/* ==========================================================================
   PARA YAMI · Una carta de amor convertida en experiencia web
   assets/styles.css
   --------------------------------------------------------------------------
   Índice
   00 · Tokens y base
   01 · Utilidades y animaciones
   02 · Ambiente (luz, pétalos, corazones)
   03 · Sobre / portada de apertura
   04 · Portada principal
   05 · Nuestra historia (scrapbook)
   06 · Carta de amor
   07 · Tres en raya
   08 · Polaroids
   09 · Pequeñas cosas que amo de ti
   10 · Regalos especiales
   11 · Nuestra canción (vinilo)
   12 · Galería de recuerdos
   13 · Cierre
   14 · Modales
   15 · Easter eggs y aviso
   16 · Responsive
   17 · Movimiento reducido
   ========================================================================== */

/* ============================ 00 · TOKENS ============================== */
:root {
  --crema:        #f8f0e2;
  --crema-2:      #f3e7d5;
  --marfil:       #fffaf3;
  --beige:        #e5d5bd;
  --beige-2:      #d8c4a6;
  --rosa:         #f0d5d1;
  --rosa-2:       #e0b3ad;
  --rosa-empolvado:#d79c99;
  --vino:         #7d2f3c;
  --vino-hondo:   #5b1f2b;
  --marron:       #6f4c38;
  --marron-2:     #93705a;
  --tinta:        #43302a;
  --tinta-suave:  #6a5248;
  --oro:          #c2a06b;
  --verde:        #6b7a4e;

  --font-title:  "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-text:   "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-script: "Great Vibes", "Dancing Script", cursive;

  --shadow-soft:  0 6px 18px rgba(91, 31, 43, .08);
  --shadow-photo: 0 18px 36px -14px rgba(67, 48, 42, .42), 0 3px 10px rgba(67, 48, 42, .12);
  --shadow-paper: 0 26px 50px -26px rgba(67, 48, 42, .48), 0 2px 6px rgba(67, 48, 42, .08);

  --radius: 4px;
  --wrap: 1120px;
  --gutter: clamp(1.1rem, 4.2vw, 3rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.33, .01, 0, 1);

  /* textura de papel: grano sutil, nunca ruidoso */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Red de seguridad contra cualquier desborde de 1-2px en móvil.
     "clip" no crea un contenedor de scroll (a diferencia de "hidden"),
     así que no rompe position: sticky; "hidden" queda de respaldo. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--crema);
  color: var(--tinta);
  font-family: var(--font-text);
  font-size: clamp(1.06rem, .55vw + .95rem, 1.22rem);
  line-height: 1.78;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Papel de fondo con manchas muy tenues y grano.
   Va en z-index negativo para quedar DETRÁS de todo el contenido
   (si estuviera por encima, aunque fuera translúcido, taparía los clics). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 12% 4%,  rgba(255, 250, 243, .95), transparent 55%),
    radial-gradient(90% 70% at 92% 12%,  rgba(240, 213, 209, .42), transparent 60%),
    radial-gradient(100% 80% at 50% 104%, rgba(216, 196, 166, .48), transparent 62%),
    var(--noise);
  background-size: auto, auto, auto, 180px 180px;
  opacity: .78;
  mix-blend-mode: multiply;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--vino); }

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 500;
  line-height: 1.18;
  color: var(--vino-hondo);
  margin: 0;
  letter-spacing: .005em;
}

p { margin: 0 0 1em; }

::selection { background: var(--rosa-2); color: var(--vino-hondo); }

:focus-visible {
  outline: 2px solid var(--vino);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--marfil);
  color: var(--vino);
  padding: .7rem 1.1rem;
  border: 1px solid var(--beige-2);
  border-radius: 999px;
  text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 2;
}

.section {
  position: relative;
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
}

.section__head {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.4rem, 6vw, 4rem);
}

.section__title {
  font-size: clamp(2.05rem, 6.4vw, 3.75rem);
  line-height: 1.1;
}
.section__title--small { font-size: clamp(1.75rem, 4.6vw, 2.6rem); }

.section__lead {
  margin-top: 1rem;
  color: var(--tinta-suave);
  font-size: 1.06em;
  font-style: italic;
}

.eyebrow {
  font-family: var(--font-title);
  font-size: .78rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--marron-2);
  margin-bottom: .9rem;
}

.ink-script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--vino);
  font-size: 1.18em;
  line-height: .9;
  display: inline-block;
  padding-inline: .06em;
}

.rule {
  display: block;
  width: 118px;
  height: 12px;
  margin: 1.5rem auto 0;
  background:
    linear-gradient(var(--beige-2), var(--beige-2)) 50% 50% / 100% 1px no-repeat;
}
.rule::after {
  content: "\2766";
  display: block;
  text-align: center;
  color: var(--rosa-empolvado);
  font-size: .95rem;
  line-height: 12px;
  background: transparent;
}
.rule--light { background: linear-gradient(rgba(255,250,243,.4), rgba(255,250,243,.4)) 50% 50% / 100% 1px no-repeat; }
.rule--light::after { color: var(--rosa); }

/* ======================= 01 · UTILIDADES / REVEAL ====================== */
.reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity .9s var(--ease-soft), transform 1s var(--ease-soft);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
.reveal[data-reveal="left"]  { transform: translate3d(-38px, 18px, 0) rotate(-1.4deg); }
.reveal[data-reveal="right"] { transform: translate3d(38px, 18px, 0) rotate(1.4deg); }
.reveal[data-reveal="scale"] { transform: scale(.94); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* fotografías -------------------------------------------------------- */
.photo {
  position: relative;
  overflow: hidden;
  background: var(--marfil);
  border: 8px solid var(--marfil);
  box-shadow: var(--shadow-photo);
  border-radius: 2px;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 1.1s var(--ease), filter .6s var(--ease);
}
.photo--hero      { aspect-ratio: 4 / 5; max-width: 460px; margin-inline: auto; }
.photo--portrait  { aspect-ratio: 4 / 5; }
.photo--landscape { aspect-ratio: 4 / 3; }
.photo--square    { aspect-ratio: 1 / 1; }
.photo--gallery   { aspect-ratio: 4 / 5; }
.photo--gallery img { filter: saturate(.96) contrast(1.02); }

.photo::after { /* brillo de papel fotográfico */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.26), transparent 42%, rgba(91,31,43,.06));
}

.photo-caption {
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: var(--marron);
  text-align: center;
  margin-top: .7rem;
  line-height: 1.2;
}

/* Contenedor del parallax: el desplazamiento vertical se aplica aquí
   (nunca sobre un .reveal, para no pisar su transform de entrada). */
.parallax { display: block; will-change: transform; }

