/* ==========================================================
   Silvis · cumpleaños
   Paleta: vino, rosa empolvado y crema sobre casi-negro.
   ========================================================== */

:root {
  --noir: #140709;
  --vino-900: #22090f;
  --vino-800: #3a0e1a;
  --vino-700: #561527;
  --vino-600: #7a1f37;
  --vino-500: #9b2c49;
  --rosa-400: #d69ea0;
  --rosa-300: #e2b4b2;
  --rosa-200: #eccbc8;
  --rosa-100: #f5e1dd;
  --crema: #f7efe6;
  --papel: #fbf7f1;
  --oro: #c8a36b;
  --texto: #f3e8df;
  --texto-suave: rgba(243, 232, 223, 0.66);

  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --card-w: min(76vw, 320px);
  --gap: 18px;
  --gutter: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --vh: 100vh;
}

@supports (height: 100svh) {
  :root { --vh: 100svh; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  background: var(--noir);
}

@supports (overflow: clip) {
  html { overflow-x: clip; }
}

html.is-locked,
html.is-locked body,
body.modal-open { overflow: hidden; }

body {
  margin: 0;
  min-height: var(--vh);
  background: var(--noir);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img { max-width: 100%; }

button { font: inherit; color: inherit; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--rosa-300);
  outline-offset: 3px;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 32px;
  border: 0;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.2s var(--ease-out), background-color 0.2s, box-shadow 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--rosa-300);
  color: var(--vino-900);
  box-shadow: 0 10px 30px -10px rgba(226, 180, 178, 0.55);
}

.btn--ghost {
  background: rgba(247, 239, 230, 0.04);
  color: var(--texto);
  box-shadow: inset 0 0 0 1.5px rgba(226, 180, 178, 0.55);
}

.btn--small {
  min-height: 50px;
  padding: 0 18px;
  gap: 8px;
  font-size: 0.975rem;
}

/* ==========================================================
   1. Entrada
   ========================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 24px) var(--gutter) calc(var(--safe-bottom) + 24px);
  background:
    radial-gradient(120% 70% at 50% 42%, rgba(122, 31, 55, 0.55) 0%, rgba(58, 14, 26, 0.35) 38%, transparent 70%),
    var(--noir);
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}

.is-open .intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 420px;
}

.intro__title {
  margin: 40px 0 28px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.9rem, 8.4vw, 2.5rem);
  line-height: 1.1;
  color: var(--crema);
  transition: opacity 0.4s ease, transform 0.5s var(--ease-out);
}

.intro__btn {
  width: min(100%, 300px);
  min-height: 62px;
  font-size: 1.125rem;
  animation: breathe 3.2s ease-in-out infinite;
  transition: opacity 0.35s ease, transform 0.4s var(--ease-out);
}

.is-opening .intro__title,
.is-opening .intro__btn {
  opacity: 0;
  transform: translateY(14px);
  animation: none;
  pointer-events: none;
}

/* ---------- El sobre ---------- */

.envelope {
  position: relative;
  width: min(72vw, 290px);
  aspect-ratio: 3 / 2;
  perspective: 900px;
  cursor: pointer;
  animation: float 4.5s ease-in-out infinite;
}

.envelope::after {
  /* sombra suave en el piso */
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -26px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
  z-index: -1;
}

.envelope__back,
.envelope__pocket {
  position: absolute;
  inset: 0;
  border-radius: 8px;
}

.envelope__back {
  z-index: 1;
  background: linear-gradient(180deg, #b77c81, #c99196);
}

.envelope__letter {
  position: absolute;
  z-index: 2;
  left: 7%;
  right: 7%;
  top: 7%;
  height: 86%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 11%;
  border-radius: 5px;
  background: var(--papel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.9s var(--ease-out) 0.55s;
}

.envelope__mono {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--vino-600);
}

.envelope__line {
  width: 46%;
  height: 2px;
  border-radius: 2px;
  background: var(--rosa-200);
}

.envelope__line--short { width: 30%; }

.envelope__pocket {
  z-index: 3;
  background: linear-gradient(180deg, #edc6c3, #e2b2b0);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.7);
}

.envelope__pocket::after {
  /* solapa inferior, un poco más oscura */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #e3b3b1, #d9a4a4);
  clip-path: polygon(0 100%, 50% 50%, 100% 100%);
}

.envelope__flap {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: 100%;
  height: 58%;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #d9a3a5, #cb8f93);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  transition: transform 0.7s var(--ease-out) 0.15s, z-index 0s linear 0.45s;
}

.envelope__seal {
  position: absolute;
  z-index: 5;
  top: 58%;
  left: 50%;
  width: 54px;
  height: 54px;
  margin: -30px 0 0 -27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--vino-500), var(--vino-700) 70%);
  box-shadow:
    0 0 0 3px rgba(86, 21, 39, 0.9),
    0 6px 14px rgba(0, 0, 0, 0.45),
    inset 0 2px 3px rgba(255, 255, 255, 0.18);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--rosa-200);
  transition: transform 0.35s var(--ease-out), opacity 0.3s ease;
}

