/* ==========================================================================
   Akash's Birthday Celebration — stylesheet
   1. Tokens            7. Scratch card      13. Dress code
   2. Base & utilities  8. Countdown         14. Wishes
   3. Buttons           9. Timeline          15. RSVP form
   4. Entrance curtain 10. Cards            16. Footer & back-to-top
   5. Header           11. Venue            17. Motion preferences
   6. Hero             12. (section base)  18. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Brand palette — overridden at runtime from config.js */
  --rose: #d31876;
  --gold: #ffbf00;
  --ivory: #fff8f0;

  --rose-600: #b0135f;
  --rose-800: #7c0c43;
  --rose-900: #56092f;
  --plum: #2b1720;
  --gold-700: #9c6b00;      /* gold that is legible on light surfaces */
  --gold-100: #fff3cf;
  --cream: #fffdfa;
  --ink: #35212b;
  --muted: #6f5763;
  --line: rgba(211, 24, 118, 0.14);
  --line-strong: rgba(211, 24, 118, 0.28);
  --shadow-sm: 0 2px 10px rgba(43, 23, 32, 0.06);
  --shadow-md: 0 14px 38px -18px rgba(43, 23, 32, 0.35);
  --shadow-lg: 0 30px 70px -28px rgba(86, 9, 47, 0.45);

  --font-display: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Jost", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --dur-press: 140ms;
  --dur-base: 220ms;
  --dur-reveal: 620ms;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 72px;
}

/* 2. Base & utilities ------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rose); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--plum);
  color: var(--cream);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform var(--dur-base) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

/* Section rhythm */
.section {
  position: relative;
  padding-block: clamp(64px, 9vw, 118px);
}
.section--invitation { background: linear-gradient(180deg, var(--cream), var(--ivory)); }
.section--countdown {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(211, 24, 118, 0.07), transparent 62%),
    var(--cream);
}
.section--schedule { background: var(--ivory); }
.section--highlights { background: linear-gradient(180deg, var(--ivory), #fff3e6); }
.section--venue { background: var(--cream); }
.section--dress { background: var(--ivory); }
.section--wishes {
  background:
    radial-gradient(90% 80% at 50% 20%, rgba(255, 191, 0, 0.14), transparent 60%),
    linear-gradient(160deg, #4d0a2c, var(--rose-900) 55%, #3a0722);
  color: var(--cream);
}
.section--rsvp {
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(211, 24, 118, 0.08), transparent 60%),
    var(--cream);
}

/* Section header */
.section-head {
  max-width: 660px;
  margin: 0 auto clamp(34px, 5vw, 58px);
  text-align: center;
}
.section-head__eyebrow {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose);
}
.section-head__title {
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.35rem);
  margin-bottom: 14px;
}
.section-head__sub {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.section-head__ornament {
  display: block;
  width: 118px;
  height: 12px;
  margin: 22px auto 0;
  background:
    linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent) center/100% 1px no-repeat,
    radial-gradient(circle at 50% 50%, var(--gold) 0 4px, transparent 4.5px);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* graceful fallback when an optional local image is missing */
.is-media-missing {
  background:
    radial-gradient(70% 70% at 50% 40%, rgba(255, 191, 0, 0.26), transparent 70%),
    linear-gradient(150deg, #f7e3ee, #ffe9c2);
}

/* 3. Buttons ---------------------------------------------------------------- */
.btn {
  --btn-bg: var(--rose);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dur-press) var(--ease-out),
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn--gold {
  --btn-bg: linear-gradient(135deg, #ffd166, var(--gold) 45%, #eaa400);
  --btn-fg: #40210a;
  box-shadow: 0 12px 28px -14px rgba(255, 191, 0, 0.85);
}
.btn--rose {
  --btn-bg: var(--rose);
  --btn-fg: #fff;
  box-shadow: 0 12px 28px -14px rgba(211, 24, 118, 0.9);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}
.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--rose);
  border-color: var(--line-strong);
}
.btn--sm { padding: 11px 20px; font-size: 0.82rem; }
.btn--wide { min-width: 240px; }

@media (hover: hover) and (pointer: fine) {
  .btn--gold:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(255, 191, 0, 0.9); }
  .btn--rose:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(211, 24, 118, 0.95); }
  .btn--ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
  .btn--outline:hover { background: rgba(211, 24, 118, 0.06); border-color: var(--rose); }
  .btn--gold:active,
  .btn--rose:active,
  .btn--ghost:active,
  .btn--outline:active { transform: translateY(-1px) scale(0.97); }
}

