/* Tipografías autoalojadas (sin pedidos a Google) */
@font-face { font-family: "Fraunces"; src: url(/assets/fonts/fraunces-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/assets/fonts/fraunces-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url(/assets/fonts/quicksand.woff2) format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

  /* Layout: a bedtime book. Night pages frame one cream "paper" spread (the sample story),
     Numia greets at the cover and says goodnight at the end; everything in between is quiet,
     typographic and illustrated, with gold hairlines instead of cards. */
  :root {
    --night: #121c38;
    --navy: #1b2a4e;
    --ink-night: #0d1430;
    --gold: #f4c77a;
    --gold-deep: #c98a3a;
    --cream: #fff6e9;
    --paper: #fbf2e2;
    --cocoa: #3d2817;
    --cream-dim: rgba(255, 246, 233, 0.8);
    --cream-faint: rgba(255, 246, 233, 0.14);
    --hair: rgba(244, 199, 122, 0.35);
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Quicksand", "Nunito", system-ui, sans-serif;
    --h1: clamp(2.7rem, 1.5rem + 4.6vw, 5.4rem);
    --h2: clamp(2rem, 1.3rem + 2.6vw, 3.3rem);
    --lead: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
    --body: 1.125rem;
    color-scheme: dark;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--night); color: var(--cream); font: 500 var(--body)/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
  img, svg { max-width: 100%; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
  .wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: max(16px, 4vw); }
  h1, h2, h3 { font-family: var(--font-display); font-weight: 500; font-variation-settings: "SOFT" 100; margin: 0; text-wrap: balance; }
  h2 { font-size: var(--h2); line-height: 1.08; letter-spacing: -0.015em; }
  h3 { font-size: 1.45rem; line-height: 1.2; }
  p { margin: 0; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .eyebrow { font: 700 0.8rem/1.2 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }

  /* ---------- Shared form: the one action ---------- */
  .signup { display: flex; flex-wrap: wrap; gap: 12px; max-width: 540px; }
  .signup label { flex: 1 1 230px; min-width: 0; }
  .field { width: 100%; font: 600 1.05rem var(--font-body); color: var(--cream); background: rgba(255, 246, 233, 0.07); border: 1.5px solid rgba(255, 246, 233, 0.3); border-radius: 999px; padding: 15px 22px; }
  .field::placeholder { color: rgba(255, 246, 233, 0.6); }
  .field:focus { outline: none; border-color: var(--gold); }
  .cta { font: 700 1.05rem/1 var(--font-body); color: var(--navy); background: var(--gold); border: 0; border-radius: 999px; padding: 17px 26px; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
  .cta:hover { transform: translateY(-1px); box-shadow: 0 0 0 6px rgba(244, 199, 122, 0.16), 0 0 44px rgba(244, 199, 122, 0.4); }
  .form-note { flex-basis: 100%; font-size: 0.98rem; color: rgba(255, 246, 233, 0.7); }
  .form-error { flex-basis: 100%; font-size: 0.98rem; font-weight: 700; color: #f2a07f; }
  .sent { display: flex; align-items: center; gap: 16px; max-width: 540px; padding: 16px 22px; border: 1.5px solid var(--gold); border-radius: 22px; }
  .sent img { width: 60px; flex: none; }
  .sent strong { display: block; font: 500 1.6rem/1.2 var(--font-display); font-variation-settings: "SOFT" 100; }
  .sent span { color: var(--cream-dim); }

  /* ---------- 1 · Cover ---------- */
  .hero { position: relative; overflow: hidden; background: radial-gradient(900px 640px at 76% 38%, rgba(244, 199, 122, 0.13), transparent 70%), linear-gradient(180deg, #0c1330 0%, var(--night) 55%, var(--navy) 100%); }
  #sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 20px; }
  .logo { display: block; height: 50px; width: auto; }
  .navlink { color: var(--gold); font-weight: 700; text-decoration: none; font-size: 0.98rem; border-bottom: 1.5px solid var(--hair); padding-bottom: 2px; }
  .navlink:hover { border-color: var(--gold); }
  .hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: 0 40px; padding-block: 28px 72px; }
  .hero-copy { display: grid; gap: 20px; }
  .hero h1 { font-size: var(--h1); line-height: 1.0; letter-spacing: -0.025em; }
  .promise { font: italic 500 var(--lead)/1.3 var(--font-display); font-variation-settings: "SOFT" 100; color: var(--gold); max-width: 22em; }
  .support { max-width: 31em; color: var(--cream-dim); font-size: 1.15rem; }
  .hero .signup { margin-top: 10px; }
  #trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  .arrival-glow { position: absolute; top: -260px; right: -260px; width: 620px; height: 620px; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(255, 214, 150, 0.32) 0%, rgba(244, 199, 122, 0.1) 40%, rgba(244, 199, 122, 0) 70%); }
  .stage { position: relative; width: 100%; max-width: 400px; aspect-ratio: 1; justify-self: center; }
  /* Numia is one character for the whole entrance: the same face rig flies, settles and stays. */
  .numia, .numia-float { position: absolute; inset: 0; }
  .numia { transform-origin: 50% 52%; }
  .numia-float { transform-origin: 50% 60%; }
  .halo { position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, rgba(244, 199, 122, 0.3) 0%, rgba(244, 199, 122, 0) 66%); }
  .rig-fit { position: absolute; left: 0; top: 0; width: 1254px; height: 1254px; transform-origin: 0 0; }
  .rig-fit img, .rig-fit .part { position: absolute; display: block; max-width: none; }
  .rig-fit .eye .iris-wrap, .rig-fit .eye .lids { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
  .rig-fit .eye .lids img { left: 0; top: 0; width: 100%; height: 100%; }
  .rig-fit .eye svg { position: absolute; inset: 0; overflow: visible; max-width: none; }
  .stage-btn { position: absolute; inset: 16%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
  .float { animation: float 4.6s ease-in-out infinite; }
  @keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-9px) rotate(1.5deg); } }

  /* ---------- Section rhythm ---------- */
  .band { padding-block: clamp(80px, 11vw, 136px); }
  .head { display: grid; gap: 14px; margin-bottom: clamp(40px, 6vw, 64px); max-width: 40em; }
  .head p { color: var(--cream-dim); font-size: 1.15rem; }

  /* ---------- 2 · How it works: three moments on one thread of light ---------- */
  .how { background: var(--navy); }
  .moments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 40px; position: relative; }
  .moments::before { content: ""; position: absolute; top: 34px; left: 34px; right: 12%; height: 0; border-top: 1.5px dashed var(--hair); }
  .moments li { position: relative; display: grid; gap: 12px; align-content: start; }
  .moment-mark { position: relative; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); box-shadow: inset 0 0 0 1.5px var(--hair); }
  .moment-mark svg { width: 38px; height: 38px; }
  .moment-n { font: 700 0.78rem var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
  .moments p { color: var(--cream-dim); max-width: 22em; }

  /* ---------- 3 · The sample story: a cream paper spread ---------- */
  .paper { position: relative; background: var(--paper); color: var(--cocoa); }
  .paper::before, .paper::after { content: ""; position: absolute; left: 0; right: 0; height: 56px; background-repeat: repeat-x; pointer-events: none; }
  .paper::before { top: -55px; background-image: radial-gradient(circle at 50% 100%, var(--paper) 49%, transparent 50.5%), radial-gradient(circle at 50% 100%, var(--paper) 49%, transparent 50.5%); background-size: 150px 56px, 96px 38px; background-position: 0 100%, 48px 100%; }
  .paper::after { bottom: -55px; transform: scaleY(-1); background-image: radial-gradient(circle at 50% 100%, var(--paper) 49%, transparent 50.5%), radial-gradient(circle at 50% 100%, var(--paper) 49%, transparent 50.5%); background-size: 140px 52px, 90px 36px; background-position: 30px 100%, 0 100%; }
  .paper .eyebrow { color: #8a5420; }
  .paper .head p { color: rgba(61, 40, 23, 0.78); }
  .example-tag { display: inline-block; margin-left: 10px; padding: 2px 10px; border: 1.2px solid rgba(168, 105, 42, 0.55); border-radius: 999px; font: 700 0.72rem/1.6 var(--font-body); letter-spacing: 0.12em; color: #8a5420; vertical-align: 2px; }
  .book { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fffaf1; box-shadow: 0 1px 0 rgba(61, 40, 23, 0.08), 0 30px 60px -30px rgba(61, 40, 23, 0.45), 0 12px 24px -16px rgba(61, 40, 23, 0.25); }
  .book::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 60px; transform: translateX(-50%); background: linear-gradient(90deg, rgba(61, 40, 23, 0) 0%, rgba(61, 40, 23, 0.12) 46%, rgba(61, 40, 23, 0.2) 50%, rgba(61, 40, 23, 0.12) 54%, rgba(61, 40, 23, 0) 100%); pointer-events: none; }
  .book .plate { padding: clamp(18px, 2.6vw, 34px); padding-right: clamp(26px, 3.4vw, 44px); }
  .book .plate img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
  .book .text { display: grid; grid-template-rows: auto 1fr auto; gap: 18px; padding: clamp(28px, 4vw, 56px); padding-left: clamp(34px, 4.6vw, 64px); }
  .book .chapter { font: 600 0.78rem var(--font-body); letter-spacing: 0.18em; text-transform: uppercase; color: #8a5420; }
  .book h3 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.1; color: var(--cocoa); margin-top: 6px; }
  .story { font: 400 clamp(1.12rem, 1rem + 0.45vw, 1.32rem)/1.62 var(--font-display); font-variation-settings: "SOFT" 100; color: var(--cocoa); }
  .story p + p { margin-top: 0.6em; }
  .story .first::first-letter { float: left; font-size: 3.5em; line-height: 0.82; padding: 0.06em 0.1em 0 0; color: #b5762f; font-weight: 500; }
  .book .folio { display: flex; justify-content: space-between; gap: 16px; font: 600 0.85rem var(--font-body); color: rgba(61, 40, 23, 0.8); border-top: 1px solid rgba(61, 40, 23, 0.14); padding-top: 14px; }

  .format-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; font: 600 1rem var(--font-body); color: rgba(61, 40, 23, 0.72); text-align: center; }
  .format-note svg { flex: none; width: 22px; height: 22px; }

  /* ---------- 4 · A story that sounds like home ---------- */
  .home { background: var(--night); }
  .home-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px 72px; align-items: center; }
  .home-copy { display: grid; gap: 18px; }
  .home-copy > p { color: var(--cream-dim); font-size: 1.15rem; max-width: 30em; }
  .home-copy .mood { width: 112px; height: auto; filter: drop-shadow(0 0 18px rgba(244, 199, 122, 0.4)); }
  .voice { border-left: 1.5px solid var(--hair); padding-left: clamp(20px, 3vw, 40px); }
  .tabs { display: flex; gap: 22px; margin-bottom: 20px; }
  .tabs button { font: 700 1rem var(--font-body); color: var(--cream-dim); background: none; border: 0; padding: 6px 0; cursor: pointer; border-bottom: 2px solid transparent; }
  .tabs button[aria-selected="true"] { color: var(--gold); border-color: var(--gold); }
  .voice blockquote { margin: 0; font: italic 400 clamp(1.35rem, 1.1rem + 1vw, 1.9rem)/1.45 var(--font-display); font-variation-settings: "SOFT" 100; color: var(--cream); }
  .voice blockquote p + p { margin-top: 0.4em; }

  /* ---------- 5 · Parents set the frame ---------- */
  .frame { background: var(--navy); }
  .frame-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px 72px; align-items: start; }
  .frame .head { margin-bottom: 0; position: sticky; top: 88px; }
  .room { display: block; width: 100%; height: auto; margin-top: 22px; border-radius: 4px; box-shadow: 0 0 0 1px var(--cream-faint), 0 26px 50px -28px rgba(0, 0, 0, 0.7); }
  .settings { list-style: none; margin: 0; padding: 0; }
  .settings li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 6px 28px; padding-block: 20px; border-top: 1px solid var(--hair); }
  .settings li:last-child { border-bottom: 1px solid var(--hair); }
  .settings strong { font: 500 1.3rem/1.3 var(--font-display); font-variation-settings: "SOFT" 100; color: var(--gold); }
  .settings span { color: var(--cream-dim); }

  /* ---------- 6 · The intro: a small signal ---------- */
  .signal { background: var(--night); padding-block: clamp(72px, 9vw, 112px) clamp(36px, 5vw, 60px); }
  .signal-grid { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 32px 64px; align-items: center; }
  .signal p { color: var(--cream-dim); font-size: 1.2rem; margin-top: 14px; max-width: 22em; }
  .signal video { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 6px; background: var(--ink-night); box-shadow: 0 0 0 1px var(--cream-faint), 0 30px 60px -30px rgba(0, 0, 0, 0.6); }

  /* ---------- 7 · Goodnight: Numia over the paper-boat night ---------- */
  .closing { position: relative; overflow: hidden; text-align: center; background: linear-gradient(180deg, var(--night) 0%, var(--ink-night) 38%); padding-bottom: clamp(80px, 10vw, 120px); }
  .closing-scene { position: relative; height: clamp(320px, 44vw, 600px); }
  .closing-scene .scene-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 62%, transparent 100%); }
  .closing .goodnight { position: absolute; left: 50%; top: 13%; width: clamp(130px, 17vw, 230px); height: auto; translate: -50% 0; filter: drop-shadow(0 0 28px rgba(244, 199, 122, 0.5)); }
  .closing-copy { position: relative; margin-top: clamp(-120px, -8vw, -56px); }
  .closing h2 { font-style: italic; max-width: 16em; margin-inline: auto; }
  .closing .support { margin: 16px auto 28px; }
  .closing .signup { margin-inline: auto; justify-content: center; text-align: left; }
  .closing .sent { margin-inline: auto; text-align: left; }
  .closing .form-note { text-align: center; }
  @media (max-width: 720px) { .closing .goodnight { left: 42%; width: 112px; top: 16%; } }



  @media (max-width: 880px) {
    .moments, .home-grid, .frame-grid, .signal-grid { grid-template-columns: minmax(0, 1fr); }
    .moments::before { top: 34px; bottom: 34px; left: 34px; right: auto; height: auto; border-top: 0; border-left: 1.5px dashed var(--hair); }
    .moments li { grid-template-columns: 68px minmax(0, 1fr); column-gap: 20px; }
    .moments li > :not(.moment-mark) { grid-column: 2; }
    .moments li .moment-mark { grid-row: 1 / span 3; }
    .frame .head { position: static; }
    .book { grid-template-columns: minmax(0, 1fr); }
    .book::after { display: none; }
    .book .plate { padding: 16px 16px 0; }
    .book .plate img { aspect-ratio: 5 / 4; object-position: 50% 50%; }
    .book .text { padding: 26px 22px 24px; }
  }
  @media (max-width: 720px) {
    nav { padding-block: 14px; }
    .logo { height: 40px; }
    .hero-grid { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "eyebrow eyebrow" "title star" "promise promise" "support support" "form form"; align-items: center; gap: 14px 8px; padding-block: 4px 48px; }
    .hero-copy { display: contents; }
    .hero-copy .eyebrow { grid-area: eyebrow; }
    .hero h1 { grid-area: title; font-size: clamp(2.4rem, 9.4vw, 3.1rem); }
    .stage { grid-area: star; width: clamp(108px, 30vw, 150px); max-width: none; margin-right: -6px; }
    .arrival-glow { width: 380px; height: 380px; top: -190px; right: -190px; }
    .hero-grid .promise { grid-area: promise; }
    .hero-grid .support { grid-area: support; }
    #lista { grid-area: form; }
    .hero-grid .support { font-size: 1.04rem; }
    .settings li { grid-template-columns: minmax(0, 1fr); }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .cta { transition: none; }
    .float { animation: none; }
  }

