/* =============================================================================
   EL MUSEO DEL AMOR — hoja de estilos
   1. Tokens        2. Reset/base     3. Utilidades     4. Tipografía de sección
   5. Splash        6. Música         7. Hero           8. Corazón / mapa
   9. Salas         10. Carta final   11. Pie
   12. Responsive   13. Movimiento reducido
   ============================================================================= */

/* =========================== 1. TOKENS ==================================== */
:root {
  --bg:       #140a0e;
  --bg-2:     #1b0e13;
  --bg-3:     #241318;
  --bg-paper: #2b1a1a;

  --cream:    #f4e9e3;
  --cream-2:  #d9c8c0;
  --cream-3:  #9a857f;

  --rose:      #e8a0ac;
  --rose-deep: #c76b7e;
  --gold:      #d9a566;

  --line:  rgba(244, 233, 227, 0.12);
  --line-2: rgba(244, 233, 227, 0.22);

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --hand:  "Caveat", "Segoe Script", "Bradley Hand", cursive;

  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:  cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --wrap: 1120px;
  --gutter: clamp(1.15rem, 5vw, 3rem);
}

/* =========================== 2. RESET / BASE ============================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--cream);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; padding: 0; }

p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.06; font-weight: 500; }

::selection { background: var(--rose-deep); color: var(--bg); }

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

/* =========================== 3. UTILIDADES =============================== */
.skip-link {
  position: fixed; top: -120px; left: 1rem; z-index: 999;
  padding: 0.7rem 1.1rem;
  background: var(--cream); color: var(--bg);
  border-radius: 8px; font-weight: 500;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

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

.nojs {
  font-family: var(--sans);
  color: var(--cream-3);
  font-size: 0.95rem;
  padding: 1rem 0;
}

/* Reveal on scroll — only armed when JS is present.
   Solo opacidad (sin transform) para no crear capas de compositación
   que el navegador pueda "fantasmear" al hacer scroll. */
.js .reveal { opacity: 0; }
.js .reveal.is-visible { opacity: 1; }
.reveal { transition: opacity 0.7s var(--ease-out); }
/* Defensive: split-text elements must never be trapped invisible */
.reveal[data-split] { opacity: 1; }
/* Safety: if JS throws before revealing, show everything after 6s */
.js .reveal { animation: revealSafety 0.01s linear 6s forwards; }
@keyframes revealSafety { to { opacity: 1; } }

/* =========================== 4. TIPOGRAFÍA DE SECCIÓN =================== */
.sala__kicker,
.museo__head .sala__kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.sala__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  letter-spacing: -0.01em;
  color: var(--cream);
}

.sala__intro {
  margin-top: 1rem;
  max-width: 46ch;
  color: var(--cream-2);
  font-size: 1.02rem;
}