/* 4. Entrance curtain ------------------------------------------------------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 42%, #7a0f45 0%, #4a0826 55%, #2a0418 100%);
  transition: opacity 400ms linear;
}
.curtain[hidden] { display: none; }

/* optional backdrop: revealed from the seam as the panels slide apart */
.curtain.has-entrance-image {
  background:
    linear-gradient(180deg, rgba(28, 3, 17, 0.52), rgba(28, 3, 17, 0.7)),
    var(--entrance-image) center / cover no-repeat;
}
.curtain.is-fading { opacity: 0; pointer-events: none; }

.curtain__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(46% 40% at 50% 46%, rgba(255, 191, 0, 0.28), transparent 70%);
  animation: curtain-breathe 6s var(--ease-in-out) infinite;
}
@keyframes curtain-breathe {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.curtain__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.6%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 26%, transparent 74%, rgba(0, 0, 0, 0.3)),
    repeating-linear-gradient(
      90deg,
      #6d0738 0px, #8c0b4b 16px, #a8115d 26px, #7a0842 40px, #5c0630 54px, #8a0b4a 66px
    );
  transition: transform 1100ms var(--ease-in-out);
  will-change: transform;
}
.curtain__panel--left {
  left: 0;
  box-shadow: inset -14px 0 26px -12px rgba(0, 0, 0, 0.7);
}
.curtain__panel--right {
  right: 0;
  box-shadow: inset 14px 0 26px -12px rgba(0, 0, 0, 0.7);
}
/* gold inner hem */
.curtain__panel--left::after,
.curtain__panel--right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(180deg, transparent, var(--gold) 12%, #ffe4a3 50%, var(--gold) 88%, transparent);
  opacity: 0.85;
}
.curtain__panel--left::after { right: 0; }
.curtain__panel--right::after { left: 0; }

.curtain__seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent, rgba(255, 191, 0, 0.55), transparent);
  opacity: 0;
  transition: opacity 300ms linear;
}

.curtain__particles,
.curtain__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.curtain__particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe9a8, rgba(255, 191, 0, 0));
  opacity: 0;
  animation: particle-float linear infinite;
}
@keyframes particle-float {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.6); }
  12% { opacity: 0.9; }
  80% { opacity: 0.7; }
  100% { opacity: 0; transform: translate3d(28px, -120px, 0) scale(1.15); }
}
.curtain__confetti-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  background: var(--gold);
  opacity: 0;
}

/* centre medallion + copy */
.curtain__center {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  color: var(--cream);
  transition: opacity 480ms var(--ease-out), transform 620ms var(--ease-out);
}
.curtain__eyebrow {
  margin: 0 0 14px;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}
.curtain__seal {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(92px, 22vw, 128px);
  aspect-ratio: 1;
  margin-bottom: 12px;
  color: var(--gold);
}
.seal__ring {
  position: absolute;
  inset: 0;
  animation: seal-spin 26s linear infinite;
}
@keyframes seal-spin { to { transform: rotate(360deg); } }
.seal__monogram {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 2px 24px rgba(255, 191, 0, 0.45);
}
.curtain__title { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.curtain__title-sm {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 253, 250, 0.82);
}
.curtain__title-lg {
  font-size: clamp(2.1rem, 1.2rem + 4vw, 3.6rem);
  color: var(--cream);
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}
.curtain__date {
  margin: 10px 0 26px;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.curtain__note {
  margin: 18px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(255, 253, 250, 0.55);
}

.curtain__open {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 40px;
  border: 1px solid rgba(255, 191, 0, 0.55);
  border-radius: var(--radius-pill);
  background: rgba(255, 191, 0, 0.08);
  color: var(--cream);
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.curtain__open::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(255, 191, 0, 0.45);
  border-radius: inherit;
  animation: curtain-pulse 2.6s var(--ease-in-out) infinite;
}
@keyframes curtain-pulse {
  0% { transform: scale(0.97); opacity: 0.9; }
  70% { transform: scale(1.1); opacity: 0; }
  100% { transform: scale(1.1); opacity: 0; }
}
.curtain__open-label {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.curtain__open-hint {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255, 253, 250, 0.7);
}
.curtain__open:active { transform: scale(0.97); }

.curtain__corner {
  position: absolute;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 191, 0, 0.45);
  opacity: 0.7;
}
.curtain__corner--tl { top: 18px; left: 18px; border-right: 0; border-bottom: 0; }
.curtain__corner--tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; }
.curtain__corner--bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; }
.curtain__corner--br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; }