/* =====================================================================
   Agregados v4: accesibilidad, formulario real, subpáginas, legales
   ===================================================================== */
.skip { position: absolute; left: 16px; top: -64px; z-index: 50; background: var(--gold); color: var(--navy); font-weight: 700; padding: 10px 18px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }
.field:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a { color: inherit; }
.hero .eyebrow { margin: 0; }

/* ---------- Formulario ---------- */
.signup .f-email { flex: 1 1 230px; min-width: 0; }
.signup .f-wide { flex: 1 1 100%; }
.f-label { display: block; margin: 0 0 6px 8px; font-weight: 700; font-size: 0.95rem; color: var(--cream-dim); }
.f-opt { font-weight: 500; opacity: 0.8; }
select.field { appearance: none; padding-right: 48px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none' stroke='%23f4c77a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 22px center; }
select.field option { color: #121c38; background: #fff6e9; }
textarea.field { border-radius: 22px; min-height: 108px; resize: vertical; line-height: 1.5; }
.consent { flex-basis: 100%; margin: 2px 0 0; }
.consent label { display: flex; gap: 12px; align-items: flex-start; font-size: 0.98rem; line-height: 1.45; color: rgba(255, 246, 233, 0.85); cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gold); cursor: pointer; }
.consent a { color: var(--gold); text-underline-offset: 3px; }
.hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cta[disabled] { opacity: 0.65; cursor: progress; transform: none; box-shadow: none; }
.cta.ghost { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); text-decoration: none; display: inline-block; }
.closing .consent label { text-align: left; }
.closing .signup { max-width: 560px; }

