/* =========================================================================
   FireTV — hoja de estilos principal
   Dirección: «colour chapters». Cada sección es un campo de color plano a sangre,
   una sola familia tipográfica (Bricolage Grotesque, autoalojada) y una sola retícula.
   Sin degradados, sin sombras en reposo, sin líneas finas, sin etiquetas sobre los títulos.
   ========================================================================= */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  /* Campos de color (marca: carbón y naranja llama) */
  --charcoal: #111114;
  --ink: #111114;
  --flame: #ff5b1a;
  --flame-strong: #ff7a3d;
  --bone: #ecebe8;
  --bone-2: #dfddd8;
  --ember: #5c1608;
  --signal: #ffc21a;
  --paper: #ffffff;

  /* Tipografía: cinco pasos */
  --font: "Bricolage", "Segoe UI", Roboto, system-ui, sans-serif;
  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-display: clamp(2.875rem, 6.4vw + 0.4rem, 6.5rem);

  /* Retícula */
  --m: clamp(16px, 3.2vw, 48px);
  --gap: clamp(12px, 1.6vw, 24px);
  --radius: 0;

  /* Movimiento */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;

  /* Alias usados por el panel (panel.css) */
  --bg: #0c0c0f; --bg-2: #141418; --surface: #18181d; --surface-2: #202026;
  --line: #2c2c34; --line-soft: #222229;
  --text: #f2f1ee; --text-2: #c9c6c0; --text-3: #9a968f;
  --orange: var(--flame); --orange-2: var(--flame-strong); --orange-3: #ffae80; --orange-deep: #e2470c;
  --ok: #4ade80; --warn: #fbbf24; --danger: #f87171;
  --radius-sm: 8px; --shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--charcoal); color: var(--paper);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