/* opening state */
.curtain.is-opening .curtain__panel--left { transform: translateX(-101%); }
.curtain.is-opening .curtain__panel--right { transform: translateX(101%); }
.curtain.is-opening .curtain__seam { opacity: 0; }
.curtain.is-opening .curtain__center {
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
}
.curtain.is-opening .curtain__glow { opacity: 0; transition: opacity 400ms linear; }
.curtain.is-opening .curtain__confetti-piece { animation: confetti-burst 1200ms var(--ease-out) forwards; }

@keyframes confetti-burst {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--rot)) scale(0.7);
  }
}

/* 5. Header ---------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: #fff;
  transition: background-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out), transform 300ms var(--ease-out);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-header.is-scrolled {
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(14px);
  color: var(--ink);
  box-shadow: 0 10px 30px -22px rgba(43, 23, 32, 0.6);
}
.site-header.is-hidden { transform: translateY(-100%); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.brand__mark { display: grid; place-items: center; color: var(--gold); }
.brand__text { white-space: nowrap; }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__link {
  position: relative;
  color: inherit;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 0;
  transition: color var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__link--cta {
  padding: 8px 18px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
}
.nav__link--cta::after { display: none; }
.nav__link.is-active { color: var(--gold); }
.site-header.is-scrolled .nav__link.is-active { color: var(--rose); }
.site-header.is-scrolled .nav__link.is-active::after { transform: scaleX(1); }

@media (hover: hover) and (pointer: fine) {
  .nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
  .nav__link--cta:hover { background: var(--gold); border-color: var(--gold); color: #40210a; }
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 5px; width: 22px; }
.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* 6. Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  padding-top: calc(var(--header-h) + 32px);
  padding-bottom: 96px;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: hero-drift 26s var(--ease-in-out) infinite alternate;
}
@keyframes hero-drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.5%, -1.5%, 0); }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(43, 23, 32, 0.72) 0%, rgba(86, 9, 47, 0.62) 42%, rgba(43, 23, 32, 0.86) 100%),
    radial-gradient(70% 60% at 50% 55%, rgba(211, 24, 118, 0.34), transparent 72%);
}

.hero__inner { max-width: 780px; text-align: center; position: relative; z-index: 2; }

.hero__eyebrow {
  margin: 0 0 18px;
  font-size: clamp(0.68rem, 0.62rem + 0.25vw, 0.82rem);
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero__title {
  font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.6rem);
  margin-bottom: 10px;
  text-shadow: 0 10px 50px rgba(0, 0, 0, 0.4);
}
.hero__highlight {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 0.95rem + 1.5vw, 2rem);
  color: var(--gold);
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
}
.hero__date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 22px;
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 253, 250, 0.92);
}
.hero__date-line {
  width: clamp(28px, 8vw, 72px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 191, 0, 0.9));
}
.hero__date-line:last-child { background: linear-gradient(90deg, rgba(255, 191, 0, 0.9), transparent); }
.hero__copy {
  max-width: 560px;
  margin: 0 auto 32px;
  color: rgba(255, 253, 250, 0.86);
  font-size: 1.05rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* hero entrance */
.hero__animate {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.hero.is-ready .hero__animate { opacity: 1; transform: none; }

.hero__badge {
  position: absolute;
  top: calc(var(--header-h) + 26px);
  right: clamp(16px, 5vw, 56px);
  z-index: 3;
  margin: 0;
  padding: 12px 22px;
  border: 1px solid rgba(255, 191, 0, 0.6);
  border-radius: var(--radius-pill);
  background: rgba(86, 9, 47, 0.55);
  backdrop-filter: blur(8px);
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform-origin: center;
  animation: badge-float 5s var(--ease-in-out) infinite;
}
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 26px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-pill);
  display: grid;
  place-items: start center;
  padding-top: 8px;
  z-index: 3;
}
.hero__scroll-line {
  width: 3px;
  height: 9px;
  border-radius: 2px;
  background: var(--gold);
  animation: scroll-hint 1.8s var(--ease-in-out) infinite;
}
@keyframes scroll-hint {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(18px); opacity: 0; }
}

