/* =============================================================
   ConsolaLista · styles.css
   1. Tokens  2. Reset  3. Utilidades  4. Tipografía  5. Chrome
   6. Componentes  7. Herramientas  8. Contenido/FAQ  9. Responsive
   10. Reduced-motion
   Tema oscuro por defecto (público gaming), claro opcional.
   ============================================================= */

/* ============ 1. Tokens ============ */
:root {
  --bg: #0b0714;
  --bg-2: #120b1f;
  --surface: #171029;
  --surface-2: #1f1636;
  --ink: #f4f0ff;
  --ink-soft: #b9aed4;
  --ink-faint: #8579a6;
  --border: #2b2043;
  --border-strong: #3d2f5c;
  --accent: #ff3d8b;
  --accent-2: #7b2ff7;
  --accent-ink: #ff6ba6;
  --accent-soft: #24152e;
  --cyan: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.5);
  --shadow-glow: 0 0 0 1px rgba(255,61,139,.18), 0 12px 40px rgba(123,47,247,.22);
  --radius: 16px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 28px);
  --maxw: 1080px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.16,1,.3,1);
}

/* ============ 2. Reset ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; overscroll-behavior-y: none;
  background-image:
    radial-gradient(60rem 30rem at 80% -10%, rgba(123,47,247,.20), transparent 60%),
    radial-gradient(45rem 25rem at 0% 0%, rgba(255,61,139,.13), transparent 60%);
  background-attachment: fixed;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.1; letter-spacing: -0.025em; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ============ 3. Utilidades ============ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--accent); color: #fff; z-index: 9999; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ============ 4. Tipografía ============ */
h1, .h1 { font-size: clamp(1.75rem, 5vw, 2.7rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.3rem, 3.2vw, 1.85rem); font-weight: 750; margin-top: 2.2em; }
h3 { font-size: 1.12rem; font-weight: 700; }
.lead { font-size: clamp(1.02rem, 2.4vw, 1.18rem); color: var(--ink-soft); }
.grad { background: linear-gradient(100deg, var(--accent), var(--accent-2) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prose p { margin: 0 0 1em; }
.prose h2, .prose h3 { margin-bottom: .5em; }
.prose ul, .prose ol { margin: 0 0 1em 1.2em; }
.prose li { margin: .35em 0; }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .94rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .55em .7em; text-align: left; }
.prose th { background: var(--surface-2); color: var(--ink); font-weight: 700; }
.table-wrap { overflow-x: auto; }

/* ============ 5. Cabecera / pie ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.site-header__row { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.brand__logo { width: 28px; height: 28px; flex: none; border-radius: 7px; }
.brand b { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 2px; list-style: none; flex-wrap: wrap; }
.nav a { display: block; padding: 8px 10px; border-radius: 8px; font-size: .88rem; font-weight: 550; color: var(--ink-soft); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.nav-toggle { display: none; margin-left: auto; padding: 8px; border-radius: 8px; }
.nav-toggle svg { width: 24px; height: 24px; }

.site-footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--bg-2); }
.site-footer .container { padding-top: 40px; padding-bottom: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 7px; }
.site-footer a { color: var(--ink-soft); font-size: .92rem; }
.site-footer a:hover { color: var(--accent-ink); }
.footer-legal { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.footer-disclaimer { margin-top: 14px; font-size: .78rem; color: var(--ink-faint); line-height: 1.5; }

/* ============ 6. Componentes ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 650; background: var(--surface-2); color: var(--ink); transition: background .2s var(--ease), transform .1s var(--ease), border-color .2s var(--ease); border: 1px solid var(--border-strong); }
.btn:hover { background: var(--border); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.btn--primary:hover { filter: brightness(1.1); border-color: transparent; }
.btn--lg { padding: 15px 26px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn svg { width: 20px; height: 20px; }

.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: .8rem; font-weight: 650; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--border-strong); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

label { font-weight: 600; font-size: .88rem; color: var(--ink-soft); display: block; margin-bottom: 6px; }
.field { margin-bottom: 15px; }
input[type=text], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: 12px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg-2); color: var(--ink); transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,61,139,.15); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.hint { font-size: .81rem; color: var(--ink-faint); margin-top: 5px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* segmented control */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; margin: 0; font-size: .89rem; color: var(--ink-soft); font-weight: 600; transition: all .15s var(--ease); }
.seg input { width: auto; position: absolute; opacity: 0; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

/* Ad slots (vacíos) */
.ad-slot { margin: 30px auto; min-height: 100px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--ink-faint); font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; background: var(--bg-2); }

/* Avisos */
.callout { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-strong); margin: 20px 0; }
.callout strong { color: var(--accent-ink); }
.note-est { display: flex; gap: 10px; padding: 12px 15px; border-radius: var(--radius-sm); background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.28); color: #f5d68a; font-size: .87rem; margin: 14px 0; }
.note-est svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.disclosure { font-size: .8rem; color: var(--ink-faint); padding: 10px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); margin: 16px 0; }

/* ============ 7. Herramientas ============ */
.hero { padding: clamp(26px, 5vw, 46px) 0 10px; }
.hero h1 { margin-bottom: 12px; }
.page-hero { padding: clamp(28px,5vw,50px) 0 8px; }
.tool-wrap { padding-bottom: 8px; }
.tool-card { padding: clamp(18px, 3vw, 28px); }

.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 750; margin: 24px 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.section-title:first-child { margin-top: 0; }