/* =========================== 5. SPLASH ================================== */
.splash {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-content: center; justify-items: center;
  gap: 1.1rem;
  background: radial-gradient(circle at 50% 45%, #241318 0%, var(--bg) 70%);
  color: var(--rose);
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
  animation: splashSafety 0.01s 4.5s forwards;
}
.splash.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes splashSafety {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.splash__heart { width: 72px; height: auto; }
.splash__stroke {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawHeart 1.8s var(--ease-out) forwards, heartGlow 2s ease-in-out 1.8s infinite;
}
@keyframes drawHeart { to { stroke-dashoffset: 0; } }
@keyframes heartGlow { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
.splash__word {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--cream-2);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fadeWord 1s var(--ease-out) 1s forwards;
}
@keyframes fadeWord { to { opacity: 1; } }

/* =========================== 6. MÚSICA ================================= */
.music {
  position: fixed; right: clamp(0.9rem, 3vw, 1.6rem); bottom: clamp(0.9rem, 3vw, 1.6rem);
  z-index: 120;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1rem 0.6rem 0.85rem;
  background: #241318;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--cream-2);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.7);
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.music:hover { transform: translateY(-2px); border-color: var(--rose-deep); color: var(--cream); }
.music[disabled] { opacity: 0.45; cursor: not-allowed; }
.music[disabled]:hover { transform: none; border-color: var(--line-2); }

.music__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.music__bars i {
  width: 3px; height: 40%;
  background: var(--rose);
  border-radius: 2px;
}
.music.is-playing .music__bars i { animation: eq 0.9s ease-in-out infinite; }
.music.is-playing .music__bars i:nth-child(2) { animation-delay: 0.15s; }
.music.is-playing .music__bars i:nth-child(3) { animation-delay: 0.3s; }
.music.is-playing .music__bars i:nth-child(4) { animation-delay: 0.45s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

.music__toast {
  position: fixed; right: clamp(0.9rem, 3vw, 1.6rem); bottom: calc(clamp(0.9rem, 3vw, 1.6rem) + 3.4rem);
  z-index: 120;
  max-width: 15rem;
  padding: 0.7rem 0.95rem;
  background: rgba(36, 19, 24, 0.92);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-family: var(--hand);
  font-size: 1.1rem;
  color: var(--cream);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  pointer-events: none;
}
.music__toast.is-shown { opacity: 1; transform: none; }

/* =========================== 7. HERO ================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 6rem var(--gutter) 4rem;
}

.hero__mesh {
  position: absolute; inset: -10%;
  z-index: -3;
  background:
    radial-gradient(38% 34% at 22% 28%, rgba(199, 107, 126, 0.55) 0%, transparent 70%),
    radial-gradient(42% 38% at 78% 34%, rgba(217, 165, 102, 0.35) 0%, transparent 72%),
    radial-gradient(46% 40% at 54% 82%, rgba(120, 40, 62, 0.55) 0%, transparent 74%);
  filter: blur(58px) saturate(125%);
  animation: meshDrift 34s ease-in-out infinite;
}
@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.18) rotate(8deg); }
}

.hero__grain {
  position: absolute; inset: 0; z-index: -2;
  pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__petals { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.petalo {
  position: absolute; top: -8%;
  width: 12px; height: 12px;
  background: radial-gradient(circle at 35% 35%, var(--rose), var(--rose-deep));
  border-radius: 60% 60% 60% 0;
  opacity: 0;
  filter: blur(0.4px);
  animation: petalFall 16s linear infinite;
}
.petalo:nth-child(1) { left: 12%; animation-duration: 17s; animation-delay: 0s; }
.petalo:nth-child(2) { left: 29%; animation-duration: 21s; animation-delay: 4s; }
.petalo:nth-child(3) { left: 47%; animation-duration: 14s; animation-delay: 8s; }
.petalo:nth-child(4) { left: 64%; animation-duration: 23s; animation-delay: 2s; }
.petalo:nth-child(5) { left: 78%; animation-duration: 18s; animation-delay: 11s; }
.petalo:nth-child(6) { left: 90%; animation-duration: 20s; animation-delay: 6s; }
@keyframes petalFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(115vh) rotate(320deg); opacity: 0; }
}

.hero__inner { max-width: 40rem; }
.hero__kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 6.6vw, 3.9rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--cream);
  max-width: 18ch;
}
.hero__title em { font-style: italic; color: var(--rose); }
.hero__sub {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: var(--cream-2);
  max-width: 34ch;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-top: 2.3rem;
  padding: 0.95rem 1.9rem;
  background: var(--rose-deep);
  color: #1a0d11;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  box-shadow: 0 12px 40px -12px rgba(199, 107, 126, 0.6);
}
.hero__cta:hover { transform: translateY(-2px); background: var(--rose); box-shadow: 0 18px 50px -14px rgba(232, 160, 172, 0.7); }
.hero__scroll {
  margin-top: 3rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.64rem;
  color: var(--cream-3);
}
.hero__scroll::after {
  content: ""; display: block; width: 1px; height: 42px;
  margin-top: 0.8rem;
  background: linear-gradient(var(--cream-3), transparent);
  animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse { 0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* =========================== 8. CORAZÓN / MAPA ======================== */
.museo { padding: clamp(4rem, 12vw, 8rem) var(--gutter) clamp(2rem, 5vw, 3.5rem); }
.museo__head { max-width: 40rem; margin: 0 auto clamp(2.5rem, 7vw, 5rem); text-align: center; }
.museo__head .sala__intro { margin-inline: auto; }

.corazon path {
  fill: var(--rose-deep);
  filter: drop-shadow(0 0 22px rgba(199, 107, 126, 0.55));
}
.corazon { animation: beat 1.8s var(--ease-soft) infinite; transform-origin: 50% 55%; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.07); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.11); }
  62%      { transform: scale(1); }
}

/* -- Escritorio: abanico radial -- */
.heart-map {
  position: relative;
  display: none;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  aspect-ratio: 1000 / 620;
}
.heart-map__veins { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vein {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.9;
  transition: stroke-dashoffset 1.7s var(--ease-out);
  animation: veinSafety 0.01s linear 6s forwards;
}
.heart-map.is-visible .vein { stroke-dashoffset: 0; }
.heart-map.is-visible .vein:nth-child(1) { transition-delay: 0.05s; }
.heart-map.is-visible .vein:nth-child(2) { transition-delay: 0.18s; }
.heart-map.is-visible .vein:nth-child(3) { transition-delay: 0.31s; }
.heart-map.is-visible .vein:nth-child(4) { transition-delay: 0.44s; }
.heart-map.is-visible .vein:nth-child(5) { transition-delay: 0.57s; }
@keyframes veinSafety { to { stroke-dashoffset: 0; } }

.heart-map__core {
  position: absolute; left: 50%; top: 47%;
  transform: translate(-50%, -50%);
  width: clamp(108px, 12vw, 168px);
}
.heart-map__core::after {
  content: ""; position: absolute; inset: -60%;
  background: radial-gradient(circle, rgba(199, 107, 126, 0.35) 0%, transparent 70%);
  z-index: -1;
}

.nodo {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 0.3rem;
  width: max-content; max-width: 12rem;
  text-align: center;
  transition: transform 0.35s var(--ease-out);
}
.nodo__punto {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(217, 165, 102, 0.18), 0 0 18px rgba(217, 165, 102, 0.7);
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.nodo__label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  color: var(--cream);
}
.nodo__hint {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--cream-3);
  max-width: 12rem;
}
.nodo:hover { transform: translate(-50%, calc(-50% - 4px)); }
.nodo:hover .nodo__punto { background: var(--rose); box-shadow: 0 0 0 6px rgba(232, 160, 172, 0.22), 0 0 24px rgba(232, 160, 172, 0.85); }
.nodo:hover .nodo__label { color: var(--rose); }

/* -- Móvil: vena vertical -- */
.heart-vine { display: block; max-width: 30rem; margin: 0 auto; }
.heart-vine__core { width: 84px; margin: 0 auto 0.4rem; }
.heart-vine__list {
  position: relative;
  padding-left: 3rem;
}
.heart-vine__list::before {
  content: ""; position: absolute; left: 1.15rem; top: 0.4rem; bottom: 2.4rem;
  width: 2px;
  background: linear-gradient(var(--rose-deep), var(--gold) 60%, transparent);
}
.vnodo { position: relative; }
.vnodo + .vnodo { margin-top: 0.7rem; }
.vnodo a {
  display: grid; gap: 0.2rem;
  padding: 1rem 1.1rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.vnodo a:hover { border-color: var(--rose-deep); transform: translateX(3px); }
.vnodo__dot {
  position: absolute; left: -2.44rem; top: 1.3rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(217, 165, 102, 0.16), 0 0 14px rgba(217, 165, 102, 0.6);
}
.vnodo__label { font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--cream); }
.vnodo__hint { font-family: var(--sans); font-size: 0.8rem; color: var(--cream-3); }

/* Una sala sin subtítulo no debe dejar un hueco vacío */
.nodo__hint:empty, .vnodo__hint:empty { display: none; }

/* =========================== 9. SALAS ================================ */
.sala {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3.5rem, 10vw, 7rem) var(--gutter);
  border-top: 1px solid var(--line);
}
.sala__head { max-width: 42rem; margin-bottom: clamp(2rem, 5vw, 3.2rem); }