/* floating decoration */
.hero__decor { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__balloon {
  position: absolute;
  bottom: -12vh;
  width: clamp(46px, 8vw, 86px);
  aspect-ratio: 3 / 4;
  border-radius: 50% 50% 48% 48% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.65), rgba(255, 191, 0, 0.92) 34%, #d31876 78%);
  box-shadow: inset -8px -12px 22px rgba(86, 9, 47, 0.35);
  opacity: 0.55;
  animation: balloon-rise linear infinite;
}
.hero__balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 64px;
  background: linear-gradient(180deg, rgba(255, 191, 0, 0.8), transparent);
}
.hero__balloon--1 { left: 6%; animation-duration: 22s; }
.hero__balloon--2 { left: 17%; animation-duration: 28s; animation-delay: 4s; transform: scale(0.78); }
.hero__balloon--3 { right: 9%; animation-duration: 25s; animation-delay: 2s; transform: scale(0.9); }
@keyframes balloon-rise {
  0% { transform: translate3d(0, 0, 0) scale(var(--s, 1)); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.45; }
  100% { transform: translate3d(26px, -118vh, 0) scale(var(--s, 1)); opacity: 0; }
}
.hero__spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px 3px rgba(255, 191, 0, 0.55);
  opacity: 0.75;
  animation: spark-pulse 3.4s var(--ease-in-out) infinite;
}
.hero__spark--1 { top: 22%; left: 22%; animation-delay: 0.2s; }
.hero__spark--2 { top: 30%; right: 26%; animation-delay: 1.1s; }
.hero__spark--3 { bottom: 34%; left: 13%; animation-delay: 1.9s; }
.hero__spark--4 { bottom: 26%; right: 16%; animation-delay: 2.6s; }
@keyframes spark-pulse {
  0%, 100% { transform: scale(0.6); opacity: 0.25; }
  50% { transform: scale(1.3); opacity: 0.9; }
}

/* 7. Scratch card ----------------------------------------------------------- */
.scratch { max-width: 860px; margin-inline: auto; }

.scratch__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(150deg, var(--rose-800), var(--rose-900) 60%, #43071f);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 191, 0, 0.35);
}
.scratch__frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 191, 0, 0.3);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
  z-index: 3;
}

.scratch__inner {
  position: relative;
  z-index: 1;
  min-height: 520px;
  padding: clamp(26px, 4vw, 54px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: var(--cream);
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(255, 191, 0, 0.16), transparent 60%),
    linear-gradient(160deg, #5d0a34, #3d0620);
}
.invite__kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}
.invite__lead {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.35rem);
  color: rgba(255, 253, 250, 0.88);
}
.invite__title {
  margin: 0;
  font-size: clamp(1.6rem, 1.05rem + 2.3vw, 2.8rem);
  color: var(--cream);
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.4);
}
.invite__date {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.invite__cake {
  width: 104px;
  height: 84px;
  margin: 2px 0;
  color: var(--gold);
}
.invite__message {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 253, 250, 0.84);
  font-size: 0.98rem;
}
.invite__meta {
  display: grid;
  gap: 6px;
  margin: 6px 0 4px;
  padding: 14px 26px;
  border: 1px solid rgba(255, 191, 0, 0.28);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}
.invite__meta-row { display: flex; gap: 12px; justify-content: center; font-size: 0.92rem; }
.invite__meta dt { color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.74rem; align-self: center; }
.invite__meta dd { margin: 0; color: rgba(255, 253, 250, 0.9); }
.invite__celebrate {
  margin: 4px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem);
  font-style: italic;
  color: var(--gold);
}