strong { font-weight: 800; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; word-break: break-all; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
::selection { background: var(--flame); color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--m); top: -80px; z-index: 100; background: var(--signal); color: var(--ink); padding: 12px 16px; font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 12px; }
.wrap { padding-left: var(--m); padding-right: var(--m); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.icon { width: 1.2em; height: 1.2em; flex: none; }
mark.pending { background: var(--signal); color: var(--ink); padding: 0 4px; }

/* ------------------------------ Botones ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 0;
  font: inherit; font-size: var(--step-body); font-weight: 800; letter-spacing: -0.01em; line-height: 1.1;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--flame); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: inherit; border: 2px solid currentColor; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }
.btn-lg { min-height: 64px; padding: 0 32px; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--flame-strong); color: var(--ink); }
  .btn-ink:hover { background: #2a2a30; color: var(--paper); }
  .btn-ghost:hover { background: currentColor; }
  .btn-ghost:hover > * { color: var(--charcoal); }
  a:hover { text-decoration-thickness: 0.12em; }
}
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }

/* ------------------------------ Cabecera ----------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--charcoal); color: var(--paper); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; margin-right: auto; }
.logo-mark { width: 34px; height: 34px; }
.brand-word { font-weight: 800; font-size: var(--step-lead); letter-spacing: -0.04em; line-height: 1; }
.brand-word span { color: var(--flame); }
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-weight: 500; }
.main-nav a:hover { text-decoration: underline; }
.main-nav { display: none; }
.nav-toggle { display: none; }
@media (min-width: 860px) { .main-nav { display: block; } }

/* ------------------------------ Héroe -------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--charcoal); color: var(--paper); min-height: calc(100svh - 72px); display: flex; align-items: center; }
.hero-shape { position: absolute; width: 120vh; height: 120vh; left: 78%; top: 55%; transform: translate(-50%, -50%); color: var(--flame); pointer-events: none; }
.hero-shape svg { width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; width: 100%; padding-top: 48px; padding-bottom: 48px; }
.hero-copy { grid-column: 1 / span 6; padding-left: 4%; }
.hero h1 { font-size: var(--step-display); letter-spacing: -0.04em; line-height: 0.9; max-width: 9ch; }
.hero-lead { margin: 40px 0 32px; font-size: var(--step-body); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.hero-facts { margin: 24px 0 0; font-size: var(--step-small); color: #d8d5cf; }
.hero-screen { position: absolute; z-index: 2; left: 72%; top: 50%; transform: translate(-50%, -50%); width: 340px; }
.notice { display: flex; gap: 12px; margin-top: 28px; max-width: 44ch; padding: 16px 18px; background: #222228; color: var(--paper); font-size: var(--step-small); line-height: 1.45; }
.notice p { margin: 0 0 .6em; } .notice p:last-child { margin: 0; }
.notice > .icon { margin-top: 2px; color: var(--signal); }
.notice .btn { margin-top: 10px; }

@media (max-width: 859px) {
  :root { --step-display: 11.5vw; --step-head: 11.5vw; }
  .hero { display: block; min-height: 0; padding-bottom: 0; }
  .hero-inner { padding-top: 15svh; padding-bottom: 0; }
  .hero-copy { grid-column: 1 / -1; padding-left: 0; }
  .hero h1 { font-size: var(--step-display); }
  .hero-lead { margin: 28px 0 24px; }
  .hero-actions .btn { width: 100%; }
  .hero-stage { position: relative; height: 150vw; margin-top: 40px; overflow: hidden; }
  .hero-shape { width: 130vw; height: 130vw; left: 50%; top: 0; transform: translate(-50%, 0); }
  .hero-screen { left: 50%; top: 36vw; transform: translateX(-50%); width: min(270px, 70vw); }
}
@media (min-width: 860px) { .hero-stage { position: static; } }

/* --------------------- Fragmentos de interfaz (data-ui) --------------------- */
/* Dentro de un fragmento rigen las convenciones de la propia app. */
[data-ui] { font-family: var(--font); color: #f2f1ee; letter-spacing: 0; line-height: 1.3; }
[data-ui].app { background: #17171b; border-radius: 22px; padding: 18px 16px 14px; }
[data-ui] .app-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
[data-ui] .app-bar svg { width: 24px; height: 24px; }
[data-ui] .app-bar b { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
[data-ui] .app-bar b span { color: var(--flame); }
[data-ui] .app-bar .app-search { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: #26262d; }
[data-ui] .chips { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: nowrap; overflow: hidden; }
[data-ui] .chips span { flex: none; font-size: 12px; padding: 5px 10px; border-radius: 99px; background: #24242a; color: #cfcbc4; }
[data-ui] .chips .on { background: var(--flame); color: #111114; font-weight: 700; }
[data-ui] .feature { position: relative; height: 150px; border-radius: 14px; background: var(--ember); overflow: hidden; margin-bottom: 14px; }
[data-ui] .feature .pitch { position: absolute; inset: 22px 26px -40px; border: 2px solid rgba(255, 255, 255, .22); border-radius: 50% 50% 0 0 / 34% 34% 0 0; }
[data-ui] .feature .pitch::after { content: ""; position: absolute; left: 50%; top: 22%; width: 40px; height: 40px; margin-left: -20px; border: 2px solid rgba(255, 255, 255, .22); border-radius: 50%; }
[data-ui] .feature .meta { position: absolute; left: 14px; bottom: 12px; }
[data-ui] .feature .meta b { display: block; font-size: 16px; font-weight: 800; }
[data-ui] .feature .meta small { font-size: 12px; color: #ffd9c7; }
[data-ui] .feature .live { position: absolute; top: 12px; left: 14px; font-size: 11px; font-weight: 700; color: #111114; background: var(--signal); padding: 3px 7px; border-radius: 4px; }
[data-ui] .feature .play { position: absolute; right: 14px; bottom: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--flame); }
[data-ui] .feature .play::after { content: ""; position: absolute; left: 14px; top: 11px; border-left: 11px solid #111114; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
[data-ui] .row-title { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin: 0 0 8px; }
[data-ui] .row-title small { font-weight: 400; color: #a9a59e; }
[data-ui] .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
[data-ui] .tile { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; }
[data-ui] .tile.tall { aspect-ratio: 2 / 3; }
[data-ui] .tile i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--flame); }
[data-ui] .tile em { position: absolute; left: 7px; bottom: 7px; font-style: normal; font-size: 10px; font-weight: 700; color: #fff; }
[data-ui] .c1 { background: #3a2316; } [data-ui] .c2 { background: #1f2f3d; } [data-ui] .c3 { background: #33213a; }
[data-ui] .c4 { background: #5c1608; } [data-ui] .c5 { background: #173430; } [data-ui] .c6 { background: #3d3418; }
[data-ui] .w62 { width: 62%; } [data-ui] .w35 { width: 35%; } [data-ui] .w80 { width: 80%; }
[data-ui] .tabbar { display: flex; justify-content: space-around; padding-top: 10px; margin-top: 2px; border-top: 1px solid #26262d; font-size: 10px; color: #8f8b84; }
[data-ui] .tabbar span { display: grid; justify-items: center; gap: 4px; }
[data-ui] .tabbar span::before { content: ""; width: 18px; height: 18px; border-radius: 5px; background: #2b2b33; }
[data-ui] .tabbar .on { color: var(--flame); }
[data-ui] .tabbar .on::before { background: var(--flame); }

/* Lista de contenidos (escaparate) */
[data-ui].panel-ui { background: var(--paper); color: #17171b; border-radius: 18px; padding: 20px; width: 100%; max-width: 500px; }
[data-ui].panel-ui .p-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
[data-ui].panel-ui .p-head b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
[data-ui].panel-ui .p-head small { font-size: 13px; color: #6b6862; }
[data-ui].panel-ui ul { list-style: none; margin: 0; padding: 0; }
[data-ui].panel-ui li { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px; padding: 10px; border-radius: 12px; }
[data-ui].panel-ui li + li { margin-top: 2px; }
[data-ui].panel-ui li.sel { background: #f1efeb; }
[data-ui].panel-ui .thumb { height: 44px; border-radius: 8px; }
[data-ui].panel-ui .t b { display: block; font-size: 15px; font-weight: 700; }
[data-ui].panel-ui .t small { font-size: 13px; color: #6b6862; }
[data-ui].panel-ui .go { font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 8px; background: #17171b; color: #fff; }
[data-ui].panel-ui li:not(.sel) .go { background: #e6e3de; color: #17171b; }
[data-ui].panel-ui .k1 { background: #5c1608; } [data-ui].panel-ui .k2 { background: #ff5b1a; } [data-ui].panel-ui .k3 { background: #1f2f3d; } [data-ui].panel-ui .k4 { background: #ffc21a; } [data-ui].panel-ui .k5 { background: #173430; }

/* Ajustes de Android (permiso) */
[data-ui].settings { background: #f7f6f3; color: #17171b; border-radius: 18px; padding: 18px; max-width: 420px; }
[data-ui].settings .s-bar { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
[data-ui].settings .s-sub { font-size: 13px; color: #6b6862; margin-bottom: 16px; }
[data-ui].settings .s-app { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: #fff; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
[data-ui].settings .s-app svg { width: 32px; height: 32px; flex: none; }
[data-ui].settings .s-app i { width: 32px; height: 32px; border-radius: 50%; background: #e7e4df; }
[data-ui].settings .s-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 12px; border-radius: 12px; background: #fff; font-size: 15px; }
[data-ui].settings .switch { width: 44px; height: 26px; border-radius: 99px; background: var(--flame); position: relative; flex: none; }
[data-ui].settings .switch::after { content: ""; position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
[data-ui].settings .s-note { font-size: 12px; color: #6b6862; margin-top: 12px; }

/* --------------------------- Capítulos ------------------------------ */
.chapter { position: relative; }
.field-charcoal { background: var(--charcoal); color: var(--paper); }
.field-flame { background: var(--flame); color: var(--ink); }
.field-bone { background: var(--bone); color: var(--ink); }
.field-bone-2 { background: var(--bone-2); color: var(--ink); }
.field-ember { background: var(--ember); color: var(--bone); }
.field-signal { background: var(--signal); color: var(--ink); }

/* Escaparate: mitad entrada / mitad salida */
.showcase { display: grid; grid-template-columns: 1fr 1fr; min-height: 90svh; }
.showcase-in, .showcase-out { position: relative; padding: 18svh var(--m) 140px; }
.showcase-in { background: var(--charcoal); color: var(--paper); }
.showcase-out { background: var(--bone); color: var(--ink); display: flex; justify-content: flex-start; align-items: flex-start; }
.showcase-in p { max-width: 34ch; font-size: var(--step-body); margin-bottom: 28px; }
.picker { display: grid; gap: 4px; max-width: 420px; }
.picker button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; width: 100%;
  padding: 14px 0; background: none; border: 0; color: #8c8983; font: inherit; font-size: var(--step-lead); font-weight: 800; letter-spacing: -0.03em; text-align: left; cursor: pointer;
  transition: color var(--t-hover) ease;
}
.picker button small { font-size: var(--step-small); font-weight: 400; letter-spacing: 0; }
.picker button[aria-pressed="true"] { color: var(--paper); }
.picker button[aria-pressed="true"] small { color: var(--flame); }
@media (hover: hover) { .picker button:hover { color: var(--paper); } }
.d0 { --i: 0; } .d1 { --i: 1; } .d2 { --i: 2; } .d3 { --i: 3; } .d4 { --i: 4; } .d5 { --i: 5; } .d6 { --i: 6; }
.split-head { font-weight: 800; letter-spacing: -0.04em; margin: 0; position: absolute; bottom: 40px; font-size: var(--step-head); line-height: 0.9; }
.showcase-in .split-head { left: var(--m); }
.showcase-out .split-head { left: var(--m); }
.panel-stack { width: 100%; max-width: 500px; }

@media (max-width: 859px) {
  .showcase { grid-template-columns: 1fr; min-height: 0; }
  .showcase-in { padding: 72px var(--m) 120px; }
  .showcase-out { padding: 104px var(--m) 72px; }
  .split-head { font-size: var(--step-display); bottom: auto; }
  .showcase-in .split-head { bottom: 28px; }
  .showcase-out .split-head { top: 28px; }
}

/* Instalación: las etapas como una barra */
.install { padding: 140px var(--m) 140px; min-height: 90svh; }
.install h2 { font-size: var(--step-display); max-width: 11ch; margin-bottom: 64px; }
.stages { display: flex; gap: 6px; }
.stage { min-width: 12%; }
.stage .bar { margin: 0; height: 22vh; min-height: 140px; padding: 20px; font-size: var(--step-lead); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.install [data-ui] { color: inherit; }
.stage p { color: var(--ink); }
.stage p { margin: 16px 0 0; max-width: 22ch; font-size: var(--step-body); padding-right: 12px; }
.stage strong { font-weight: 800; }
.stage:nth-child(1) { flex: 3; } .stage:nth-child(1) .bar { background: var(--charcoal); color: var(--paper); }
.stage:nth-child(2) { flex: 1.4; } .stage:nth-child(2) .bar { background: var(--bone); color: var(--ink); }
.stage:nth-child(3) { flex: 2; } .stage:nth-child(3) .bar { background: var(--signal); color: var(--ink); }
.stage:nth-child(4) { flex: 2.4; } .stage:nth-child(4) .bar { background: var(--ember); color: var(--bone); }
.install-more { margin-top: 64px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
@media (max-width: 859px) {
  .install { padding: 88px var(--m); min-height: 0; }
  .install h2 { margin-bottom: 40px; }
  .stages { flex-direction: column; }
  .stage .bar { height: auto; min-height: 72px; padding: 16px; }
  .stage:nth-child(1) .bar { min-height: 150px; } .stage:nth-child(2) .bar { min-height: 80px; }
  .stage:nth-child(3) .bar { min-height: 100px; } .stage:nth-child(4) .bar { min-height: 120px; }
  .stage p { margin: 10px 0 18px; }
}

/* Requisitos: un elemento por línea de cartel */
.needs { padding: 100px var(--m) 100px; }
.needs h2 { font-size: var(--step-lead); letter-spacing: -0.02em; margin-bottom: 40px; }
.poster { list-style: none; margin: 0; padding: 0; }
.poster li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; font-size: var(--step-display); font-weight: 800; letter-spacing: -0.04em; line-height: 0.92; text-transform: lowercase; transition: color var(--t-hover) ease; }
.poster li > span:last-child { font-size: var(--step-lead); font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1.3; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (hover: hover) { .poster li:hover { color: var(--flame); } }
.needs-note { margin-top: 56px; max-width: 60ch; }

@media (max-width: 859px) {
  .needs { padding: 80px var(--m); }
  .poster li { padding: 4px 0; flex-wrap: wrap; column-gap: 12px; font-size: 10.5vw; }
  .poster li > span:last-child { white-space: normal; }
}

/* Iconos */
.poster .pi { display: inline-flex; align-items: center; gap: 0.22em; white-space: nowrap; }
.poster-i { width: 0.62em; height: 0.62em; stroke-width: 2.2; color: var(--flame); flex: none; }
.hero-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { color: var(--flame); width: 20px; height: 20px; }
.pk-l { display: inline-flex; align-items: center; gap: 14px; }
.pk-i { width: 1.1em; height: 1.1em; stroke-width: 2; }
.picker button[aria-pressed="true"] .pk-i { color: var(--flame); }
.bar { display: flex; flex-direction: column; justify-content: space-between; }
.bar-i { width: 36px; height: 36px; stroke-width: 2; order: 2; }
.faq-band h3 { display: flex; gap: 14px; align-items: flex-start; }
.faq-i { width: 1.15em; height: 1.15em; color: var(--flame); stroke-width: 2.2; flex: none; margin-top: 0.05em; }
[data-ui].panel-ui .p-img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }

/* Preguntas: una banda por pregunta */
.faq-head { min-height: 40svh; display: flex; align-items: flex-end; padding: 56px var(--m); }
.faq-head h2 { font-size: var(--step-display); }
.faq-band { padding: 56px var(--m); }
.faq-band:nth-of-type(odd) { background: var(--bone); color: var(--ink); }
.faq-band:nth-of-type(even) { background: var(--bone-2); color: var(--ink); }
.faq-band h3 { grid-column: 1 / span 5; font-size: var(--step-lead); letter-spacing: -0.025em; line-height: 1.1; }
.faq-band .answer { grid-column: 7 / span 6; }
.faq-band .answer p:last-child { margin-bottom: 0; }
.faq-band .answer [data-ui] { margin-top: 24px; }
@media (max-width: 859px) {
  .faq-head { min-height: 30svh; padding: 32px var(--m); }
  .faq-band { padding: 32px var(--m); }
  .faq-band h3, .faq-band .answer { grid-column: 1 / -1; }
  .faq-band h3 { margin-bottom: 12px; }
}

/* Pie de tablero */
.site-footer { background: var(--charcoal); color: var(--paper); padding: 10px; }
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
.tile-f { padding: 24px; min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.tile-f p { margin: 0; }
.tile-f ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tile-f a { text-decoration: none; } .tile-f a:hover { text-decoration: underline; }
.t-statement { grid-column: 1 / span 4; background: #1d1d22; }
.t-statement .big { font-size: var(--step-lead); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.t-statement .legal { font-size: var(--step-small); color: #d0cdc7; }
.t-nav { grid-column: 5 / span 3; background: #1d1d22; }
.t-version { grid-column: 8 / span 2; background: var(--bone); color: var(--ink); }
.t-version b { font-size: var(--step-lead); font-weight: 800; letter-spacing: -0.02em; }
.t-mail { grid-column: 10 / span 3; background: #1d1d22; }
.t-mail a { font-size: var(--step-lead); font-weight: 800; letter-spacing: -0.02em; word-break: break-word; }
.t-word { grid-column: 1 / span 8; min-height: 320px; background: var(--ink); justify-content: center; align-items: center; outline: 0; }
.t-word .wordmark { font-size: var(--step-display); font-weight: 800; letter-spacing: -0.05em; line-height: 0.85; }
.t-word .wordmark span { color: var(--flame); }
.t-cta { grid-column: 9 / span 4; min-height: 320px; background: var(--flame); color: var(--ink); text-decoration: none; }
.t-cta b { font-size: var(--step-lead); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.t-cta svg { align-self: flex-end; width: 64px; height: 64px; transition: transform var(--t-hover) var(--ease-out); }
@media (hover: hover) { .t-cta:hover svg { transform: translate(6px, -6px); } .t-cta:hover { background: var(--flame-strong); } }
.footer-label { font-size: var(--step-small); color: #b9b5ae; margin-bottom: 8px; }
.t-version .footer-label { color: #45423d; }
@media (max-width: 859px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 6px; }
  .tile-f { min-height: 0; padding: 20px; }
  .t-word { grid-column: 1 / -1; order: 1; min-height: 160px; }
  .t-word .wordmark { font-size: var(--step-display); }
  .t-cta { grid-column: 1 / -1; order: 2; min-height: 180px; }
  .t-nav { grid-column: 1; order: 3; } .t-version { grid-column: 2; order: 4; }
  .t-mail { grid-column: 1 / -1; order: 5; } .t-statement { grid-column: 1 / -1; order: 6; }
  .t-mail a { font-size: var(--step-body); }
}

/* ----------------------- Páginas de contenido ----------------------- */
.page-head { background: var(--charcoal); color: var(--paper); padding: 96px var(--m) 72px; }
.page-head h1 { font-size: var(--step-head); max-width: 16ch; }
.page-head .lead { margin: 32px 0 0; max-width: 46ch; font-size: var(--step-body); }
.page-head .cta-row { margin-top: 32px; }
.prose { background: var(--bone); color: var(--ink); padding: 88px var(--m) 120px; }
.prose { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-content: start; }
.prose > * { grid-column: 1 / span 7; min-width: 0; }
.prose > .prose-aside { grid-column: 9 / span 4; grid-row: 1 / span 60; align-self: start; position: sticky; top: 96px; display: grid; gap: 8px; }
.aside-cta { background: var(--ink); color: var(--paper); padding: 24px; }
.aside-cta p { margin: 0 0 16px; }
.aside-cta b { font-size: var(--step-lead); letter-spacing: -0.02em; }
.aside-cta .btn { width: 100%; }
.prose-aside [data-ui] { max-width: none; }
.prose h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); margin: 72px 0 20px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; margin: 40px 0 12px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.8em; font-size: 1rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 12px 14px; vertical-align: top; }
.prose th { background: var(--ink); color: var(--paper); }
.prose tr:nth-child(even) td { background: var(--bone-2); }
.updated { margin-top: 20px; font-size: var(--step-small); color: #d0cdc7; }
.callout { display: flex; gap: 14px; padding: 20px 22px; background: var(--ink); color: var(--paper); margin: 24px 0; }
.callout .icon { color: var(--flame); margin-top: 3px; }
.callout p { margin: 0; }
.contact-card { display: flex; gap: 16px; align-items: center; padding: 28px; background: var(--flame); color: var(--ink); margin: 0 0 32px; }
.contact-card .icon { width: 32px; height: 32px; }
.contact-card p { margin: 0 0 4px; }
.contact-card a { font-weight: 800; font-size: var(--step-lead); letter-spacing: -0.02em; word-break: break-all; }

/* Guía de instalación: pasos como bandas */
.guide { background: var(--bone); color: var(--ink); list-style: none; margin: 0; padding: 0; counter-reset: g; }
.guide-step { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 72px var(--m); align-items: center; }
.guide-step:nth-child(even) { background: var(--bone-2); }
.guide-step .g-text { grid-column: 1 / span 6; }
.guide-step .g-art { grid-column: 8 / span 5; justify-self: start; width: 100%; max-width: 340px; }
.guide-step .g-art img { width: 100%; height: auto; display: block; }
.guide-step .wiz-tip { margin-top: 20px; max-width: 52ch; }
.guide-step h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.75rem); margin-bottom: 20px; max-width: 14ch; }
.guide-step { counter-increment: g; }
.guide-step h2::before { content: counter(g); display: block; color: var(--flame); margin-bottom: 8px; }
.guide-step p, .guide-step li { font-size: var(--step-body); max-width: 52ch; }
.guide-step p:last-child, .guide-step ul:last-child, .guide-step ol:last-child { margin-bottom: 0; }
.version-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 24px 0; }
.version-pair > div { padding: 24px; background: var(--ink); color: var(--paper); }
.version-pair h3 { margin-top: 0; color: var(--flame); }
.trouble details { background: var(--paper); margin-bottom: 8px; }
.trouble summary { cursor: pointer; padding: 20px 22px; font-weight: 800; font-size: 1.1875rem; letter-spacing: -0.01em; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.trouble summary::-webkit-details-marker { display: none; }
.trouble summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--flame); }
.trouble details[open] summary::after { content: "–"; }
.trouble details > div { padding: 0 22px 20px; }
@media (max-width: 859px) {
  .page-head { padding: 64px var(--m) 48px; }
  .prose { padding: 56px var(--m) 80px; }
  .prose > *, .prose > .prose-aside { grid-column: 1 / -1; grid-row: auto; position: static; }
  .prose > .prose-aside { order: 99; margin-top: 48px; }
  .guide-step { padding: 48px var(--m); row-gap: 28px; }
  .guide-step .g-text, .guide-step .g-art { grid-column: 1 / -1; }
  .guide-step .g-art { max-width: 280px; justify-self: center; }
  .version-pair { grid-template-columns: 1fr; }
}

/* Pantalla de error */
.error-page { min-height: 80svh; display: flex; align-items: center; background: var(--charcoal); color: var(--paper); padding: 64px var(--m); }
.error-page h1 { font-size: var(--step-head); max-width: 14ch; }
.error-page .lead { margin: 28px 0 32px; max-width: 46ch; }
.error-art { width: min(220px, 50vw); margin: 0 0 40px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --------------------- Modal: gracias e instalación --------------------- */
.thanks { padding: 0; border: 0; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; background: var(--bone); color: var(--ink); overflow-y: auto; }
.thanks::backdrop { background: rgba(17, 17, 20, .7); }
.thanks-inner { min-height: 100%; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); overflow-x: clip; column-gap: var(--gap); align-content: start; padding: 0 var(--m) 40px; }
.thanks-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; min-height: 76px; }
.thanks-close { display: grid; place-items: center; width: 52px; height: 52px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; }
.thanks-close .icon { width: 24px; height: 24px; stroke-width: 2.4; }
.thanks-hello { grid-column: 1 / span 5; padding-top: 32px; }
.thanks-check { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 8px 14px 8px 10px; background: var(--ink); color: var(--paper); font-weight: 500; }
.thanks-check .icon { color: var(--ok); stroke-width: 2.6; }
.thanks-hello h2 { font-size: var(--step-head); max-width: 10ch; }
.thanks-sub { margin: 24px 0 0; font-size: var(--step-lead); line-height: 1.25; letter-spacing: -0.01em; max-width: 24ch; }
.thanks-why { display: flex; gap: 14px; margin-top: 32px; padding: 20px; background: var(--paper); }
.thanks-why .icon { width: 28px; height: 28px; color: var(--flame); flex: none; stroke-width: 2; }
.thanks-why p { margin: 0; }
.thanks-hello .retry { display: flex; gap: 10px; align-items: center; margin: 24px 0 0; }
.thanks-hello .retry .icon { color: var(--flame); }
.wizard { grid-column: 7 / span 6; padding-top: 32px; min-width: 0; }
.thanks-hello { min-width: 0; }
.wiz-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 24px; }
.wiz-progress span { height: 8px; background: var(--bone-2); transition: background-color 240ms ease; }
.wiz-progress span.on { background: var(--flame); }
.wiz-steps { list-style: none; margin: 0; padding: 0; }
.wiz-step { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 32px; align-items: center; }
.wiz-step + .wiz-step { margin-top: 32px; }
.js .wiz-step + .wiz-step { margin-top: 0; }
.wiz-step img { width: 100%; height: auto; display: block; }
.wiz-count { margin: 0 0 10px; font-weight: 500; color: #5a5650; }
.wiz-step h3 { font-size: var(--step-lead); letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 14px; }
.wiz-step p { font-size: var(--step-body); }
.wiz-tip { display: flex; gap: 10px; padding: 14px 16px; background: var(--paper); font-size: var(--step-small) !important; line-height: 1.45; margin: 0; }
.wiz-tip .icon { color: var(--flame); flex: none; margin-top: 1px; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.wiz-nav .btn { flex: 1 1 auto; }
.wiz-nav [data-prev] { flex: 0 0 auto; }
.wiz-nav .wiz-done { flex: 1 1 auto; display: flex; }
.wiz-nav .wiz-done .btn { width: 100%; }
.flip { transform: scaleX(-1); }
.wiz-help { margin: 20px 0 0; }
.wiz-step.enter { animation: swap 380ms var(--ease-out); }
@media (max-width: 1099px) { .wiz-step { grid-template-columns: minmax(160px, 240px) 1fr; gap: 24px; } }
@media (max-width: 859px) {
  .thanks-inner { padding-bottom: 0; }
  .thanks-top { min-height: 64px; }
  .thanks-hello, .wizard { grid-column: 1 / -1; }
  .thanks-hello { padding-top: 4px; }
  .thanks-check { margin-bottom: 14px; }
  .thanks-sub { margin-top: 14px; font-size: var(--step-body); line-height: 1.45; max-width: none; }
  .thanks-why { margin-top: 18px; padding: 14px; font-size: var(--step-small); }
  .thanks-hello .retry { font-size: var(--step-small); margin-top: 14px; }
  .wizard { padding-top: 24px; }
  .wiz-step { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .wiz-step .wiz-text { order: -1; }
  .wiz-step img { max-height: 52svh; width: auto; max-width: 100%; margin: 0 auto; }
  .thanks-why { display: none; }
  .wiz-step h3 { margin-bottom: 8px; }
  .wiz-nav { position: sticky; bottom: 0; margin: 20px calc(var(--m) * -1) 0; padding: 12px var(--m) calc(12px + env(safe-area-inset-bottom)); background: var(--bone); }
  .wiz-nav [data-prev] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wiz-help { padding-bottom: 24px; font-size: var(--step-small); }
}

/* Consentimiento (solo si Meta Pixel está activo) */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--ink); color: var(--paper); padding: 20px var(--m); }
.consent-inner { max-width: 1100px; display: grid; gap: 12px; }
.consent h2 { font-size: var(--step-body); letter-spacing: -0.01em; }
.consent p { margin: 0; font-size: var(--step-small); max-width: 70ch; }
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.consent-actions .btn { min-width: 140px; }

/* ----------------------------- Movimiento ----------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .js .shutter { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter > * { transform: scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js .shutter.in { clip-path: inset(0 0 0 0); }
  .js .shutter.in > * { transform: none; }
  .js .hero-shape { animation: drift 14s var(--ease-soft) infinite alternate; }
  .js .hero h1, .js .hero-lead, .js .hero-actions, .js .hero-facts { animation: rise 900ms var(--ease-out) both; }
  .js .hero-lead { animation-delay: 90ms; } .js .hero-actions { animation-delay: 180ms; } .js .hero-facts { animation-delay: 260ms; }
  .panel-ui.swap { animation: swap 420ms var(--ease-out); }
  .thanks[open] .thanks-hello, .thanks[open] .wizard { animation: rise 700ms var(--ease-out) both; }
  .thanks[open] .wizard { animation-delay: 120ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes swap { from { opacity: 0; transform: translateY(12px); } }
@keyframes drift { from { transform: translate(-50%, -50%) rotate(-2deg); } to { transform: translate(-51.5%, -49%) rotate(2deg); } }
@media (max-width: 859px) { @keyframes drift { from { transform: translate(-50%, 0) rotate(-2deg); } to { transform: translate(-50%, 1.5%) rotate(2deg); } } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── In-app browser overlay ─────────────────────────────────────────────── */
.inapp-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: ia-fade .22s ease both;
}
.inapp-overlay[hidden] { display: none; }
@keyframes ia-fade { from { opacity: 0; } }

.inapp-card {
  background: #18181d;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  padding: 32px 28px 28px;
  max-width: 360px; width: 100%;
  text-align: center;
  animation: ia-rise .28s var(--ease-out) both;
}
@keyframes ia-rise { from { opacity: 0; transform: translateY(20px) scale(.97); } }

.inapp-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255, 194, 26, .12);
  border: 1px solid rgba(255, 194, 26, .3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  color: var(--signal);
}

.inapp-title {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--paper); line-height: 1.15; margin: 0 0 10px;
}

.inapp-body {
  font-size: var(--step-small); color: rgba(255,255,255,.55);
  line-height: 1.55; margin: 0 0 22px;
}

.inapp-btn {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: 100px; padding: 15px 20px;
  font-size: .9375rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; text-decoration: none;
  background: var(--flame); color: var(--ink);
  transition: background var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.inapp-btn:hover { background: var(--flame-strong); }
.inapp-btn:active { transform: scale(.97); }

.inapp-hint {
  font-size: .75rem; color: rgba(255,255,255,.28);
  margin: 14px 0 0; line-height: 1.5;
}

/* Divider "o si no funciona" */
.inapp-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 16px; color: rgba(255,255,255,.3); font-size: .78rem;
}
.inapp-divider::before,
.inapp-divider::after {
  content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.1);
}

/* Instrucciones manuales (3 puntos) */
.inapp-manual { text-align: left; }
.inapp-manual-title {
  font-size: .82rem; font-weight: 700; color: rgba(255,255,255,.45);
  text-transform: uppercase; letter-spacing: .07em; margin: 0 0 12px;
}
.inapp-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.inapp-steps li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: .9rem; color: rgba(255,255,255,.75); line-height: 1.45;
}
.inapp-step-num {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,91,26,.18); border: 1px solid rgba(255,91,26,.35);
  color: var(--flame); font-size: .75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Botón cerrar */
.inapp-dismiss {
  margin-top: 20px; background: none; border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.4); border-radius: 100px; padding: 9px 22px;
  font: inherit; font-size: .85rem; cursor: pointer;
  transition: color var(--t-hover) ease, border-color var(--t-hover) ease;
}
.inapp-dismiss:hover { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.25); }

/* Chrome icon en el botón del aviso inline */
.inapp-btn .icon, .btn .icon { flex: none; }
