/* =====================================================================
   OCHO AÑOS — estilos
   Estética: álbum de aventuras / correo aéreo / papel avena
   ===================================================================== */

:root {
  --oat: #f4ecdc;
  --oat-2: #ece0c6;
  --paper: #fbf7ee;
  --kraft: #c9a374;
  --kraft-d: #a8834f;
  --ink: #2d2522;
  --ink-soft: #6b5d55;
  --leather: #2b211d;
  --leather-2: #3a2c25;
  --wine: #8c1c3b;
  --rose: #e46a7c;
  --blush: #f6c9cf;
  --coral: #f08a5d;
  --sun: #f4c145;
  --sky: #4b9fc6;
  --mint: #7cc49a;
  --navy: #161c36;
  --navy-2: #232c52;
  --air-red: #c8322f;
  --air-blue: #1f4e9c;

  --f-display: "Fraunces", Georgia, serif;
  --f-hand: "Caveat", "Segoe Print", cursive;
  --f-fun: "Chewy", "Fraunces", cursive;
  --f-body: "Work Sans", "Segoe UI", sans-serif;

  --shadow-1: 0 1px 2px rgba(45, 37, 34, .12), 0 6px 18px rgba(45, 37, 34, .12);
  --shadow-2: 0 2px 4px rgba(45, 37, 34, .15), 0 18px 40px rgba(45, 37, 34, .22);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  scroll-padding-top: 72px;              /* que el dock no tape los títulos al navegar */
  color-scheme: light;
  accent-color: var(--rose);
  scrollbar-color: var(--kraft-d) var(--oat);
  interpolate-size: allow-keywords;      /* permite animar height: 0 → auto (mejora progresiva) */
}
::selection { background: var(--blush); color: var(--wine); }

/* tipografía: saltos de línea equilibrados en títulos y sin palabras huérfanas en párrafos */
h1, h2, h3, .section-title, .pg__title, .eight__whisper, .finale__msg { text-wrap: balance; }
p, li, .lead { text-wrap: pretty; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--oat);
  line-height: 1.55;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

/* grano de papel general */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; position: relative; z-index: 2; }

.section-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  text-align: center;
  margin: 0 0 .4em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.section-title small {
  display: block;
  font-family: var(--f-hand);
  font-weight: 600;
  font-size: .55em;
  color: var(--rose);
  letter-spacing: 0;
  margin-bottom: .1em;
  transform: rotate(-2deg);
}
.section-title--light { color: var(--paper); }
.section-title--light small { color: var(--sun); }
.lead { text-align: center; max-width: 56ch; margin: 0 auto 2.2rem; color: var(--ink-soft); }
.lead--light { color: #d9d3e8; }

.btn {
  border: 0;
  border-radius: 999px;
  padding: .8em 1.4em;
  font-weight: 500;
  background: var(--ink);
  color: var(--paper);
  transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.btn:focus-visible, .print-opt:focus-visible, .eight:focus-visible, .seal-card:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--ghost:disabled { opacity: .3; pointer-events: none; }
.btn--big { font-size: 1.15rem; padding: 1em 2em; background: var(--rose); color: #fff; box-shadow: 0 10px 30px rgba(228, 106, 124, .45); }
.btn--big:hover { background: var(--wine); }

/* Aparición al hacer scroll. Se usa `translate` (no `transform`) para no pisar
   los giros de las tarjetas y el `rotate` de la carta. */
.reveal { opacity: 0; translate: var(--from-x, 0) 28px; transition: opacity .9s var(--ease), translate .9s var(--ease); }
.reveal.is-in { opacity: 1; translate: none; }

@keyframes reveal-in { from { opacity: 0; translate: var(--from-x, 0) 44px; } }
@keyframes grow-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fly { from { transform: translateY(0); } to { transform: translateY(100%); } }
@keyframes page-swing {
  0%   { scale: .86; opacity: .55; rotate: -2deg; }
  50%  { scale: 1;   opacity: 1;   rotate: 0deg; }
  100% { scale: .86; opacity: .55; rotate: 2deg; }
}

/* Barra de progreso tipo correo aéreo (decorativa: sin fallback) */
.progress {
  display: none;
  position: fixed; inset: 0 0 auto; height: 5px; z-index: 55; pointer-events: none;
  background: repeating-linear-gradient(-45deg, var(--air-red) 0 8px, var(--paper) 8px 12px, var(--air-blue) 12px 20px, var(--paper) 20px 24px);
  transform-origin: 0 50%;
  box-shadow: 0 1px 4px rgba(45, 37, 34, .2);
}

/* Animaciones ligadas al scroll: nativas donde existen (Chrome, Edge, Safari 26, Firefox 159).
   Si no hay soporte, app.js usa IntersectionObserver / scroll como respaldo. */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .progress {
      display: block;
      animation: grow-progress auto linear;
      animation-timeline: scroll(root);
    }
    .reveal, .reveal.is-in {
      opacity: 1; translate: none;
      animation: reveal-in auto var(--ease) both;
      animation-timeline: view();
      animation-range: entry 5% cover 32%;
    }
    .route { view-timeline: --route block; }
    .route__track {
      animation: fly auto linear both;
      animation-timeline: --route;
      /* el avión va a la altura del 55 % de la pantalla, igual que antes con JS */
      animation-range: cover 45vh cover calc(100% - 55vh);
    }
    .mbook__page {
      animation: page-swing auto linear both;
      animation-timeline: view(inline);
    }
  }
}

/* ============================ INTRO ============================ */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 28px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.08), transparent 60%),
    repeating-linear-gradient(90deg, #5a4334 0 2px, #634a3a 2px 90px, #58402f 90px 92px, #6a503e 92px 180px),
    #5d4535;
  transition: opacity 1.1s ease, visibility 1.1s;
  padding: 16px;
}
.intro.is-gone { opacity: 0; visibility: hidden; }
.intro__hint {
  font-family: var(--f-hand); font-size: 1.6rem; color: var(--oat); margin: 0;
  animation: breathe 2.4s ease-in-out infinite;
}
.intro.is-open .intro__hint { opacity: 0; }