.scratch__canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}
.scratch.is-revealed .scratch__canvas {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

.scratch__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.scratch__tip {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.scratch__status {
  margin: 12px 0 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  color: var(--rose);
}

/* reveal choreography */
.scratch__inner > * { opacity: 0; transform: translateY(14px); }
.scratch.is-revealed .scratch__inner > * {
  opacity: 1;
  transform: none;
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}
.scratch.is-revealed .scratch__inner > *:nth-child(1) { transition-delay: 120ms; }
.scratch.is-revealed .scratch__inner > *:nth-child(2) { transition-delay: 190ms; }
.scratch.is-revealed .scratch__inner > *:nth-child(3) { transition-delay: 260ms; }
.scratch.is-revealed .scratch__inner > *:nth-child(4) { transition-delay: 330ms; }
.scratch.is-revealed .scratch__inner > *:nth-child(5) { transition-delay: 400ms; }
.scratch.is-revealed .scratch__inner > *:nth-child(6) { transition-delay: 470ms; }
.scratch.is-revealed .scratch__inner > *:nth-child(7) { transition-delay: 540ms; }
.scratch.is-revealed .scratch__inner > *:nth-child(8) { transition-delay: 610ms; }
.scratch.is-revealed .scratch__inner > *:nth-child(9) { transition-delay: 680ms; }

/* 8. Countdown -------------------------------------------------------------- */
.countdown {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 880px;
  margin-inline: auto;
  padding: clamp(26px, 3.4vw, 46px) clamp(16px, 2.8vw, 36px) clamp(18px, 2.4vw, 28px);
  border: 1px solid rgba(255, 191, 0, 0.32);
  border-radius: var(--radius-lg);
  color: var(--cream);
  background:
    radial-gradient(68% 110% at 50% -14%, rgba(255, 191, 0, 0.18), transparent 60%),
    linear-gradient(165deg, #4d0a2c, #3a0722 52%, #24050f);
  box-shadow: inset 0 1px 0 rgba(255, 248, 240, 0.07), 0 30px 64px -34px rgba(58, 7, 34, 0.85);
}
/* inner gold rule — the "printed ticket" edge */
.countdown::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 191, 0, 0.2);
  border-radius: calc(var(--radius-lg) - 9px);
  pointer-events: none;
}
/* slow breathing gold light, echoing the curtain */
.countdown::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(46% 52% at 50% 34%, rgba(255, 191, 0, 0.16), transparent 72%);
  animation: countdown-glow 7s var(--ease-in-out) infinite;
  pointer-events: none;
}
@keyframes countdown-glow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.countdown__unit {
  position: relative;
  padding: clamp(8px, 1.2vw, 16px) clamp(6px, 1.4vw, 18px);
  text-align: center;
}
/* hairline divider instead of a ":" glyph taking a whole grid column */
.countdown__unit + .countdown__unit::before {
  content: "";
  position: absolute;
  top: 14%;
  bottom: 14%;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 191, 0, 0.45), transparent);
}

/* the slot masks the digit so it can roll up into place like a flip clock */
.countdown__slot {
  display: block;
  overflow: hidden;
}
.countdown__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.3rem + 4.6vw, 4.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
/* gold foil gradient, only where the browser can clip it to the glyphs */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .countdown__value {
    background-image: linear-gradient(180deg, #fff8e2 0%, #ffdf8c 30%, #f0b429 60%, #d09400 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.countdown__label {
  display: block;
  margin-top: 12px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em; /* cancel the trailing letter-space so the label reads centred */
  text-transform: uppercase;
  color: rgba(255, 248, 240, 0.58);
}

.countdown__done {
  grid-column: 1 / -1;
  margin: 0;
  padding: clamp(12px, 2vw, 22px) 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1.5vw, 2rem);
  line-height: 1.25;
  color: var(--gold);
}
.countdown.is-complete .countdown__unit { display: none; }

.countdown__target {
  grid-column: 1 / -1;
  margin: clamp(18px, 2.4vw, 28px) 0 0;
  padding-top: clamp(15px, 2vw, 22px);
  border-top: 1px solid rgba(255, 191, 0, 0.24);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 248, 240, 0.68);
}
.countdown__target::before,
.countdown__target::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-bottom: 1px;
  vertical-align: middle;
  background: var(--gold);
  opacity: 0.8;
  transform: rotate(45deg);
}
.countdown__target::before { margin-right: 14px; }
/* pull the trailing diamond back by the text's own letter-spacing */
.countdown__target::after { margin-left: calc(14px - 0.2em); }