/* cinta adhesiva ----------------------------------------------------- */
.tape {
  position: absolute;
  z-index: 3;
  width: 108px;
  height: 30px;
  background: linear-gradient(180deg, rgba(240, 224, 196, .82), rgba(226, 205, 170, .72));
  border-left: 1px solid rgba(255,255,255,.5);
  border-right: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 2px 5px rgba(67,48,42,.16);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 6px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 6px), transparent 100%);
  opacity: .92;
  pointer-events: none;
}
.tape--tl { top: -14px; left: -22px; transform: rotate(-32deg); }
.tape--tr { top: -14px; right: -22px; transform: rotate(32deg); }
.tape--top { top: -15px; left: 50%; transform: translateX(-50%) rotate(-2.5deg); }
.tape--rose { background: linear-gradient(180deg, rgba(240, 213, 209, .88), rgba(224, 179, 173, .74)); }

/* clips -------------------------------------------------------------- */
.clip {
  position: absolute;
  z-index: 4;
  top: -18px; left: 50%;
  width: 26px; height: 54px;
  margin-left: -13px;
  border: 3px solid #b9a184;
  border-bottom-color: transparent;
  border-radius: 13px 13px 6px 6px;
  transform: rotate(6deg);
  box-shadow: 0 2px 4px rgba(67,48,42,.18);
  pointer-events: none;
}
.clip--metal { border-color: #b0997d; width: 22px; height: 46px; margin-left: -11px; }

/* corazones dibujados ------------------------------------------------ */
.doodle-heart {
  font-family: var(--font-text);
  color: var(--vino);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.doodle-heart--float {
  position: absolute;
  top: -6px; right: -10px;
  font-size: 1.4rem;
  opacity: .82;
  animation: heartFloat 4.6s var(--ease) infinite;
}
.doodle-heart--corner {
  position: absolute;
  bottom: 18px; right: 20px;
  font-size: 1.15rem;
  opacity: .55;
  transform: rotate(-8deg);
}
@keyframes heartFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: .72; }
  50%      { transform: translateY(-9px) scale(1.08); opacity: .95; }
}

.photo-corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid var(--beige-2);
  opacity: .75;
  pointer-events: none;
}
.photo-corner--a { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.photo-corner--b { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

/* botones ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;
  padding: .85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid var(--vino);
  background: transparent;
  color: var(--vino);
  font-family: var(--font-title);
  font-size: 1rem;
  letter-spacing: .04em;
  cursor: pointer;
  text-decoration: none;
  transition: transform .35s var(--ease), background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.btn--primary {
  background: linear-gradient(180deg, var(--vino), var(--vino-hondo));
  color: var(--marfil);
  border-color: var(--vino-hondo);
  box-shadow: 0 12px 24px -12px rgba(91,31,43,.7);
}
.btn--primary:hover { box-shadow: 0 16px 30px -12px rgba(91,31,43,.75); }
.btn--ghost { background: rgba(255,250,243,.7); }

/* =========================== 02 · AMBIENTE ============================ */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.ambient__luz {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(45% 35% at 22% 18%, rgba(255, 247, 232, .85), transparent 70%),
    radial-gradient(38% 30% at 82% 72%, rgba(240, 213, 209, .45), transparent 72%);
  animation: luzDrift 26s var(--ease) infinite alternate;
}
@keyframes luzDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(2%, -2%, 0) scale(1.06); }
}

.petal {
  position: absolute;
  top: -6vh;
  width: 12px; height: 12px;
  border-radius: 60% 0 60% 0;
  background: linear-gradient(140deg, var(--rosa), var(--rosa-empolvado));
  opacity: .38;
  animation: petalFall linear infinite;
  filter: blur(.2px);
}
@keyframes petalFall {
  0%   { transform: translate3d(0, -8vh, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: .42; }
  50%  { transform: translate3d(4vw, 46vh, 0) rotate(180deg); }
  92%  { opacity: .3; }
  100% { transform: translate3d(-3vw, 108vh, 0) rotate(360deg); opacity: 0; }
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: radial-gradient(circle at 50% 45%, #fff, rgba(255,255,255,.82) 55%, rgba(255,247,232,.3));
  opacity: 0;
  pointer-events: none;
}
.flash.is-firing { animation: flashFire .62s var(--ease) 1; }
@keyframes flashFire {
  0%   { opacity: 0; }
  12%  { opacity: .92; }
  100% { opacity: 0; }
}

/* ====================== 03 · SOBRE / APERTURA ========================= */
body.is-sealed { overflow: hidden; }

.envelope-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: max(1.2rem, env(safe-area-inset-top)) 1.2rem max(1.2rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(70% 55% at 50% 34%, rgba(255, 252, 246, .96), rgba(246, 236, 221, .97) 62%, rgba(229, 213, 189, .98)),
    var(--crema-2);
  transition: opacity .85s var(--ease), visibility .85s;
  perspective: 1400px;
}
.envelope-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--noise);
  background-size: 180px 180px;
  opacity: .34;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.envelope-stage.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-glow {
  position: absolute;
  width: min(78vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 213, 209, .72), transparent 66%);
  filter: blur(8px);
  animation: glowPulse 6s var(--ease-soft) infinite alternate;
}
@keyframes glowPulse {
  from { transform: scale(.94); opacity: .7; }
  to   { transform: scale(1.08); opacity: 1; }
}

.envelope-wrap {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
  transform: scale(var(--stage-scale, 1));
  transition: transform .6s var(--ease);
}

.envelope-stamp { margin: 0; }
.envelope-stamp__ring {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  padding: .55rem 1.1rem;
  border: 1px solid var(--beige-2);
  border-radius: 999px;
  background: rgba(255, 250, 243, .78);
  box-shadow: var(--shadow-soft);
  transform: rotate(-2deg);
}
.envelope-stamp__top,
.envelope-stamp__bottom {
  font-family: var(--font-title);
  font-size: .58rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--marron-2);
}
.envelope-stamp__name {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--vino);
  line-height: 1.05;
}