/* Resultado grande */
.result-box { margin-top: 20px; padding: 22px; border-radius: var(--radius); background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border-strong); text-align: center; }
.result-box[data-estado="cabe"] { border-color: rgba(52,211,153,.45); box-shadow: 0 0 0 1px rgba(52,211,153,.14), 0 10px 40px rgba(52,211,153,.10); }
.result-box[data-estado="justo"] { border-color: rgba(251,191,36,.45); box-shadow: 0 0 0 1px rgba(251,191,36,.14), 0 10px 40px rgba(251,191,36,.10); }
.result-box[data-estado="no-cabe"] { border-color: rgba(251,113,133,.45); box-shadow: 0 0 0 1px rgba(251,113,133,.14), 0 10px 40px rgba(251,113,133,.10); }
.result-verdict { font-size: clamp(1.5rem, 5.2vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.result-box[data-estado="cabe"] .result-verdict { color: var(--ok); }
.result-box[data-estado="justo"] .result-verdict { color: var(--warn); }
.result-box[data-estado="no-cabe"] .result-verdict { color: var(--danger); }
.result-big { font-size: clamp(1.9rem, 6.5vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; background: linear-gradient(100deg, var(--accent), var(--accent-2) 75%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-label { font-size: .88rem; color: var(--ink-soft); margin-top: 8px; }
.result-sub { font-size: .96rem; color: var(--ink-soft); margin-top: 8px; }

/* barra de ocupación */
.bar { height: 30px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border-strong); overflow: hidden; display: flex; margin-top: 16px; }
.bar__seg { height: 100%; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; color: #fff; white-space: nowrap; transition: width .35s var(--ease); overflow: hidden; }
.bar__usado { background: linear-gradient(90deg, #4b3a6b, #5b4780); }
.bar__juego { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar__libre { background: transparent; color: var(--ink-faint); }
.bar-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: .8rem; color: var(--ink-soft); }
.bar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bar-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.breakdown { margin-top: 16px; padding: 15px 17px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); }
.breakdown .row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .93rem; color: var(--ink-soft); }
.breakdown .row b { color: var(--ink); font-weight: 650; }
.breakdown .row--total { border-top: 1px solid var(--border-strong); margin-top: 8px; padding-top: 12px; font-size: 1.05rem; }
.breakdown .row--total b { color: var(--accent-ink); font-size: 1.2rem; }

/* cuenta atrás */
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 6px; }
.count__box { background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 14px 6px; text-align: center; }
.count__n { font-family: var(--mono); font-size: clamp(1.5rem, 6vw, 2.6rem); font-weight: 700; line-height: 1; background: linear-gradient(100deg, var(--accent), var(--accent-2) 75%); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.count__l { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-faint); margin-top: 7px; font-weight: 650; }

/* recomendación */
.reco { margin-top: 16px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid var(--border-strong); }
.reco h3 { margin-bottom: 6px; color: var(--accent-ink); font-size: 1.02rem; }
.reco p { font-size: .93rem; color: var(--ink-soft); margin: 0 0 .5em; }
.reco ul { margin: 6px 0 0 1.1em; font-size: .92rem; color: var(--ink-soft); }
.reco li { margin: .3em 0; }

/* tarjetas comparativa */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px,1fr)); gap: 14px; margin-top: 18px; }
.cmp { padding: 18px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); position: relative; }
.cmp--win { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.cmp__tag { position: absolute; top: -10px; left: 16px; font-size: .68rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: #fff; }
.cmp h3 { font-size: 1.02rem; margin-bottom: 4px; }
.cmp__price { font-size: 1.35rem; font-weight: 800; color: var(--accent-ink); margin: 6px 0 10px; }
.cmp ul { list-style: none; display: grid; gap: 6px; font-size: .87rem; color: var(--ink-soft); }
.cmp li { display: flex; gap: 7px; align-items: flex-start; }
.cmp li::before { content: "·"; color: var(--accent); font-weight: 800; }

.noscript-msg { padding: 14px; border-radius: var(--radius-sm); background: rgba(251,191,36,.09); color: #f5d68a; border: 1px solid rgba(251,191,36,.3); margin-bottom: 16px; }

/* ============ 8. Contenido SEO / FAQ ============ */
.content-section { padding-top: 10px; }
.example-box { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); margin: 18px 0; }
.example-box .example-tag { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 750; margin-bottom: 8px; }

.faq { display: grid; gap: 10px; margin-top: 16px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq summary { padding: 15px 18px; font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); font-weight: 400; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 18px 16px; color: var(--ink-soft); }
.faq details > div p { margin: 0 0 .6em; }

.more-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 14px; margin-top: 18px; }
.tool-link { display: block; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease); }
.tool-link:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.tool-link__t { display: block; font-weight: 700; margin-bottom: 3px; }
.tool-link__d { display: block; font-size: .86rem; color: var(--ink-soft); }

/* ============ 9. Responsive ============ */
@media (max-width: 900px) {
  .nav { position: fixed; inset: 62px 0 auto 0; background: var(--bg-2); border-bottom: 1px solid var(--border); transform: translateY(-120%); transition: transform .25s var(--ease); box-shadow: var(--shadow); }
  .nav.is-open { transform: translateY(0); }
  .nav ul { flex-direction: column; padding: 12px var(--gutter) 18px; gap: 2px; }
  .nav a { padding: 12px; }
  .nav-toggle { display: grid; place-items: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .count { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .count__box { padding: 11px 3px; }
}

/* ============ 10. Reduced-motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