.is-opening .envelope { animation: none; }
.is-opening .envelope__seal { transform: scale(0.4); opacity: 0; }
.is-opening .envelope__flap { transform: rotateX(180deg); z-index: 1; }
.is-opening .envelope__letter { transform: translateY(-52%); }

.is-open .envelope {
  transform: scale(1.08);
  transition: transform 0.7s var(--ease-out);
}

/* ==========================================================
   Contenido (oculto hasta abrir el sobre)
   ========================================================== */

.main { display: none; }
.is-open .main { display: block; }

.section-title {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.4rem, 11vw, 3.2rem);
  line-height: 1;
  color: var(--crema);
}

/* ---------- 2. Portada ---------- */

.hero {
  position: relative;
  min-height: var(--vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 48px) var(--gutter) calc(var(--safe-bottom) + 96px);
  text-align: center;
  background:
    radial-gradient(110% 60% at 50% 38%, rgba(122, 31, 55, 0.5) 0%, rgba(58, 14, 26, 0.3) 40%, transparent 72%),
    var(--noir);
}

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1;
  color: var(--crema);
  outline: none;
}

.hero__line {
  display: block;
  font-size: clamp(2.3rem, 11vw, 3.4rem);
  letter-spacing: -0.005em;
}

.hero__name {
  display: block;
  margin-top: 0.12em;
  font-style: italic;
  font-size: clamp(5rem, 27vw, 8rem);
  line-height: 0.95;
  color: var(--rosa-300);
}

.hero__cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) + 28px);
  width: max-content;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 88px;
  padding: 8px 12px;
  color: var(--texto-suave);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

.hero__cue svg { animation: nudge 2s ease-in-out infinite; }

.reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(22px);
}

.hero__name.reveal { display: block; }
.hero__cue.reveal { display: flex; }

.is-open .reveal {
  animation: rise 1s var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 160ms + 300ms);
}

/* ---------- 3. Galería ---------- */

.gallery {
  position: relative;
  padding: 72px 0 190px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--noir), var(--vino-900) 55%, var(--noir));
}

@supports (overflow: clip) {
  .gallery { overflow: clip; }
}

.gallery .section-title {
  position: relative;
  z-index: 1;
}

.carousel {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--gap);
  margin-top: 110px;
  padding: 26px 0 30px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
}

.carousel::-webkit-scrollbar { display: none; }

/* Espaciadores para que la primera y la última foto queden centradas */
.carousel::before,
.carousel::after {
  content: '';
  flex: 0 0 max(0px, calc((100% - var(--card-w)) / 2 - var(--gap)));
}

.slide {
  flex: 0 0 var(--card-w);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.polaroid {
  margin: 0;
  padding: 12px 12px 46px;
  border-radius: 3px;
  background: var(--papel);
  box-shadow:
    0 22px 40px -14px rgba(0, 0, 0, 0.75),
    0 2px 6px rgba(0, 0, 0, 0.3);
  transform: rotate(var(--rot, 0deg)) scale(0.9);
  transition: transform 0.6s var(--ease-out), opacity 0.6s ease;
  opacity: 0.6;
}

.slide.is-active .polaroid {
  transform: rotate(var(--rot, 0deg)) scale(1);
  opacity: 1;
}

.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #e9ddd0;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.polaroid figcaption {
  margin-top: 12px;
  margin-bottom: -30px;
  min-height: 1.3em;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.1;
  color: var(--vino-700);
}

.dots {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 4px;
}

.dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

.dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(226, 180, 178, 0.35);
  transition: width 0.35s var(--ease-out), background-color 0.35s;
}

.dot[aria-current='true']::before {
  width: 22px;
  background: var(--rosa-300);
}

.hint {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--texto-suave);
}

/* ---------- Stickers ---------- */