/* --- el sobre --- */
.envelope {
  position: relative;
  width: min(84vw, 420px);
  aspect-ratio: 3 / 2;
  transform-style: preserve-3d;
  filter: drop-shadow(0 26px 30px rgba(91, 31, 43, .25));
}
.envelope__back,
.envelope__body,
.envelope__flap,
.envelope__letter {
  position: absolute;
  inset: 0;
  border-radius: 5px;
}
.envelope__back {
  background: linear-gradient(160deg, #f3e3ca, #e3cdab);
  box-shadow: inset 0 0 0 1px rgba(147, 112, 90, .28);
}

.envelope__body { overflow: hidden; border-radius: 5px; }
.envelope__pocket {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, #f7ead4, #e7d3b4);
  box-shadow: inset 0 0 0 1px rgba(147, 112, 90, .22);
}
.envelope__pocket--left  { clip-path: polygon(0 0, 50% 52%, 0 100%); }
.envelope__pocket--right { clip-path: polygon(100% 0, 50% 52%, 100% 100%); }
.envelope__pocket--bottom{ clip-path: polygon(0 100%, 50% 46%, 100% 100%); background: linear-gradient(200deg, #f2e2c8, #dcc6a4); }

.envelope__flap {
  z-index: 6;
  background: linear-gradient(180deg, #f0dec2, #dcc4a0);
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  transform-origin: 50% 0%;
  transform: rotateX(0deg);
  transition: transform 1.05s var(--ease), z-index 0s linear 1.05s;
  box-shadow: 0 4px 10px rgba(91,31,43,.12);
  backface-visibility: hidden;
}
.envelope__flap::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  box-shadow: inset 0 -1px 0 rgba(147, 112, 90, .32);
}

.envelope__seal {
  position: absolute;
  z-index: 7;
  top: 46%; left: 50%;
  width: 62px; height: 62px;
  margin: -31px 0 0 -31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9d3f4c, var(--vino-hondo) 70%);
  color: #f6dfd8;
  font-size: 1.35rem;
  box-shadow: 0 6px 14px rgba(91,31,43,.4), inset 0 -2px 6px rgba(0,0,0,.28);
  transition: transform .55s var(--ease), opacity .5s var(--ease);
}
.envelope__seal-heart { transform: translateY(-1px); }

.envelope__letter {
  z-index: 2;
  inset: 12% 7% 6%;
  padding: clamp(.9rem, 3vw, 1.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  text-align: center;
  background:
    linear-gradient(180deg, #fffdf8, #f7efdf);
  box-shadow: 0 10px 24px -12px rgba(67,48,42,.5), inset 0 0 0 1px rgba(216,196,166,.7);
  transform: translateY(34%) scale(.94);
  opacity: 0;
  transition: transform 1s var(--ease) .55s, opacity .7s var(--ease) .55s;
}
.envelope__letter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--noise);
  background-size: 180px 180px;
  opacity: .3;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.envelope__letter-line {
  font-family: var(--font-script);
  font-size: clamp(1.15rem, 4.6vw, 1.6rem);
  color: var(--vino);
  line-height: 1.3;
  margin: 0;
}
.envelope__letter-sign {
  font-family: var(--font-text);
  font-style: italic;
  color: var(--tinta-suave);
  font-size: .95rem;
  margin: 0;
}
.envelope__letter-heart { color: var(--rosa-empolvado); font-size: .9rem; }

/* estados de apertura */
.envelope.is-opening .envelope__seal { transform: scale(.4) rotate(28deg); opacity: 0; }
.envelope.is-opening .envelope__flap {
  transform: rotateX(-176deg);
  z-index: 0;
  transition: transform 1.05s var(--ease), z-index 0s linear .5s;
}
.envelope.is-opening .envelope__letter {
  transform: translateY(-28%) scale(1);
  opacity: 1;
}
.envelope.is-out .envelope__letter {
  transform: translateY(-58%) scale(1.04) rotate(-.6deg);
  opacity: 1;
  z-index: 9;
  box-shadow: 0 26px 44px -18px rgba(67,48,42,.55);
}
.envelope.is-out { transform: translateY(-4%); }

.envelope__cta {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  min-height: 60px;
  padding: 1rem 2.4rem;
  border: 1px solid var(--beige-2);
  border-radius: 999px;
  background: rgba(255, 250, 243, .86);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .4s var(--ease);
  animation: ctaBreath 3.4s var(--ease-soft) infinite;
}
@keyframes ctaBreath {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.envelope__cta:hover,
.envelope__cta:focus-visible {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 28px -14px rgba(91,31,43,.45);
  animation-play-state: paused;
}
.envelope__cta-text {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 3.6vw, 1.35rem);
  color: var(--vino);
  letter-spacing: .02em;
}
.envelope__cta-sub {
  font-family: var(--font-script);
  font-size: 1.05rem;
  color: var(--marron-2);
}
.envelope-stage.is-done .envelope__cta { pointer-events: none; }

/* ======================= 04 · PORTADA PRINCIPAL ======================= */
.hero {
  position: relative;
  padding-block: clamp(3.6rem, 11vh, 6.5rem) clamp(3.5rem, 9vw, 6rem);
  /* min-height en vez de height: si el contenido crece, la sección crece
     con él y nunca se corta en móviles bajos. */
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.hero__inner { text-align: center; }

.hero__title {
  font-size: clamp(2.5rem, 9.4vw, 5rem);
  letter-spacing: .01em;
  margin-bottom: 1.1rem;
}
.hero__sub {
  font-family: var(--font-title);
  font-style: italic;
  font-size: clamp(1.1rem, 3.6vw, 1.45rem);
  color: var(--marron);
  margin-bottom: clamp(2rem, 6vw, 3.2rem);
}

.hero__photo {
  position: relative;
  margin: 0 auto clamp(2rem, 6vw, 3rem);
  width: min(88vw, 470px);
  padding: 14px 14px 54px;
  background: linear-gradient(180deg, #fffdf9, #f6ecdd);
  border-radius: 3px;
  box-shadow: var(--shadow-paper), inset 0 0 0 1px rgba(216,196,166,.6);
  transform: rotate(-1.1deg);
}
.hero__photo .photo {
  border: 0;
  border-radius: 1px;
  box-shadow: inset 0 0 22px rgba(67,48,42,.22), 0 1px 0 rgba(255,255,255,.6);
}
.hero__photo .photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), inset 0 0 30px rgba(91,31,43,.16);
  pointer-events: none;
}
.hero__quote {
  max-width: 34rem;
  margin: 0 auto;
  font-size: clamp(1.08rem, 3.4vw, 1.3rem);
  font-style: italic;
  color: var(--tinta-suave);
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  margin-top: clamp(2.4rem, 7vw, 3.6rem);
  color: var(--marron-2);
}
.scroll-hint__text {
  font-family: var(--font-script);
  font-size: 1.25rem;
}
.scroll-hint__line {
  width: 1px;
  height: 52px;
  background: linear-gradient(var(--beige-2), transparent);
  animation: hintDrop 2.6s var(--ease-soft) infinite;
}
@keyframes hintDrop {
  0%, 100% { transform: scaleY(.5); transform-origin: top; opacity: .5; }
  50%      { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

/* ==================== 05 · NUESTRA HISTORIA (SCRAP) =================== */
.story { background: linear-gradient(180deg, transparent, rgba(255,250,243,.6) 30%, transparent); }

.scrap {
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.6rem);
  align-items: start;
}

.scrap__note {
  position: relative;
  padding: clamp(1.3rem, 4vw, 2rem);
  background: linear-gradient(170deg, #fffdf7, #f4ead8);
  border-radius: 3px;
  box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(216,196,166,.55);
  transform: rotate(-.5deg);
}
.scrap__note::before,
.scrap__note::after {
  content: "";
  position: absolute;
  width: 30px; height: 30px;
  border: 1px solid var(--beige-2);
  opacity: .8;
}
.scrap__note::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.scrap__note::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.scrap__note p { margin: 0; }
.scrap__note p + p { margin-top: .9em; }
.scrap__note--right { transform: rotate(.6deg); }
.scrap__note--small { font-size: .97em; }

.scrap__photo {
  position: relative;
  margin: 0;
  padding: 12px 12px 46px;
  background: var(--marfil);
  box-shadow: var(--shadow-photo);
  border-radius: 2px;
  transform: rotate(1.2deg);
  transition: transform .8s var(--ease), box-shadow .8s var(--ease);
}
.scrap__photo .photo { border: 0; box-shadow: none; }
.scrap__photo--two { transform: rotate(-1.4deg); }
.scrap__photo--three { transform: rotate(.9deg); }
.scrap__photo:hover { transform: rotate(0deg) translateY(-5px); box-shadow: 0 26px 44px -20px rgba(67,48,42,.5); }

.scrap__quote {
  position: relative;
  text-align: center;
  padding: clamp(1.2rem, 4vw, 2rem) clamp(1rem, 5vw, 3rem);
}
.scrap__quote p {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 5.4vw, 2.2rem);
  color: var(--vino);
  line-height: 1.4;
  margin: 0;
}
.mark {
  font-family: var(--font-title);
  font-size: 3.4rem;
  line-height: 1;
  color: var(--rosa-2);
  display: block;
  opacity: .8;
}
.mark--open { text-align: left; }
.mark--close { text-align: right; }

/* ========================== 06 · CARTA =============================== */
.letter__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.4rem);
  align-items: start;
}
.letter__paper-wrap { position: relative; }

.paper {
  position: relative;
  padding: clamp(1.6rem, 5vw, 3rem) clamp(1.4rem, 5vw, 3rem);
  background:
    linear-gradient(180deg, rgba(255,253,246,.96), rgba(246,236,220,.96));
  border-radius: 3px;
  box-shadow: var(--shadow-paper), inset 0 0 0 1px rgba(216,196,166,.7);
  overflow: hidden;
}
.paper::before { /* grano + manchas de papel antiguo */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38% 26% at 84% 8%, rgba(190, 158, 112, .16), transparent 70%),
    radial-gradient(30% 22% at 8% 92%, rgba(190, 158, 112, .14), transparent 72%),
    radial-gradient(50% 40% at 50% 50%, rgba(255,255,255,.5), transparent 70%),
    var(--noise);
  background-size: auto, auto, auto, 180px 180px;
  opacity: .55;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.paper::after { /* borde quemado suave */
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 40px rgba(147, 112, 90, .2);
  pointer-events: none;
}
.paper > * { position: relative; z-index: 1; }

.paper--letter { max-width: 44rem; margin-inline: auto; }
.paper--letter::after { box-shadow: inset 0 0 46px rgba(147,112,90,.22); }

.paper__head { text-align: center; margin-bottom: 1.6rem; }
.paper__date {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--vino);
  margin: .6rem 0 0;
}
.paper__date-line {
  display: block;
  font-family: var(--font-text);
  font-size: .88rem;
  font-style: italic;
  letter-spacing: .1em;
  color: var(--marron-2);
  margin-top: .2rem;
}
.paper__body {
  position: relative;
  font-size: 1.04em;
  line-height: 1.95;
  color: #3f2d27;
}
.paper__body p { margin: 0 0 1.05em; text-indent: 1.2em; }
.paper__body p:first-child { text-indent: 0; }
.paper__closing { font-style: italic; color: var(--tinta-suave); }
.paper__sign {
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .1rem;
}
.signature {
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  color: var(--vino-hondo);
  line-height: 1;
  transform: rotate(-4deg);
  padding-right: .3rem;
}
.signature--small { font-size: clamp(1.5rem, 5vw, 2rem); vertical-align: -.2em; }
.paper__sign-line {
  width: 148px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--marron-2), transparent);
  opacity: .6;
  margin: .1rem .6rem .35rem 0;
}
.paper__sign-note {
  font-family: var(--font-text);
  font-style: italic;
  font-size: .92rem;
  color: var(--marron-2);
  padding-right: .6rem;
}