/* ---------- Bloque para profesionales (landing) ---------- */
.pros { background: var(--ink-night); border-top: 1px solid var(--cream-faint); padding-block: 34px; }
.pros p { color: var(--cream-dim); font-size: 1.05rem; max-width: 60em; }
.pros strong { color: var(--cream); font-weight: 700; }
.pros a { color: var(--gold); font-weight: 700; text-underline-offset: 3px; }

/* ---------- Pie ---------- */
footer { background: var(--ink-night); padding-block: 28px 44px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; border-top: 1px solid var(--cream-faint); padding-top: 28px; }
footer .logo { height: 42px; }
.tagline { font: italic 500 1.2rem var(--font-display); color: var(--gold); }
.links { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--cream-dim); font-weight: 600; }
.links a { color: var(--cream-dim); text-decoration: none; padding-block: 8px; }
.links a:hover { color: var(--gold); }
.legal-row { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 22px; color: rgba(255, 246, 233, 0.72); font-size: 0.92rem; }

/* ---------- Subpáginas (profesionales, jardines, gracias) ---------- */
.sub-hero { position: relative; background: radial-gradient(800px 520px at 82% 20%, rgba(244, 199, 122, 0.13), transparent 70%), linear-gradient(180deg, #0c1330 0%, var(--night) 60%, var(--navy) 100%); }
.sub-hero nav { padding-block: 20px; }
.sub-hero-body { display: grid; gap: 20px; padding-block: 36px 84px; max-width: 44rem; }
.sub-hero h1 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.2rem); line-height: 1.04; letter-spacing: -0.02em; }
.sub-hero .support { max-width: 36em; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cards li { display: grid; gap: 10px; align-content: start; padding: 28px 26px; border: 1px solid var(--hair); border-radius: 22px; background: rgba(255, 246, 233, 0.03); }
.cards h3 { color: var(--gold); }
.cards p { color: var(--cream-dim); }
.note-box { margin-top: 30px; padding: 18px 22px; border-left: 2px solid var(--gold); color: var(--cream-dim); max-width: 46rem; }
.join { background: var(--night); }
.join-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px 72px; align-items: start; }
.join .signup { max-width: 600px; }
.thanks { min-height: 70vh; display: grid; align-content: center; justify-items: start; gap: 18px; padding-block: 56px 96px; }
.thanks img { width: 150px; height: auto; filter: drop-shadow(0 0 22px rgba(244, 199, 122, 0.45)); }
.thanks h1 { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.8rem); line-height: 1.05; }