/* 9. Timeline --------------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
/* the gold rail the markers hang on */
.timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 50%;
  width: 1px;
  margin-left: -0.5px;
  background: linear-gradient(180deg, transparent, rgba(255, 191, 0, 0.6) 9%, rgba(255, 191, 0, 0.6) 91%, transparent);
}
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 68px 1fr;
  grid-template-areas: "body marker figure";
  align-items: center;
  gap: clamp(16px, 2.4vw, 30px);
  margin-bottom: clamp(24px, 4vw, 48px);
}
.timeline__item:last-child { margin-bottom: 0; }
/* every second row flips, so the eye zig-zags down the rail */
.timeline__item:nth-child(even) { grid-template-areas: "figure marker body"; }

.timeline__body {
  grid-area: body;
  justify-self: end;
  max-width: 430px;
}
/* the copy and the photograph drift in from opposite sides */
.timeline__body,
.timeline__figure { transition: transform 900ms var(--ease-out) var(--d, 0ms); }
.timeline__body { transform: translateX(-24px); }
.timeline__figure { transform: translateX(24px); }
.timeline__item:nth-child(even) .timeline__body { justify-self: start; transform: translateX(24px); }
.timeline__item:nth-child(even) .timeline__figure { justify-self: start; transform: translateX(-24px); }
.timeline__item.is-visible .timeline__body,
.timeline__item.is-visible .timeline__figure { transform: none; }

.timeline__marker {
  grid-area: marker;
  justify-self: center;
  align-self: center;
  width: 13px;
  height: 13px;
  background: linear-gradient(140deg, #ffe08a, var(--gold) 45%, var(--gold-700));
  transform: rotate(45deg);
  box-shadow: 0 0 0 5px var(--ivory), 0 0 0 6px rgba(255, 191, 0, 0.45);
}

.timeline__time {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 15px 5px;
  border: 1px solid rgba(255, 191, 0, 0.6);
  border-radius: var(--radius-pill);
  background: rgba(255, 243, 207, 0.55);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--gold-700);
}
.timeline__body p { margin: 6px 0 0; color: var(--muted); font-size: 0.96rem; }
.timeline__title {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  transition: color var(--dur-base) var(--ease-out);
}

.timeline__figure {
  grid-area: figure;
  justify-self: end;
  margin: 0;
  overflow: hidden;
  width: 100%;
  max-width: 430px;
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(255, 191, 0, 0.3);
  border-radius: var(--radius-md);
  background: var(--gold-100);
  box-shadow: var(--shadow-md);
}
.timeline__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: hover) and (pointer: fine) {
  .timeline__figure img { transition: transform 700ms var(--ease-out); }
  .timeline__item:hover .timeline__figure img { transform: scale(1.05); }
  .timeline__item:hover .timeline__title { color: var(--rose); }
}

/* 10. Cards ----------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}
.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(150deg, #f7e3ee, #ffe9c2); }
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-out);
}
.card__media--ornament {
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 70% at 50% 40%, rgba(255, 191, 0, 0.28), transparent 70%),
    linear-gradient(150deg, #f7e3ee, #ffe9c2);
  color: var(--rose);
}
.card__ornament { width: min(130px, 44%); height: auto; aspect-ratio: 1; }
.card__body { padding: clamp(18px, 2vw, 26px); }
.card__title { font-size: 1.2rem; margin-bottom: 6px; }
.card__body p { margin: 0; color: var(--muted); font-size: 0.94rem; }

@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
  .card:hover .card__media img { transform: scale(1.06); }
}

/* 11. Venue ----------------------------------------------------------------- */
.venue {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  max-width: 1080px;
  margin-inline: auto;
}
.venue__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.venue__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.venue__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(86, 9, 47, 0.85);
}
.venue__name { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin-bottom: 8px; }
.venue__address { margin: 0 0 14px; color: var(--muted); font-size: 1.02rem; }
.venue__note { margin: 0 0 22px; font-size: 0.84rem; color: var(--muted); font-style: italic; }

/* 12/13. Dress code --------------------------------------------------------- */
.dress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
  max-width: 980px;
  margin-inline: auto;
}
.dress__card {
  padding: clamp(24px, 3vw, 34px) clamp(20px, 2.4vw, 28px);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.dress__icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(140deg, rgba(211, 24, 118, 0.1), rgba(255, 191, 0, 0.22));
  color: var(--rose);
}
.dress__icon svg { width: 38px; height: 38px; }
.dress__title { font-size: 1.2rem; margin-bottom: 6px; }
.dress__card p { margin: 0; color: var(--muted); font-size: 0.94rem; }
@media (hover: hover) and (pointer: fine) {
  .dress__card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
}
.dress__note { margin: 22px auto 0; text-align: center; font-size: 0.86rem; color: var(--muted); font-style: italic; }

