@import url("fonts/fonts-embed.css");

:root {
  --paper: #f8f3e8;
  --paper-deep: #efe6d2;
  --ink: #362c20;
  --ink-soft: #6b5c47;
  --gold: #9c7a42;
  --gold-deep: #7a5d30;
  --gold-bright: #b6935c;
  --sage: #7c8a6e;
  --sage-deep: #5f6e52;
  --dustyblue: #93a8b3;
  --blush: #cba59e;
  --rule: rgba(124, 93, 48, 0.28);
  --taupe: #cabb9d;
  --taupe-deep: #b9a884;
  --taupe-ink: #fdf9f0;
  --gift-bg: #8a6b3c;
  --gift-bg-deep: #705328;
  --gift-ink: #f7ecd6;
  --info-bg: #7a3a2c;
  --info-bg-deep: #5f2c22;
  --info-ink: #f5e6d8;

  --display: "Pinyon Script", "Brush Script MT", cursive;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --measure: 34rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 3.4rem;
  --space-6: 4.2rem;
}

/* This invitation commits to a single warm, printed-paper world on purpose —
   like a physical letterpress card, it does not have a "night mode". */

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
}

::selection {
  background: var(--gold);
  color: var(--paper);
}

button {
  font-family: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

a {
  color: var(--gold-deep);
}

/* ---------- Envelope intro ---------- */

#envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(20, 15, 8, 0.55) 0%, rgba(20, 15, 8, 0.72) 65%, rgba(10, 8, 4, 0.85) 100%),
    url("images/pareja.jpg") center 30% / cover no-repeat;
  transition: opacity 1.1s ease, visibility 1.1s ease;
}

#envelope-screen.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-wrap {
  position: relative;
  width: min(78vw, 380px);
  aspect-ratio: 4 / 3;
  perspective: 1400px;
}

.envelope-hint {
  position: absolute;
  left: 50%;
  bottom: -3rem;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--taupe-ink);
  white-space: nowrap;
  animation: hint-pulse 2.6s ease-in-out infinite;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.envelope {
  position: absolute;
  inset: 0;
  border: none;
  background: none;
  padding: 0;
}

.envelope svg { width: 100%; height: 100%; display: block; }

.envelope-flap {
  transform-origin: 50% 0%;
  transition: transform 1s cubic-bezier(.6,.02,.3,1);
  filter: drop-shadow(0 6px 10px rgba(54, 44, 32, 0.18));
}

.envelope-letter {
  transform: translateY(0);
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1) 0.15s, opacity 0.6s ease 0.15s;
  opacity: 1;
}

#envelope-screen.is-opening .envelope-flap {
  transform: rotateX(160deg);
}

#envelope-screen.is-opening .envelope-letter {
  transform: translateY(-92%);
}

#envelope-screen.is-opening .envelope-seal {
  animation: seal-crack 0.6s ease-in forwards;
}

.envelope-seal {
  transition: transform 0.2s ease;
}

.envelope:hover .envelope-seal {
  transform: scale(1.04);
}

@keyframes seal-crack {
  0% { transform: scale(1); opacity: 1; filter: brightness(1) saturate(1); }
  35% { transform: scale(1.18); opacity: 1; filter: brightness(1.7) saturate(1.3); }
  100% { transform: scale(0.65); opacity: 0; filter: brightness(2.4) saturate(1.5); }
}

.seal-shine {
  animation: seal-shimmer 3.2s ease-in-out infinite;
}

@keyframes seal-shimmer {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.5; }
}

/* golden light breaking through the seal as it opens */
.light-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e6 0%, #ffdf9e 32%, rgba(255, 199, 110, 0.55) 58%, rgba(255, 199, 110, 0) 75%);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

#envelope-screen.is-opening .light-burst {
  animation: burst-grow 1.15s cubic-bezier(.2,.6,.3,1) forwards;
}

@keyframes burst-grow {
  0% { transform: scale(0.4); opacity: 0; }
  25% { opacity: 1; }
  55% { transform: scale(11); opacity: 0.9; }
  100% { transform: scale(36); opacity: 0; }
}

.flash-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, #fffaf0 0%, #ffdca0 32%, #caa15c 65%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}

#envelope-screen.is-opening .flash-overlay {
  animation: flash-peak 1.15s ease-out forwards;
}