.stickers {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.sticker {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  transform: translate(var(--x, 0px), var(--y, 0px)) rotate(var(--rot, 0deg));
}

.sticker.is-dragging { cursor: grabbing; }

.sticker__pop {
  transform: scale(0);
  transition: transform 0.25s var(--ease-out);
}

.stickers.is-visible .sticker__pop {
  animation: pop 0.7s var(--ease-out) forwards;
  animation-delay: var(--pop-delay, 0ms);
}

.sticker.is-dragging .sticker__pop {
  /* se agranda un poco mientras se arrastra */
  animation: none;
  transform: scale(1.08);
}

.sticker__bob {
  animation: bob 5.5s ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}

.sticker img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.sticker--foto img {
  border: 4px solid var(--papel);
  border-radius: 12px;
  box-shadow: 0 10px 22px -6px rgba(0, 0, 0, 0.6);
}

.sticker--recorte img {
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5));
}

/* ---------- 4. Video ---------- */

.video-section {
  padding: 40px var(--gutter) 24px;
  display: flex;
  justify-content: center;
}

.video-card {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
  max-height: calc(var(--vh) * 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  background:
    radial-gradient(90% 70% at 50% 40%, rgba(155, 44, 73, 0.55), transparent 70%),
    linear-gradient(160deg, var(--vino-800), var(--vino-900) 60%, #120508);
  box-shadow:
    inset 0 0 0 1px rgba(226, 180, 178, 0.18),
    0 30px 60px -30px rgba(0, 0, 0, 0.9);
  transition: transform 0.25s var(--ease-out);
}

.video-card:active { transform: scale(0.98); }

.video-card__glow {
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 0deg, transparent 0 60%, rgba(226, 180, 178, 0.14) 75%, transparent 90%);
  animation: spin 14s linear infinite;
}

.video-card__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding-left: 5px;
  border-radius: 50%;
  background: var(--crema);
  color: var(--vino-700);
  box-shadow: 0 0 0 0 rgba(226, 180, 178, 0.5);
  animation: ring 2.6s ease-out infinite;
}

.video-card__label {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 9vw, 2.5rem);
  line-height: 1.05;
  color: var(--crema);
}

/* ---------- 5. Final ---------- */

.final {
  min-height: calc(var(--vh) * 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 72px var(--gutter) calc(var(--safe-bottom) + 72px);
  text-align: center;
  background: radial-gradient(90% 55% at 50% 60%, rgba(122, 31, 55, 0.45), transparent 72%);
}

.final__love {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(4.5rem, 26vw, 8rem);
  line-height: 0.9;
  color: var(--rosa-300);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 1.2s ease, transform 1.4s var(--ease-out);
}

.final.is-visible .final__love {
  opacity: 1;
  transform: none;
}

.final .btn { width: min(100%, 320px); }

/* ---------- 6. P.D. · tarjeta de regalo ---------- */

.pd {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px var(--gutter) calc(var(--safe-bottom) + 88px);
  text-align: center;
}

.pd__eyebrow {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 3rem;
  line-height: 1;
  color: var(--rosa-300);
}

.pd__lead {
  margin: 10px 0 34px;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--crema);
}

.gift {
  width: min(86vw, 340px);
  aspect-ratio: 1.586;
  perspective: 1200px;
}

.gift__card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.1s var(--ease-out);
}

.gift.is-open .gift__card { transform: rotateY(180deg); }

.gift.is-wrong { animation: shake 0.45s ease; }

.gift__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 18px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow: 0 26px 50px -22px rgba(0, 0, 0, 0.85);
}

.gift__face--back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    repeating-linear-gradient(135deg, rgba(226, 180, 178, 0.06) 0 1px, transparent 1px 11px),
    linear-gradient(135deg, var(--vino-600), var(--vino-900));
  box-shadow:
    inset 0 0 0 1px rgba(226, 180, 178, 0.22),
    0 26px 50px -22px rgba(0, 0, 0, 0.85);
}

.gift__seal {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--rosa-200), var(--rosa-400) 75%);
  color: var(--vino-700);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.gift__locked {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rosa-200);
}

.gift__face--front {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px;
  text-align: left;
  color: var(--vino-800);
  background: linear-gradient(135deg, var(--crema) 0%, var(--rosa-200) 58%, var(--rosa-300) 100%);
}

.gift__face--front::after {
  /* brillo que cruza la tarjeta al abrirse */
  content: '';
  position: absolute;
  inset: -40%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.65) 50%, transparent 60%);
  transform: translateX(-70%);
  pointer-events: none;
}

.gift.is-open .gift__face--front::after {
  animation: shine 1.4s ease 0.9s forwards;
}

.gift__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vino-600);
}