/* --- Cartas --- */
.cartas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.1rem;
}
.carta {
  position: relative;
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: 1.6rem 1.4rem 1.4rem;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.carta::before {
  content: ""; position: absolute; top: 1.1rem; right: 1.1rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--rose), #7a1f30);
  box-shadow: 0 0 12px rgba(199, 107, 126, 0.6);
}
.carta:hover { transform: translateY(-4px); border-color: var(--rose-deep); box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.7); }
.carta__titulo {
  font-family: var(--serif); font-style: italic; font-size: 1.55rem;
  color: var(--cream); padding-right: 1.6rem; flex: 1;
}
.carta__link {
  margin-top: 0.9rem;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 500;
  color: var(--rose);
  align-self: flex-start;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out);
}
.carta__link:hover { border-color: var(--rose); }
.carta__link[aria-disabled="true"] { color: var(--cream-3); pointer-events: none; }

/* --- Vídeo (introducción y tesoro) --- */
.video-player {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  background: #000;
}
.video-pendiente {
  padding: 2.4rem 1.2rem;
  text-align: center;
  font-family: var(--sans); font-size: 0.82rem; line-height: 1.7;
  color: var(--cream-3);
}
.video-pendiente code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--rose); font-size: 0.8rem;
}

/* --- Vídeo introductorio (arriba, pequeño) --- */
.intro { padding: clamp(2.5rem, 8vw, 4.5rem) var(--gutter) 0; }
.intro__box { max-width: 34rem; margin: 0 auto; }
.intro__kicker {
  font-family: var(--sans);
  text-transform: uppercase; letter-spacing: 0.28em;
  font-size: 0.68rem; font-weight: 500;
  color: var(--gold);
  text-align: center;
  margin-bottom: 1rem;
}
.intro__frame {
  margin: 0 auto;
  line-height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.85);
}
.intro__frame:has(video) { width: -moz-fit-content; width: fit-content; max-width: 100%; }
.intro__frame.is-pendiente { border-style: dashed; border-color: var(--line-2); }