@keyframes flash-peak {
  0%, 28% { opacity: 0; }
  58% { opacity: 0.85; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .light-burst, .flash-overlay { display: none; }
  #envelope-screen.is-opening .envelope-seal { animation: none; opacity: 0; }
}

.sprig {
  position: absolute;
  width: clamp(70px, 12vw, 110px);
  height: auto;
  animation: sprig-float 6s ease-in-out infinite;
}

.sprig-left {
  left: clamp(0.5rem, 6vw, 4rem);
  top: 12%;
}

.sprig-right {
  right: clamp(0.5rem, 6vw, 4rem);
  bottom: 14%;
  transform: scaleY(-1);
  animation-delay: 1.4s;
}

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

.sprig-right {
  animation-name: sprig-float-right;
}

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

/* main content stays gently blurred behind the envelope, then sharpens into view */
#invitation {
  filter: blur(18px);
  transform: scale(1.03);
  transition: filter 1.3s ease, transform 1.3s ease;
}

body.is-revealed #invitation {
  filter: blur(0);
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .sprig, .seal-shine { animation: none; }
  #invitation { transition: none; }
}

/* ---------- Layout shell ---------- */

.scene {
  position: relative;
  isolation: isolate;
}

.scene-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.scene-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-scene {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero-scene .card { padding-top: var(--space-6); padding-bottom: var(--space-6); }

.hero-bg {
  overflow: hidden;
  background: var(--paper);
}

.hero-bg-image {
  position: absolute;
  inset: -4%;
  background: url("images/hero-bg.jpg") center center / cover no-repeat;
  animation: hero-pan 28s ease-in-out infinite alternate;
}

@keyframes hero-pan {
  0% { transform: scale(1.06) translate(0, 0); }
  100% { transform: scale(1.14) translate(-1%, -0.6%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-image { animation: none; }
}

.corner-rose {
  position: absolute;
  width: clamp(150px, 34vw, 220px);
  height: auto;
  opacity: 0.75;
  pointer-events: none;
  z-index: 2;
}

.corner-rose.tl { top: 0; left: 0; animation: rose-sway-tl 3.6s ease-in-out infinite; }
.corner-rose.tr { top: 0; right: 0; animation: rose-sway-tr 4s ease-in-out infinite 0.3s; }
.corner-rose.bl { bottom: 0; left: 0; animation: rose-sway-bl 3.4s ease-in-out infinite 0.5s; }
.corner-rose.br { bottom: 0; right: 0; animation: rose-sway-br 3.8s ease-in-out infinite 0.2s; }

@keyframes rose-sway-tl {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-10px); }
}
@keyframes rose-sway-tr {
  0%, 100% { transform: scaleX(-1) rotate(0deg) translateY(0); }
  50% { transform: scaleX(-1) rotate(4deg) translateY(-10px); }
}
@keyframes rose-sway-bl {
  0%, 100% { transform: scaleY(-1) rotate(0deg) translateY(0); }
  50% { transform: scaleY(-1) rotate(-4deg) translateY(10px); }
}
@keyframes rose-sway-br {
  0%, 100% { transform: scale(-1, -1) rotate(0deg) translateY(0); }
  50% { transform: scale(-1, -1) rotate(4deg) translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
  .corner-rose.tl, .corner-rose.tr, .corner-rose.bl, .corner-rose.br { animation: none; }
}

.card {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-6);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(3px);
  transition: opacity 1.6s cubic-bezier(.16,.6,.24,1), transform 1.6s cubic-bezier(.16,.6,.24,1), filter 1.6s cubic-bezier(.16,.6,.24,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .envelope-flap, .envelope-letter, .envelope-seal, #envelope-screen { transition: none !important; }
  .hint-pulse, .envelope-hint { animation: none; }
}

/* ---------- Typography ---------- */

.eyebrow {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 var(--space-3);
}

.verse {
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 var(--space-1);
}

.verse-cite {
  display: block;
  font-style: italic;
  font-size: 1.02rem;
  color: var(--gold-deep);
  margin-bottom: var(--space-4);
}

.lede {
  font-size: 1.28rem;
  line-height: 1.6;
  margin: 0 0 var(--space-4);
}

.names {
  font-family: var(--display);
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  line-height: 1.15;
  color: var(--gold-deep);
  margin: var(--space-2) 0 var(--space-4);
  text-wrap: balance;
}

.invite-text {
  font-size: 1.2rem;
  line-height: 1.65;
  margin: 0 0 var(--space-5);
}

.invite-text strong {
  font-weight: 600;
  color: var(--ink);
}

.sign-off {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  color: var(--gold-deep);
}

.sign-off svg { width: 56px; height: auto; flex: none; opacity: 0.85; }

.signoff-tower {
  width: 40px;
  height: auto;
  flex: none;
  opacity: 0.85;
}

/* ---------- Our story ---------- */

.story-scene { padding: var(--space-6) var(--space-4); }

.story-bg {
  background:
    linear-gradient(rgba(248, 243, 232, 0.68), rgba(248, 243, 232, 0.86)),
    url("images/bg-fuente.jpg") center top / cover no-repeat;
}

.story-card { max-width: 38rem; }

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

.heart {
  position: absolute;
  bottom: -6%;
  width: 15px;
  height: 15px;
  background: linear-gradient(160deg, #ffffff, #fdfaf4);
  opacity: 0;
  filter: drop-shadow(0 1px 1px rgba(122, 93, 48, 0.55)) drop-shadow(0 0 5px rgba(255, 255, 255, 0.9));
  animation: heart-rise 12s ease-in-out infinite;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  background: inherit;
  border-radius: 50%;
}

.heart::before { top: -6.5px; left: 0; }
.heart::after { left: 6.5px; top: 0; }

/* left-margin cluster */
.heart:nth-child(1) { left: 2%;  animation-duration: 11s; animation-delay: 0s; }
.heart:nth-child(2) { left: 7%;  animation-duration: 14s; animation-delay: 2.5s; width: 10px; height: 10px; }
.heart:nth-child(3) { left: 3%;  animation-duration: 10s; animation-delay: 5s; }
.heart:nth-child(4) { left: 9%;  animation-duration: 15s; animation-delay: 1.2s; width: 11px; height: 11px; }

/* right-margin cluster */
.heart:nth-child(5) { left: 91%; animation-duration: 12.5s; animation-delay: 4s; }
.heart:nth-child(6) { left: 96%; animation-duration: 13s; animation-delay: 6.5s; width: 10px; height: 10px; }
.heart:nth-child(7) { left: 90%; animation-duration: 16s; animation-delay: 3s; }
.heart:nth-child(8) { left: 95%; animation-duration: 11.5s; animation-delay: 7s; width: 11px; height: 11px; }

@keyframes heart-rise {
  0% { transform: translateY(0) translateX(0) rotate(-45deg); opacity: 0; }
  12% { opacity: 0.85; }
  85% { opacity: 0.6; }
  100% { transform: translateY(-680%) translateX(10px) rotate(-45deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .heart { animation: none; opacity: 0; }
}

.story-heading {
  font-family: var(--display);
  font-size: clamp(2.2rem, 7vw, 3rem);
  color: var(--gold-deep);
  margin: 0 0 var(--space-4);
}

.story-text {
  font-size: 1.12rem;
  line-height: 1.75;
  text-align: left;
  margin: 0 0 var(--space-3);
}

.story-text:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 3.2rem;
  color: var(--gold-deep);
  float: left;
  line-height: 0.7;
  margin: 0.2rem 0.35rem 0 0;
}

/* ---------- Info section ---------- */

.info-scene {
  background: linear-gradient(165deg, var(--info-bg) 0%, var(--info-bg-deep) 100%);
  color: var(--info-ink);
  padding: var(--space-6) var(--space-4);
}

.info-scene .eyebrow { color: var(--info-ink); opacity: 0.85; }

.info-grid {
  display: grid;
  gap: var(--space-5);
  text-align: center;
  margin-bottom: var(--space-6);
}

.info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.info-icon {
  width: 108px;
  height: 108px;
  color: var(--info-ink);
}

.info-icon svg { width: 100%; height: 100%; }
.info-icon img { width: 100%; height: 100%; object-fit: contain; }

.info-heading {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--info-ink);
  margin: 0;
}

.info-body {
  margin: 0;
  line-height: 1.6;
  font-size: 1.05rem;
  color: var(--info-ink);
  opacity: 0.92;
  max-width: 22rem;
}

.info-body em { font-style: italic; opacity: 1; }
.info-body strong { font-weight: 600; }

.rsvp-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--info-ink);
  border-radius: 999px;
  background: transparent;
  color: var(--info-ink);
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.rsvp-button:hover {
  background: var(--info-ink);
  color: var(--info-bg-deep);
}

.closing-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.closing-heading {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
}

/* stagger the info items and timeline items as they reveal */
.info-item:nth-child(2) { transition-delay: 0.1s; }
.info-item:nth-child(3) { transition-delay: 0.2s; }
.info-item:nth-child(4) { transition-delay: 0.3s; }
.timeline-item:nth-child(2) { transition-delay: 0.15s; }
.timeline-item:nth-child(3) { transition-delay: 0.22s; }
.timeline-item:nth-child(4) { transition-delay: 0.3s; }
.timeline-item:nth-child(5) { transition-delay: 0.38s; }
.timeline-item:nth-child(6) { transition-delay: 0.46s; }

/* ---------- Countdown ---------- */

.countdown-scene {
  background: linear-gradient(165deg, var(--taupe) 0%, var(--taupe-deep) 100%);
  color: var(--taupe-ink);
  overflow: hidden;
  padding: var(--space-6) var(--space-4);
}

.countdown-scene .eyebrow {
  color: var(--taupe-ink);
  opacity: 0.85;
}

.countdown-invite {
  max-width: 30rem;
  margin: 0 auto var(--space-3);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--taupe-ink);
  opacity: 0.95;
}

.countdown-date {
  font-family: var(--display);
  font-size: clamp(1.7rem, 5.5vw, 2.3rem);
  color: var(--taupe-ink);
  margin: 0 0 var(--space-3);
}

.petals {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -8%;
  width: 20px;
  height: 24px;
  background:
    radial-gradient(ellipse at 32% 28%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(160deg, #ffffff 0%, #fbf3ea 55%, #e9dccb 100%);
  border-radius: 2% 92% 2% 92% / 2% 92% 2% 92%;
  opacity: 0.92;
  box-shadow: inset 3px 3px 4px rgba(255, 255, 255, 0.6), inset -3px -3px 5px rgba(150, 130, 105, 0.3), 0 2px 5px rgba(60, 45, 25, 0.12);
  animation: petal-fall 14s linear infinite;
  will-change: top, transform;
}

.petal:nth-child(1)  { left: 3%;  animation-duration: 13s; animation-delay: 0s; }
.petal:nth-child(2)  { left: 12%; animation-duration: 17s; animation-delay: 2s; width: 13px; height: 16px; }
.petal:nth-child(3)  { left: 21%; animation-duration: 12s; animation-delay: 4s; }
.petal:nth-child(4)  { left: 30%; animation-duration: 18s; animation-delay: 1s; width: 15px; height: 19px; }
.petal:nth-child(5)  { left: 39%; animation-duration: 15s; animation-delay: 5s; }
.petal:nth-child(6)  { left: 48%; animation-duration: 13s; animation-delay: 3s; width: 13px; height: 16px; }
.petal:nth-child(7)  { left: 57%; animation-duration: 19s; animation-delay: 6s; }
.petal:nth-child(8)  { left: 66%; animation-duration: 16s; animation-delay: 2.5s; width: 15px; height: 19px; }
.petal:nth-child(9)  { left: 74%; animation-duration: 14s; animation-delay: 0.8s; }
.petal:nth-child(10) { left: 81%; animation-duration: 20s; animation-delay: 3.6s; width: 13px; height: 16px; }
.petal:nth-child(11) { left: 89%; animation-duration: 12.5s; animation-delay: 5.2s; }
.petal:nth-child(12) { left: 96%; animation-duration: 17.5s; animation-delay: 1.6s; width: 15px; height: 19px; }
.petal:nth-child(13) { left: 55%; animation-duration: 15.5s; animation-delay: 7s; width: 11px; height: 14px; }
.petal:nth-child(14) { left: 8%;  animation-duration: 21s; animation-delay: 4.4s; width: 11px; height: 14px; }

@keyframes petal-fall {
  0% { top: -8%; transform: translateX(0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.85; }
  88% { opacity: 0.6; }
  100% { top: 108%; transform: translateX(34px) rotate(220deg); opacity: 0; }
}

.countdown-scene .card { position: relative; z-index: 1; }

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.6rem;
  margin: var(--space-3) 0 var(--space-4);
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4rem;
}

.countdown-value {
  font-size: clamp(2.4rem, 9vw, 4rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--taupe-ink);
}

.countdown-label {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taupe-ink);
  opacity: 0.8;
}

.countdown-sep {
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.4;
  color: var(--taupe-ink);
  opacity: 0.6;
}

.countdown-signoff {
  color: var(--taupe-ink);
  font-family: var(--display);
  font-size: clamp(1.6rem, 5vw, 2.1rem);
}

@media (prefers-reduced-motion: reduce) {
  .petal { animation: none; opacity: 0; }
}

/* ---------- Gift section ---------- */

.gift-scene {
  background: linear-gradient(160deg, var(--gift-bg) 0%, var(--gift-bg-deep) 100%);
  color: var(--gift-ink);
  padding: var(--space-6) var(--space-4);
}

.gift-inner {
  max-width: 52rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: var(--space-4);
  align-items: center;
}

.gift-illustration {
  width: 100%;
  height: auto;
  animation: gift-float 5s ease-in-out infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .gift-illustration { animation: none; }
}

.gift-heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.3;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

.gift-body {
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0 0 var(--space-3);
  color: var(--gift-ink);
  opacity: 0.92;
}

.gift-accounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.gift-account-label {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
  margin: 0 0 0.3rem;
}

.gift-account-name {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
}

.gift-account-alias {
  font-style: italic;
  font-size: 1.02rem;
  margin: 0;
  opacity: 0.95;
}

@media (max-width: 640px) {
  .gift-inner { grid-template-columns: 1fr; text-align: center; }
  .gift-illustration { max-width: 300px; margin: 0 auto; }
  .gift-accounts { grid-template-columns: 1fr; text-align: center; }
}

.closing-scene { padding-top: var(--space-6); }

.closing-logo {
  display: block;
  width: 190px;
  height: auto;
  margin: 0;
  opacity: 0.9;
  animation: logo-breathe 4.5s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .closing-logo { animation: none; }
}

/* ---------- Timeline ---------- */

.timeline-scene { padding: var(--space-6) var(--space-4); }

.timeline-bg {
  background:
    linear-gradient(rgba(248, 243, 232, 0.6), rgba(248, 243, 232, 0.8)),
    url("images/bg-girnaldas.jpg") center / cover no-repeat;
}

.timeline-card { max-width: 30rem; }

.timeline-rings {
  width: 46px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  opacity: 0.85;
}

.timeline-heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 5.5vw, 2.1rem);
  color: var(--ink);
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

.timeline-media {
  display: block;
  width: auto;
  max-width: 200px;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  margin: 0 0 0.7rem;
}

.timeline-media--photo {
  -webkit-mask-image: radial-gradient(closest-side, black 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, black 62%, transparent 100%);
}

.timeline {
  position: relative;
  margin: var(--space-4) 0 0;
  text-align: left;
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--rule);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.4s cubic-bezier(.3,.7,.2,1);
}