.gift__amount {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.2rem, 17vw, 4.2rem);
  line-height: 1;
}

.gift__code {
  min-height: 1.3em;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: clamp(0.95rem, 4.6vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  word-break: break-all;
}

.unlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(100%, 340px);
  margin-top: 30px;
  transition: opacity 0.4s ease;
}

.unlock.is-done { display: none; }

.unlock__hint {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--crema);
}

.unlock__hint-label {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--texto-suave);
}

.unlock__input {
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: rgba(247, 239, 230, 0.07);
  box-shadow: inset 0 0 0 1.5px rgba(226, 180, 178, 0.35);
  color: var(--crema);
  font: 500 1.0625rem/1 var(--sans); /* ≥16px: iOS no hace zoom al escribir */
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}

.unlock__input::placeholder { color: rgba(243, 232, 223, 0.4); }

.unlock__input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--rosa-300);
}

.unlock__btn { width: 100%; }
.unlock__btn[disabled] { opacity: 0.7; cursor: progress; }

.unlock__msg {
  min-height: 1.5em;
  margin: 0;
  font-size: 0.875rem;
  color: var(--texto-suave);
}

.unlock__msg.is-error { color: var(--rosa-300); }

.gift-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(100%, 320px);
  margin-top: 30px;
  animation: rise 0.8s var(--ease-out) both;
}

.gift-actions .btn { width: 100%; }

.gift-actions__help {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--texto-suave);
}

.ideas {
  width: 100%;
  max-width: 440px;
  margin-top: 64px;
}

.ideas__title {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--crema);
}

.ideas__sub {
  margin: 10px 0 22px;
  color: var(--texto-suave);
}

.ideas__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}

.idea {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 10px 14px;
  border-radius: 18px;
  background: rgba(247, 239, 230, 0.04);
  box-shadow: inset 0 0 0 1px rgba(226, 180, 178, 0.18);
  color: var(--texto);
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 0.2s var(--ease-out), background-color 0.2s;
}

.idea:active { transform: scale(0.97); }

.idea__img {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  color: var(--vino-600);
}

.idea__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.idea__img svg { width: 56%; height: 56%; }

.idea__brand {
  padding: 0 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rosa-400);
}

.idea__name {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-top: -6px;
  padding: 0 4px;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.1;
  color: var(--crema);
}

.idea__name svg {
  flex: none;
  margin-top: 2px;
  color: var(--rosa-300);
}

/* ==========================================================
   Reproductor
   ========================================================== */

.player {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #0b0406;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.player.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease;
}

.player__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding-top: var(--safe-top);
}

.player__frame {
  --ar: 1.7778;
  position: relative;
  width: min(100vw, calc((var(--vh) - var(--safe-top) - var(--safe-bottom) - 100px) * var(--ar)));
  aspect-ratio: var(--ar);
  background: #000;
}

.player__frame iframe,
.player__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.player__frame video { object-fit: contain; }

.player__frame:fullscreen,
.player__frame:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}

.player__error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  background: #0b0406;
}

.player__error p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
}

.player__bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px var(--gutter) calc(var(--safe-bottom) + 18px);
}

/* ==========================================================
   Confeti
   ========================================================== */

.confetti {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}

.confetti.is-active { display: block; }

/* ==========================================================
   Animaciones
   ========================================================== */

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 10px 30px -10px rgba(226, 180, 178, 0.45), 0 0 0 0 rgba(226, 180, 178, 0.35); }
  50% { box-shadow: 0 10px 30px -10px rgba(226, 180, 178, 0.6), 0 0 0 10px rgba(226, 180, 178, 0); }
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@keyframes pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes bob {
  from { transform: translateY(-5px) rotate(-2deg); }
  to { transform: translateY(6px) rotate(2deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(3px); }
}

@keyframes shine {
  to { transform: translateX(70%); }
}

@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(226, 180, 178, 0.45); }
  80%, 100% { box-shadow: 0 0 0 26px rgba(226, 180, 178, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

  .envelope,
  .intro__btn,
  .sticker__bob,
  .video-card__glow,
  .video-card__icon,
  .hero__cue svg { animation: none !important; }

  .reveal,
  .final__love { opacity: 1; transform: none; }

  .stickers .sticker__pop { transform: none; animation: none !important; }

  .polaroid { transition: none; }

  /* Los fundidos suaves sí se conservan */
  .intro { transition: opacity 0.45s ease, visibility 0s linear 0.45s !important; }
  .player { transition-duration: 0.2s !important; }
}