.letter__photo {
  position: relative;
  margin: clamp(1.8rem, 5vw, 2.6rem) auto 0;
  width: min(78%, 300px);
  padding: 11px 11px 42px;
  background: var(--marfil);
  box-shadow: var(--shadow-photo);
  transform: rotate(-2deg);
}
.letter__photo .photo { border: 0; box-shadow: none; }

/* ========================= 07 · TRES EN RAYA ========================= */
.game {
  padding: clamp(1.4rem, 4vw, 2.1rem);
  background: linear-gradient(175deg, rgba(255,253,247,.92), rgba(243,231,213,.92));
  border-radius: 4px;
  box-shadow: var(--shadow-paper), inset 0 0 0 1px rgba(216,196,166,.65);
  text-align: center;
}
.game__title {
  font-family: var(--font-script);
  font-size: clamp(2rem, 7vw, 2.7rem);
  color: var(--vino);
  font-weight: 400;
  margin-bottom: .3rem;
}
.game__sub {
  font-style: italic;
  color: var(--tinta-suave);
  font-size: .98rem;
  margin-bottom: 1rem;
}
.game__score {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem .9rem;
  font-size: .92rem;
  color: var(--tinta-suave);
  margin-bottom: 1.1rem;
}
.game__score-item { display: inline-flex; align-items: center; gap: .35rem; }
.game__score-item b { color: var(--vino); font-family: var(--font-title); }
.piece { font-family: var(--font-title); font-weight: 600; font-size: 1.05rem; }
.piece--o { color: var(--rosa-empolvado); }
.piece--x { color: var(--vino-hondo); }

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 340px;
  margin: 0 auto 1rem;
  padding: 8px;
  background: rgba(229, 213, 189, .5);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(216,196,166,.8);
}
.cell {
  position: relative;
  aspect-ratio: 1;
  min-height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216,196,166,.9);
  border-radius: 4px;
  background: linear-gradient(180deg, #fffdf8, #f8f1e4);
  font-family: var(--font-title);
  font-size: clamp(2rem, 9vw, 2.7rem);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.cell:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.cell:disabled { cursor: default; }
.cell--x { color: var(--vino-hondo); }
.cell--o { color: var(--rosa-empolvado); }
.cell--pop { animation: cellPop .42s var(--ease) 1; }
@keyframes cellPop {
  0%   { transform: scale(.72); opacity: .3; }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
.cell--win {
  background: linear-gradient(180deg, #f7e6e2, #f0d5d1);
  box-shadow: inset 0 0 0 2px var(--rosa-empolvado), 0 6px 16px -8px rgba(91,31,43,.4);
  animation: winPulse 1.5s var(--ease-soft) infinite;
}
@keyframes winPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.game__msg {
  min-height: 3.2em;
  font-family: var(--font-script);
  font-size: clamp(1.25rem, 4.6vw, 1.55rem);
  color: var(--vino);
  line-height: 1.35;
  margin: 0 0 1rem;
}
.game__actions { display: flex; justify-content: center; gap: .7rem; flex-wrap: wrap; }

/* ========================== 08 · POLAROIDS =========================== */
.polaroid-row {
  display: grid;
  gap: clamp(1.6rem, 5vw, 2.4rem);
  justify-items: center;
}
.polaroid {
  position: relative;
  width: min(84vw, 300px);
  margin: 0;
  padding: 13px 13px 58px;
  background: linear-gradient(180deg, #fffefb, #f7f0e2);
  border-radius: 2px;
  box-shadow: var(--shadow-photo);
  transform: rotate(-3.2deg);
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
/* Ojo con el orden: --mid va después para poder inclinarla distinto
   sin que la regla estructural de :nth-child la pise. */
.polaroid:nth-child(3) { transform: rotate(3.4deg); }
.polaroid--mid { transform: rotate(1.6deg) translateY(-6px); }
.polaroid .photo { border: 0; box-shadow: none; }
.polaroid figcaption {
  position: absolute;
  left: 0; right: 0;
  bottom: 16px;
  font-family: var(--font-script);
  font-size: clamp(1.25rem, 4.4vw, 1.5rem);
  color: var(--marron);
  text-align: center;
  line-height: 1.15;
  padding-inline: .8rem;
}
.polaroid:hover,
.polaroid:focus-visible,
.polaroid.is-touched {
  transform: rotate(0deg) translateY(-8px) scale(1.02);
  box-shadow: 0 30px 50px -22px rgba(67,48,42,.55);
  z-index: 3;
}
.polaroid.is-touched .photo img { transform: scale(1.05); }

/* ================= 09 · PEQUEÑAS COSAS QUE AMO DE TI ================== */
.love { background: linear-gradient(180deg, transparent, rgba(240, 213, 209, .22) 45%, transparent); }

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(.9rem, 2.6vw, 1.3rem);
}
.note {
  position: relative;
  padding: 1.25rem 1.4rem 1.25rem 3.1rem;
  background: linear-gradient(168deg, #fffdf6, #f7eedc);
  border-radius: 2px;
  box-shadow: 0 10px 22px -14px rgba(67,48,42,.45), inset 0 0 0 1px rgba(216,196,166,.55);
  transform: rotate(var(--tilt, -1deg));
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  font-size: 1.02em;
}
.note:nth-child(even) { background: linear-gradient(168deg, #fffdf8, #f4e9e6); }
.note:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 0 18px 30px -16px rgba(67,48,42,.5); }
.note__heart {
  position: absolute;
  left: 1rem; top: 1.35rem;
  color: var(--rosa-empolvado);
  font-size: .95rem;
  line-height: 1;
}
/* línea de "papel rayado" sutil */
.note::after {
  content: "";
  position: absolute;
  left: 2.6rem; right: 1.4rem; bottom: .55rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(216,196,166,.7), transparent);
}

/* ====================== 10 · REGALOS ESPECIALES ====================== */
.gift-grid {
  display: grid;
  gap: clamp(1.2rem, 3.4vw, 1.8rem);
}
.gift-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5rem;
  padding: clamp(1.7rem, 5vw, 2.4rem) clamp(1.2rem, 4vw, 1.8rem);
  background: linear-gradient(172deg, rgba(255,253,247,.95), rgba(244,233,216,.95));
  border: 1px solid rgba(216,196,166,.8);
  border-radius: 4px;
  box-shadow: var(--shadow-soft), inset 0 0 0 6px rgba(255,255,255,.35);
  cursor: pointer;
  overflow: hidden;
  transition: transform .55s var(--ease), box-shadow .55s var(--ease), border-color .55s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.gift-card::before { /* esquina doblada */
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 42px; height: 42px;
  background: linear-gradient(225deg, var(--crema-2) 46%, rgba(216,196,166,.5) 50%, transparent 51%);
  opacity: .9;
}
.gift-card:hover,
.gift-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 26px 44px -22px rgba(67,48,42,.5);
  border-color: var(--rosa-2);
}
.gift-card__icon {
  color: var(--vino);
  line-height: 0;
  margin-bottom: .4rem;
  transition: transform .6s var(--ease);
}
.gift-card:hover .gift-card__icon { transform: translateY(-3px) rotate(-3deg) scale(1.06); }
.gift-card__title {
  font-family: var(--font-title);
  font-size: clamp(1.35rem, 4.4vw, 1.6rem);
  color: var(--vino-hondo);
}
.gift-card__text {
  font-style: italic;
  color: var(--tinta-suave);
  font-size: .98rem;
  max-width: 24ch;
}
.gift-card__cta {
  margin-top: .6rem;
  font-family: var(--font-title);
  font-size: .82rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--marron-2);
  border-bottom: 1px solid var(--beige-2);
  padding-bottom: .18rem;
}

/* ======================= 11 · NUESTRA CANCIÓN ======================== */
.song {
  background: linear-gradient(180deg, transparent, rgba(229, 213, 189, .4) 40%, transparent);
}
.song__grid {
  display: grid;
  gap: clamp(2.2rem, 6vw, 3.6rem);
  align-items: center;
}
.song__track {
  font-family: var(--font-title);
  font-style: italic;
  font-size: clamp(1.3rem, 4.4vw, 1.7rem);
  color: var(--vino);
  margin: .9rem 0 .1rem;
}
.song__artist {
  font-variant: small-caps;
  letter-spacing: .16em;
  color: var(--marron-2);
  margin-bottom: 1.2rem;
}
.song__note { color: var(--tinta-suave); }
.song__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.song__tiny {
  margin-top: .9rem;
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--marron-2);
}

.song__disc { display: grid; place-items: center; }
.vinyl {
  position: relative;
  width: min(80vw, 360px);
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* El escenario recorta el disco: al girar, su caja envolvente crece hasta
   un 41% en los 45°, y sin recorte eso podría desbordar la pantalla. */
.vinyl__stage {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
}
.vinyl__disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #14100f 0 2px, #211b19 2px 4px, #17120f 4px 6px),
    radial-gradient(circle at 50% 50%, #241d1a, #0d0a09 72%);
  box-shadow:
    0 24px 44px -18px rgba(67,48,42,.7),
    inset 0 0 0 1px rgba(194, 160, 107, .28),
    inset 0 0 40px rgba(0,0,0,.9);
  animation: spin 6.5s linear infinite;
  animation-play-state: paused;
  display: grid;
  place-items: center;
}
.vinyl__grooves {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.06) 0 1px, transparent 1px 5px);
  box-shadow: inset 0 0 30px rgba(0,0,0,.6);
  pointer-events: none;
}
.vinyl__disc::after { /* reflejo de luz */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 210deg, transparent 0 18%, rgba(255,255,255,.09) 26%, transparent 40%, transparent 100%);
  pointer-events: none;
}
.vinyl.is-spinning .vinyl__disc,
.vinyl:hover .vinyl__disc { animation-play-state: running; }

