/* Jeff G FF · tienda de diamantes y cuentas de Free Fire
   Una pestaña por pantalla. Paleta: negro azulado, azul diamante y naranja fuego.
   Tipos: Clash Display (títulos) y General Sans (texto). */

/* ---------- fuentes, servidas desde la propia página (sin terceros) ---------- */
@font-face { font-family: "Clash Display"; src: url("assets/fonts/clash-display-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("assets/fonts/general-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("assets/fonts/general-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("assets/fonts/general-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --bg: #070a12;
  --surface: #0e1320;
  --surface-2: #151c2d;
  --blue-field: #0f2a55;
  --blue-field-2: #143a75;
  --ink: #f2f4f8;
  --muted: #a6b0c4;
  --blue: #3fb4ff;
  --accent: #ff6a1a;
  --accent-hover: #ff8340;
  --accent-ink: #140a04;
  --live: #ff3355;

  --font-display: "Clash Display", "Arial Narrow", system-ui, sans-serif;
  --font-text: "General Sans", system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --step-head: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);
  --step-display: clamp(2.75rem, 1rem + 4.6vw, 5.5rem);

  --margin: clamp(1.25rem, 2.5vw, 2.5rem);
  --gutter: clamp(1rem, 2vw, 2.5rem);
  --bar: 72px;
  --radius: 14px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--bar); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol, ul, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
svg { display: block; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
b { font-weight: 600; }
p { max-width: 62ch; text-wrap: pretty; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.defs { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nums { font-variant-numeric: tabular-nums; }
.small { font-size: var(--step-small); }
.skip { position: absolute; left: var(--margin); top: -4rem; z-index: 30; background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; text-decoration: none; border-radius: var(--radius); }
.skip:focus { top: 0.5rem; }

/* ---------- type ---------- */
.display, h1, h2, h3, .brand { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
.display { font-size: var(--step-display); line-height: 0.95; letter-spacing: -0.02em; }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.5rem; padding: 0 1.75rem; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; border-radius: var(--radius); transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
.button-ghost { background: var(--surface-2); color: var(--ink); }
.link-plain { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-hover); }
  .button-ghost:hover { background: #1f2840; }
  .link-plain:hover { color: var(--blue); }
}

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 2rem; height: var(--bar); padding: 0 var(--margin); background: var(--bg); }
.brand { display: flex; align-items: center; gap: 0.6rem; font-size: var(--step-lead); text-decoration: none; letter-spacing: -0.01em; word-spacing: 0.18em; white-space: nowrap; }
.brand-gem { width: 34px; height: auto; }
.tabs { display: flex; gap: 0.25rem; margin-left: auto; }
.tabs + .bar-cta { margin-left: 0; }
.tab { position: relative; padding: 0.6rem 1rem; color: var(--muted); font-weight: 500; text-decoration: none; border-radius: var(--radius); transition: color var(--t-hover) ease, background-color var(--t-hover) ease; }
.tab[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--ink); } }
.bar-cta { flex: none; margin-left: auto; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.25rem; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; border-radius: var(--radius); transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.bar-cta:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .bar-cta:hover { background: var(--accent-hover); } }

/* ---------- panels ---------- */
.panel { min-height: calc(100svh - var(--bar) - 4rem); padding: clamp(1.5rem, 3vw, 3rem) var(--margin); }
.js .panel[hidden] { display: none; }

/* --- diamantes --- */
.panel-shop { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.shop-intro { grid-column: 1 / 8; display: grid; gap: 1.75rem; align-content: center; position: sticky; top: calc(var(--bar) + 2rem); align-self: start; }
.shop-intro .display { max-width: 15ch; }
.pile { width: 100%; max-width: 640px; height: auto; max-height: 42svh; }

.checkout { grid-column: 8 / 13; display: grid; gap: 0.75rem; padding: clamp(1.25rem, 2.2vw, 2rem); background: var(--surface); border-radius: var(--radius); }
.checkout-title { font-size: var(--step-lead); margin-bottom: 0.5rem; }
.packs { display: grid; gap: 8px; margin-bottom: 0.5rem; }
.pack { position: relative; display: grid; grid-template-columns: 64px 1fr auto; grid-template-rows: auto auto; column-gap: 1rem; align-items: center; min-height: 76px; padding: 0.75rem 1.1rem 0.75rem 0.75rem; background: var(--surface-2); border-radius: var(--radius); cursor: pointer; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.pack input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pack-art { grid-row: 1 / 3; width: 64px; height: auto; transition: transform 300ms var(--ease-out); }
.pack-count { align-self: end; font-weight: 500; }
.pack-count b { font-family: var(--font-display); font-size: var(--step-lead); font-weight: 600; }
.pack-unit { grid-column: 2; align-self: start; color: var(--muted); font-size: var(--step-small); }
.pack-price { grid-column: 3; grid-row: 1 / 3; font-family: var(--font-display); font-size: var(--step-lead); font-weight: 600; }
.pack:has(input:checked) { background: var(--blue-field-2); }
.pack:has(input:checked) .pack-unit { color: #cfe3ff; }
.pack:has(input:checked) .pack-art { transform: scale(1.12) rotate(-4deg); }
.pack:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.pack:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .pack:not(:has(input:checked)):hover { background: #1d2740; } }

.id-label { font-weight: 600; padding: 0; }
.id-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.verify { min-height: 3.5rem; padding: 0 1.25rem; background: var(--blue-field-2); color: var(--ink); font-weight: 600; border: 0; border-radius: var(--radius); cursor: pointer; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.verify:active { transform: scale(0.97); }
.verify:disabled { opacity: 0.6; cursor: progress; }
@media (hover: hover) and (pointer: fine) { .verify:hover { background: #1b4c96; } }
.id-status { padding: 0.75rem 1rem; border-radius: var(--radius); max-width: none; }
.id-status.is-ok { background: #0f3d2a; color: #d7f7e6; }
.id-status.is-error { background: #4a1420; color: #ffd9df; }
.id-status.is-wait { background: var(--surface-2); color: var(--muted); }
.id-status.is-ok:has(.player) { display: grid; gap: 0.35rem; }
.player { display: grid; gap: 0.1rem; padding-top: 0.25rem; }
.player-name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-lead); color: #fff; overflow-wrap: anywhere; }
.player-meta { color: #a6f0c6; font-variant-numeric: tabular-nums; }
.player-test { justify-self: start; padding: 0.15rem 0.6rem; border-radius: 999px; background: #4a3a10; color: #ffe7a6; font-size: var(--step-small); font-weight: 600; }
.confirm { display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer; }
.confirm[hidden] { display: none; }
html:not(.js) .verify { display: none; }
html:not(.js) .id-row { grid-template-columns: 1fr; }
.confirm input { flex: none; width: 1.35rem; height: 1.35rem; margin: 0.15rem 0 0; accent-color: var(--accent); cursor: pointer; }
.pay { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pay-opt { position: relative; display: flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 0.5rem; background: var(--surface-2); border-radius: var(--radius); font-weight: 600; text-align: center; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.pay-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pay-opt:has(input:checked) { background: var(--ink); color: var(--bg); }
.pay-opt:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.pay-opt:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .pay-opt:not(:has(input:checked)):hover { background: #1d2740; } }
.pay-note { color: var(--muted); }
.pay-sub { color: var(--muted); }
.button[aria-busy="true"] { cursor: progress; opacity: 0.8; }
.button[aria-disabled="true"] { background: #4a3226; color: #c9b8ad; cursor: not-allowed; }
.gate { display: none; color: var(--muted); text-align: center; }
.js .gate:not([hidden]) { display: block; }
.field { width: 100%; min-height: 3.5rem; padding: 0.7rem 1rem; background: var(--ink); color: var(--accent-ink); border: 0; border-radius: var(--radius); font-size: max(1rem, var(--step-body)); }
.field::placeholder { color: #6a7286; }
.id-help { color: var(--muted); }
.total { display: grid; gap: 0.25rem; margin-top: 0.5rem; padding: 0.9rem 1.1rem; background: var(--blue-field); border-radius: var(--radius); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; max-width: none; }
.total [data-out="price"] { white-space: nowrap; }
.total-note { color: #cfe3ff; font-size: var(--step-small); }
.total-note a { color: #9fdcff; text-underline-offset: 0.2em; }
.consents { display: grid; gap: 0.75rem; margin: 0.5rem 0; }
.confirm a, .risk a, .faq a, .nojs a { color: var(--blue); text-underline-offset: 0.2em; }
.risk { padding: 0.9rem 1.1rem; background: var(--surface); border-radius: var(--radius); max-width: 40rem; }
.checkout .button { width: 100%; }
.js .nojs { display: none; }
.nojs a { color: var(--blue); }

/* --- cuentas en vivo --- */
.panel-live { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.live-text { grid-column: 1 / 8; display: grid; gap: 1.75rem; align-content: center; }
.live-text .display { max-width: 12ch; }
.ladder { list-style: none; padding: 0; display: grid; gap: 8px; max-width: 40rem; }
.ladder li { display: grid; gap: 0.15rem; padding: 1rem 1.25rem; border-radius: var(--radius); }
.ladder li:nth-child(1) { background: var(--surface-2); margin-right: 6rem; }
.ladder li:nth-child(2) { background: var(--blue-field); margin-right: 3rem; }
.ladder li:nth-child(3) { background: var(--blue-field-2); }
.ladder b { font-family: var(--font-display); font-size: var(--step-lead); }
.ladder span { color: #d3daea; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }


/* cuentas a la venta */
.market { grid-column: 1 / 13; margin-top: 3.5rem; display: grid; gap: 1rem; }
.market-title { font-size: var(--step-head); }
.market-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.account-card { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.account-media { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--surface-2); }
.account-media img { width: 100%; height: 100%; object-fit: cover; }
.is-empty .account-media svg { width: 22%; opacity: 0.35; }
.account-body { display: grid; gap: 0.6rem; align-content: start; padding: 1.1rem 1.25rem 1.25rem; }
.account-body h4 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-lead); }
.account-body p { color: var(--muted); }
.account-body .button { justify-self: start; min-height: 3rem; }

.phone { grid-column: 8 / 13; justify-self: center; width: min(320px, 100%); aspect-ratio: 9 / 18.5; padding: 12px; background: #1b2232; border-radius: 44px; }
.phone-screen { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem; background: var(--blue-field); border-radius: 34px; text-align: center; position: relative; }
.phone-live { position: absolute; top: 1.25rem; left: 1.25rem; display: flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: var(--step-small); }
.dot { width: 10px; height: 10px; background: var(--live); border-radius: 50%; }
.phone-gem { width: 70%; height: auto; }
.phone-handle { font-family: var(--font-display); font-size: var(--step-head); font-weight: 600; }
.phone-line { color: #cfe3ff; }

/* --- cómo comprar --- */
.panel-how { display: grid; gap: 2rem; align-content: center; }
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.track { display: grid; gap: 1.5rem; align-content: start; padding: clamp(1.5rem, 3vw, 2.75rem); border-radius: var(--radius); }
.track-gems { background: var(--blue-field); }
.track-accounts { background: var(--surface); }
.track h3 { font-size: var(--step-head); }
.track ol { display: grid; gap: 1rem; padding-left: 1.75rem; }
.track li { padding-left: 0.5rem; }
.track li::marker { font-family: var(--font-display); font-weight: 600; color: var(--blue); }
.track .button { justify-self: start; }

/* --- preguntas --- */
.panel-help { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2rem; align-content: center; }
.panel-help .display { grid-column: 1 / 13; }
.faq { grid-column: 1 / 9; columns: 2; column-gap: 3rem; }
.faq p { break-inside: avoid; margin-bottom: 1.25rem; }
.faq b { color: var(--ink); }
.contact { grid-column: 9 / 13; align-self: start; display: grid; gap: 1rem; padding: clamp(1.5rem, 2.5vw, 2.25rem); background: var(--blue-field); border-radius: var(--radius); }
.contact h3 { font-size: var(--step-lead); }
.contact-big { font-family: var(--font-display); font-size: var(--step-lead); font-weight: 600; text-decoration: none; line-height: 1.1; white-space: nowrap; transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .contact-big:hover { color: var(--accent); } }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* ---------- footer and dock ---------- */
.foot { display: grid; gap: 1rem; padding: 2rem var(--margin) 2rem; color: var(--muted); background: var(--surface); }
.foot p { max-width: 70ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: var(--step-body); }
.foot-links a, .foot-btn { color: var(--ink); padding: 0.4rem 0; text-underline-offset: 0.2em; }
.foot-btn { background: none; border: 0; text-decoration: underline; cursor: pointer; font: inherit; }
@media (hover: hover) and (pointer: fine) { .foot-links a:hover, .foot-btn:hover { color: var(--blue); } }
.biz { color: var(--ink); }
.pack-price { display: grid; justify-items: end; }
.usd { font-family: var(--font-text); font-size: var(--step-small); font-weight: 500; color: var(--muted); }
.pack:has(input:checked) .usd { color: #cfe3ff; }

/* ---------- aviso de cookies ---------- */
.consent { position: fixed; z-index: 40; left: var(--margin); bottom: var(--margin); width: min(26rem, calc(100% - 2 * var(--margin))); display: grid; gap: 0.75rem; padding: 1.25rem; background: #1c2740; border-radius: var(--radius); }
.consent[hidden] { display: none; }
.consent-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-lead); }
.consent a { color: var(--blue); }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.consent .button { min-height: 3rem; background: var(--blue-field-2); }
@media (hover: hover) and (pointer: fine) { .consent .button:hover { background: #1b4c96; } }

/* ---------- páginas legales ---------- */
.legal-page { max-width: 48rem; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--margin) 4rem; }
.legal-page h1 { font-size: var(--step-head); line-height: 1.05; margin-bottom: 0.5rem; }
.legal-page h2 { font-size: var(--step-lead); margin: 2.25rem 0 0.75rem; }
.legal-page p, .legal-page li { color: #d9deea; }
.legal-page p + p { margin-top: 0.75rem; }
.legal-page ul, .legal-page ol { padding-left: 1.4rem; display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.legal-page a { color: var(--blue); text-underline-offset: 0.2em; }
.legal-page a.button { color: var(--accent-ink); text-decoration: none; }
.legal-page .updated { color: var(--muted); }
.legal-page .back { display: inline-block; margin-top: 2.5rem; }

/* ---------- resultado del pago ---------- */
.result { display: grid; gap: 1.5rem; align-content: start; min-height: 60svh; }
.result .lead { color: var(--ink); max-width: 40ch; }
.result[data-state="approved"] h1 { color: #7ef0b0; }
.result[data-state="rejected"] h1 { color: #ff9aa9; }
.receipt { display: grid; gap: 8px; margin: 0; }
.receipt div[hidden] { display: none; }
.receipt div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem; background: var(--surface); border-radius: var(--radius); }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }
.result .actions .button-ghost[hidden] { display: none; }
.result .muted { color: var(--muted); }
.dock { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 64rem) {
  .tabs { display: none; }
  .bar { justify-content: space-between; }
  .consent { bottom: calc(76px + var(--margin)); }
  .legal-page ~ .consent { bottom: var(--margin); }
  .foot { padding-bottom: 5.5rem; }
  .dock { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--surface); padding: 6px 16px calc(6px + env(safe-area-inset-bottom)); }
  .dock a { display: flex; align-items: center; justify-content: center; min-height: 52px; color: var(--muted); font-size: var(--step-small); font-weight: 600; border-radius: var(--radius); text-decoration: none; transition: color var(--t-hover) ease; }
  .dock a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
  .shop-intro, .checkout, .live-text, .phone { grid-column: 1 / 13; }
  .shop-intro { position: static; }
  .checkout { margin-top: 2rem; }
  .phone { margin-top: 3rem; width: min(280px, 80%); }
  .faq, .contact { grid-column: 1 / 13; }
}

/* ---------- phone ---------- */
@media (max-width: 47.99rem) {
  :root { --bar: 60px; }
  .panel { min-height: 0; padding-bottom: 2.5rem; }
  .pile { max-height: none; }
  .market-grid { grid-template-columns: 1fr; }
  .pack { grid-template-columns: 52px 1fr auto; min-height: 80px; }
  .pack-art { width: 52px; }
  .ladder li:nth-child(1) { margin-right: 2rem; }
  .ladder li:nth-child(2) { margin-right: 1rem; }
  .actions .button { width: 100%; }
  .tracks { grid-template-columns: 1fr; }
  .faq { columns: 1; }
  .consent { left: 12px; right: 12px; width: auto; bottom: 76px; gap: 0.5rem; padding: 1rem; }
  .legal-page ~ .consent { bottom: 12px; }
  .consent-title { display: none; }
  .consent .button { min-height: 2.75rem; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .panel:not([hidden]) [data-rise] { opacity: 0; transform: translateY(22px); animation: rise 800ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  .float { animation: float 6s ease-in-out infinite alternate; }
  .f2 { animation-duration: 7s; animation-delay: -2s; }
  .f3 { animation-duration: 5.5s; animation-delay: -1s; }
  .f4 { animation-duration: 8s; animation-delay: -3s; }
  .f5 { animation-duration: 6.5s; animation-delay: -4s; }
  .dot { animation: pulse 1.4s ease-in-out infinite alternate; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-12px); } }
@keyframes pulse { to { opacity: 0.35; } }