/* --- Mi tesoro más grande --- */
.sala--tesoro {
  position: relative;
  text-align: center;
}
.sala--tesoro .sala__head { margin-inline: auto; }
.sala--tesoro::before {
  content: ""; position: absolute; inset: 6% -12% 12% -12%;
  background: radial-gradient(52% 46% at 50% 48%, rgba(199, 107, 126, 0.2) 0%, transparent 74%);
  pointer-events: none; z-index: -1;
}
.tesoro__frame {
  max-width: 44rem; margin: 0 auto;
  line-height: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  box-shadow: 0 30px 80px -34px rgba(0, 0, 0, 0.9);
}
.tesoro__frame:has(video) { width: -moz-fit-content; width: fit-content; }
.tesoro__frame.is-pendiente { border-style: dashed; }

/* --- Playlist --- */
.playlist { display: grid; gap: 0.9rem; max-width: 34rem; }
.playlist__link {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.15rem 1.3rem;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-2);
  border-radius: 14px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.playlist__link:hover {
  transform: translateY(-3px);
  border-color: var(--rose-deep);
  box-shadow: 0 22px 50px -26px rgba(0, 0, 0, 0.8);
}
.playlist__icon {
  flex: none;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-content: center;
  background: rgba(199, 107, 126, 0.16);
  color: var(--rose);
  font-size: 1.15rem;
}
.playlist__texto { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.playlist__label { font-family: var(--sans); font-weight: 500; font-size: 1rem; color: var(--cream); }
.playlist__nombre { font-family: var(--serif); font-style: italic; font-size: 1.02rem; color: var(--cream-3); }
.playlist__flecha { flex: none; color: var(--gold); font-size: 1.15rem; }
.playlist__nota { font-size: 0.78rem; color: var(--cream-3); }
.aviso {
  padding: 1rem 1.2rem;
  background: var(--bg-3); border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  font-size: 0.86rem; color: var(--cream-2);
}
.aviso code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--rose); font-size: 0.82rem; }