.vinyl__label {
  position: relative;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  gap: .1rem;
  background: radial-gradient(circle at 38% 32%, #a4444f, var(--vino-hondo) 74%);
  box-shadow: inset 0 0 0 1px rgba(194,160,107,.5), 0 0 14px rgba(0,0,0,.55);
  color: #f8e7e2;
  padding: 8%;
}
.vinyl__label-name {
  font-family: var(--font-script);
  font-size: clamp(1rem, 3.6vw, 1.35rem);
  line-height: 1;
}
.vinyl__label-artist {
  font-family: var(--font-title);
  font-size: clamp(.5rem, 1.8vw, .64rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .82;
}
.vinyl__label-hole {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--crema);
  margin: .3rem auto 0;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.5);
}
.vinyl__tonearm {
  position: absolute;
  top: -4%;
  right: 2%;
  width: 5px;
  height: 46%;
  border-radius: 4px;
  background: linear-gradient(180deg, #cbb79a, #9c8767);
  transform-origin: 50% 6%;
  transform: rotate(-24deg);
  box-shadow: 0 3px 8px rgba(67,48,42,.4);
  transition: transform .8s var(--ease);
  pointer-events: none;
}
.vinyl.is-spinning .vinyl__tonearm,
.vinyl:hover .vinyl__tonearm { transform: rotate(-8deg); }
.vinyl__tonearm::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  width: 16px; height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d9c6a8, #a08a68);
}
.vinyl__shadow {
  width: min(70vw, 300px);
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(67,48,42,.28), transparent 70%);
  filter: blur(4px);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====================== 12 · GALERÍA DE RECUERDOS =================== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.6rem, 4.4vw, 2.2rem);
}
.g-item {
  position: relative;
  margin: 0;
  padding: 11px 11px 11px;
  background: linear-gradient(180deg, #fffefb, #f8f1e3);
  border-radius: 2px;
  box-shadow: var(--shadow-photo);
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
.g-item .photo { border: 0; box-shadow: none; }
.g-item:hover { transform: translateY(-6px) rotate(-.5deg); box-shadow: 0 30px 52px -24px rgba(67,48,42,.55); }
.g-item:hover .photo img { transform: scale(1.04); }

.sticker {
  position: absolute;
  z-index: 4;
  top: var(--sy, -14px);
  left: var(--sx, auto);
  right: auto;
  transform: rotate(var(--sr, -5deg));
  padding: .34rem .8rem;
  background: linear-gradient(180deg, rgba(255, 251, 244, .96), rgba(246, 233, 226, .96));
  border: 1px solid rgba(216, 196, 166, .9);
  border-radius: 3px;
  box-shadow: 0 6px 14px -8px rgba(67,48,42,.5);
  font-family: var(--font-title);
  font-size: clamp(.72rem, 2.4vw, .84rem);
  letter-spacing: .06em;
  color: var(--vino);
  white-space: nowrap;
  pointer-events: none;
  transition: transform .6s var(--ease);
}
.sticker--script {
  font-family: var(--font-script);
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  letter-spacing: 0;
  color: var(--vino-hondo);
  padding: .18rem .7rem .3rem;
}
.g-item:hover .sticker { transform: rotate(calc(var(--sr, -5deg) * -.6)) scale(1.05); }

/* ============================ 13 · CIERRE =========================== */
.closing {
  position: relative;
  padding-block: clamp(5rem, 14vw, 9rem) clamp(3rem, 8vw, 5rem);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(125, 47, 60, .5), transparent 70%),
    linear-gradient(180deg, #4a1c25, #35141c 60%, #2a1016);
  color: #f4e3d8;
  text-align: center;
  overflow: hidden;
}
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--noise);
  background-size: 180px 180px;
  opacity: .28;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.closing h2, .closing p { color: #f7e9df; }
.closing__inner { max-width: 44rem; }

.hearts-pair { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.hearts-pair svg { overflow: visible; }
.hp { fill: none; stroke: var(--rosa-2); stroke-width: 3; }
.hp--left  { fill: rgba(215, 156, 153, .34); animation: beat 3.6s var(--ease-soft) infinite; transform-origin: 30% 60%; }
.hp--right { fill: rgba(240, 213, 209, .28); animation: beat 3.6s var(--ease-soft) .5s infinite; transform-origin: 70% 60%; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.07); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.04); }
}