/* ---------- Páginas legales ---------- */
.legal { background: var(--night); padding-block: 40px 96px; }
.legal .col { max-width: 46rem; display: grid; gap: 16px; }
.legal h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); line-height: 1.05; margin-bottom: 4px; }
.legal h2 { font-size: 1.55rem; line-height: 1.2; margin-top: 26px; color: var(--gold); }
.legal p, .legal li { color: var(--cream-dim); font-size: 1.05rem; line-height: 1.7; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.legal a { color: var(--gold); text-underline-offset: 3px; }
.legal .updated { font-size: 0.95rem; color: rgba(255, 246, 233, 0.7); }

@media (max-width: 880px) {
  .cards, .join-grid { grid-template-columns: minmax(0, 1fr); }
  .legal-row { justify-content: flex-start; }
}

/* Sin JavaScript: se muestra una Numia fija en lugar de la animada */
.stage-static { position: absolute; inset: 8%; width: 84%; height: auto; }
.signal video { object-fit: cover; }

/* Correcciones de la revisión */
.sent img { height: auto; }
a.cta { display: inline-block; text-decoration: none; }
.sub-hero.plain { background: var(--night); }

/* ---------- v5: Numia compañera ---------- */
#estela { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }
#puntero { position: fixed; left: 0; top: 0; z-index: 61; pointer-events: none; opacity: 0; scale: 0.4; transition: opacity 0.22s ease, scale 0.32s cubic-bezier(0.3, 1.5, 0.5, 1); will-change: transform; filter: drop-shadow(0 3px 8px rgba(13, 20, 48, 0.35)); }
#puntero.on { opacity: 1; scale: 1; }
#puntero .pp-bob { position: relative; width: 100%; height: 100%; animation: pp-bob 2.4s ease-in-out infinite; }
#puntero img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }
#puntero .pp-b { opacity: 0; }
#puntero.wink .pp-a { opacity: 0; }
#puntero.wink .pp-b { opacity: 1; }
@keyframes pp-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }

/* =====================================================================
   v6: acabado premium y movimiento al avanzar (motion.js)
   ===================================================================== */
html.lenis, html.lenis body { height: auto; }
html.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }
::selection { background: rgba(244, 199, 122, 0.85); color: var(--ink-night); }

/* Mientras motion.js prepara la portada, sus textos esperan (early.js; 3 s como máximo) */
html.mo:not(.mo-ready) :is(.hero nav, .hero .eyebrow, .hero h1, .hero .promise, .hero .support, .hero #lista, .sub-hero nav, .sub-hero-body > *, .thanks > *, .legal .col > *) { visibility: hidden; }
/* Las máscaras de línea dejan lugar a los trazos que bajan (g, p, y) */
.ln-mask { padding-bottom: 0.14em; margin-bottom: -0.14em; }


/* ---------- Botones, campos y enlaces ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(180deg, #f9dca0 0%, var(--gold) 55%, #ecb862 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 26px -14px rgba(244, 199, 122, 0.9); transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.6) 50%, transparent 68%); translate: -130% 0; transition: translate 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cta:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 0 6px rgba(244, 199, 122, 0.14), 0 18px 44px -12px rgba(244, 199, 122, 0.55); }
.cta:hover::after { translate: 130% 0; }
.cta:active { transform: translateY(0) scale(0.98); transition-duration: 0.12s; }
.cta.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--gold); }
.field { transition: border-color 0.35s ease, box-shadow 0.45s ease, background-color 0.35s ease; }
.field:hover { border-color: rgba(255, 246, 233, 0.5); }
.field:focus { background-color: rgba(255, 246, 233, 0.1); box-shadow: 0 0 0 5px rgba(244, 199, 122, 0.14), 0 0 34px -6px rgba(244, 199, 122, 0.35); }
.navlink { border-bottom: 0; padding-bottom: 3px; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 1.5px no-repeat, linear-gradient(var(--hair), var(--hair)) 0 100% / 100% 1.5px no-repeat; transition: background-size 0.5s cubic-bezier(0.65, 0, 0.15, 1); }
.navlink { background-size: 0% 1.5px, 100% 1.5px; }
.navlink:hover { background-size: 100% 1.5px, 100% 1.5px; }
.links a, .pros a, .consent a, .legal a { transition: color 0.3s ease; }

/* ---------- Barra fija ---------- */
.topbar { position: fixed; top: 12px; left: 50%; z-index: 40; width: min(1088px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 8px 8px 22px; border-radius: 999px; overflow: hidden; background: linear-gradient(180deg, rgba(24, 36, 70, 0.94), rgba(13, 20, 48, 0.94)); box-shadow: inset 0 0 0 1px rgba(244, 199, 122, 0.2), 0 22px 44px -22px rgba(0, 0, 0, 0.75); translate: -50% calc(-100% - 20px); visibility: hidden; transition: translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.7s; }
.topbar.on { translate: -50% 0; visibility: visible; transition: translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
.topbar .logo { height: 34px; }
.topbar .tb-cta { padding: 12px 20px; font-size: 0.95rem; }
.tb-progress { position: absolute; left: 22px; right: 22px; bottom: 0; height: 1.5px; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, rgba(244, 199, 122, 0), var(--gold)); border-radius: 2px; }

/* ---------- Portada ---------- */
#stage { will-change: transform; }

/* ---------- Estrellas lejanas en las bandas de noche (se desplazan con el scroll) ---------- */
.home, .frame, .signal { position: relative; isolation: isolate; overflow: clip; }
.home::before, .frame::before, .signal::before { content: ""; position: absolute; inset: -80px 0; z-index: -1; pointer-events: none; opacity: 0.85; translate: 0 var(--sy, 0px); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Ccircle cx='207' cy='97' r='1.5' fill='%23f4c77a' fill-opacity='0.21'/%3E%3Ccircle cx='234' cy='37' r='1.2' fill='%23f4c77a' fill-opacity='0.29'/%3E%3Ccircle cx='278' cy='45' r='0.6' fill='%23f4c77a' fill-opacity='0.47'/%3E%3Ccircle cx='529' cy='79' r='0.7' fill='%23f4c77a' fill-opacity='0.51'/%3E%3Ccircle cx='369' cy='254' r='0.7' fill='%23d6dcff' fill-opacity='0.2'/%3E%3Ccircle cx='185' cy='92' r='0.6' fill='%23d6dcff' fill-opacity='0.48'/%3E%3Ccircle cx='66' cy='366' r='0.7' fill='%23f4c77a' fill-opacity='0.37'/%3E%3Ccircle cx='361' cy='396' r='1' fill='%23fff6e9' fill-opacity='0.53'/%3E%3Ccircle cx='497' cy='298' r='1' fill='%23d6dcff' fill-opacity='0.37'/%3E%3Ccircle cx='508' cy='447' r='0.7' fill='%23d6dcff' fill-opacity='0.22'/%3E%3Ccircle cx='336' cy='560' r='1.5' fill='%23f4c77a' fill-opacity='0.41'/%3E%3Ccircle cx='76' cy='268' r='0.8' fill='%23fff6e9' fill-opacity='0.26'/%3E%3Ccircle cx='270' cy='616' r='0.6' fill='%23d6dcff' fill-opacity='0.58'/%3E%3Ccircle cx='218' cy='224' r='1' fill='%23fff6e9' fill-opacity='0.48'/%3E%3Ccircle cx='44' cy='60' r='0.8' fill='%23f4c77a' fill-opacity='0.43'/%3E%3Ccircle cx='39' cy='449' r='1.5' fill='%23fff6e9' fill-opacity='0.48'/%3E%3Ccircle cx='182' cy='247' r='1.5' fill='%23fff6e9' fill-opacity='0.36'/%3E%3Ccircle cx='227' cy='391' r='1' fill='%23d6dcff' fill-opacity='0.21'/%3E%3Ccircle cx='83' cy='158' r='1' fill='%23fff6e9' fill-opacity='0.66'/%3E%3Ccircle cx='52' cy='287' r='1.2' fill='%23d6dcff' fill-opacity='0.32'/%3E%3Ccircle cx='524' cy='553' r='0.8' fill='%23d6dcff' fill-opacity='0.55'/%3E%3Ccircle cx='437' cy='243' r='0.7' fill='%23d6dcff' fill-opacity='0.26'/%3E%3Ccircle cx='97' cy='421' r='0.6' fill='%23d6dcff' fill-opacity='0.43'/%3E%3Ccircle cx='168' cy='3' r='1' fill='%23d6dcff' fill-opacity='0.46'/%3E%3Ccircle cx='610' cy='442' r='1.2' fill='%23f4c77a' fill-opacity='0.67'/%3E%3Ccircle cx='292' cy='557' r='1.5' fill='%23fff6e9' fill-opacity='0.59'/%3E%3Ccircle cx='255' cy='252' r='1' fill='%23f4c77a' fill-opacity='0.51'/%3E%3Ccircle cx='122' cy='630' r='1' fill='%23d6dcff' fill-opacity='0.26'/%3E%3Ccircle cx='384' cy='66' r='1.2' fill='%23f4c77a' fill-opacity='0.26'/%3E%3Ccircle cx='607' cy='393' r='0.6' fill='%23fff6e9' fill-opacity='0.63'/%3E%3Ccircle cx='95' cy='161' r='0.8' fill='%23fff6e9' fill-opacity='0.49'/%3E%3Ccircle cx='79' cy='543' r='1' fill='%23d6dcff' fill-opacity='0.43'/%3E%3Ccircle cx='55' cy='65' r='0.8' fill='%23fff6e9' fill-opacity='0.56'/%3E%3Ccircle cx='530' cy='103' r='0.6' fill='%23d6dcff' fill-opacity='0.29'/%3E%3Ccircle cx='94' cy='348' r='0.6' fill='%23d6dcff' fill-opacity='0.57'/%3E%3Ccircle cx='626' cy='553' r='1.5' fill='%23d6dcff' fill-opacity='0.62'/%3E%3Ccircle cx='581' cy='228' r='0.7' fill='%23d6dcff' fill-opacity='0.46'/%3E%3Ccircle cx='407' cy='392' r='0.7' fill='%23fff6e9' fill-opacity='0.6'/%3E%3Ccircle cx='474' cy='145' r='1.2' fill='%23f4c77a' fill-opacity='0.44'/%3E%3Ccircle cx='633' cy='506' r='1' fill='%23d6dcff' fill-opacity='0.31'/%3E%3Ccircle cx='286' cy='600' r='0.8' fill='%23d6dcff' fill-opacity='0.68'/%3E%3Ccircle cx='52' cy='65' r='1' fill='%23d6dcff' fill-opacity='0.28'/%3E%3Ccircle cx='309' cy='631' r='1.2' fill='%23fff6e9' fill-opacity='0.62'/%3E%3Ccircle cx='582' cy='220' r='1.5' fill='%23f4c77a' fill-opacity='0.22'/%3E%3Ccircle cx='582' cy='501' r='0.7' fill='%23d6dcff' fill-opacity='0.43'/%3E%3Ccircle cx='278' cy='407' r='0.6' fill='%23fff6e9' fill-opacity='0.6'/%3E%3C/svg%3E"); background-size: 640px 640px; will-change: translate; }
.signal::before { background-position: 220px 140px; }
.frame::before { background-position: 410px 300px; opacity: 0.6; }
/* Costuras suaves entre bandas de noche */
.frame { background: linear-gradient(180deg, var(--night) 0%, var(--navy) 18%, var(--navy) 82%, var(--night) 100%); }

/* ---------- Cómo funciona: hilo de luz que se dibuja ---------- */
.moments::before { transform-origin: 0 50%; transform: scaleX(var(--draw, 1)); }
.moments::after { content: ""; position: absolute; top: 34px; left: calc(34px + (88% - 34px) * var(--draw, 1)); width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff1cf; box-shadow: 0 0 10px 3px rgba(244, 199, 122, 0.8), 0 0 28px 8px rgba(244, 199, 122, 0.35); opacity: 0; }
html.mo-ready .moments::after { opacity: 1; }
.moment-mark { z-index: 1; transition: box-shadow 0.9s ease, background-color 0.9s ease; }
.moment-mark::after { content: ""; position: absolute; inset: -18px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(244, 199, 122, 0.32), rgba(244, 199, 122, 0) 66%); opacity: 0; transition: opacity 1.1s ease; }
.moments li.lit .moment-mark { background-color: #22335c; box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 26px -2px rgba(244, 199, 122, 0.45); }
.moments li.lit .moment-mark::after { opacity: 1; }

/* ---------- Nubes de papel que suben y derivan ---------- */
.paper::before { translate: 0 var(--rise, 0px); background-position: calc(0px + var(--drift, 0px)) 100%, calc(48px - var(--drift, 0px) * 0.6) 100%; }
.paper::after { background-position: calc(30px + var(--drift2, 0px)) 100%, calc(0px - var(--drift2, 0px) * 0.7) 100%; }
.paper { z-index: 1; }

/* ---------- El libro ---------- */
.paper .wrap { perspective: 1600px; }
.book { will-change: transform; transform-style: flat; }
.plate-frame { position: relative; overflow: hidden; }
.plate-frame img { will-change: transform; }
.book .plate img { aspect-ratio: auto; }
.book .plate-frame { aspect-ratio: 4 / 5; }
.book .plate-frame img { width: 100%; height: 100%; object-fit: cover; }
/* Luciérnagas sobre la ilustración */
.fly { position: absolute; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, #fff6d8 0%, rgba(255, 214, 140, 0.85) 35%, rgba(255, 214, 140, 0) 72%); box-shadow: 0 0 14px 4px rgba(255, 200, 110, 0.32); opacity: 0; animation: fly 8s ease-in-out infinite; }
.fly:nth-child(2) { left: 18%; top: 62%; animation-delay: -1s; }
.fly:nth-child(3) { left: 74%; top: 30%; animation-delay: -3.4s; animation-duration: 9.5s; }
.fly:nth-child(4) { left: 40%; top: 80%; animation-delay: -5.2s; }
.fly:nth-child(5) { left: 86%; top: 70%; animation-delay: -2.2s; animation-duration: 7s; }
.fly:nth-child(6) { left: 10%; top: 24%; animation-delay: -6.6s; animation-duration: 10s; }
.fly:nth-child(7) { left: 58%; top: 12%; animation-delay: -4.1s; }
@keyframes fly { 0% { opacity: 0; translate: 0 0; } 18% { opacity: 0.95; } 50% { opacity: 0.5; translate: 16px -28px; } 78% { opacity: 0.9; } 100% { opacity: 0; translate: -10px -58px; } }

/* ---------- Un cuento que suena a casa ---------- */
.voice { border-left: 0; position: relative; }
.voice::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1.5px; background: linear-gradient(180deg, var(--gold), var(--hair) 40%, rgba(244, 199, 122, 0.08)); transform-origin: 50% 0; transform: scaleY(var(--vline, 1)); }
.tabs button { position: relative; border-bottom: 0; transition: color 0.35s ease; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.55s cubic-bezier(0.65, 0, 0.15, 1); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.tabs button:hover { color: var(--cream); }

/* ---------- Para madres y padres ---------- */
.room-frame { margin-top: 22px; overflow: hidden; border-radius: 6px; box-shadow: 0 0 0 1px var(--cream-faint), 0 26px 50px -28px rgba(0, 0, 0, 0.7); }
.room-frame .room { margin-top: 0; border-radius: 0; box-shadow: none; will-change: transform; }
.settings li { position: relative; transition: background-color 0.5s ease; }
.settings li:hover { background-color: rgba(244, 199, 122, 0.035); }
html.mo-ready .settings li { border-top-color: transparent; }
html.mo-ready .settings li::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, var(--gold), var(--hair) 45%); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.3s cubic-bezier(0.65, 0, 0.15, 1); }
html.mo-ready .settings li > * { opacity: 0; translate: 0 14px; transition: opacity 0.9s ease 0.22s, translate 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.22s; }
html.mo-ready .settings li > span { transition-delay: 0.36s; }
html.mo-ready .settings li.in::before { transform: scaleX(1); }
html.mo-ready .settings li.in > * { opacity: 1; translate: 0 0; }

/* ---------- Video ---------- */
.signal video { will-change: transform; box-shadow: 0 0 0 1px var(--cream-faint), 0 40px 80px -40px rgba(0, 0, 0, 0.8), 0 0 90px -30px rgba(244, 199, 122, 0.3); }

/* ---------- Cierre ---------- */
.closing .goodnight-wrap { position: absolute; left: 50%; top: 13%; width: clamp(130px, 17vw, 230px); translate: -50% 0; will-change: transform; }
.closing .goodnight { position: static; display: block; width: 100%; translate: none; }
.scene-bg { will-change: transform; }
@media (max-width: 720px) {
  .closing .goodnight-wrap { left: 42%; width: 112px; top: 16%; }
  .closing .goodnight { width: 100%; }
  .topbar { padding-left: 16px; top: 10px; }
  .topbar .logo { height: 30px; }
  .topbar .tb-cta { padding: 11px 16px; font-size: 0.9rem; }
}
@media (max-width: 880px) {
  .moments::before { transform-origin: 50% 0; transform: scaleY(var(--draw, 1)); }
  .moments::after { left: 34px; top: calc(34px + (100% - 68px) * var(--draw, 1)); }
  .book .plate-frame { aspect-ratio: 5 / 4; }
}

/* ---------- Tarjetas de las subpáginas ---------- */
.cards li { transition: border-color 0.5s ease, background-color 0.5s ease, translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cards li:hover { border-color: rgba(244, 199, 122, 0.6); background-color: rgba(255, 246, 233, 0.05); translate: 0 -4px; }

@media (prefers-reduced-motion: reduce) {
  .topbar { transition: none; }
  .fly { display: none; }
  .cta, .cta::after, .field, .navlink, .tabs button::after, .cards li { transition: none; }
}

/* =====================================================================
   v7: cielo continuo de la apertura + ritmo y legibilidad (escena.js)
   ===================================================================== */
html { scrollbar-gutter: stable; scroll-padding-top: 88px; }
[id] { scroll-margin-top: 88px; }
html.intro-on, html.intro-on body { overflow: hidden; }

/* El cielo fijo de la página de inicio se ve detrás de todas las bandas de noche */
#cielo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
body:has(#cielo) { background: #0b1230; }
body:has(#cielo) :is(.hero, main, footer) { position: relative; z-index: 1; }
body:has(#cielo) .hero { background: transparent; }
body:has(#cielo) .how { background: linear-gradient(180deg, rgba(16, 25, 54, 0) 0%, rgba(22, 34, 66, 0.5) 100%); }
body:has(#cielo) .home { background: rgba(9, 15, 39, 0.38); }
body:has(#cielo) .frame { background: linear-gradient(180deg, rgba(9, 15, 39, 0.38) 0%, rgba(24, 37, 72, 0.58) 20%, rgba(24, 37, 72, 0.58) 80%, rgba(9, 15, 39, 0.2) 100%); }
body:has(#cielo) .signal { background: transparent; }
body:has(#cielo) .closing { background: linear-gradient(180deg, rgba(9, 15, 39, 0) 0%, rgba(9, 15, 39, 0.85) 45%, #0b1230 100%); }
body:has(#cielo) :is(.pros, footer) { background: #0b1230; }
body:has(#cielo) :is(.home, .frame, .signal)::before { display: none; }

/* Apertura */
.intro { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.intro-veil { position: absolute; inset: 0; background: #090f27; }
#lk { position: absolute; inset: 0; width: 100%; height: 100%; }
.lockup { position: absolute; will-change: transform; }
.lk-word { position: absolute; left: 13.75%; top: 56.9%; width: 82.5%; height: auto; max-width: none; filter: drop-shadow(0 0 22px rgba(244, 199, 122, 0.35));
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--rx, 0%) - 14%), transparent var(--rx, 0%)); mask-image: linear-gradient(90deg, #000 calc(var(--rx, 0%) - 14%), transparent var(--rx, 0%)); }
.lk-logo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; visibility: hidden; }
.intro-load { position: absolute; left: max(24px, 4vw); bottom: max(24px, 4vh); display: flex; gap: 18px; align-items: baseline; font: 700 0.74rem var(--font-body); letter-spacing: 0.26em; text-transform: uppercase; color: rgba(255, 246, 233, 0.62); }
.il-num { font: 500 1.6rem var(--font-display); letter-spacing: 0; color: var(--gold); font-variant-numeric: tabular-nums; }
.intro-skip { position: absolute; right: max(24px, 4vw); bottom: max(22px, 4vh); pointer-events: auto; font: 700 0.74rem var(--font-body); letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 246, 233, 0.78); background: rgba(9, 15, 39, 0.4); border: 1px solid rgba(255, 246, 233, 0.24); border-radius: 999px; padding: 11px 18px; cursor: pointer; transition: color 0.3s ease, border-color 0.3s ease; }
.intro-skip:hover, .intro-skip:focus-visible { color: var(--gold); border-color: var(--gold); }

/* Portada: más corta, para que «Cómo funciona» asome y llame a seguir */
.hero-grid { padding-block: 24px 40px; }
@media (min-width: 721px) {
  .hero-copy { opacity: calc(1 - var(--hp, 0) * 0.8); translate: 0 calc(var(--hp, 0) * -70px); }
}
body:has(#cielo) .how { padding-top: clamp(40px, 6vw, 72px); }

/* Ritmo entre secciones: aire, sin tramos vacíos */
.band { padding-block: clamp(64px, 8.5vw, 112px); }
.signal { padding-block: clamp(56px, 7vw, 92px) clamp(24px, 3vw, 40px); }
.closing-scene { height: clamp(300px, 40vw, 540px); }
.closing { padding-bottom: clamp(64px, 8vw, 96px); }

/* Los tres pasos: los textos siempre legibles; el progreso lo marcan el ícono, su contorno y el hilo */
.moment-mark svg { opacity: 0.45; transition: opacity 0.8s ease, filter 0.8s ease; }
.moments li.lit .moment-mark svg { opacity: 1; filter: drop-shadow(0 0 6px rgba(244, 199, 122, 0.55)); }
html:not(.mo-ready) .moment-mark svg { opacity: 1; }

/* Barra flotante: una píldora chica a la derecha que aparece al subir */
.topbar { left: auto; right: max(12px, env(safe-area-inset-right, 0px)); width: auto; gap: 12px; padding: 5px 5px 5px 14px; translate: 0 calc(-100% - 20px); background: rgba(11, 18, 44, 0.78); box-shadow: inset 0 0 0 1px rgba(244, 199, 122, 0.16), 0 14px 30px -18px rgba(0, 0, 0, 0.7); }
.topbar.on { translate: 0 0; }
.topbar .logo { height: 24px; }
.topbar .tb-cta { padding: 9px 16px; font-size: 0.88rem; }
.tb-progress { left: 14px; right: 14px; height: 1px; opacity: 0.8; }
@media (max-width: 720px) {
  .topbar { top: 8px; padding: 4px 4px 4px 12px; }
  .topbar .logo { height: 22px; }
  .topbar .tb-cta { padding: 8px 14px; font-size: 0.85rem; }
  .intro-skip { top: max(16px, env(safe-area-inset-top, 0px)); bottom: auto; right: 16px; }
  .intro-load { left: 16px; }
  /* Cierre: Numia entera, separada de la luna */
  .closing .goodnight-wrap { left: 34%; top: 14%; width: 104px; }
}
/* Durante la apertura solo se ve el cielo; el resto de la página entra con la portada */
main, footer { transition: opacity 0.9s ease 0.2s; }
html.intro-on :is(main, footer) { opacity: 0; transition: none; }