.timeline.is-visible .timeline-line {
  transform: scaleY(1);
}

.timeline-item {
  position: relative;
  padding: 0 0 var(--space-5) 3.5rem;
  min-height: 42px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--gold-deep);
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.4);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(.4,1.4,.5,1) 0.3s, opacity 0.4s ease 0.3s;
}

.timeline-dot svg { width: 21px; height: 21px; }

.timeline-item.is-visible .timeline-dot {
  transform: scale(1);
  opacity: 1;
}

.timeline-content { padding-top: 0.5rem; }

.timeline-time {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.15rem;
}

.timeline-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--gold-deep);
  margin: 0 0 0.3rem;
  line-height: 1.1;
}

.timeline-venue {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.map-link {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 1px;
  transition: opacity 0.2s ease;
}

.map-link:hover { opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
  .timeline-line, .timeline-dot { transition: none; transform: none; opacity: 1; }
}

/* ---------- Music toggle ---------- */

.music-toggle {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 40;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: 0 4px 14px rgba(54, 44, 32, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-deep);
  transition: transform 0.2s ease;
}

.music-toggle:hover { transform: scale(1.06); }

.music-toggle svg { width: 22px; height: 22px; }

.music-toggle .icon-pause { display: none; }
.music-toggle.is-playing .icon-play { display: none; }
.music-toggle.is-playing .icon-pause { display: block; }

@media (min-width: 640px) {
  .info-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
}