.closing__initials {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: .3em;
  color: #f2d9cd;
  margin-bottom: 1.2rem;
}
.closing__quote {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 5.6vw, 2.3rem);
  line-height: 1.45;
  color: #f7ddd2;
}
.closing__final {
  margin-top: 1.6rem;
  font-style: italic;
  color: #e9cfc4;
  font-size: 1.06em;
}
.closing__title {
  margin-top: 1.8rem;
  font-size: clamp(2rem, 7.4vw, 3.6rem);
  line-height: 1.15;
  color: #fdf3ec;
}
.closing__title .ink-script { color: #f0bdb6; }
.closing__sign {
  margin-top: 1.4rem;
  font-style: italic;
  color: #e2c3b7;
}
.closing__date {
  margin-top: .7rem;
  font-family: var(--font-title);
  font-size: .82rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(242, 217, 205, .72);
}

.closing__hearts { position: absolute; inset: 0; pointer-events: none; }
.closing__hearts span {
  position: absolute;
  bottom: -30px;
  color: var(--rosa-2);
  opacity: 0;
  animation: riseUp linear infinite;
}
@keyframes riseUp {
  0%   { transform: translateY(0) scale(.7) rotate(0deg); opacity: 0; }
  12%  { opacity: .7; }
  80%  { opacity: .35; }
  100% { transform: translateY(-105vh) scale(1.05) rotate(24deg); opacity: 0; }
}

.site-foot {
  background: #2a1016;
  color: #d9bcb0;
  padding-block: 1.6rem;
  text-align: center;
  font-size: .95rem;
  position: relative;
  z-index: 2;
}
.site-foot p { margin: 0; }
.site-foot .ink-script { color: #efc3bb; font-size: 1.25em; }

/* =========================== 14 · MODALES ============================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(53, 20, 28, .62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn .4s var(--ease) 1;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal__panel {
  position: relative;
  width: min(100%, 560px);
  max-height: min(92svh, 900px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(1.5rem, 5vw, 2.6rem);
  background: linear-gradient(178deg, #fffdf7, #f6ecdd);
  border-radius: 4px;
  box-shadow: 0 40px 70px -30px rgba(20, 6, 10, .8), inset 0 0 0 1px rgba(216,196,166,.8);
  text-align: center;
  animation: panelIn .55s var(--ease) 1;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.modal__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--noise);
  background-size: 180px 180px;
  opacity: .3;
  mix-blend-mode: multiply;
  pointer-events: none;
  border-radius: 4px;
}
.modal__panel > * { position: relative; z-index: 1; }
.modal__close {
  position: absolute;
  top: .7rem; right: .9rem;
  z-index: 3;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216,196,166,.9);
  border-radius: 50%;
  background: rgba(255,253,247,.9);
  color: var(--vino);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .35s var(--ease), background-color .35s var(--ease);
}
.modal__close:hover { transform: rotate(90deg); background: var(--rosa); }
.modal__title {
  font-family: var(--font-script);
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 400;
  color: var(--vino);
  margin-bottom: .4rem;
}
.modal__text {
  font-style: italic;
  color: var(--tinta-suave);
  max-width: 34ch;
  margin-inline: auto;
}
.modal__actions { margin-top: 1.4rem; display: flex; justify-content: center; gap: .7rem; flex-wrap: wrap; }

/* --- pastel --- */
.cake-scene { margin: 1.4rem auto .4rem; max-width: 320px; }
.cake {
  position: relative;
  margin: 0 auto;
  width: 220px;
  height: 210px;
  filter: drop-shadow(0 16px 20px rgba(67,48,42,.28));
}
.cake__candles {
  position: absolute;
  bottom: 132px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 26px;
  z-index: 4;
}
.candle {
  position: relative;
  width: 8px;
  height: 40px;
  border-radius: 3px 3px 1px 1px;
  background: repeating-linear-gradient(45deg, #f3ddd6 0 6px, #e0b3ad 6px 12px);
  box-shadow: inset -1px 0 2px rgba(91,31,43,.25);
}
.candle__wick {
  position: absolute;
  top: -7px; left: 50%;
  width: 2px; height: 7px;
  margin-left: -1px;
  background: #4b3a33;
}
.candle__flame {
  position: absolute;
  top: -24px; left: 50%;
  width: 12px; height: 20px;
  margin-left: -6px;
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 68%, #fff3b0, #f6a92c 58%, rgba(224, 106, 34, .9) 100%);
  box-shadow: 0 0 18px rgba(246, 169, 44, .75), 0 0 34px rgba(246, 169, 44, .4);
  transform-origin: 50% 100%;
  animation: flicker 1.5s var(--ease-soft) infinite alternate;
}
@keyframes flicker {
  from { transform: scale(1) rotate(-3deg) translateY(0); opacity: .92; }
  to   { transform: scale(1.09) rotate(3deg) translateY(-1px); opacity: 1; }
}
.cake__top {
  position: absolute;
  bottom: 118px; left: 50%;
  transform: translateX(-50%);
  width: 176px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fdf1e2, #edcfb2);
  z-index: 3;
}
.cake__body {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  width: 176px; height: 100px;
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, #f7dfc8 0 24px, #e8c9a8 24px 100%);
  box-shadow: inset 0 -12px 20px rgba(147, 112, 90, .3);
  z-index: 2;
}
.cake__drip {
  position: absolute;
  top: -2px; left: 0; right: 0;
  height: 26px;
  background: linear-gradient(180deg, #fdf1e2, #f4dcc3);
  border-radius: 0 0 40% 40% / 0 0 100% 100%;
}
.cake__cherry {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b8495a, var(--vino-hondo));
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.cake__cherry--a { top: 16px; left: 26px; }
.cake__cherry--b { top: 34px; left: 84px; }
.cake__cherry--c { top: 20px; right: 30px; }
.cake__plate {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  width: 224px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffdf8, #e3d1b8);
  box-shadow: 0 8px 16px -6px rgba(67,48,42,.4);
  z-index: 1;
}
.cake.is-blown .candle__flame { animation: none; opacity: 0; transform: scale(.2) translateY(6px); transition: opacity .4s, transform .4s; }
.cake.is-blown::after {
  content: "";
  position: absolute;
  inset: -10% -6% 12%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 62%, rgba(255,255,255,.5), transparent 62%);
  animation: puff 1.6s var(--ease) 1 forwards;
  pointer-events: none;
}
@keyframes puff {
  0%   { opacity: .8; transform: scale(.7); }
  100% { opacity: 0; transform: scale(1.4); }
}
.cake-wish {
  min-height: 2.6em;
  margin: 1.1rem 0 0;
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 5.4vw, 1.9rem);
  color: var(--vino);
  line-height: 1.35;
}

/* --- girasoles --- */
.modal__panel--surprise { overflow: hidden; }
.sunflowers { position: relative; margin: 1rem auto 0; }
.bouquet { position: relative; z-index: 2; display: grid; place-items: center; }
.bouquet__svg { width: min(78vw, 330px); height: auto; }
.bouquet .flower { transform-box: fill-box; transform-origin: center; animation: bloom 1.1s var(--ease) 1 backwards; }
.bouquet .flower[data-delay="0"] { animation-delay: .1s; }
.bouquet .flower[data-delay="1"] { animation-delay: .25s; }
.bouquet .flower[data-delay="2"] { animation-delay: .4s; }
.bouquet .flower[data-delay="3"] { animation-delay: .55s; }
.bouquet .flower[data-delay="4"] { animation-delay: .7s; }
.bouquet .flower .peta { transform-box: fill-box; transform-origin: center; animation: sway 5.5s var(--ease-soft) infinite alternate; }
@keyframes bloom {
  from { opacity: 0; transform: scale(.4) rotate(-14deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes sway {
  from { transform: rotate(-3deg); }
  to   { transform: rotate(3deg); }
}
.bouquet .stems .stem { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1.4s var(--ease) forwards; }
.bouquet .stems .stem:nth-child(2) { animation-delay: .1s; }
.bouquet .stems .stem:nth-child(3) { animation-delay: .2s; }
.bouquet .stems .stem:nth-child(4) { animation-delay: .3s; }
.bouquet .stems .stem:nth-child(5) { animation-delay: .4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.float-phrases {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.float-phrase {
  position: absolute;
  left: var(--px, 50%);
  top: var(--py, 50%);
  transform: translate(-50%, -50%);
  padding: .3rem .75rem;
  border-radius: 3px;
  background: rgba(255, 252, 246, .92);
  border: 1px solid rgba(216,196,166,.85);
  box-shadow: 0 8px 18px -10px rgba(67,48,42,.55);
  font-family: var(--font-script);
  font-size: clamp(1rem, 3.6vw, 1.22rem);
  line-height: 1.2;
  color: var(--vino);
  white-space: nowrap;
  opacity: 0;
  animation: phraseIn .8s var(--ease) forwards;
}
@keyframes phraseIn {
  from { opacity: 0; transform: translate(-50%, -32%) scale(.9); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ====================== 15 · EASTER EGGS / TOAST ==================== */
/* Banda discreta donde viven los corazones escondidos: no interrumpe la
   lectura, pero invita a mirar con calma. */
.secrets {
  position: relative;
  z-index: 5;
  height: clamp(190px, 40vw, 300px);
  margin: clamp(1rem, 4vw, 2.4rem) 0;
  background:
    linear-gradient(180deg, rgba(255, 250, 243, .55), transparent 40%, rgba(240, 213, 209, .22));
  border-block: 1px solid rgba(216, 196, 166, .55);
}
.secrets::before { /* hilo punteado vertical */
  content: "";
  position: absolute;
  top: 12%; bottom: 12%; left: 50%;
  width: 0;
  border-left: 1px dashed rgba(216, 196, 166, .9);
}
.secrets__hint {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-4deg);
  font-family: var(--font-script);
  font-size: clamp(1.05rem, 3.6vw, 1.35rem);
  color: var(--marron-2);
  white-space: nowrap;
  opacity: .85;
  pointer-events: none;
}
.secrets__hint small {
  display: block;
  font-family: var(--font-title);
  font-size: .6rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--beige-2);
  text-align: center;
  margin-top: .1rem;
}
.secret {
  position: absolute;
  left: var(--sx, 50%);
  transform: rotate(var(--rot, 0deg));
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--rosa-empolvado);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: .5;
  transition: opacity .4s var(--ease), transform .4s var(--ease), color .4s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.secret:hover, .secret:focus-visible { opacity: 1; transform: rotate(var(--rot, 0deg)) scale(1.25); color: var(--vino); }
.secret.is-found { color: var(--vino); opacity: .85; }
.secret.is-found::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed var(--rosa-2);
  animation: foundPing .8s var(--ease) 1 forwards;
}
@keyframes foundPing {
  from { opacity: .9; transform: scale(.7); }
  to   { opacity: 0; transform: scale(1.5); }
}

/* posiciones verticales de cada corazón escondido (relativas a .secrets) */
.secret:nth-of-type(1) { top: 6%; }
.secret:nth-of-type(2) { top: 16%; }
.secret:nth-of-type(3) { top: 36%; }
.secret:nth-of-type(4) { top: 54%; }
.secret:nth-of-type(5) { top: 72%; }
.secret:nth-of-type(6) { top: 88%; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.4rem, env(safe-area-inset-bottom));
  z-index: 120;
  transform: translate(-50%, 20px);
  padding: .85rem 1.5rem;
  background: linear-gradient(180deg, #fffdf8, #f6ecdd);
  border: 1px solid rgba(216,196,166,.9);
  border-radius: 999px;
  box-shadow: 0 18px 34px -18px rgba(67,48,42,.6);
  font-family: var(--font-script);
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  color: var(--vino);
  opacity: 0;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  pointer-events: none;
  max-width: calc(100vw - 2rem);
  text-align: center;
}
.toast[hidden] { display: none; }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

.noscript-note {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 200;
  margin: 0;
  background: var(--vino-hondo);
  color: #f7e9df;
  text-align: center;
  padding: 1rem;
  display: none;
}
html:not(.js) .noscript-note { display: block; }

/* Volver al principio */
.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 70;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(216, 196, 166, .9);
  background: rgba(255, 252, 245, .9);
  color: var(--vino);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 10px 20px -12px rgba(67,48,42,.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .45s var(--ease), visibility .45s var(--ease), transform .45s var(--ease);
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--rosa); }

/* ========================== 16 · RESPONSIVE ========================= */
/* Móvil pequeño: nada de scroll horizontal, todo cómodo */
@media (max-width: 420px) {
  .hero__photo { width: 92vw; padding: 10px 10px 44px; }
  .sticker { font-size: .8rem; }
  .sticker--script { font-size: 1.02rem; }
  .envelope { width: 88vw; }
  .tape { width: 84px; height: 26px; }
}

@media (min-width: 560px) {
  .notes { grid-template-columns: repeat(2, 1fr); }
  .gift-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* A partir de aquí hay espacio real para el scrapbook a dos columnas
   (por debajo, las fotos quedarían demasiado estrechas). */
@media (min-width: 900px) {
  .polaroid-row { grid-template-columns: repeat(3, 1fr); align-items: start; }

  .scrap {
    grid-template-columns: repeat(12, 1fr);
    align-items: start;
  }
  .scrap__note { grid-column: 1 / span 6; }
  .scrap__note--right { grid-column: 7 / span 6; margin-top: 2.4rem; }
  .scrap__note--small { grid-column: 2 / span 5; }
  .scrap__photo--one { grid-column: 8 / span 5; margin-top: 1rem; }
  .scrap__photo--two { grid-column: 1 / span 6; margin-top: 2.6rem; }
  .scrap__photo--three { grid-column: 8 / span 4; margin-top: 1.6rem; }
  .scrap__quote { grid-column: 1 / span 12; margin-block: 1.4rem; }

  .letter__grid { grid-template-columns: 1.35fr 1fr; }
  .game { position: sticky; top: 2rem; }
  .song__grid { grid-template-columns: 1fr 1fr; }
  .notes { grid-template-columns: repeat(3, 1fr); }
  .gift-card:nth-child(2) { transform: translateY(-14px); }
}

@media (min-width: 820px) and (max-width: 899px) {
  .polaroid-row { grid-template-columns: repeat(3, 1fr); align-items: start; }
}

@media (min-width: 1100px) {
  .hero__photo { width: min(90vw, 500px); }
}

/* Tabletas y móviles grandes en horizontal: galería a 2 columnas */
@media (min-width: 620px) and (max-width: 899px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== 17 · MOVIMIENTO REDUCIDO ==================== */
/* Sin JavaScript todo debe verse igualmente: mostramos lo que el
   IntersectionObserver revelaría, y el sobre se deja abierto de par en par. */
html:not(.js) .reveal { opacity: 1; transform: none; }
html:not(.js) .envelope-stage { display: none; }
html:not(.js) body.is-sealed { overflow: auto; }
html:not(.js) .vinyl__disc { animation: none; }
html:not(.js) .modal { display: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .ambient__petals, .closing__hearts { display: none !important; }
  .ambient__luz { animation: none; }
  .envelope__cta { animation: none; }
  .vinyl__disc { animation: none !important; }
}