/* 14. Wishes ---------------------------------------------------------------- */
.section--wishes { overflow: hidden; }
.wishes { max-width: 720px; margin-inline: auto; text-align: center; }
.wishes__heart {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  color: var(--rose);
  filter: drop-shadow(0 10px 24px rgba(211, 24, 118, 0.5));
  animation: heart-beat 2.6s var(--ease-in-out) infinite;
}
.wishes__heart svg { width: 52px; height: 52px; }
@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.12); }
  28% { transform: scale(1); }
  42% { transform: scale(1.08); }
  70% { transform: scale(1); }
}
.wishes__title { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); color: var(--cream); margin-bottom: 16px; }
.wishes__text { color: rgba(255, 253, 250, 0.82); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.14rem); }
.wishes__ornament { margin-top: 30px; color: var(--gold); opacity: 0.85; }
.wishes__cake svg { width: 120px; height: 80px; }

/* 15. RSVP form ------------------------------------------------------------- */
.form {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(24px, 3.6vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: var(--shadow-md);
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.4vw, 26px);
}
.field { margin-bottom: 20px; border: 0; padding: 0; min-width: 0; }
.field__label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
}
.field__req { color: var(--gold-700); }
.field__opt {
  margin-left: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: none;
}
.field__input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.field__input::placeholder { color: rgba(111, 87, 99, 0.55); }
.field__input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(211, 24, 118, 0.14);
}
.field__input--area { resize: vertical; min-height: 108px; }
.field__input[aria-invalid="true"] { border-color: #c2143f; box-shadow: 0 0 0 3px rgba(194, 20, 63, 0.12); }
.field__error {
  min-height: 1.1em;
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: #c2143f;
}
.field__error:empty { margin: 0; }

.choice { display: flex; flex-wrap: wrap; gap: 12px; }
.choice__option { position: relative; }
.choice__option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice__box {
  display: inline-block;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: 0.92rem;
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.choice__option input:checked + .choice__box {
  border-color: var(--rose);
  background: var(--rose);
  color: #fff;
}
.choice__option input:focus-visible + .choice__box { outline: 2px solid var(--gold); outline-offset: 3px; }
.choice__option:active .choice__box { transform: scale(0.97); }

.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.form__status { margin: 0; font-size: 0.92rem; color: var(--rose); }
.form__status.is-success { color: #1c7a4d; }
.form__status.is-error { color: #c2143f; }
.form__note { margin: 18px 0 0; font-size: 0.82rem; color: var(--muted); }

/* 16. Footer ---------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(170deg, #3d0620, #24030f);
  color: rgba(255, 253, 250, 0.78);
  padding: clamp(44px, 6vw, 72px) 0 28px;
  border-top: 1px solid rgba(255, 191, 0, 0.22);
}
.site-footer__top { text-align: center; }
.site-footer__mark { display: inline-grid; color: var(--gold); }
.site-footer__title {
  margin: 12px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  color: var(--cream);
}
.site-footer__date { margin: 0 0 10px; font-size: 0.82rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.site-footer__thanks { margin: 0; font-size: 0.98rem; }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin: 30px 0;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 191, 0, 0.16);
  border-bottom: 1px solid rgba(255, 191, 0, 0.16);
}
.site-footer__links a {
  color: rgba(255, 253, 250, 0.78);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .site-footer__links a:hover { color: var(--gold); }
}
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: 0.82rem;
}
.site-footer__base p { margin: 0; }
.site-footer__base a { color: var(--gold); text-decoration: none; }
.site-footer__base a:hover { text-decoration: underline; }

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 191, 0, 0.5);
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out),
    visibility var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .to-top:hover { background: var(--rose-600); }
}

/* Optional background music toggle (created by script.js only when a track exists) */
.music-toggle {
  position: fixed;
  left: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 191, 0, 0.5);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(8px);
  color: var(--rose);
  font-family: var(--font-body);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.music-toggle:active { transform: scale(0.96); }
.music-toggle.is-playing { background: var(--rose); color: #fff; border-color: var(--rose); }
.music-toggle__icon { font-size: 1rem; line-height: 1; }
.music-toggle.is-playing .music-toggle__icon { animation: music-pulse 1.6s var(--ease-in-out) infinite; }
@keyframes music-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* RSVP fallback when the organizer's WhatsApp number is not configured yet */
.form__fallback {
  flex-basis: 100%;
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 191, 0, 0.07);
}
.form__fallback .btn { justify-self: start; }

/* 17. Motion preferences ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Keep gentle opacity fades so nothing appears without explanation. */
  .reveal { opacity: 1; transform: none; }
  .hero__animate { opacity: 1; transform: none; }
  /* no directional slide — the rows should not sit offset waiting for an observer */
  .timeline__body,
  .timeline__figure,
  .timeline__item:nth-child(even) .timeline__body,
  .timeline__item:nth-child(even) .timeline__figure { transform: none; }
  .hero__balloon,
  .hero__spark,
  .curtain__particle,
  .wishes__heart,
  .seal__ring,
  .curtain__glow { animation: none !important; }

  .curtain.is-opening .curtain__panel { transform: none; opacity: 0; }
  .curtain.is-opening .curtain__center { transform: none; }
}

/* 18. Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .venue { grid-template-columns: 1fr; }
  /* single column: the rail moves to the left edge and the photo drops under the copy */
  .timeline::before { left: 24px; }
  .timeline__item {
    grid-template-columns: 48px 1fr;
    grid-template-areas:
      "marker body"
      ".      figure";
    align-items: start;
    gap: 14px 16px;
  }
  .timeline__item:nth-child(even) { grid-template-areas: "marker body" ". figure"; }
  .timeline__body,
  .timeline__item:nth-child(even) .timeline__body {
    justify-self: stretch;
    max-width: none;
    transform: none;
  }
  .timeline__figure,
  .timeline__item:nth-child(even) .timeline__figure {
    justify-self: stretch;
    max-width: none;
    transform: none;
  }
  .timeline__marker { align-self: start; margin-top: 9px; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    padding: 22px var(--gutter) 30px;
    background: rgba(255, 253, 250, 0.98);
    backdrop-filter: blur(14px);
    color: var(--ink);
    box-shadow: 0 24px 40px -30px rgba(43, 23, 32, 0.8);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out),
      visibility var(--dur-base) var(--ease-out);
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav__link { font-size: 1rem; padding: 10px 0; }
  .nav__link--cta { margin-top: 8px; }

  .form__row { grid-template-columns: 1fr; gap: 0; }
  .countdown { grid-template-columns: repeat(2, 1fr); }
  .countdown__unit:nth-child(odd)::before { display: none; } /* no divider at the start of a row */
  .countdown__target::before,
  .countdown__target::after { display: none; }
  .countdown__target { letter-spacing: 0.14em; }

  .scratch__inner { min-height: 0; padding: 24px 20px; }
  .invite__cake { width: 84px; height: 68px; }
  .invite__message { font-size: 0.92rem; }
  .scratch__controls { flex-direction: column; align-items: flex-start; }
  .hero__badge { top: calc(var(--header-h) + 14px); right: 14px; font-size: 0.68rem; padding: 9px 16px; }
  .site-footer__base { justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
  .hero__date { flex-direction: column; gap: 6px; letter-spacing: 0.16em; }
  .hero__date-line { width: 54px; }
  .btn { width: 100%; }
  .btn--wide { min-width: 0; }
}

@media print {
  /* print the settled state, never a frame mid-animation */
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .curtain, .site-header, .to-top, .hero__decor, .scratch__canvas, .scratch__controls { display: none !important; }
  body.is-locked { overflow: visible; }
  .reveal { opacity: 1; transform: none; }
  .section { padding-block: 28px; }
  .countdown {
    background: none;
    color: var(--ink);
    border-color: var(--line-strong);
    box-shadow: none;
  }
  .countdown::before, .countdown::after { display: none; }
  .countdown__value {
    background-image: none;
    -webkit-text-fill-color: var(--gold-700);
    color: var(--gold-700);
  }
  .countdown__label, .countdown__target { color: var(--muted); }
  .timeline__body,
  .timeline__figure,
  .timeline__item:nth-child(even) .timeline__body,
  .timeline__item:nth-child(even) .timeline__figure { transform: none; }
  .timeline__figure { box-shadow: none; }
}