.envelope {
  --w: min(560px, 92vw);
  position: relative;
  width: var(--w); aspect-ratio: 1.55;
  border: 0; padding: 0; background: none;
  perspective: 1400px;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.45));
  animation: floaty 4s ease-in-out infinite;
}
.intro.is-open .envelope { animation: none; }
.envelope > span { position: absolute; display: block; }
.envelope__back { inset: 0; background: var(--kraft-d); border-radius: 6px; }
.envelope__letter {
  left: 5%; right: 5%; top: 6%; height: 88%;
  background: var(--paper);
  border-radius: 4px;
  transition: transform 1.2s var(--ease) .55s;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.envelope__letter-in {
  position: absolute; inset: 0; padding: 7% 8%;
  display: flex; flex-direction: column; justify-content: center; gap: 4%;
  text-align: center;
  background: repeating-linear-gradient(#fbf7ee 0 calc(1.5em - 1px), #e9dcc6 calc(1.5em - 1px) 1.5em);
  border-radius: 4px;
}
.envelope__letter .hand { font-family: var(--f-hand); font-size: clamp(1.05rem, 3.4vw, 1.5rem); line-height: 1.25; color: var(--ink); }
.envelope__eight { font-family: var(--f-display); font-size: clamp(2.2rem, 8vw, 3.4rem); color: var(--rose); line-height: 1; }
.envelope__front {
  inset: 0; z-index: 2;
  border-radius: 6px;
  background:
    linear-gradient(to top right, transparent 49.6%, rgba(0,0,0,.08) 50%, transparent 50.6%) left bottom / 50% 100% no-repeat,
    linear-gradient(to top left, transparent 49.6%, rgba(0,0,0,.08) 50%, transparent 50.6%) right bottom / 50% 100% no-repeat,
    var(--kraft);
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
}
.airmail {
  position: absolute; inset: 0; border-radius: 6px;
  padding: 10px;
  background: repeating-linear-gradient(-45deg, var(--air-red) 0 14px, transparent 14px 22px, var(--air-blue) 22px 36px, transparent 36px 44px);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: .9;
}
.envelope__to {
  position: absolute; left: 12%; bottom: 13%;
  text-align: left; display: grid; line-height: 1.1;
  font-family: var(--f-hand); color: var(--ink);
}
.envelope__to small { font-family: var(--f-body); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; opacity: .6; margin-top: 4px; }
.envelope__to strong { font-size: clamp(1.4rem, 4.6vw, 2rem); font-weight: 700; }
.envelope__to em { font-style: normal; font-size: clamp(1.1rem, 3.6vw, 1.5rem); }
.stamp {
  position: absolute;
  display: grid; place-items: center;
  background: radial-gradient(circle, transparent 3px, var(--paper) 3.5px) -5px -5px / 10px 10px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.2));
}
.stamp--intro { right: 9%; bottom: 14%; width: 20%; aspect-ratio: .82; }
.stamp--intro::before { content: ""; position: absolute; inset: 5px; outline: 3px solid var(--paper); background: linear-gradient(160deg, var(--rose), var(--coral)); }
.stamp--intro span { position: relative; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 6vw, 2.6rem); color: #fff; line-height: 1; }
.stamp--intro i { position: absolute; bottom: 12%; font-family: var(--f-hand); color: #fff; font-style: normal; font-size: clamp(.8rem, 2.6vw, 1rem); }
.postmark {
  position: absolute; right: 25%; bottom: 22%;
  width: 26%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(45,37,34,.55);
  display: grid; place-items: center; text-align: center;
  font-size: clamp(.5rem, 1.6vw, .7rem); font-weight: 600; letter-spacing: .08em; color: rgba(45,37,34,.65);
  transform: rotate(-14deg);
  line-height: 1.3;
}
.postmark small { font-family: var(--f-hand); font-size: 1.3em; letter-spacing: 0; font-weight: 400; }
.envelope__flap {
  left: 0; right: 0; top: 0; height: 56%; z-index: 3;
  background: linear-gradient(180deg, #d6b386, var(--kraft));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  transition: transform .8s var(--ease), z-index 0s .4s;
  border-radius: 6px 6px 0 0;
}
.envelope__seal {
  left: 50%; top: 56%; z-index: 4;
  width: 15%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #c13a55, var(--wine) 60%, #5c0f25);
  color: #ffd9de; font-size: clamp(1.1rem, 4vw, 1.7rem);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.3);
  transition: transform .5s var(--ease), opacity .4s;
}
.intro.is-open .envelope__seal { transform: scale(.2) rotate(40deg); opacity: 0; }
.intro.is-open .envelope__flap { transform: rotateX(180deg); z-index: 0; }
.intro.is-open .envelope__letter { transform: translateY(-62%); z-index: 2; }
.intro.is-open .envelope__front { z-index: 3; }

/* ============================ FX ============================ */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.balloons { position: fixed; inset: 0; pointer-events: none; z-index: 61; overflow: hidden; }
.balloon {
  position: absolute; bottom: -180px;
  width: 74px; height: 92px;
  border-radius: 50% 50% 48% 52% / 55% 55% 45% 45%;
  display: grid; place-items: center;
  font-family: var(--f-hand); font-weight: 700; font-size: 1.2rem; color: rgba(255,255,255,.95);
  box-shadow: inset -10px -12px 0 rgba(0,0,0,.12), inset 8px 8px 14px rgba(255,255,255,.35);
  animation: rise var(--dur, 9s) cubic-bezier(.35,.05,.4,1) forwards;
}
.balloon::before { content: ""; position: absolute; bottom: -6px; left: 50%; translate: -50% 0; border: 6px solid transparent; border-bottom-color: inherit; border-bottom: 0; border-top: 8px solid var(--c); }
.balloon::after { content: ""; position: absolute; top: 100%; left: 50%; width: 1px; height: 110px; background: rgba(45,37,34,.4); transform-origin: top; animation: string 2s ease-in-out infinite alternate; }

/* ============================ DOCK ============================ */
.dock {
  position: fixed; z-index: 50;
  top: 14px; left: 50%; translate: -50% 0;
  display: flex; gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(251, 247, 238, .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-1);
  max-width: calc(100% - 24px);
  overflow-x: auto; scrollbar-width: none;
  opacity: 0; transform: translateY(-20px);
  transition: opacity .6s, transform .6s var(--ease);
}
.dock::-webkit-scrollbar { display: none; }
body.ready .dock { opacity: 1; transform: none; }
.dock a {
  text-decoration: none; white-space: nowrap;
  font-size: .85rem; padding: .45em .95em; border-radius: 999px;
  color: var(--ink-soft);
  transition: background .25s, color .25s;
}
.dock a:hover, .dock a.is-active { background: var(--ink); color: var(--paper); }
.dock a:focus-visible, .mbook:focus-visible, .lightbox__btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.music {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 999px; padding: 8px 16px 8px 8px;
  background: var(--leather); color: var(--oat);
  box-shadow: var(--shadow-2);
  font-family: var(--f-hand); font-size: 1.15rem;
}
.music__disc {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle, var(--rose) 0 18%, #111 19% 22%, #2a2a2a 23% 40%, #111 41% 44%, #333 45% 70%, #111 71%);
}
.music[aria-pressed="true"] .music__disc { animation: spin 3s linear infinite; }

/* ============================ HERO ============================ */
.hero {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  padding: 90px 16px 60px;
  overflow: hidden;
}
.hero__paper {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(255, 255, 255, .7), transparent 70%),
    radial-gradient(circle at 12% 20%, rgba(246, 201, 207, .55), transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(244, 193, 69, .25), transparent 32%),
    var(--oat);
}
.hero__paper::after {
  content: ""; position: absolute; inset: 18px;
  border: 1.5px dashed rgba(45, 37, 34, .18);
  border-radius: 14px;
}
.hero__inner { position: relative; display: grid; justify-items: center; }
.hero__kicker {
  font-family: var(--f-hand); font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin: 0; color: var(--ink);
  opacity: 0; animation: up 1s var(--ease) forwards;
  animation-play-state: paused;
}
.hero__kicker .amp { color: var(--rose); padding: 0 .1em; }
body.ready .hero__kicker, body.ready .eight, body.ready .hero__title, body.ready .hero__dates, body.ready .countdown, body.ready .scroll-cue { animation-play-state: running; }

.eight {
  border: 0; background: none; padding: 0;
  line-height: .78;
  opacity: 0; animation: pop 1.3s var(--ease) .2s forwards; animation-play-state: paused;
}
.eight__num {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(11rem, 38vw, 21rem);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  background: linear-gradient(170deg, var(--coral) 10%, var(--rose) 45%, var(--wine) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 12px 18px rgba(140, 28, 59, .22));
  transition: transform 1.2s cubic-bezier(.5, -0.4, .3, 1.4);
}
.eight:hover .eight__num { transform: rotate(-6deg) scale(1.03); }
.eight.is-infinite .eight__num { transform: rotate(90deg) scale(.92); }
.eight__whisper {
  font-family: var(--f-hand); font-size: clamp(1.2rem, 3vw, 1.6rem); color: var(--wine);
  margin: 0; max-width: 30ch; height: 0; opacity: 0; overflow: hidden;
  transition: opacity .8s, height .8s var(--ease);
}
.eight.is-infinite + .eight__whisper { opacity: 1; height: auto; }
.hero__title {
  font-family: var(--f-display); font-weight: 400; font-style: italic;
  font-size: clamp(2.4rem, 7vw, 4.4rem); margin: -.05em 0 0; line-height: 1;
  opacity: 0; animation: up 1s var(--ease) .5s forwards; animation-play-state: paused;
}
.hero__title em { color: var(--rose); }
.hero__dates {
  font-size: .95rem; letter-spacing: .3em; color: var(--ink-soft); margin: 1rem 0 2rem;
  opacity: 0; animation: up 1s var(--ease) .7s forwards; animation-play-state: paused;
}
.hero__dates span { color: var(--rose); letter-spacing: 0; padding: 0 .4em; }

.countdown { opacity: 0; animation: up 1s var(--ease) .9s forwards; animation-play-state: paused; }
.countdown__label { font-family: var(--f-hand); font-size: 1.5rem; margin: 0 0 .6rem; color: var(--ink); }
.countdown__tiles { display: flex; gap: clamp(8px, 2vw, 16px); justify-content: center; }
.tile {
  position: relative;
  min-width: clamp(64px, 17vw, 96px);
  padding: 12px 8px 10px;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: var(--shadow-1);
  display: grid;
}
.tile::before, .tile::after {
  content: ""; position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--oat); translate: 0 -50%;
}
.tile::before { left: -6px; } .tile::after { right: -6px; }
.tile b { font-family: var(--f-display); font-size: clamp(1.8rem, 6vw, 2.8rem); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.countdown__today {
  font-family: var(--f-display); font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 600; color: var(--wine); margin: 0; line-height: 1.1;
}
.countdown__today span { font-family: var(--f-hand); font-weight: 400; color: var(--ink); font-size: .75em; }

.scroll-cue {
  margin-top: 2.4rem; text-decoration: none;
  font-family: var(--f-hand); font-size: 1.3rem; color: var(--ink-soft);
  display: grid; justify-items: center; gap: 6px;
  opacity: 0; animation: up 1s var(--ease) 1.2s forwards; animation-play-state: paused;
}
.scroll-cue span { width: 2px; height: 36px; background: linear-gradient(var(--ink-soft), transparent); animation: drip 1.8s ease-in-out infinite; }

.sticker { position: absolute; pointer-events: none; }
.sticker--plane {
  top: 14%; left: 6%; width: clamp(70px, 12vw, 140px); aspect-ratio: 1.6;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100'%3E%3Cpath d='M4 70 C40 90 70 40 100 52' fill='none' stroke='%232d2522' stroke-width='2' stroke-dasharray='5 6' opacity='.5'/%3E%3Cpath d='M100 52 L156 22 L128 72 L118 58 Z' fill='%234b9fc6'/%3E%3Cpath d='M100 52 L156 22 L118 58 Z' fill='%2387c3de'/%3E%3C/svg%3E") center/contain no-repeat;
  animation: drift 7s ease-in-out infinite;
}
.sticker--balloons {
  right: 7%; bottom: 16%; width: clamp(60px, 9vw, 110px); aspect-ratio: .7;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 100'%3E%3Cg stroke='%232d2522' stroke-width='.8' opacity='.6'%3E%3Cpath d='M35 98 L20 40 M35 98 L35 34 M35 98 L52 42'/%3E%3C/g%3E%3Cellipse cx='20' cy='28' rx='14' ry='17' fill='%23f08a5d'/%3E%3Cellipse cx='52' cy='30' rx='14' ry='17' fill='%23f4c145'/%3E%3Cellipse cx='35' cy='20' rx='15' ry='18' fill='%23e46a7c'/%3E%3C/svg%3E") center/contain no-repeat;
  animation: drift 6s ease-in-out -2s infinite;
}

/* ============================ NIGHT / CONTADORES ============================ */
.night {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
  background: radial-gradient(ellipse at 50% 0%, var(--navy-2), var(--navy) 65%);
  color: var(--paper);
  overflow: hidden;
}
.night__stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.ticket {
  display: grid; grid-template-columns: 1fr 210px;
  max-width: 920px; margin: 2.2rem auto 0;
  color: var(--ink);
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .35));
}
.ticket__main, .ticket__stub {
  background: var(--paper);
  --r: radial-gradient(circle 12px at 100% 0, transparent 98%, #000) top right / 51% 51% no-repeat,
       radial-gradient(circle 12px at 100% 100%, transparent 98%, #000) bottom right / 51% 51% no-repeat,
       linear-gradient(#000 0 0) left / 50% 100% no-repeat;
}
.ticket__main {
  padding: 26px clamp(18px, 3.4vw, 36px);
  border-radius: 16px 0 0 16px;
  -webkit-mask: var(--r); mask: var(--r);
  border-right: 2px dashed rgba(45, 37, 34, .25);
}
.ticket__stub {
  border-radius: 0 16px 16px 0;
  padding: 26px 22px;
  display: grid; align-content: start; gap: 2px;
  background: linear-gradient(var(--sun), var(--sun)) top / 100% 10px no-repeat, var(--paper);
  -webkit-mask:
    radial-gradient(circle 12px at 0 0, transparent 98%, #000) top left / 51% 51% no-repeat,
    radial-gradient(circle 12px at 0 100%, transparent 98%, #000) bottom left / 51% 51% no-repeat,
    linear-gradient(#000 0 0) right / 50% 100% no-repeat;
  mask:
    radial-gradient(circle 12px at 0 0, transparent 98%, #000) top left / 51% 51% no-repeat,
    radial-gradient(circle 12px at 0 100%, transparent 98%, #000) bottom left / 51% 51% no-repeat,
    linear-gradient(#000 0 0) right / 50% 100% no-repeat;
}
.ticket--rose .ticket__stub { background: linear-gradient(var(--rose), var(--rose)) top / 100% 10px no-repeat, var(--paper); }
.ticket__stub small { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-top: 10px; }
.ticket__stub b { font-family: var(--f-hand); font-size: 1.5rem; line-height: 1.05; }
.barcode {
  display: block; height: 46px; margin-top: 18px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 9px, var(--ink) 9px 12px, transparent 12px 13px);
}
.ticket__airline { margin: 0; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--air-blue); font-weight: 600; }
.ticket--rose .ticket__airline { color: var(--wine); }
.ticket__route { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 6px; }
.ticket__route > div { display: grid; }
.ticket__route > div:last-child { text-align: right; }
.ticket__route small { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.ticket__route b { font-family: var(--f-display); font-size: clamp(1.3rem, 3.4vw, 2.2rem); font-weight: 600; line-height: 1.1; }
.ticket__route span { font-family: var(--f-hand); font-size: 1.15rem; color: var(--rose); }
.ticket__plane {
  flex: 1; text-align: center; font-size: 1.5rem; color: var(--sky);
  background: linear-gradient(90deg, transparent, rgba(45, 37, 34, .3) 20% 80%, transparent) center / 100% 1.5px no-repeat;
}
.ticket__caption { margin: 14px 0 8px; font-family: var(--f-hand); font-size: 1.4rem; }
.clock { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.clock div { display: grid; text-align: center; background: var(--oat); border-radius: 8px; padding: 8px 2px 6px; }
.clock b { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.4rem, 4vw, 2.3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.clock span { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.clock b.tick { animation: tick .45s var(--ease); }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px;
  max-width: 920px; margin: 3.2rem auto 0;
}
.stat {
  position: relative; text-align: center;
  padding: 22px 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(4px);
}
.stat__ico { font-size: 1.6rem; }
.stat b { display: block; font-family: var(--f-display); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 600; color: var(--sun); line-height: 1.1; margin: 4px 0; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: #cfcbe0; }

/* ============================ RUTA / TIMELINE ============================ */
.history { position: relative; padding: clamp(80px, 12vw, 140px) 0; overflow-x: clip; }
/* las fotos de la ruta entran desde su lado */
.stop:nth-child(odd) .stop__photo { --from-x: 36px; }
.stop:nth-child(even) .stop__photo { --from-x: -36px; }
.route__track { position: absolute; inset: 0; display: block; }
.route { position: relative; margin-top: 3rem; }
.route__line {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; translate: -50% 0;
  background: repeating-linear-gradient(var(--ink-soft) 0 8px, transparent 8px 16px);
  opacity: .5;
}
.route__plane {
  position: absolute; left: 50%; top: 0; translate: -50% -50%;
  font-size: 1.8rem; color: var(--sky); rotate: 90deg;
  text-shadow: 0 3px 6px rgba(0, 0, 0, .15);
}
.route__list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(30px, 6vw, 60px); }
.stop {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center;
}
.stop::before {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--rose);
  z-index: 1;
}
.stop--big::before { width: 24px; height: 24px; background: var(--rose); box-shadow: 0 0 0 6px rgba(228, 106, 124, .25); }
.stop__card { text-align: right; }
.stop__photo { justify-self: start; }
.stop:nth-child(even) .stop__card { order: 2; text-align: left; }
.stop:nth-child(even) .stop__photo { order: 1; justify-self: end; }
.stop__date {
  display: inline-block;
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
  background: var(--ink); color: var(--paper); padding: .35em .9em; border-radius: 4px;
}
.stop--big .stop__date { background: var(--rose); }
.stop__card h3 { font-family: var(--f-display); font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin: .35em 0 .2em; line-height: 1.1; font-weight: 600; }
.stop__card p { margin: 0; color: var(--ink-soft); max-width: 38ch; display: inline-block; }

.polaroid {
  position: relative;
  background: #fff;
  padding: 10px 10px 34px;
  box-shadow: var(--shadow-1);
  width: min(270px, 100%);
  rotate: var(--rot, -3deg);
  transition: rotate .5s var(--ease), transform .5s var(--ease);
  cursor: zoom-in;
}
.polaroid:hover { rotate: 0deg; transform: scale(1.04); z-index: 2; }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--oat-2); }
.polaroid::before {
  content: ""; position: absolute; top: -12px; left: 50%; translate: -50% 0; rotate: -4deg;
  width: 90px; height: 26px;
  background: repeating-linear-gradient(45deg, rgba(246, 201, 207, .85) 0 8px, rgba(255, 255, 255, .7) 8px 16px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.stop:nth-child(3n+2) .polaroid::before { background: repeating-linear-gradient(90deg, rgba(244, 193, 69, .8) 0 10px, rgba(255, 255, 255, .6) 10px 14px); }
.stop:nth-child(3n) .polaroid::before { background: rgba(124, 196, 154, .75); }

/* ============================ BOOK ============================ */
.bookroom {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, .5), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.0) 0 120px, rgba(140, 110, 80, .05) 120px 122px),
    #e9dfcb;
}
.book-stage {
  --pw: min(560px, 46vw);         /* ancho de UNA página */
  --ph: calc(var(--pw) * 165 / 245);
  position: relative;
  width: calc(var(--pw) * 2); height: var(--ph);
  margin: 2rem auto 0;
  perspective: 2600px;
}
.book {
  position: absolute; inset: 0;
  transition: transform .9s var(--ease);
  transform-style: preserve-3d;
}
.book.is-closed { transform: translateX(-25%); }
.book.is-end { transform: translateX(25%); }
.book::after { /* sombra sobre la mesa */
  content: ""; position: absolute; left: 50%; right: 0; bottom: -26px; height: 30px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.28), transparent 70%);
  filter: blur(4px); z-index: -1;
}
.book:not(.is-closed)::after { left: 0; }
.book.is-end::after { left: 0; right: 50%; }
.leaf {
  position: absolute; top: 0; left: 50%;
  width: 50%; height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(.6, .04, .3, 1);
}
.leaf.flipped { transform: rotateY(-180deg); }
.face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  overflow: hidden;
  cursor: pointer;
}
.face.back { transform: rotateY(180deg); }
.face::after { /* lomo / sombreado de curvatura */
  content: ""; position: absolute; inset: 0; pointer-events: none;
}
.face.front::after { background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,.04) 6%, transparent 14%); }
.face.back::after { background: linear-gradient(270deg, rgba(0,0,0,.18), rgba(0,0,0,.04) 6%, transparent 14%); }
.face.front { border-radius: 0 6px 6px 0; box-shadow: 2px 3px 8px rgba(0,0,0,.18); }
.face.back { border-radius: 6px 0 0 6px; box-shadow: -2px 3px 8px rgba(0,0,0,.18); }
.leaf.is-cover .face.front::after, .leaf.is-backcover .face.back::after { background: none; }

.book-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 2.6rem; }
.book-ctrl__count { font-family: var(--f-hand); font-size: 1.4rem; min-width: 9ch; text-align: center; }

