/* Ossian · web. Mismo mundo que la app: noche, portada que tiñe la pantalla, ámbar de vela. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/newsreader.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(fonts/newsreader-italic.woff2) format("woff2"); }

/* El color del libro elegido recorre la página: se anima al cambiar de libro. */
@property --book { syntax: "<color>"; inherits: true; initial-value: #e8a73f; }
@property --deep { syntax: "<color>"; inherits: true; initial-value: #3b230b; }

:root {
  color-scheme: dark;
  --bg: #0b0806;
  --ink: #fbf6ef;
  --ink-2: rgba(251, 246, 239, .78);
  --ink-3: rgba(251, 246, 239, .58);
  --line: rgba(251, 246, 239, .12);
  --glass: rgba(255, 255, 255, .07);
  --glass-strong: rgba(255, 255, 255, .13);
  --candle: #ffb37a;
  --candle-text: #ffd9bb;
  --candle-ink: #1a0a04;
  --serif: "Newsreader", "New York", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --radius: 24px;
  --wrap: 1180px;
  --ease: cubic-bezier(.22, .8, .24, 1);      /* salida exponencial */
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  transition: --book .9s var(--ease-io), --deep .9s var(--ease-io);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-color: color-mix(in oklab, var(--book) 55%, #000) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  caret-color: var(--book);
}
::selection { background: color-mix(in oklab, var(--book) 70%, transparent); color: #fff; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; margin: 0; font-optical-sizing: auto; text-wrap: balance; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--book); outline-offset: 3px; border-radius: 8px; }

/* Datos que faltan por rellenar antes de publicar (README.md). */
.pending { border-bottom: 1px dashed var(--candle); color: var(--candle-text); }

/* ── Navegación ─────────────────────────────────────────── */
.nav { position: fixed; inset: 12px 0 auto; z-index: 50; display: flex; justify-content: center; pointer-events: none; }
.nav-inner {
  pointer-events: auto; display: flex; align-items: center; gap: 28px;
  padding: 8px 8px 8px 12px; border-radius: 999px;
  background: color-mix(in oklab, var(--deep) 55%, rgba(8, 6, 5, .6));
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: inset 0 .5px 0 rgba(255,255,255,.3), inset 0 0 0 .5px rgba(255,255,255,.1), 0 10px 30px rgba(0,0,0,.35);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 20px var(--serif); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 22px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.lang { font: 600 13px var(--sans); letter-spacing: .04em; text-decoration: none; color: var(--ink-2); padding: 6px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: color .2s; }
.lang:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 16px var(--sans); text-decoration: none; border: 0; cursor: pointer;
  transition: transform .25s var(--ease), background .2s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: #fff; color: #15110d; box-shadow: 0 14px 34px -10px color-mix(in oklab, var(--book) 70%, transparent); }
.btn-glass { background: var(--glass-strong); color: var(--ink); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.2); }
.btn-small { height: 38px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 20px; height: 20px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--candle-text); } /* solo páginas legales */
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }

/* ── Secciones ─────────────────────────────────────────── */
section { position: relative; }
.section { padding: clamp(96px, 13vw, 170px) 0; }
.section-head { max-width: 720px; margin-bottom: 64px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section h2, .scene h2 { font-size: clamp(38px, 5.2vw, 72px); line-height: 1.02; margin: 0 0 22px; }
.lede { font-size: clamp(18px, 1.5vw, 20px); color: var(--ink-2); max-width: 36em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.split.reverse > :first-child { order: 2; }

.phone {
  position: relative; width: 300px; aspect-ratio: 1320 / 2868; padding: 3px; border-radius: 52px;
  background: linear-gradient(145deg, #3a3d44, #121317 40%, #26282d);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px -20px rgba(0,0,0,.7);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 49px; border: 7px solid #050505; } /* borde negro de pantalla, como en el aparato */

/* ── La escena: portada → reproductor ──────────────────── */
.scene { height: 290svh; --t1: 0; --t2: 0; }
.scene-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; background: var(--deep); }
.scene-bg { position: absolute; inset: -80px; z-index: -1; }
.scene-bg i { position: absolute; inset: 0; background: center/cover; filter: blur(70px) saturate(160%); opacity: 0; transform: scale(1.25); transition: opacity 1.2s var(--ease-io), transform 6s var(--ease); }
.scene-bg i.on { opacity: .62; transform: scale(1.1); }
.scene-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 45%, transparent, color-mix(in oklab, var(--deep) 85%, #000) 90%); }

.hook {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  font-size: var(--hook-size); line-height: .92; font-weight: 500; letter-spacing: -.035em;
  opacity: calc(1 - var(--t1) * 1.6); filter: blur(calc(var(--t1) * 14px));
}
.hook span { position: absolute; left: 0; right: 0; text-align: center; white-space: nowrap; }
.hook-a { top: 15svh; transform: translateY(calc(var(--t1) * -60px)); }
.hook-b { top: calc(15svh + 1.04em + var(--cover-h)); font-style: italic; color: color-mix(in oklab, var(--book) 45%, #fff); transform: translateY(calc(var(--t1) * 60px)); text-shadow: 0 6px 40px rgba(0,0,0,.45); }
.scene { --cover-h: min(46svh, 440px); --hook-size: clamp(46px, 8.4vw, 132px); --cover-mid: calc(15svh + 1.02 * var(--hook-size) + var(--cover-h) / 2); }
.cover-start { position: absolute; left: 50%; top: calc(15svh + 1.02 * var(--hook-size) - 2px); width: var(--cover-h); aspect-ratio: 1; translate: -50% 0; }

.hero-foot { position: absolute; left: max(24px, calc(50% - var(--wrap) / 2)); top: var(--cover-mid); width: min(340px, calc(50% - var(--cover-h) / 2 - 72px)); z-index: 4; opacity: calc(1 - var(--t1) * 2.2); transform: translateY(calc(-50% + var(--t1) * 40px)); }
.hero-foot .lede { font-size: 18px; }
.hero-cta { margin-top: 22px; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* La portada que vuela: su sitio final es el hueco del reproductor; fx.js la lleva desde arriba. */
.cover {
  position: absolute; z-index: 5; width: 0; height: 0; left: 0; top: 0; border-radius: 10px; object-fit: cover;
  transform-origin: 50% 50%; will-change: transform;
  box-shadow: 0 40px 90px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.08);
  transition: opacity .5s var(--ease-io);
}
.cover.swap { opacity: 0; }

.device {
  /* Alto según la ventana y algo por debajo del centro: el menú flotante nunca lo tapa. */
  position: absolute; z-index: 2; left: 66%; top: calc(50% + 36px); height: min(695px, 100svh - 132px); aspect-ratio: 1320 / 2868;
  translate: -50% -50%; padding: 10px; border-radius: 56px;
  background: linear-gradient(145deg, #3a3d44, #121317 40%, #26282d);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 60px 120px -30px rgba(0,0,0,.8), 0 0 140px -20px color-mix(in oklab, var(--book) 60%, transparent);
  opacity: var(--t2); scale: calc(1.12 - var(--t2) * .12);
}
.device::after { content: ""; position: absolute; top: 21px; left: 50%; translate: -50% 0; width: 30%; height: 27px; border-radius: 20px; background: #000; }
.player {
  position: relative; height: 100%; border-radius: 46px; overflow: hidden; padding: 64px 20px 26px;
  display: flex; flex-direction: column; color: #fff;
  background: linear-gradient(180deg, color-mix(in oklab, var(--book) 75%, #000) 0%, color-mix(in oklab, var(--book) 42%, #000) 48%, color-mix(in oklab, var(--deep) 80%, #000) 100%);
  font-family: var(--sans);
}
.player > :not(.pl-slot) { opacity: calc(var(--t2) * 1.4 - .4); }
.pl-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.8); }
.pl-btn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); box-shadow: inset 0 .5px 0 rgba(255,255,255,.35); }
.pl-btn svg { width: 15px; height: 15px; }
.pl-slot { width: 100%; aspect-ratio: 1; margin: 22px 0 auto; }
.pl-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.pl-title { display: block; font: 600 21px/1.15 var(--serif); }
.pl-author { display: block; font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }
.pl-progress { height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin-top: 18px; overflow: hidden; }
.pl-progress i { display: block; width: 29%; height: 100%; background: #fff; border-radius: 3px; }
.pl-times { display: flex; justify-content: space-between; font-size: 10px; color: rgba(255,255,255,.7); margin-top: 6px; font-variant-numeric: tabular-nums; }
.pl-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.pl-controls > svg { width: 24px; height: 24px; }
.pl-play { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); box-shadow: inset 0 .5px 0 rgba(255,255,255,.4); }
.pl-play svg { width: 26px; height: 26px; }
.pl-bar { display: flex; justify-content: space-around; align-items: center; height: 44px; margin-top: 16px; border-radius: 22px; background: rgba(255,255,255,.12); box-shadow: inset 0 .5px 0 rgba(255,255,255,.3); font-size: 13px; font-weight: 600; }
.pl-bar svg { width: 18px; height: 18px; }

.scene-copy {
  position: absolute; z-index: 4; left: max(20px, calc(50% - var(--wrap) / 2)); top: 50%; width: min(440px, 40%);
  opacity: var(--t2); transform: translateY(calc(-50% + (1 - var(--t2)) * 40px)); filter: blur(calc((1 - var(--t2)) * 8px));
}
/* Sin JavaScript: escena fija, con la portada en su sitio y sin teléfono. */
.no-js .scene { height: 100svh; }
.no-js .cover-start { background: url(img/cover-moby.webp) center/cover; border-radius: 10px; }
.no-js .picker { display: none; }

.feature-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; color: var(--ink-2); font-size: 16px; }
.feature-list b { color: var(--ink); font-weight: 600; }

/* Selector de libro: siempre a mano, se recoloca bajo el teléfono al final. */
.picker {
  position: absolute; z-index: 6; right: max(24px, calc(50% - var(--wrap) / 2)); top: var(--cover-mid); translate: 0 -50%;
  display: flex; flex-direction: column; gap: 10px; padding: 8px; border-radius: 22px;
  background: rgba(0,0,0,.28); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.14);
}
.picker button { width: 50px; height: 50px; padding: 0; border: 0; border-radius: 10px; cursor: pointer; background: none; opacity: .55; transition: opacity .25s, transform .25s var(--ease), box-shadow .25s; }
.picker button img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.picker button:hover { opacity: .9; transform: translateY(-2px); }
.picker button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--deep), 0 0 0 4px #fff; }

/* ── Biblioteca ─────────────────────────────────────────── */
.library { background: radial-gradient(55% 50% at 22% 50%, color-mix(in oklab, var(--book) 22%, transparent), transparent 70%); }
.library-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.library-shots { position: relative; height: 660px; }
.library-shots .phone { position: absolute; width: 270px; }
.library-shots .back { left: 4%; top: 0; rotate: -6deg; filter: brightness(.7); }
.library-shots .front { left: 34%; top: 50px; rotate: 4deg; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 50px 100px -20px rgba(0,0,0,.8); }
.facts-list { margin: 40px 0 0; display: grid; grid-template-columns: auto; gap: 0; }
.facts-list dt { font: 600 21px/1.2 var(--serif); padding-top: 20px; border-top: 1px solid var(--line); }
.facts-list dd { margin: 6px 0 20px; color: var(--ink-2); font-size: 16px; }

/* ── Modo Vela ─────────────────────────────────────────── */
.candle { background: radial-gradient(60% 55% at 50% 35%, #3a1a0a 0%, #1a0c05 45%, #070302 100%); color: var(--candle-text); overflow: hidden; }
.candle h2 { color: #ffe6d2; }
.candle .lede { color: rgba(255,217,187,.82); }
.candle::after { content: ""; position: absolute; inset: 0; z-index: 2; background: #000; opacity: 0; pointer-events: none; transition: opacity 1.2s ease; }
.candle.sleep::after { opacity: .86; transition: opacity 6.5s cubic-bezier(.5, 0, .9, .6); }
.candle-demo { position: relative; z-index: 3; display: grid; justify-items: center; gap: 30px; }
.ring { position: relative; width: min(380px, 80vw); aspect-ratio: 1; }
.ring::before {
  content: ""; position: absolute; inset: -30%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,150,70,.35), transparent 70%);
  animation: breathe 4.5s ease-in-out infinite alternate; transition: inset 6.5s ease, opacity 6.5s ease;
}
@keyframes breathe { from { transform: scale(.92); opacity: .6; } to { transform: scale(1.06); opacity: 1; } }
.candle.sleep .ring::before { inset: 10%; opacity: .25; animation-duration: 1.6s; }
.ring svg { position: relative; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: rgba(255,179,122,.16); }
.ring .bar { stroke: var(--candle); stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.ring-cover { position: absolute; inset: 9%; border-radius: 50%; background: url(img/cover-moby.webp) center/cover; filter: sepia(.6) brightness(.38) saturate(1.4); transition: filter 6.5s ease; }
.candle.sleep .ring-cover { filter: sepia(.6) brightness(.12) saturate(1.4); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; text-shadow: 0 2px 18px rgba(0,0,0,.7); }
.ring-label b { font: 500 clamp(64px, 9vw, 108px)/1 var(--serif); color: #fff3e8; font-variant-numeric: tabular-nums; }
.ring-label span { font-size: 17px; color: var(--candle-text); }
.presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.presets button {
  min-width: 52px; height: 46px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 16px var(--sans); font-variant-numeric: tabular-nums;
  color: var(--candle); background: rgba(255,179,122,.14); transition: background .25s, color .25s, transform .25s var(--ease);
}
.presets button:hover { transform: translateY(-2px); }
.presets button[aria-pressed="true"] { background: var(--candle); color: var(--candle-ink); }
.candle-note { font-size: 14px; color: rgba(255,217,187,.65); text-align: center; }
.candle.sleep .presets, .candle.sleep .candle-note { opacity: .35; transition: opacity 6s; }

/* ── iPad y Apple TV ───────────────────────────────────── */
.screens { background: radial-gradient(60% 45% at 50% 60%, color-mix(in oklab, var(--book) 16%, transparent), transparent 70%); }
.screens-stage { position: relative; padding: 0 0 0 12%; }
.tv { border-radius: 18px; padding: 10px; background: #0b0b0d; box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 60px 120px -30px rgba(0,0,0,.8), 0 0 160px -40px color-mix(in oklab, var(--book) 55%, transparent); }
.tv img { border-radius: 10px; width: 100%; }
.tablet {
  position: absolute; left: 0; bottom: -16%; width: 40%; aspect-ratio: 1180 / 820; padding: 10px; border-radius: 26px;
  background: linear-gradient(145deg, #3a3d44, #121317 40%, #26282d);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 50px 100px -20px rgba(0,0,0,.85);
}
.tablet img { width: 100%; height: 100%; object-fit: cover; border-radius: 17px; }
.watch { position: absolute; left: 41.5%; bottom: -16%; width: 10%; aspect-ratio: 416 / 496; isolation: isolate; }
/* Corona. */
.watch::after { content: ""; position: absolute; z-index: -1; right: -3.5%; top: 26%; width: 6%; height: 15%; border-radius: 3px; background: linear-gradient(90deg, #34363c, #7a7e86); }
/* La caja es la propia imagen: relleno = bisel, y la pantalla hereda las esquinas. */
.watch img {
  width: 100%; height: 100%; object-fit: cover; padding: max(4px, 5%); border-radius: 27% / 23%;
  background: linear-gradient(150deg, #5a5e66, #1b1c20 42%, #34363c);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 40px 80px -20px rgba(0,0,0,.85), 0 0 90px -30px color-mix(in oklab, var(--book) 60%, transparent);
}
.steps { list-style: none; padding: 0; margin: clamp(90px, 12vw, 150px) 0 0 32%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s; color: var(--ink-2); font-size: 15px; }
.steps li::before { counter-increment: s; content: counter(s); display: block; font: 500 44px/1 var(--serif); color: color-mix(in oklab, var(--book) 55%, #fff); margin-bottom: 10px; }
.steps b { color: var(--ink); font-weight: 600; }

/* ── Movimiento de las secciones (fx.js) ───────────────────
   .in: la sección ha entrado en pantalla (una vez). --p: 0 → 1 mientras la cruzas con el scroll.
   Sin JavaScript o con «reducir movimiento», todo queda en su estado final. */
:root:not(.no-js) [data-reveal] .rv { opacity: 0; translate: 0 26px; transition: opacity .7s var(--ease), translate .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 120ms); }
:root:not(.no-js) [data-reveal].in .rv { opacity: 1; translate: 0 0; }

/* Biblioteca: los dos teléfonos se abren en abanico al entrar y se separan en profundidad con el scroll. */
.library-shots { --e: min(1, var(--p, .5) * 1.6); }
.library-shots .phone { transition: rotate 1.2s var(--ease), left 1.2s var(--ease), opacity 1s var(--ease); }
.library-shots .back { translate: 0 calc((.5 - var(--e)) * 70px); }
.library-shots .front { translate: 0 calc((.5 - var(--e)) * -50px); }
:root:not(.no-js) .library-shots:not(.in) .back { rotate: 0deg; left: 20%; opacity: 0; }
:root:not(.no-js) .library-shots:not(.in) .front { rotate: 0deg; left: 24%; }
/* La ficha que salta de aparato en aparato: el mismo minuto, en otro sitio. */
.handoff {
  position: absolute; z-index: 3; left: 0; bottom: 34px; display: flex; align-items: center; gap: 14px;
  padding: 12px 20px 12px 12px; border-radius: 22px; min-width: 268px;
  background: rgba(20, 16, 14, .62); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 .5px 0 rgba(255,255,255,.25), 0 0 0 .5px rgba(255,255,255,.1), 0 30px 60px -20px rgba(0,0,0,.8);
  transition: opacity .8s var(--ease) .5s, translate .9s var(--ease) .5s;
}
:root:not(.no-js) .library-shots:not(.in) .handoff { opacity: 0; translate: 0 20px; }
.handoff-icon { position: relative; flex: none; width: 44px; height: 44px; border-radius: 13px; background: color-mix(in oklab, var(--book) 70%, #000); }
.handoff-icon svg { position: absolute; inset: 11px; width: 22px; height: 22px; color: #fff; opacity: 0; scale: .6; transition: opacity .35s, scale .5s var(--ease); }
.handoff-icon svg.on { opacity: 1; scale: 1; }
.handoff-text { display: grid; line-height: 1.25; }
.handoff-where { font: 600 16px var(--sans); transition: opacity .3s, translate .4s var(--ease); }
.handoff-where.out { opacity: 0; translate: 0 -6px; }
.handoff-time { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.handoff-bar { position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px; border-radius: 1px; background: rgba(255,255,255,.1); overflow: hidden; }
.handoff-bar i { display: block; height: 100%; width: 37.7%; background: color-mix(in oklab, var(--book) 60%, #fff); transition: width 1s linear; }

/* Modo Vela: brasas que suben del anillo. */
.embers { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.embers i {
  position: absolute; left: var(--x); bottom: 30%; width: var(--s); height: var(--s); border-radius: 50%;
  background: #ffb37a; box-shadow: 0 0 10px 2px rgba(255,140,60,.7); opacity: 0;
  animation: ember var(--d) linear var(--delay) infinite;
}
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  15% { opacity: .9; }
  70% { opacity: .5; }
  100% { opacity: 0; transform: translate(var(--dx), -320px) scale(.3); }
}
.candle.sleep .embers { opacity: .25; transition: opacity 5s; }
.candle-demo .ring { transition: scale 1.4s var(--ease), opacity 1.2s var(--ease); }
:root:not(.no-js) .candle-demo:not(.in) .ring { scale: .86; opacity: 0; }

/* iPad y Apple TV: la tele crece y el iPad sube inclinado mientras bajas. */
.screens-stage { --e: min(1, var(--p, .5) * 1.8); }
.tv { position: relative; translate: 0 calc((1 - var(--e)) * 70px); scale: calc(.9 + var(--e) * .1); }
.tablet { translate: calc((1 - var(--e)) * -50px) calc((1 - var(--e)) * 150px); rotate: calc((1 - var(--e)) * -9deg); }
.watch { translate: calc((1 - var(--e)) * 60px) calc((1 - var(--e)) * 200px); rotate: calc((1 - var(--e)) * 12deg); }
/* La vinculación, paso a paso, en la propia tele. */
.tv-flow img { position: absolute; inset: 10px; width: calc(100% - 20px); border-radius: 10px; opacity: 0; transition: opacity .7s var(--ease-io); }
.tv-flow img.on { opacity: 1; }
.steps li { position: relative; padding-top: 18px; transition: color .4s; }
.steps li::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 1px; background: var(--line); }
.steps li > i { position: absolute; left: 0; top: 0; height: 2px; width: 0; border-radius: 1px; background: color-mix(in oklab, var(--book) 60%, #fff); z-index: 1; }
.steps li.on > i { width: 100%; transition: width var(--step, 3s) linear; }
.steps li.on, .steps li.on b { color: var(--ink); }
.steps li.on::before { color: color-mix(in oklab, var(--book) 30%, #fff); }

/* ── Privacidad ────────────────────────────────────────── */
.privacy { text-align: center; padding-block: clamp(80px, 10vw, 130px); }
.privacy .big { font: 500 clamp(44px, 7.4vw, 108px)/1 var(--serif); letter-spacing: -.035em; text-wrap: balance; }
.privacy-points { margin: 30px auto 0; max-width: 46em; color: var(--ink-3); font-size: 17px; }

/* ── Precio ────────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; align-items: stretch; }
.plan { padding: 40px; border-radius: 30px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 .5px var(--line); display: flex; flex-direction: column; }
.plan h3 { font-size: 30px; }
.price { font: 500 58px/1 var(--serif); margin: 18px 0 8px; letter-spacing: -.02em; }
.price small { font: 500 16px var(--sans); color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
.plan > p { color: var(--ink-2); }
.plan ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-2); font-size: 16px; }
.plan li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: rgba(255,255,255,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.5L13 6.4' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.plan.plus { background: linear-gradient(160deg, rgba(255,179,122,.17), rgba(255,255,255,.03) 60%); box-shadow: inset 0 0 0 1px rgba(255,179,122,.45), 0 40px 90px -30px rgba(0,0,0,.6); }
.plan.plus .price { color: #ffe6d2; }
.plan.plus li::before { background-color: rgba(255,179,122,.32); }
.pricing-note { margin-top: 22px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ── Preguntas ─────────────────────────────────────────── */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative; font: 500 22px var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font: 300 28px var(--sans); color: var(--ink-3); transition: rotate .25s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 0 24px; color: var(--ink-2); max-width: 680px; }
.faq details p + p { margin-top: -10px; }
.faq a { color: var(--candle-text); }

/* ── Cierre y pie ──────────────────────────────────────── */
.closing { text-align: center; overflow: hidden; isolation: isolate; padding-block: clamp(130px, 16vw, 210px); }
.closing .wrap { position: relative; }
.closing .wrap::before {
  content: ""; position: absolute; left: 50%; top: 70px; width: 660px; aspect-ratio: 1; translate: -50% -50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255,150,70,.5), rgba(255,120,50,.12) 45%, transparent 70%);
  animation: breathe 3.8s ease-in-out infinite alternate;
}
.closing img.icon { width: 150px; height: 150px; border-radius: 34px; margin: 0 auto 34px; box-shadow: 0 30px 80px -10px rgba(0,0,0,.6); }
.closing h2 { font-size: clamp(46px, 7.4vw, 104px); margin-bottom: 18px; }
.bard { max-width: 32em; margin: 0 auto 38px; font: italic 400 clamp(20px, 2vw, 24px)/1.45 var(--serif); color: var(--candle-text); text-wrap: balance; }

footer { padding: 60px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.foot { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot nav a { text-decoration: none; color: var(--ink-2); }
.foot nav a:hover { color: var(--ink); }
.disclaimer { margin-top: 28px; font-size: 13px; line-height: 1.6; max-width: 900px; }

/* ── Páginas legales ───────────────────────────────────── */
.legal-hero { padding: 150px 0 50px; position: relative; isolation: isolate; overflow: hidden; }
.legal-hero::before { content: ""; position: absolute; inset: -40px; z-index: -1; background: url(img/ambient.webp) center/cover; filter: blur(50px); opacity: .35; }
.legal-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, var(--bg)); }
.legal-hero h1 { font-size: clamp(40px, 6vw, 64px); margin: 14px 0 18px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; color: var(--ink-3); }
.legal-meta b { color: var(--ink-2); font-weight: 600; }
.legal { display: grid; grid-template-columns: 220px 1fr; gap: 60px; padding: 30px 0 120px; }
.toc { position: sticky; top: 100px; align-self: start; font-size: 14px; }
.toc p { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--ink-3); margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--ink); }
.legal article { max-width: 720px; color: var(--ink-2); }
.legal article .intro { font-size: 19px; color: var(--ink); margin-bottom: 20px; }
.legal article h2 { font-size: 28px; color: var(--ink); margin: 52px 0 14px; scroll-margin-top: 100px; }
.legal article h2 span { color: var(--candle); font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: .08em; margin-right: 10px; vertical-align: 4px; }
.legal article p, .legal article li { margin-bottom: 12px; }
.legal article ul { padding-left: 20px; }
.legal article strong { color: var(--ink); }
.legal article a { color: var(--candle-text); }
.callout { padding: 20px 24px; border-radius: 18px; background: rgba(255,179,122,.08); box-shadow: inset 0 0 0 .5px rgba(255,179,122,.3); color: var(--candle-text); margin: 24px 0; }
.facts { display: grid; grid-template-columns: 180px 1fr; gap: 0; border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 .5px var(--line); margin: 18px 0; }
.facts > * { padding: 14px 18px; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { color: var(--ink-3); font-size: 14px; }
.facts dd { color: var(--ink); }
.facts > :nth-last-child(-n+2) { border-bottom: 0; }

/* ── Pantallas medianas y pequeñas ─────────────────────── */
@media (max-width: 960px) {
  .split, .pricing, .library-grid { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .legal { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; }
  .library-shots { height: 520px; max-width: 440px; width: 100%; margin-inline: auto; }
  .library-shots .phone { width: 220px; }
  .steps { margin-left: 0; grid-template-columns: 1fr; }
  .screens-stage { padding: 0 0 0 8%; }
  .tablet { width: 46%; }
  .watch { left: 47.5%; width: 12%; }

  /* Escena en vertical: titular arriba, portada, pie; al final el teléfono arriba y el texto debajo. */
  .scene { height: 260svh; --cover-h: min(38svh, 64vw); }
  .hook { font-size: clamp(40px, 11vw, 84px); }
  .hook-a { top: 13svh; }
  .hero-foot { left: 20px; right: 20px; width: auto; top: auto; bottom: 4svh; text-align: center; transform: translateY(calc(var(--t1) * 40px)); }
  .hero-foot .lede { font-size: 16px; margin-inline: auto; }
  .hero-note { display: none; }
  .picker { right: 50%; translate: 50% 0; top: 70svh; flex-direction: row; padding: 6px; gap: 8px; }
  .picker button { width: 40px; height: 40px; }
  .device { left: 50%; top: max(9svh, 88px); translate: -50% 0; width: min(208px, 46vw); height: auto; padding: 7px; border-radius: 36px; }
  .device::after { top: 13px; height: 17px; }
  .player { border-radius: 30px; padding: 40px 12px 14px; }
  .pl-top { font-size: 8px; } .pl-btn { width: 20px; height: 20px; } .pl-btn svg { width: 10px; height: 10px; }
  .pl-slot { margin-top: 12px; }
  .pl-title { font-size: 13px; } .pl-author { font-size: 8px; }
  .pl-progress { margin-top: 10px; height: 3px; } .pl-times { font-size: 7px; }
  .pl-controls { margin-top: 6px; } .pl-controls > svg { width: 15px; height: 15px; }
  .pl-play { width: 38px; height: 38px; } .pl-play svg { width: 16px; height: 16px; }
  .pl-bar { height: 28px; margin-top: 8px; font-size: 9px; } .pl-bar svg { width: 12px; height: 12px; }
  .scene-copy { left: 20px; right: 20px; width: auto; top: auto; bottom: 4svh; transform: translateY(calc((1 - var(--t2)) * 40px)); text-align: center; }
  .scene-copy h2 { font-size: clamp(34px, 9vw, 52px); margin-bottom: 10px; }
  .scene-copy .lede { margin-inline: auto; font-size: 16px; }
  .feature-list { display: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-inner { gap: 16px; }
  .phone { width: 220px; border-radius: 40px; padding: 2px; }
  .phone img { border-radius: 38px; border-width: 5px; }
  .plan { padding: 28px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
  .library-shots { height: 440px; }
  .library-shots .phone { width: 180px; }
  .screens-stage { padding: 0; }
  .tablet { position: relative; width: 72%; bottom: auto; margin: -14% 0 0 0; }
  .watch { left: 74%; bottom: 0; width: 20%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