/* --- Mosaico sorpresa --- */
.mosaico { margin-top: 1.8rem; display: grid; justify-items: center; gap: 1.1rem; }
.mosaico__btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  color: var(--cream);
  font-size: 0.9rem; letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.mosaico__btn:hover {
  transform: translateY(-2px);
  border-color: var(--rose-deep);
  box-shadow: 0 18px 44px -20px rgba(199, 107, 126, 0.55);
}
.mosaico__btn-ico { color: var(--gold); font-size: 1rem; }
.mosaico__btn[hidden] { display: none; }

.mosaico__stage { display: grid; justify-items: center; gap: 1rem; width: 100%; }
.mosaico__stage[hidden] { display: none; }

.mosaico__grid {
  position: relative;
  border-radius: 10px;
  filter: drop-shadow(0 22px 55px rgba(0, 0, 0, 0.55));
}
.mosaico__grid.is-bloom { animation: mosaicoBloom 1.8s var(--ease-out) 0.15s both; }
@keyframes mosaicoBloom {
  0%   { filter: brightness(1.25) drop-shadow(0 0 42px rgba(232, 160, 172, 0.65)); }
  100% { filter: brightness(1) drop-shadow(0 22px 55px rgba(0, 0, 0, 0.55)); }
}
.mosaico__tile {
  position: absolute;
  background-repeat: no-repeat;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  opacity: 0;
}
.mosaico__tint { position: absolute; inset: 0; mix-blend-mode: multiply; opacity: 0.55; }

.mosaico__nombre {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--rose);
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}
.mosaico__nombre.is-in { opacity: 1; }
.mosaico__cap {
  max-width: 34rem; text-align: center;
  font-family: var(--serif); font-style: italic;
  color: var(--cream-2); font-size: 1.05rem;
  opacity: 0;
  transition: opacity 1s var(--ease-out) 0.3s;
}
.mosaico__cap.is-in { opacity: 1; }
.mosaico__hide {
  font-family: var(--sans);
  font-size: 0.78rem; color: var(--cream-3);
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.mosaico__hide:hover { color: var(--rose); border-color: var(--rose); }
.mosaico__err { font-size: 0.85rem; color: var(--cream-3); text-align: center; padding: 1.5rem; }
.mosaico__err code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--rose); }

@media (prefers-reduced-motion: reduce) {
  .mosaico__grid.is-bloom { animation: none; }
}

/* --- Notas (estilo notas del iPhone) --- */
.notas { display: grid; gap: 1.4rem; }
.nota {
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
              "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  max-width: 33rem;
  padding: 1.6rem 1.5rem 1.8rem;
  background: #fffdf8;
  border-radius: 20px;
  box-shadow: 0 24px 60px -26px rgba(0, 0, 0, 0.75), 0 2px 10px rgba(0, 0, 0, 0.25);
}
.nota__titulo {
  font-family: var(--ios-font);
  font-weight: 700;
  font-size: 1.42rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #1c1c1e;
}
.nota__fecha {
  font-family: var(--ios-font);
  font-size: 0.8rem;
  color: #9b9ba1;
  margin-top: 0.35rem;
}
.nota__texto {
  font-family: var(--ios-font);
  font-size: 1rem;
  line-height: 1.55;
  color: #1c1c1e;
  margin-top: 1rem;
  white-space: pre-wrap;
}
.nota__pend {
  font-family: var(--ios-font);
  font-size: 1rem;
  font-style: italic;
  color: #b8b8bd;
  margin-top: 1rem;
}