.mbook {
  display: none;
  gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px 16px 18px;
  margin: 1.4rem -16px 0;
  scrollbar-width: none;
}
.mbook::-webkit-scrollbar { display: none; }
.mbook__page {
  flex: 0 0 88%;
  aspect-ratio: 245 / 165;
  scroll-snap-align: center;
  border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow-1);
}

/* ---------- Página del álbum (todas las medidas relativas al tamaño de la página) ---------- */
.pg {
  container-type: size;
  position: relative; width: 100%; height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.55), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(201, 163, 116, .18), transparent 40%),
    var(--oat);
  color: var(--ink);
  font-family: var(--f-body);
}
.pg::before { /* fibras del papel */
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .28 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.pg--dots { background-image: radial-gradient(rgba(45,37,34,.13) 1px, transparent 1.4px), radial-gradient(circle at 20% 15%, rgba(255,255,255,.55), transparent 45%); background-size: 3% 4.45%, auto; background-color: var(--oat); }
.pg--grid {
  background-image:
    linear-gradient(rgba(75,159,198,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75,159,198,.13) 1px, transparent 1px);
  background-size: 4% 5.94%; background-color: var(--oat);
}
.pg__num { position: absolute; bottom: 2.4cqh; font-family: var(--f-hand); font-size: 2.6cqw; color: var(--ink-soft); opacity: .7; }
.pg__num--r { right: 3cqw; } .pg__num--l { left: 3cqw; }

.pg__title {
  font-family: var(--f-hand); font-weight: 700;
  font-size: 6.6cqw; line-height: .95; margin: 0;
  color: var(--ink);
}
.pg__title mark {
  background: linear-gradient(transparent 55%, var(--hl, rgba(244, 193, 69, .55)) 55% 88%, transparent 88%);
  color: inherit; padding: 0 .1em;
}
.pg__date {
  display: inline-block;
  font-size: 1.85cqw; letter-spacing: .25em; text-transform: uppercase; font-weight: 600;
  color: var(--paper); background: var(--ink);
  padding: .45em .9em; border-radius: .3em;
  rotate: -2deg;
}
.pg__text { font-family: var(--f-display); font-style: italic; font-size: 2.55cqw; line-height: 1.38; margin: 0; color: var(--ink); }

.pp { /* polaroid dentro de la página */
  position: absolute;
  background: #fff;
  padding: 1.1cqw 1.1cqw 4.2cqw;
  box-shadow: 0 .3cqw .6cqw rgba(0,0,0,.14), 0 1.4cqw 2.6cqw rgba(0,0,0,.12);
  rotate: var(--r, 0deg);
}
.pp img { width: 100%; height: 100%; object-fit: cover; background: var(--oat-2); cursor: zoom-in; }
.pp__in { width: 100%; aspect-ratio: var(--ar, 3 / 4); overflow: hidden; }
.pp::before { /* washi */
  content: ""; position: absolute; top: -1.6cqw; left: 50%; translate: -50% 0; rotate: var(--tr, -5deg);
  width: 40%; height: 3.4cqw; z-index: 2;
  background: var(--tape, repeating-linear-gradient(45deg, rgba(246, 201, 207, .9) 0 1.2cqw, rgba(255,255,255,.75) 1.2cqw 2.4cqw));
  box-shadow: 0 .1cqw .3cqw rgba(0,0,0,.08);
}
.pp--t2 { --tape: repeating-linear-gradient(90deg, rgba(244,193,69,.85) 0 1.4cqw, rgba(255,255,255,.6) 1.4cqw 2cqw); --tr: 4deg; }
.pp--t3 { --tape: rgba(124, 196, 154, .8); --tr: -2deg; }
.pp--t4 { --tape: repeating-linear-gradient(-45deg, rgba(75,159,198,.8) 0 1cqw, rgba(255,255,255,.7) 1cqw 2cqw); --tr: 6deg; }
.pp--empty .pp__in {
  display: grid; place-items: center; text-align: center;
  border: .35cqw dashed rgba(45,37,34,.35);
  background: repeating-linear-gradient(45deg, transparent 0 1.4cqw, rgba(201,163,116,.12) 1.4cqw 2.8cqw);
  font-family: var(--f-hand); font-size: 2.8cqw; color: var(--ink-soft); padding: 2cqw;
}
.pp__cap { position: absolute; left: 0; right: 0; bottom: .6cqw; text-align: center; font-family: var(--f-hand); font-size: 2.3cqw; color: var(--ink-soft); }

/* layout: tres */
.pg--tres .pg__head { position: absolute; left: 5cqw; top: 5cqh; right: 5cqw; display: flex; align-items: baseline; gap: 2.4cqw; flex-wrap: wrap; }
.pg--tres .pp { width: 27cqw; top: 23cqh; }
.pg--tres .pp:nth-of-type(1) { left: 4.5cqw; --r: -4deg; }
.pg--tres .pp:nth-of-type(2) { left: 36.5cqw; top: 19cqh; --r: 2.5deg; }
.pg--tres .pp:nth-of-type(3) { left: 68.5cqw; --r: -1.5deg; }
.pg--tres .pg__text { position: absolute; left: 6cqw; right: 22cqw; bottom: 5.5cqh; font-size: 2.3cqw; }

/* layout: dos */
.pg--dos .pp { width: 29cqw; top: 12cqh; --ar: 4 / 5; }
.pg--dos .pp:nth-of-type(1) { left: 4.5cqw; --r: -3.5deg; }
.pg--dos .pp:nth-of-type(2) { left: 34.5cqw; top: 22cqh; --r: 3deg; }
.pg--dos .pg__side { position: absolute; left: 68cqw; right: 4.5cqw; top: 14cqh; display: grid; gap: 2.4cqw; justify-items: start; }

/* layout: una */
.pg--una .pp { width: 33cqw; left: 7cqw; top: 9cqh; --ar: 4 / 5; --r: -2.5deg; }
.pg--una .pg__side { position: absolute; left: 48cqw; right: 6cqw; top: 18cqh; display: grid; gap: 2.6cqw; justify-items: start; }
.pg--una .pg__title { font-size: 8cqw; }

/* layout: dedicatoria */
.pg--dedicatoria { display: grid; place-items: center; text-align: center; }
.pg--dedicatoria .ded { width: 72cqw; display: grid; gap: 3cqw; justify-items: center; position: relative; z-index: 1; }
.pg--dedicatoria .pg__title { font-size: 8cqw; }
.pg--dedicatoria .pg__text { font-size: 2.9cqw; }
.pg--dedicatoria .ded__sign { font-family: var(--f-hand); font-size: 3.6cqw; color: var(--rose); }

/* layout: sueños */
.pg--suenos { padding: 4% 6%; }
.pg--suenos .pg__title { font-family: var(--f-fun); font-weight: 400; font-size: 7cqw; letter-spacing: .02em; line-height: 1; }
.pg--suenos .pg__title span:nth-child(3n+1) { color: var(--coral); }
.pg--suenos .pg__title span:nth-child(3n+2) { color: var(--sky); }
.pg--suenos .pg__title span:nth-child(3n) { color: var(--rose); }
.dreams { list-style: none; margin: 4cqh 0 0; padding: 0; columns: 2; column-gap: 5cqw; }
.dreams li { break-inside: avoid; display: flex; gap: 1.6cqw; align-items: center; font-family: var(--f-hand); font-size: 3.1cqw; line-height: 1.15; padding: 1.4cqh 0; border-bottom: .2cqw dashed rgba(45,37,34,.2); }
.dreams li::before { content: ""; flex: 0 0 auto; width: 2.6cqw; height: 2.6cqw; border: .3cqw solid var(--ink); border-radius: .5cqw; }

/* layout: final */
.pg--final { display: grid; place-items: center; text-align: center; }
.pg--final .fin { display: grid; gap: 2cqw; justify-items: center; position: relative; z-index: 1; }
.pg--final .fin__big { font-family: var(--f-display); font-style: italic; font-size: 7cqw; line-height: 1; margin: 0; }
.pg--final .fin__inf { font-family: var(--f-display); font-size: 15cqw; color: var(--rose); line-height: .8; margin: 0; }
.pg--final .fin__small { font-family: var(--f-hand); font-size: 3.4cqw; margin: 0; }

/* portada */
.pg--portada {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.07), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(0,0,0,.35), transparent 60%),
    var(--leather);
}
.pg--portada::before { opacity: .9; mix-blend-mode: overlay; }
.cover__spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 16cqw;
  background: linear-gradient(90deg, #4b3529, #3e2c22 40%, #33241c);
  box-shadow: inset -.6cqw 0 1cqw rgba(0,0,0,.35);
}
.cover__cord {
  position: absolute; left: 6cqw; top: 22cqh; bottom: 22cqh; width: 3.4cqw;
  border-radius: 2cqw;
  border: .9cqw solid #e9dcc2;
  border-left-color: transparent;
}
.cover__knot { position: absolute; left: 3.6cqw; top: 46cqh; width: 7cqw; height: 9cqh; background: radial-gradient(ellipse, #efe4cd 40%, #cdbd9d 70%, transparent 72%); }
.cover__frame {
  position: absolute; left: 21cqw; right: 4cqw; top: 6cqh; bottom: 6cqh;
  border: .25cqw solid rgba(233, 220, 194, .55);
  outline: .25cqw solid rgba(233, 220, 194, .25); outline-offset: .9cqw;
  display: grid; place-items: center;
}
.cover__oval {
  width: 92%; height: 84%;
  border: .25cqw solid rgba(233, 220, 194, .5);
  border-radius: 50%;
  display: grid; place-items: center; align-content: center; text-align: center;
  gap: 1.6cqh;
}
.cover__title { margin: 0; font-family: var(--f-fun); font-weight: 400; line-height: .9; letter-spacing: .03em; }
.cover__title .w { display: block; white-space: nowrap; }
.cover__title .w1 { font-size: 8cqw; }
.cover__title .w2 { font-size: 11.5cqw; }
.cover__title .w3 { font-size: 10cqw; }
.cover__title .ch { display: inline-block; text-shadow: 0 .3cqw 0 rgba(0,0,0,.35); }
.cover__title .ch:nth-child(6n+1) { color: #f08a5d; rotate: -4deg; }
.cover__title .ch:nth-child(6n+2) { color: #f4c145; rotate: 3deg; translate: 0 -.4cqw; }
.cover__title .ch:nth-child(6n+3) { color: #4b9fc6; rotate: -2deg; }
.cover__title .ch:nth-child(6n+4) { color: #e46a7c; rotate: 4deg; translate: 0 .3cqw; }
.cover__title .ch:nth-child(6n+5) { color: #7cc49a; rotate: -3deg; }
.cover__title .ch:nth-child(6n) { color: #f5ecdc; rotate: 2deg; }
.cover__names { margin: 0; font-family: var(--f-hand); font-size: 3.6cqw; color: #efe4cd; }
.cover__badge {
  width: 7cqw; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8fc6de, #4b9fc6 55%, #2f7097);
  display: grid; place-items: center; color: #fff; font-size: 4cqw;
  box-shadow: 0 .4cqw .8cqw rgba(0,0,0,.4);
  position: relative;
}
.cover__badge::before { content: ""; position: absolute; top: -.6cqw; left: 10%; right: 10%; height: 1.6cqw; background: rgba(124,196,154,.9); rotate: -6deg; }

/* contraportada */
.pg--contra { background: var(--leather); }
.pg--contra::before { opacity: .9; mix-blend-mode: overlay; }
.pg--contra .contra { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-hand); font-size: 3.4cqw; color: #cdbd9d; text-align: center; }

/* stickers dentro de páginas */
.dk { position: absolute; width: var(--s, 9cqw); aspect-ratio: 1; rotate: var(--r, 0deg); pointer-events: none; z-index: 3; }
.dk svg { width: 100%; height: 100%; overflow: visible; }
.dk--sello { width: var(--s, 12cqw); }

/* ============================ PRINT DESK ============================ */
.printdesk {
  margin: 4rem auto 0; max-width: 980px;
  background: var(--paper);
  border-radius: 20px;
  padding: clamp(22px, 4vw, 40px);
  box-shadow: var(--shadow-2);
  position: relative;
}
.printdesk::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 8px; pointer-events: none;
  background: repeating-linear-gradient(-45deg, var(--air-red) 0 12px, transparent 12px 20px, var(--air-blue) 20px 32px, transparent 32px 40px);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: .85;
}
.printdesk__head h3 { font-family: var(--f-display); font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 .3em; font-weight: 600; }
.printdesk__head p { margin: 0 0 1.6rem; color: var(--ink-soft); max-width: 70ch; }
.printdesk__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.print-opt {
  text-align: left; border: 1.5px solid rgba(45,37,34,.15); background: var(--oat);
  border-radius: 14px; padding: 18px;
  display: grid; gap: 4px;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.print-opt:hover { transform: translateY(-3px); border-color: var(--rose); box-shadow: var(--shadow-1); }
.print-opt__ico { font-size: 1.6rem; }
.print-opt b { font-family: var(--f-display); font-size: 1.15rem; font-weight: 600; }
.print-opt small { color: var(--ink-soft); line-height: 1.4; }
.print-opt.is-busy { opacity: .6; pointer-events: none; }
.printdesk__tip { font-size: .88rem; color: var(--ink-soft); margin: 1.4rem 0 0; }

/* ============================ RAZONES ============================ */
.reasons { padding: clamp(80px, 12vw, 140px) 0; }
.reasons__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; perspective: 1400px; }
.seal-card {
  position: relative; aspect-ratio: 1.4; border: 0; padding: 0; background: none;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.5, -0.2, .25, 1.3);
}
.seal-card.is-open { transform: rotateY(180deg); }
.seal-card:not(.is-open):hover { transform: translateY(-5px) rotate(-1deg); }
.seal-card__f, .seal-card__b {
  position: absolute; inset: 0; border-radius: 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow-1);
}
.seal-card__f {
  background:
    linear-gradient(to bottom right, transparent 49.5%, rgba(0,0,0,.09) 50%, transparent 51%) left top / 50% 55% no-repeat,
    linear-gradient(to bottom left, transparent 49.5%, rgba(0,0,0,.09) 50%, transparent 51%) right top / 50% 55% no-repeat,
    var(--kraft);
  display: grid; place-items: center;
}
.seal-card:nth-child(odd) .seal-card__f { background-color: #d8b892; }
.seal-card__wax {
  width: 30%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #c13a55, var(--wine) 60%, #5c0f25);
  color: #ffd9de; font-family: var(--f-display); font-weight: 700; font-size: 1.6rem;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.25);
  margin-top: 6%;
}
.seal-card__b {
  transform: rotateY(180deg);
  background: var(--paper);
  padding: 18px 20px;
  display: grid; align-content: center; gap: 6px; text-align: left;
  background-image: repeating-linear-gradient(transparent 0 27px, rgba(75,159,198,.18) 27px 28px);
}
.seal-card__b small { font-family: var(--f-display); font-style: italic; color: var(--rose); font-size: 1rem; }
.seal-card__b p { margin: 0; font-family: var(--f-hand); font-size: 1.45rem; line-height: 1.15; }

/* ============================ CARTA ============================ */
.letter-sec { padding: clamp(60px, 10vw, 120px) 0 clamp(80px, 12vw, 140px); }
.letter {
  position: relative;
  max-width: 720px; margin: 0 auto;
  background: var(--paper);
  padding: clamp(36px, 7vw, 70px) clamp(24px, 7vw, 76px);
  box-shadow: var(--shadow-2);
  rotate: -.6deg;
  background-image:
    linear-gradient(90deg, transparent 0 clamp(18px, 5vw, 52px), rgba(228,106,124,.35) clamp(18px, 5vw, 52px) calc(clamp(18px, 5vw, 52px) + 1.5px), transparent 0),
    repeating-linear-gradient(transparent 0 35px, rgba(75,159,198,.2) 35px 36px);
}
.tape { position: absolute; top: -14px; width: 120px; height: 32px; background: rgba(246, 201, 207, .8); }
.tape--l { left: 30px; rotate: -8deg; }
.tape--r { right: 30px; rotate: 6deg; background: rgba(244, 193, 69, .7); }
.letter__date { text-align: right; font-family: var(--f-hand); font-size: 1.3rem; color: var(--ink-soft); margin: 0 0 1rem; }
.letter__body { font-family: var(--f-hand); font-size: clamp(1.35rem, 3.2vw, 1.75rem); line-height: 36px; min-height: 12em; }
.letter__body p { margin: 0 0 36px; }
.letter__body .caret { display: inline-block; width: 2px; height: 1em; background: var(--rose); vertical-align: -0.15em; animation: blink .8s steps(1) infinite; }
.letter__sign { font-family: var(--f-hand); font-size: 1.5rem; text-align: right; margin: 0; opacity: 0; transition: opacity 1s; }
.letter__sign.is-in { opacity: 1; }
.letter__sign span { font-size: 2.2rem; color: var(--wine); }

/* ============================ FINAL ============================ */
.finale {
  position: relative;
  padding: clamp(90px, 14vw, 160px) 0;
  text-align: center;
  background: linear-gradient(180deg, var(--navy) 0%, #3b2e5a 55%, #d9776f 100%);
  color: var(--paper);
  overflow: hidden;
}
.finale__msg {
  font-family: var(--f-hand); font-size: clamp(1.8rem, 4.6vw, 2.8rem); line-height: 1.2;
  margin: 2.2rem 0 0; opacity: 0; transform: translateY(16px);
  transition: opacity 1.4s, transform 1.4s var(--ease);
}
.finale__msg b { font-family: var(--f-display); font-weight: 600; font-size: .7em; letter-spacing: .1em; color: var(--sun); }
.finale__msg.is-in { opacity: 1; transform: none; }
.foot { text-align: center; padding: 28px 16px 90px; font-size: .9rem; color: var(--ink-soft); background: var(--oat); position: relative; z-index: 2; }

/* ============================ LIGHTBOX (<dialog> nativo) ============================ */
.lightbox {
  border: 0; border-radius: 4px;
  padding: 14px 14px 12px;
  background: #fff; color: var(--ink);
  max-width: min(92vw, 860px); max-height: 94dvh;
  min-width: min(80vw, 300px);
  overflow: hidden;
  overscroll-behavior: contain;          /* el scroll no se pasa a la página */
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  rotate: -1deg;

  /* estado cerrado / salida */
  opacity: 0;
  transition-property: opacity, scale, display, overlay;
  transition-duration: .35s;
  transition-timing-function: var(--ease);
  transition-behavior: allow-discrete;
}
@media (prefers-reduced-motion: no-preference) { .lightbox { scale: .92; } }
.lightbox::backdrop {
  background-color: transparent;
  overflow: hidden; overscroll-behavior: contain;
  transition-property: background-color, backdrop-filter, display, overlay;
  transition-duration: .35s;
  transition-behavior: allow-discrete;
}
/* estado abierto / entrada (data-closing = respaldo de salida para Firefox/Safari) */
.lightbox[open]:where(:not([data-closing])) {
  opacity: 1;
  @starting-style { opacity: 0; }

  @media (prefers-reduced-motion: no-preference) {
    scale: 1;
    &:not([data-vt]) { @starting-style { scale: .92; } }
  }

  &::backdrop {
    background-color: rgb(22 16 14 / .86);
    backdrop-filter: blur(6px);
    @starting-style { background-color: transparent; backdrop-filter: blur(0); }
  }
}
@media (prefers-reduced-motion: reduce) { .lightbox, .lightbox::backdrop { transition-duration: .1s; } }

.lightbox__fig { margin: 0; }
.lightbox__fig img { max-height: 78dvh; max-width: 100%; width: auto; margin: 0 auto; }
.lightbox__fig figcaption {
  display: flex; align-items: baseline; justify-content: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--f-hand); font-size: 1.5rem; text-align: center; margin-top: 8px;
}
.lightbox__fig figcaption small { font-family: var(--f-body); font-size: .75rem; letter-spacing: .15em; color: var(--ink-soft); }
.lightbox__btn {
  position: absolute;
  width: 44px; height: 44px; border-radius: 50%;   /* objetivo táctil cómodo */
  border: 0; display: grid; place-items: center;
  background: rgb(22 16 14 / .55); color: #fff;
  font-size: 1.9rem; line-height: 1;
  backdrop-filter: blur(4px);
  transition: background .2s, scale .2s var(--ease);
}
.lightbox__btn:hover { background: var(--rose); scale: 1.08; }
.lightbox__close { top: 22px; right: 22px; }
.lightbox__nav { top: 50%; translate: 0 -50%; }
.lightbox__nav--prev { left: 22px; }
.lightbox__nav--next { right: 22px; }

/* morph de la foto (View Transitions) */
::view-transition-group(foto) { animation-duration: .55s; animation-timing-function: var(--ease); }
::view-transition-old(foto), ::view-transition-new(foto) { height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ============================ KEYFRAMES ============================ */
@keyframes up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes fade { from { opacity: 0; } }
@keyframes floaty { 50% { transform: translateY(-10px) rotate(-.6deg); } }
@keyframes breathe { 50% { opacity: .45; } }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes drift { 50% { transform: translate(8px, -12px) rotate(3deg); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes tick { from { transform: translateY(-30%); opacity: .2; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise {
  0% { transform: translate(0, 0) rotate(-4deg); }
  25% { transform: translate(var(--sway, 20px), -30vh) rotate(4deg); }
  50% { transform: translate(calc(var(--sway, 20px) * -1), -60vh) rotate(-3deg); }
  100% { transform: translate(var(--sway, 20px), calc(-100vh - 260px)) rotate(3deg); }
}
@keyframes string { from { rotate: -6deg; } to { rotate: 6deg; } }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 820px) {
  .book-stage { display: none; }
  .mbook { display: flex; }
  .book-ctrl { display: none; }
  .ticket { grid-template-columns: 1fr; }
  .ticket__main { border-radius: 16px 16px 0 0; -webkit-mask: none; mask: none; border-right: 0; border-bottom: 2px dashed rgba(45,37,34,.25); }
  .ticket__stub { border-radius: 0 0 16px 16px; -webkit-mask: none; mask: none; }

  .clock { grid-template-columns: repeat(3, 1fr); }

  .route__line { left: 14px; }
  .route__plane { left: 14px; }
  .stop { grid-template-columns: 1fr; gap: 16px; padding-left: 44px; }
  .stop::before { left: 14px; top: 14px; }
  .stop__card, .stop:nth-child(even) .stop__card { order: 1; text-align: left; }
  .stop__photo, .stop:nth-child(even) .stop__photo { order: 2; justify-self: start; }
  .polaroid { width: min(230px, 80%); }

  .dock { top: auto; bottom: 12px; }
  .music { bottom: 74px; right: 12px; }
  .music__txt { display: none; }
  .music { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ============================ IMPRESIÓN ============================ */
.print-area { display: none; }

@media print {
  html, body { background: #fff !important; }
  body::before { display: none !important; }
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.sheet { position: relative; overflow: hidden; break-after: page; page-break-after: always; background: #fff; }
.sheet:last-child { break-after: auto; page-break-after: auto; }

/* modo libro: A4 horizontal con la página a tamaño real centrada */
.sheet--libro { width: 297mm; height: 209mm; display: grid; place-items: center; }
.cut { position: relative; width: 245mm; height: 165mm; }
.cut > .pg { border-radius: 0; }
.cut::before, .cut::after { content: ""; position: absolute; inset: -6mm; pointer-events: none;
  background:
    linear-gradient(#999 0 0) 0 6mm / 4mm .2mm no-repeat,
    linear-gradient(#999 0 0) 6mm 0 / .2mm 4mm no-repeat,
    linear-gradient(#999 0 0) 100% 6mm / 4mm .2mm no-repeat,
    linear-gradient(#999 0 0) calc(100% - 6mm) 0 / .2mm 4mm no-repeat,
    linear-gradient(#999 0 0) 0 calc(100% - 6mm) / 4mm .2mm no-repeat,
    linear-gradient(#999 0 0) 6mm 100% / .2mm 4mm no-repeat,
    linear-gradient(#999 0 0) 100% calc(100% - 6mm) / 4mm .2mm no-repeat,
    linear-gradient(#999 0 0) calc(100% - 6mm) 100% / .2mm 4mm no-repeat;
}
.sheet__note { position: absolute; bottom: 7mm; left: 0; right: 0; text-align: center; font: 8pt var(--f-body); color: #999; margin: 0; }

/* modo fotos: A4 vertical, 3 x 3 polaroids de 7 x 9.4 cm */
.sheet--fotos { width: 210mm; height: 296mm; padding: 10mm 0; display: grid; grid-template-columns: repeat(3, 70mm); grid-auto-rows: 94mm; gap: 0; justify-content: center; align-content: start; }
.pfoto { position: relative; width: 70mm; height: 94mm; padding: 4mm 4mm 0; background: #fff; outline: .2mm dashed #bbb; outline-offset: -.1mm; display: grid; grid-template-rows: 62mm 1fr; }
.pfoto img { width: 62mm; height: 62mm; object-fit: cover; }
.pfoto figcaption { display: grid; align-content: center; text-align: center; font-family: var(--f-hand); font-size: 15pt; line-height: 1; color: #2d2522; }
.pfoto figcaption small { font-family: var(--f-body); font-size: 6.5pt; letter-spacing: .2em; text-transform: uppercase; color: #8a7a70; margin-top: 2mm; }

/* modo stickers: A4 vertical */
.sheet--stickers { width: 210mm; height: 296mm; padding: 14mm 14mm; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6mm 6mm; }
.sheet--stickers h4 { width: 100%; margin: 0 0 2mm; font: 600 9pt var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #999; }
.stk-title {
  font-family: var(--f-hand); font-weight: 700; font-size: 20pt; line-height: 1; color: #2d2522;
  padding: 3mm 6mm; background: var(--c, #f6c9cf);
  clip-path: polygon(0 8%, 3% 0, 6% 10%, 9% 0, 12% 8%, 100% 0, 97% 50%, 100% 100%, 12% 92%, 9% 100%, 6% 90%, 3% 100%, 0 92%, 2% 50%);
}
.stk-stamp {
  width: 34mm; height: 34mm; border-radius: 50%; border: .6mm solid var(--c, #8c1c3b); color: var(--c, #8c1c3b);
  display: grid; place-items: center; text-align: center; font: 700 10pt var(--f-body); letter-spacing: .12em; line-height: 1.25;
  rotate: -10deg;
}
.stk-stamp small { display: block; font-family: var(--f-hand); font-size: 12pt; letter-spacing: 0; font-weight: 400; }
.stk-heart { width: 22mm; height: 22mm; }
.stk-ticket { width: 80mm; height: 30mm; border-radius: 3mm; background: #fbf7ee; border: .4mm solid #2d2522; display: grid; grid-template-columns: 1fr 22mm; overflow: hidden; }
.stk-ticket > div { padding: 3mm 4mm; display: grid; align-content: center; font-family: var(--f-body); font-size: 7pt; letter-spacing: .15em; text-transform: uppercase; color: #6b5d55; }
.stk-ticket b { font-family: var(--f-display); font-size: 15pt; letter-spacing: 0; text-transform: none; color: #2d2522; }
.stk-ticket > div:last-child { border-left: .4mm dashed #2d2522; background: var(--c, #f4c145); color: #2d2522; text-align: center; font-family: var(--f-display); font-size: 20pt; letter-spacing: 0; }