/* --- Carrusel: "Cosas que me recuerdan a ti" --- */
.carrusel { display: grid; gap: 0.8rem; min-width: 0; }
.carrusel__viewport { position: relative; min-width: 0; }
.carrusel__track {
  display: flex;
  gap: 0.9rem;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 0.4rem var(--gutter) 1.2rem;
  margin: 0 calc(var(--gutter) * -1);
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.carrusel__track::-webkit-scrollbar { display: none; }
.carrusel__item {
  position: relative;
  flex: none;
  height: min(58vh, 440px);
  width: auto;
  max-width: min(86vw, 620px);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px -26px rgba(0, 0, 0, 0.75);
  scroll-snap-align: center;
}
.carrusel__item img,
.carrusel__item video {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
}
.carrusel__item--video { background: #000; }
.carrusel__play {
  position: absolute; inset: 0; margin: auto;
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  display: grid; place-content: center;
  background: rgba(20, 10, 14, 0.6);
  border: 1px solid rgba(244, 233, 227, 0.35);
  color: var(--cream);
  font-size: 1.05rem;
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.carrusel__play:hover { background: rgba(20, 10, 14, 0.78); transform: scale(1.06); }
.carrusel__play[hidden] { display: none; }
.carrusel__item.is-missing {
  width: min(86vw, 340px);
  display: grid; place-content: center;
  border-style: dashed; border-color: var(--line-2);
}
.carrusel__falta {
  padding: 1.5rem; text-align: center;
  font-family: var(--sans); font-size: 0.78rem; line-height: 1.7;
  color: var(--cream-3);
}
.carrusel__falta code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--rose); font-size: 0.76rem;
}
.carrusel__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-content: center;
  background: #241318;
  border: 1px solid var(--line-2);
  color: var(--cream);
  font-size: 1.3rem; line-height: 1;
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.7);
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.carrusel__nav:hover { border-color: var(--rose-deep); transform: translateY(-50%) scale(1.06); }
.carrusel__nav--prev { left: 0.4rem; }
.carrusel__nav--next { right: 0.4rem; }
.carrusel__contador {
  text-align: center;
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em;
  color: var(--cream-3);
}

@media (min-width: 720px) {
  .carrusel__nav--prev { left: -1.2rem; }
  .carrusel__nav--next { right: -1.2rem; }
}

/* =========================== 10. CARTA FINAL ======================== */
.final {
  max-width: none;
  margin: 0;
  padding: clamp(4.5rem, 13vw, 9rem) var(--gutter);
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(120, 40, 62, 0.35) 0%, transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line);
  text-align: center;
}
.final__inner { max-width: 40rem; margin: 0 auto; }
.final__title,
.final__fallback .final__title {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(2rem, 6vw, 3.1rem);
  color: var(--cream);
  margin-bottom: 1.8rem;
}
.final__p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  line-height: 1.7;
  color: var(--cream-2);
  margin-bottom: 1.2rem;
}
.final__firma { margin-top: 2.4rem; font-family: var(--serif); font-style: italic; color: var(--cream-3); }
.final__firmante { font-family: var(--hand); font-size: 2.2rem; color: var(--rose); margin-top: 0.2rem; }

/* =========================== 11. PIE ============================== */
.pie {
  text-align: center;
  padding: 3.5rem var(--gutter) 4rem;
  border-top: 1px solid var(--line);
  color: var(--cream-3);
}
.pie__heart { width: 26px; margin: 0 auto 1rem; }
.pie__heart path { fill: var(--rose-deep); }
.pie__line { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--cream-2); }
.pie__sub { font-size: 0.76rem; letter-spacing: 0.06em; margin-top: 0.4rem; }

/* =========================== 12. RESPONSIVE ====================== */
@media (min-width: 720px) {
  .cartas-grid { gap: 1.4rem; }
  .notas { gap: 1.6rem; }
  .intro__box { max-width: 38rem; }
}

@media (min-width: 960px) {
  .heart-map { display: block; }
  .heart-vine { display: none; }
  .hero__inner { max-width: 44rem; }
}

/* =========================== 13. MOVIMIENTO REDUCIDO ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__petals { display: none; }
  .hero__mesh { animation: none; }
  .hero__scroll::after { animation: none; }
  .splash__stroke { animation: none; stroke-dashoffset: 0; }
  .splash__word { animation: none; opacity: 1; }
  .corazon { animation: beatSoft 4s ease-in-out infinite; }
  .music.is-playing .music__bars i { animation: none; height: 60%; }
  .vein-pulse { display: none; }
  @keyframes beatSoft { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
}
