/* ============================================================
   Royal Heritage — wedding site design system
   Prashant & Vibha · 21.11.2026
   ============================================================ */

:root {
  --maroon: #6B1F2A;
  --maroon-deep: #45121D;
  --plum: #33101E;
  --ivory: #FCF8F0;
  --ivory-dim: #F6EFE1;
  --ivory-warm: #FAF2E6;
  --cream: #FFFDF7;
  --cream-blush: #FFF9F5;
  --gold: #C9A227;
  --gold-soft: #E3C565;
  --gold-pale: #F0E0B0;
  --gold-ink: #8B6510;          /* antique gold, 5:1 on ivory for small labels */
  --emerald: #1E4D3B;
  --ink: #2E1D1F;
  --ink-soft: #5E4744;
  --sakura: #E59DB2;
  --sakura-soft: #F3C9D6;
  --sakura-pale: #FBE9F0;

  --font-display: "Shippori Mincho", "Cormorant Garamond", "Georgia", serif;
  --font-serif: "Cormorant Garamond", "Shippori Mincho", "Georgia", serif;
  --font-script: "Pinyon Script", "Cormorant Garamond", cursive;
  --font-body: "Jost", "Segoe UI", sans-serif;

  --gold-border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  --gold-hair: 1px solid color-mix(in srgb, var(--gold) 32%, transparent);

  --radius: 12px;
  --radius-lg: 18px;

  --shadow-card: 0 1px 0 rgba(201, 162, 39, .11), 0 3px 10px rgba(69, 18, 29, .055), 0 20px 46px rgba(69, 18, 29, .11);
  --shadow-lift: 0 6px 16px rgba(69, 18, 29, .08), 0 34px 70px rgba(69, 18, 29, .16);
  --shadow-dark: 0 10px 30px rgba(20, 4, 10, .35);

  /* fine paper grain, laid over the whole page */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");

  /* small gold blossom, used as a section mark */
  --mark-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-13 -13 26 26'%3E%3Cg fill='%23C9A227'%3E%3Cpath id='p' d='M0 -1.5 C -4 -5 -5.6 -8.6 -3.4 -11.4 C -1.9 -13.2 -.6 -12.4 0 -11 C .6 -12.4 1.9 -13.2 3.4 -11.4 C 5.6 -8.6 4 -5 0 -1.5 Z'/%3E%3Cuse href='%23p' transform='rotate(72)'/%3E%3Cuse href='%23p' transform='rotate(144)'/%3E%3Cuse href='%23p' transform='rotate(216)'/%3E%3Cuse href='%23p' transform='rotate(288)'/%3E%3C/g%3E%3Ccircle r='1.9' fill='%236B1F2A'/%3E%3C/svg%3E");

  /* pale blossom watermark for photo frames */
  --mark-pale: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-13 -13 26 26'%3E%3Cg fill='rgba(255,255,255,.085)'%3E%3Cpath id='q' d='M0 -1.5 C -4 -5 -5.6 -8.6 -3.4 -11.4 C -1.9 -13.2 -.6 -12.4 0 -11 C .6 -12.4 1.9 -13.2 3.4 -11.4 C 5.6 -8.6 4 -5 0 -1.5 Z'/%3E%3Cuse href='%23q' transform='rotate(72)'/%3E%3Cuse href='%23q' transform='rotate(144)'/%3E%3Cuse href='%23q' transform='rotate(216)'/%3E%3Cuse href='%23q' transform='rotate(288)'/%3E%3C/g%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* page-wide paper grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image: var(--grain);
  background-size: 180px 180px;
  opacity: .05;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 40;
}

/* golden hour glow — warm light that drifts with scroll */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: radial-gradient(
    ellipse 55% 45% at var(--glow-x, 50%) var(--glow-y, 30%),
    rgba(227, 197, 101, .07),
    rgba(229, 157, 178, .04) 45%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 39;
  transition: none; /* updated via JS custom properties */
}

img, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: color-mix(in srgb, var(--sakura) 55%, transparent); color: var(--maroon-deep); }

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

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  color: var(--maroon);
  line-height: 1.14;
  letter-spacing: -.005em;
}

/* ---------- shared section chrome ---------- */
.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 1.5rem;
  position: relative;
  overflow: hidden;
}
/* tinted sections fade in and out of the ivory instead of hard-edging */
.section--tint {
  background:
    radial-gradient(ellipse 60% 40% at 12% 0%, color-mix(in srgb, var(--sakura) 15%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 40% at 88% 100%, color-mix(in srgb, var(--gold) 11%, transparent), transparent 70%),
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-dim) 11%, var(--ivory-warm) 89%, var(--ivory) 100%);
}
/* hairline gold rule where light sections meet */
.section + .section:not(.section--dark)::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(560px, 78%); height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold) 45%, transparent), transparent);
}

.section__head { text-align: center; margin-bottom: clamp(2.8rem, 5vw, 4rem); }
.section__head::before {
  content: "";
  display: block;
  width: 22px; height: 22px;
  margin: 0 auto 1.1rem;
  background: var(--mark-gold) center / contain no-repeat;
  opacity: .8;
}
.section__label {
  font-size: .74rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-ink);
  font-weight: 500;
  margin-bottom: .8rem;
}
.section__divider { width: 210px; margin: 1.3rem auto 0; color: var(--gold); }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 1;
  transform: none;
}
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(.22, .8, .3, 1), transform 1s cubic-bezier(.22, .8, .3, 1);
}
.reveal-ready .reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ NAV ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid transparent;
  /* over the hero the bar is invisible — the hero paints its own scrim */
  background: none;
  transition: padding .4s ease, background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.nav.is-scrolled {
  padding: .6rem 1.5rem;
  background: color-mix(in srgb, var(--maroon-deep) 90%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom-color: color-mix(in srgb, var(--gold) 40%, transparent);
  box-shadow: 0 10px 34px rgba(20, 4, 10, .34);
}
.nav__brand { text-decoration: none; }
.nav__monogram {
  color: var(--gold-soft);
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  transition: background .35s ease, color .35s ease, transform .35s ease;
}
.nav__brand:hover .nav__monogram {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  transform: rotate(-6deg);
}
.nav__links { display: flex; gap: 1.7rem; align-items: center; }
.nav__links a {
  color: var(--ivory);
  text-decoration: none;
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 400;
  position: relative;
  padding-bottom: 5px;
  transition: color .3s ease;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--gold-pale));
  transition: width .35s ease;
}
.nav__links a:hover { color: var(--gold-pale); }
.nav__links a:hover::after,
.nav__links a.is-active::after { width: 100%; }
.nav__links a.is-active { color: var(--gold-soft); }
.nav__cta {
  border: 1px solid var(--gold);
  padding: .5rem 1.15rem !important;
  border-radius: 999px;
  color: var(--gold-soft) !important;
}
.nav__cta::after { display: none; }
.nav__cta:hover {
  background: var(--gold);
  color: var(--maroon-deep) !important;
  box-shadow: 0 6px 18px rgba(201, 162, 39, .35);
}
.nav__toggle { display: none; }

/* reading-progress hairline along the bottom of the bar */
.nav__progress {
  position: absolute; left: 0; bottom: -1px;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--sakura-soft));
  box-shadow: 0 0 10px rgba(227, 197, 101, .6);
  transition: width .15s linear;
}

/* ============ 1 · HERO ============ */
.hero {
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 60% at 50% -5%, color-mix(in srgb, var(--sakura) 22%, transparent), transparent 62%),
    radial-gradient(ellipse 70% 45% at 50% 104%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 66%),
    linear-gradient(168deg, var(--plum) 0%, var(--maroon-deep) 34%, var(--maroon) 72%, #5A2230 100%);
  color: var(--ivory);
  position: relative;
  overflow: hidden;
  padding: 7.5rem 1.5rem 4.5rem;
}
/* corner vignette plus a long scrim under the nav, so the eye settles in the middle */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(30, 7, 16, .62), rgba(30, 7, 16, 0) 220px),
    radial-gradient(ellipse 78% 72% at 50% 48%, transparent 42%, rgba(28, 6, 14, .5) 100%);
  pointer-events: none;
}
.hero__mandala {
  position: absolute; width: min(92vw, 640px);
  left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  opacity: .1;
  animation: mandala-spin 120s linear infinite;
  pointer-events: none;
}
@keyframes mandala-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.hero__canvas {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero__canvas { display: none; }
  .hero__mandala { animation: none; }
}

.hero__inner { position: relative; z-index: 2; max-width: 760px; }
/* soft pool of shade so the names stay crisp over petals and lanterns */
.hero__inner::before {
  content: "";
  position: absolute; inset: -10% -14%;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 46%, rgba(44, 10, 22, .62), rgba(44, 10, 22, .28) 55%, transparent 76%);
  filter: blur(18px);
  pointer-events: none;
}

.hero__eyebrow {
  font-size: .76rem; letter-spacing: .38em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 1.9rem; font-weight: 400;
}

.medallion { width: 124px; margin: 0 auto 2rem; color: var(--gold-soft); }
.medallion--small { width: 74px; }
.medallion__text {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 600;
  fill: currentColor;
  letter-spacing: .04em;
}
.medallion--small .medallion__text { font-size: 46px; }
.monogram-script {
  font-family: var(--font-script);
  font-size: 44px;
  fill: currentColor;
}
.hero .medallion {
  filter: drop-shadow(0 0 18px rgba(227, 197, 101, .28));
  animation: medallion-breathe 7s ease-in-out infinite;
}
@keyframes medallion-breathe {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(227, 197, 101, .2)); }
  50% { filter: drop-shadow(0 0 26px rgba(227, 197, 101, .42)); }
}
@media (prefers-reduced-motion: reduce) { .hero .medallion { animation: none; } }

.hero__names {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3.1rem, 9.4vw, 6rem);
  line-height: 1.04;
  letter-spacing: .01em;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .3em;
}
.hero__names span:not(.hero__amp) {
  background: linear-gradient(178deg, #FFFDF7 18%, #F7DFD3 72%, #EFC9BE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__amp {
  font-family: var(--font-script);
  font-style: normal;
  color: var(--gold-soft);
  font-size: .72em;
  text-shadow: 0 0 22px rgba(227, 197, 101, .4);
}
.hero__sub {
  font-family: var(--font-script);
  font-style: normal;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin-top: .8rem;
  color: color-mix(in srgb, var(--ivory) 88%, var(--sakura));
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}
/* hairlines flanking the phrase */
.hero__sub::before, .hero__sub::after {
  content: "";
  width: clamp(28px, 8vw, 64px); height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold-soft) 70%, transparent));
}
.hero__sub::after { background: linear-gradient(270deg, transparent, color-mix(in srgb, var(--gold-soft) 70%, transparent)); }

.hero__date {
  display: flex; justify-content: center; align-items: center; gap: .85em;
  font-size: clamp(.9rem, 2.3vw, 1.15rem);
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 1.7rem; font-weight: 400;
}
.hero__date i { font-style: normal; color: color-mix(in srgb, var(--gold) 80%, transparent); }

/* countdown */
.countdown {
  display: flex; justify-content: center; gap: clamp(.6rem, 3vw, 1.3rem);
  margin-top: 2.7rem;
}
.countdown__cell {
  min-width: clamp(68px, 17vw, 98px);
  padding: 1rem .5rem .75rem;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, .1), rgba(255, 253, 247, .02) 55%, rgba(28, 6, 14, .18)),
    color-mix(in srgb, var(--plum) 52%, transparent);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 0 rgba(255, 253, 247, .16), 0 12px 28px rgba(20, 4, 10, .26);
  transition: transform .35s ease, border-color .35s ease;
}
.countdown__cell:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--gold) 75%, transparent);
}
.countdown__cell b {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 5vw, 2.6rem);
  font-weight: 600;
  color: var(--gold-pale);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.countdown__cell span {
  font-size: .64rem; letter-spacing: .26em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ivory) 72%, transparent);
}
/* the counter steps aside once both dates are behind us */
.countdown[hidden] { display: none; }
/* one line carrying whichever date we are not counting to */
.countdown__note {
  margin-top: 1.15rem;
  font-family: var(--font-script);
  font-style: normal;
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  color: color-mix(in srgb, var(--gold-pale) 86%, transparent);
}
.hero__hashtag {
  margin-top: 1.4rem;
  font-family: var(--font-script);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--gold-soft);
  letter-spacing: .04em;
  opacity: .9;
}

/* blossom canopies leaning in from the top corners, framing the view */
.hero__tree {
  position: absolute; left: -14px; top: 0; z-index: 1;
  width: clamp(240px, 36vw, 470px);
  pointer-events: none;
  transform-origin: 8% 0%;
  animation: tree-sway 9s ease-in-out infinite;
  filter: drop-shadow(0 18px 30px rgba(28, 6, 14, .35));
}
/* the far side of the arch — mirrored, smaller and hazier with distance,
   hung below the nav so it never crowds the links */
.hero__tree--right {
  left: auto; right: -26px;
  top: clamp(64px, 8vh, 104px);
  width: clamp(160px, 24vw, 300px);
  transform-origin: 92% 0%;
  animation-duration: 11s;
  animation-delay: -3.5s;
  opacity: .88;
}
.hero__tree--right > use { transform: scaleX(-1) translateX(-320px); }
@keyframes tree-sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(0.8deg); }
}
@media (max-width: 700px) {
  /* the left canopy is nudged clear of the monogram sharing its corner */
  .hero__tree:not(.hero__tree--right) { width: 200px; top: 30px; left: -8px; opacity: .95; }
  .hero__tree--right { width: 140px; opacity: .8; }
}
@media (prefers-reduced-motion: reduce) { .hero__tree { animation: none; } }

/* the far bank: blossom lost in evening haze */
.hero__sakura-scene {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: clamp(230px, 34vh, 380px);
  z-index: 0;
  pointer-events: none;
}

/* vertical Japanese greeting — “sakura no enishi” (the bond of cherry blossoms) */
.hero__jp {
  position: absolute; right: clamp(12px, 4vw, 52px); top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .6em;
  color: color-mix(in srgb, var(--gold-soft) 62%, transparent);
  pointer-events: none;
  user-select: none;
}
@media (max-width: 860px) { .hero__jp { display: none; } }

/* ---- floating cassette music toggle ---- */
.music-toggle {
  position: fixed; left: 18px; bottom: 18px; z-index: 60;
  width: 88px; height: 56px; padding: 0; border-radius: 10px;
  border: 1px solid var(--gold);
  background: color-mix(in srgb, var(--maroon-deep) 92%, transparent);
  color: var(--gold-soft);
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(20, 4, 10, .4);
  transition: transform .25s ease, background .35s ease, color .35s ease;
}
.music-toggle:hover { transform: scale(1.06); }
.music-toggle__art { display: block; }
.music-toggle__label {
  font-family: "Pinyon Script", "Cormorant Garamond", serif;
  font-size: 9px;
  fill: var(--ivory);
  letter-spacing: .04em;
}
.music-toggle.is-playing {
  background: color-mix(in srgb, var(--sakura) 88%, #fff);
  color: var(--maroon-deep);
  border-color: color-mix(in srgb, var(--sakura) 80%, transparent);
}
.music-toggle.is-playing .music-toggle__label { fill: var(--maroon-deep); }
.music-toggle.is-playing .music-toggle__reel {
  transform-box: fill-box;
  transform-origin: center;
  animation: cassette-reel 1.8s linear infinite;
}
.music-toggle.is-playing .music-toggle__reel--right { animation-duration: 2s; }
@keyframes cassette-reel { to { transform: rotate(360deg); } }
.music-toggle:not(.is-playing)::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 13px;
  border: 1px solid var(--gold-soft);
  animation: music-ping 3s ease-out infinite;
  pointer-events: none;
}
@keyframes music-ping {
  0% { transform: scale(1); opacity: .8; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .music-toggle::after { animation: none; content: none; }
  .music-toggle.is-playing .music-toggle__reel { animation: none; }
}

.hero__cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: .45rem;
  margin-top: 3rem;
  color: color-mix(in srgb, var(--ivory) 78%, transparent);
  text-decoration: none;
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  transition: color .3s ease;
}
.hero__cue:hover { color: var(--gold-pale); }
.hero__cue svg { animation: cue-bounce 2.2s ease-in-out infinite; color: var(--gold-soft); }
@keyframes cue-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) { .hero__cue svg { animation: none; } }

/* ============ 2 · INVITATION ============ */
.invitation {
  background:
    radial-gradient(ellipse 46% 34% at 50% 0%, color-mix(in srgb, var(--sakura) 13%, transparent), transparent 70%),
    linear-gradient(180deg, var(--ivory), var(--ivory-warm));
}
/* blossoming branch leaning into a section corner */
.deco-branch {
  position: absolute;
  z-index: 0;
  width: clamp(170px, 24vw, 320px);
  pointer-events: none;
}
.deco-branch--tr { top: -12px; right: -16px; transform: scale(-1); opacity: .42; }
@media (max-width: 760px) { .deco-branch { display: none; } }

.invite-card {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  /* gilded edge: gold gradient rim wrapping the cream paper */
  padding: 1px;
  border-radius: var(--radius);
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--gold) 85%, transparent),
    color-mix(in srgb, var(--gold-pale) 70%, transparent) 35%,
    color-mix(in srgb, var(--gold) 60%, transparent) 65%,
    color-mix(in srgb, var(--sakura) 45%, transparent));
  box-shadow: var(--shadow-card);
}
.invite-card__paper {
  position: relative;
  border-radius: calc(var(--radius) - 1px);
  padding: clamp(2.6rem, 7vw, 4.6rem) clamp(1.7rem, 6vw, 3.6rem);
  text-align: center;
  background:
    radial-gradient(ellipse 70% 34% at 50% 0%, color-mix(in srgb, var(--sakura-pale) 42%, transparent), transparent 74%),
    radial-gradient(ellipse 60% 40% at 50% 100%, color-mix(in srgb, var(--gold) 6%, transparent), transparent 72%),
    linear-gradient(145deg, var(--cream), var(--cream-blush));
  overflow: hidden;
}
/* inner hairline frame */
.invite-card__paper::before {
  content: "";
  position: absolute; inset: 13px;
  border: var(--gold-hair);
  border-radius: 6px;
  pointer-events: none;
}
.invite-card__corner {
  position: absolute;
  width: var(--corner-size, 62px);
  color: var(--gold); opacity: .75; z-index: 1;
}
.invite-card__corner.tl { top: var(--corner-inset, 22px); left: var(--corner-inset, 22px); }
.invite-card__corner.tr { top: var(--corner-inset, 22px); right: var(--corner-inset, 22px); transform: scaleX(-1); }
.invite-card__corner.bl { bottom: var(--corner-inset, 22px); left: var(--corner-inset, 22px); transform: scaleY(-1); }
.invite-card__corner.br { bottom: var(--corner-inset, 22px); right: var(--corner-inset, 22px); transform: scale(-1); }

.invite-card__families { letter-spacing: .07em; color: var(--ink-soft); font-size: .98rem; }
.invite-card__body { margin-top: 1.5rem; font-size: 1.02rem; color: var(--ink-soft); }
.invite-card__couple {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 7.5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.16;
  color: var(--maroon);
  margin-top: 1.1rem;
}
.invite-card__rule { width: 190px; margin: 1.5rem auto; color: var(--gold); }
.invite-card__when {
  font-family: var(--font-serif);
  font-size: 1.32rem; font-style: italic;
  color: var(--ink);
}
.invite-card__where {
  margin-top: 1.1rem;
  font-size: .8rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--emerald); font-weight: 500;
}
.invite-card__hashtag {
  margin-top: 1.3rem;
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--gold-ink);
  opacity: .9;
}

/* ============ 3 · STORY TIMELINE ============ */
.timeline {
  list-style: none;
  max-width: 980px;
  margin: 0 auto;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--gold) 60%, transparent) 12%, color-mix(in srgb, var(--gold) 60%, transparent) 88%, transparent);
}
.timeline__item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 5vw, 4rem);
  align-items: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
}
.timeline__item:last-child { margin-bottom: 0; }
/* blossom node on the spine */
.timeline__item::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 12px; height: 12px;
  background: var(--mark-gold) center / contain no-repeat;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 6px rgba(201, 162, 39, .45));
}
.timeline__item:nth-child(even) .timeline__photo { order: 2; }
.timeline__item:nth-child(even) .timeline__text { text-align: right; }
.timeline__date {
  font-size: .72rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold-ink); font-weight: 500; margin-bottom: .55rem;
}
.timeline__text h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem); font-weight: 600;
  color: var(--maroon);
  margin-bottom: .6rem;
}
.timeline__text p:last-child { color: var(--ink-soft); font-size: .98rem; }
.timeline__photo {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent);
  border-radius: var(--radius);
  background: var(--maroon-deep);
  box-shadow: var(--shadow-card);
}
.timeline__photo::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(240, 224, 176, .26);
  border-radius: 6px;
  pointer-events: none;
}

/* photo placeholder (also used in gallery) */
.photo-ph {
  --ph-1: #8A2C42;
  --ph-2: #6B1F2A;
  --ph-3: #431425;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  background:
    var(--mark-pale) 84% 17% / auto 21% no-repeat,
    var(--mark-pale) 14% 82% / auto 12% no-repeat,
    radial-gradient(ellipse 70% 60% at 26% 20%, rgba(243, 201, 214, .3), transparent 62%),
    radial-gradient(ellipse 60% 50% at 82% 88%, rgba(201, 162, 39, .18), transparent 66%),
    linear-gradient(152deg, var(--ph-1) 0%, var(--ph-2) 42%, var(--ph-3) 100%);
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
/* placeholders shouldn't all be the same wine — vary the tint down the page */
.gallery__item:nth-child(3n+2), .timeline__item:nth-child(even) .photo-ph {
  --ph-1: #7A2540; --ph-2: #5A1A2E; --ph-3: #30101F;
}
.gallery__item:nth-child(3n) { --ph-1: #96394B; --ph-2: #70212C; --ph-3: #3D1220; }
/* gilded inner hairline */
.photo-ph::before {
  content: "";
  position: absolute; inset: 9px;
  border: 1px solid rgba(240, 224, 176, .28);
  border-radius: 6px;
  pointer-events: none;
}
.photo-ph span {
  position: relative;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--ivory);
  opacity: .92;
  padding: 0 1.4rem; text-align: center;
  text-shadow: 0 2px 14px rgba(28, 6, 14, .5);
}
.photo-ph span::after {
  content: "";
  display: block;
  width: 34px; height: 1px;
  margin: .7rem auto 0;
  background: color-mix(in srgb, var(--gold-soft) 75%, transparent);
}
.timeline__photo img, .gallery__item img {
  display: block;
  width: 100%; height: 100%; object-fit: cover;
  border-radius: calc(var(--radius) - 1px);
}
.timeline__photo img {
  transition: transform .7s cubic-bezier(.22, .8, .3, 1);
}
.timeline__item:hover .timeline__photo img {
  transform: scale(1.025);
}

/* ============ 4 · CELEBRATION CARDS ============ */
.celebration {
  background:
    radial-gradient(ellipse 42% 35% at 10% 14%, color-mix(in srgb, var(--gold-pale) 24%, transparent), transparent 72%),
    radial-gradient(ellipse 44% 34% at 92% 88%, color-mix(in srgb, var(--sakura-pale) 34%, transparent), transparent 72%),
    linear-gradient(180deg, var(--ivory), #FFF9EF 52%, var(--ivory));
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.6vw, 1.9rem);
  max-width: 1020px;
  margin: 0 auto;
}
.card {
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, color-mix(in srgb, var(--sakura-pale) 55%, transparent), transparent 72%),
    linear-gradient(145deg, var(--cream), var(--cream-blush));
  border: 1px solid color-mix(in srgb, var(--gold) 46%, transparent);
  border-radius: var(--radius);
  padding: 2.6rem 1.7rem 2.4rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform .4s cubic-bezier(.22, .8, .3, 1), box-shadow .4s ease, border-color .4s ease;
}
.card::before {
  content: "";
  position: absolute; inset: 7px;
  border: var(--gold-hair);
  border-radius: 7px;
  pointer-events: none;
  transition: inset .4s ease;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--gold) 70%, transparent);
}
.card:hover::before { inset: 10px; }
.card__icon { width: 50px; margin: 0 auto 1.15rem; color: var(--gold); }
.card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600;
  color: var(--maroon);
  margin-bottom: .5rem;
}
.card__meta {
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--emerald); font-weight: 500;
  margin-bottom: .9rem;
  line-height: 1.7;
}
.card p:last-child { color: var(--ink-soft); font-size: .95rem; }

/* the wedding is a full-width closing banner, not an orphan card */
.card--wedding {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 46ch);
  justify-content: center;
  align-items: center;
  column-gap: clamp(1.4rem, 4vw, 2.6rem);
  text-align: left;
  padding: 2.3rem clamp(1.8rem, 5vw, 3rem);
  background:
    var(--mark-pale) 93% 26% / auto 42% no-repeat,
    var(--mark-pale) 85% 80% / auto 21% no-repeat,
    radial-gradient(ellipse 50% 90% at 96% 50%, color-mix(in srgb, var(--sakura) 16%, transparent), transparent 70%),
    linear-gradient(120deg, var(--maroon-deep), var(--maroon) 78%);
  border-color: color-mix(in srgb, var(--gold) 55%, transparent);
  box-shadow: 0 20px 46px rgba(69, 18, 29, .26);
}
.card--wedding::before { border-color: color-mix(in srgb, var(--gold-soft) 28%, transparent); }
.card--wedding .card__icon {
  grid-row: 1 / span 3;
  width: 58px; margin: 0;
  color: var(--gold-soft);
}
.card--wedding h3 { color: var(--gold-pale); font-size: 1.7rem; margin-bottom: .25rem; }
.card--wedding .card__meta { color: var(--sakura-soft); margin-bottom: .5rem; }
.card--wedding p:last-child { color: color-mix(in srgb, var(--ivory) 82%, transparent); max-width: 62ch; }

/* ============ 5 · GALLERY ============ */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1rem, 2.2vw, 1.5rem);
  max-width: 1100px;
  margin: 0 auto;
}
.gallery__item--half { grid-column: span 3; aspect-ratio: 3 / 2; }
.gallery__item--third { grid-column: span 2; aspect-ratio: 1 / 1; }
.gallery__item--pano { grid-column: span 6; aspect-ratio: 3 / 1; }
.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  box-shadow: var(--shadow-card);
  transition: transform .5s cubic-bezier(.22, .8, .3, 1), box-shadow .5s ease, border-color .5s ease;
}
.gallery__item:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--gold) 78%, transparent);
}
.gallery__item img { transition: transform .7s cubic-bezier(.22, .8, .3, 1); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.2rem 1rem .9rem;
  background: linear-gradient(transparent, rgba(20, 8, 15, .75));
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: var(--gold-pale);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
.gallery__item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none) {
  .gallery__item figcaption {
    opacity: 1;
    transform: none;
  }
  .gallery__item:hover,
  .gallery__item:hover img {
    transform: none;
  }
}

/* guests' own photos: the code sits open on the page, nothing to click first */
.photoshare {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 54ch);
  justify-content: center;
  align-items: center;
  gap: clamp(1.4rem, 4vw, 2.8rem);
  max-width: 1100px;
  margin: clamp(2.2rem, 5vw, 3.4rem) auto 0;
  padding: clamp(1.7rem, 3.4vw, 2.4rem);
  background:
    radial-gradient(ellipse 70% 45% at 100% 0%, color-mix(in srgb, var(--sakura-pale) 65%, transparent), transparent 70%),
    var(--cream);
  border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.photoshare[hidden] { display: none; }
.photoshare::before {
  content: "";
  position: absolute; inset: 7px;
  border: var(--gold-hair);
  border-radius: 7px;
  pointer-events: none;
}
.photoshare > * { position: relative; }
.photoshare__code {
  display: block;
  width: clamp(136px, 21vw, 176px);
  padding: 9px;
  background: var(--cream);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(69, 18, 29, .14);
  transition: transform .4s ease, box-shadow .4s ease;
}
.photoshare__code:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(69, 18, 29, .2);
}
.photoshare__code svg { display: block; width: 100%; height: auto; border-radius: 3px; }
.photoshare__body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 600;
  color: var(--maroon);
  margin-bottom: .6rem;
}
.photoshare__body p { color: var(--ink-soft); font-size: .97rem; }
.photoshare__body .btn { margin-top: 1.35rem; padding: .9rem 1.9rem; }

/* ============ 6 · DETAILS ============ */
.details {
  background:
    radial-gradient(ellipse 48% 42% at 90% 12%, color-mix(in srgb, var(--gold-pale) 23%, transparent), transparent 74%),
    radial-gradient(ellipse 38% 36% at 8% 90%, color-mix(in srgb, var(--sakura-pale) 30%, transparent), transparent 72%),
    linear-gradient(180deg, var(--ivory), var(--ivory-warm));
}
.details__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 3vw, 2.4rem);
  max-width: 1100px;
  margin: 0 auto;
  align-items: stretch;
}
.details__card {
  position: relative;
  background:
    radial-gradient(ellipse 70% 40% at 100% 0%, color-mix(in srgb, var(--sakura-pale) 60%, transparent), transparent 70%),
    linear-gradient(145deg, var(--cream), var(--cream-blush));
  border: 1px solid color-mix(in srgb, var(--gold) 46%, transparent);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 2.7rem) clamp(1.6rem, 3.4vw, 2.4rem);
  box-shadow: var(--shadow-card);
}
.details__card::before {
  content: "";
  position: absolute; inset: 7px;
  border: var(--gold-hair);
  border-radius: 7px;
  pointer-events: none;
}
.details__card > * { position: relative; }
.details__card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 600;
  color: var(--maroon);
  margin: 1.7rem 0 .5rem;
  display: flex; align-items: center; gap: .7rem;
}
/* small gold blossom bullet beside each heading */
.details__card h3::before {
  content: "";
  flex: none;
  width: 13px; height: 13px;
  background: var(--mark-gold) center / contain no-repeat;
  opacity: .85;
}
.details__card h3:first-child { margin-top: 0; }
.details__card p { color: var(--ink-soft); font-size: .97rem; }
.details__card p strong { color: var(--ink); font-weight: 500; }
.details__card a {
  color: var(--maroon); font-weight: 500;
  text-decoration-color: color-mix(in srgb, var(--gold) 60%, transparent);
  text-underline-offset: 3px;
  transition: color .3s ease;
}
.details__card a:hover { color: var(--gold-ink); }

.details__map {
  position: relative;
  border-radius: var(--radius);
  padding: 8px;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--gold) 55%, transparent), color-mix(in srgb, var(--sakura) 35%, transparent));
  box-shadow: var(--shadow-card);
}
.details__map iframe {
  width: 100%; height: 100%; min-height: 400px;
  border: 0;
  border-radius: calc(var(--radius) - 4px);
  filter: sepia(.3) saturate(.8) contrast(1.02) brightness(1.03);
}
/* warm wash so the map belongs to the palette */
.details__map::after {
  content: "";
  position: absolute; inset: 8px;
  border-radius: calc(var(--radius) - 4px);
  background: linear-gradient(150deg, rgba(201, 162, 39, .14), rgba(107, 31, 42, .16));
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ============ 7 · RSVP ============ */
.section--dark {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, color-mix(in srgb, var(--sakura) 14%, transparent), transparent 68%),
    linear-gradient(160deg, var(--plum), var(--maroon-deep) 45%, var(--maroon) 100%);
  color: var(--ivory);
  text-align: center;
  border-top: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
}
.section--dark h2 { color: var(--ivory); }
.section--dark .section__label { color: var(--gold-soft); }
.section--dark .section__head::before { opacity: 1; filter: brightness(1.35); }
.rsvp__mandala {
  position: absolute; width: min(80vw, 540px);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  color: var(--gold); opacity: .09; pointer-events: none;
  animation: mandala-spin 150s linear infinite reverse;
}
@media (prefers-reduced-motion: reduce) { .rsvp__mandala { animation: none; } }
.rsvp .section__head, .rsvp p, .rsvp .rsvp__actions { position: relative; z-index: 2; }
.rsvp__nudge {
  position: relative;
  z-index: 2;
  max-width: 36ch;
  margin: -0.4rem auto 1.8rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--gold-pale);
}
.rsvp__note {
  font-family: var(--font-script);
  font-size: 1.6rem; font-style: normal;
}
.rsvp__note strong { color: var(--gold-soft); font-weight: 600; }
.rsvp__choice-note {
  margin-top: .55rem;
  color: color-mix(in srgb, var(--ivory) 68%, transparent);
  font-size: .78rem;
  letter-spacing: .08em;
}
.rsvp__actions {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 1.1rem;
  margin-top: 1.7rem;
}
.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: 1.05rem 2.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .84rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 500;
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease, color .35s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn--gold {
  background: linear-gradient(140deg, var(--gold-soft), var(--gold) 55%, #B08A1D);
  color: var(--maroon-deep);
  box-shadow: 0 12px 30px rgba(201, 162, 39, .3);
}
.btn--gold:hover { box-shadow: 0 18px 40px rgba(201, 162, 39, .42); }
.btn--outline {
  border: 1px solid color-mix(in srgb, var(--gold-soft) 75%, transparent);
  color: var(--gold-soft);
}
.btn--outline:hover {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  box-shadow: 0 12px 30px rgba(20, 4, 10, .3);
}
.rsvp__side-btn {
  min-width: min(260px, 100%);
  justify-content: flex-start;
  text-align: left;
}
.rsvp__side-btn > span {
  display: grid;
  gap: .18rem;
  line-height: 1.15;
}
.rsvp__side-btn small {
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .16em;
  opacity: .72;
}
.rsvp__blessing {
  margin-top: 2.6rem;
  font-family: var(--font-script);
  font-style: normal;
  font-size: 1.3rem;
  color: color-mix(in srgb, var(--ivory) 78%, transparent);
}

/* ---- wax-seal envelope ---- */
.envelope {
  position: relative;
  max-width: 560px;
  margin: 2.5rem auto 0;
  perspective: 800px;
}
.envelope__back {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #3A1520, #2A0E18);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(20, 4, 10, .4);
}
.envelope__letter {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  transform: translateY(0);
  transition: transform 1s cubic-bezier(.22, .8, .3, 1) .3s;
}
.envelope__front {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(160deg, #45121D, #33101E);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: 8px;
  transition: opacity .8s ease .6s, transform .8s ease .6s;
  pointer-events: none;
}
/* envelope V-fold lines */
.envelope__front::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom right, transparent 49.5%, color-mix(in srgb, var(--gold) 25%, transparent) 49.5%, color-mix(in srgb, var(--gold) 25%, transparent) 50.5%, transparent 50.5%),
    linear-gradient(to bottom left, transparent 49.5%, color-mix(in srgb, var(--gold) 25%, transparent) 49.5%, color-mix(in srgb, var(--gold) 25%, transparent) 50.5%, transparent 50.5%);
}
.envelope__flap {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  height: 50%;
  background: linear-gradient(180deg, #4D1622, #3A1520);
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  transform-origin: top center;
  transition: transform .8s cubic-bezier(.22, .8, .3, 1);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.envelope__seal {
  position: absolute; z-index: 5;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: none; border: none; cursor: pointer;
  transition: transform .4s ease, opacity .4s ease;
  filter: drop-shadow(0 4px 12px rgba(20, 4, 10, .5));
}
.envelope__seal:hover { transform: translate(-50%, -50%) scale(1.1); }

/* opened state */
.envelope.is-open .envelope__flap {
  transform: rotateX(180deg);
  z-index: 1;
}
.envelope.is-open .envelope__seal {
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}
.envelope.is-open .envelope__front {
  opacity: 0;
  transform: translateY(20px);
}
.envelope.is-open .envelope__letter {
  transform: translateY(-8px);
}
@media (prefers-reduced-motion: reduce) {
  .envelope__flap, .envelope__front, .envelope__seal, .envelope__letter { transition: none; }
}

/* ============ 8 · FOOTER ============ */
.footer {
  background: linear-gradient(180deg, var(--maroon-deep), var(--plum));
  color: var(--ivory);
  text-align: center;
  padding: 2.2rem 1.5rem 3rem;
  border-top: 1px solid color-mix(in srgb, var(--gold) 32%, transparent);
}
.footer__catch {
  width: min(360px, 86vw);
  height: 240px;
  margin: 0 auto 0.4rem;
}
.footer__couple {
  display: block;
  width: 100%;
  height: 100%;
}
.footer .medallion { margin: 0 auto 1.3rem; }
.footer__line {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 5vw, 2.8rem); font-weight: 400;
  color: var(--gold-pale);
}
.footer__names {
  margin-top: .3rem;
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.4vw, 1.3rem); font-weight: 500;
  color: color-mix(in srgb, var(--ivory) 80%, transparent);
  letter-spacing: .12em;
}
.footer__divider { width: 190px; margin: .9rem auto 1.1rem; color: color-mix(in srgb, var(--gold) 70%, transparent); }
.footer__sub {
  letter-spacing: .22em; text-transform: uppercase; font-size: .74rem;
  color: color-mix(in srgb, var(--ivory) 72%, transparent);
}
.footer__hashtag {
  margin-top: 1.2rem;
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: var(--gold-soft);
  opacity: .9;
}
.footer__credit { margin-top: 2rem; font-size: .78rem; color: color-mix(in srgb, var(--ivory) 50%, transparent); }

/* ============ MODE C · ROYAL WEDDING SCROLL ============ */
/* Decorative pieces are progressive enhancements: they do not enter layout
   until the live switcher activates Mode C. */
.hero__curtains,
.royal-wagasa,
.royal-knot { display: none; }

body[data-scroll-mode="3"] .hero__curtains {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
body[data-scroll-mode="3"] .hero__curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(36vw, 520px);
  opacity: var(--royal-curtain-opacity, .9);
  will-change: transform;
  filter: drop-shadow(0 20px 34px rgba(20, 4, 10, .35));
}
body[data-scroll-mode="3"] .hero__curtain::before,
body[data-scroll-mode="3"] .hero__curtain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
body[data-scroll-mode="3"] .hero__curtain::before {
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 238, 222, .05) 0 3%,
      transparent 3% 12%,
      rgba(20, 4, 10, .2) 18% 25%,
      transparent 31% 40%),
    linear-gradient(90deg, #2D0B16, #751E31 45%, #45121D 88%);
}
body[data-scroll-mode="3"] .hero__curtain::after {
  background:
    linear-gradient(180deg, rgba(227, 197, 101, .26), transparent 12% 88%, rgba(227, 197, 101, .18)),
    radial-gradient(ellipse 90% 18% at 50% 12%, rgba(255, 244, 220, .1), transparent 70%);
  border-bottom: 1px solid rgba(227, 197, 101, .3);
}
body[data-scroll-mode="3"] .hero__curtain--left {
  left: 0;
  transform: translate3d(var(--royal-curtain-left, 0%), 0, 0);
  clip-path: polygon(0 0, 100% 0, 88% 48%, 100% 100%, 0 100%);
}
body[data-scroll-mode="3"] .hero__curtain--right {
  right: 0;
  transform: translate3d(var(--royal-curtain-right, 0%), 0, 0);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12% 48%);
}
body[data-scroll-mode="3"] .hero__curtain--right::before {
  transform: scaleX(-1);
}

body[data-scroll-mode="3"] .invite-card {
  overflow: hidden;
  scale: var(--royal-invite-scale, 1);
  box-shadow:
    0 2px 8px rgba(69, 18, 29, .05),
    0 var(--royal-invite-shadow-y, 18px) var(--royal-invite-shadow-blur, 44px) rgba(69, 18, 29, .12);
}
body[data-scroll-mode="3"] .invite-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: -30%;
  top: var(--royal-thread-y, -10%);
  width: 160%;
  height: 2px;
  transform: translate3d(var(--royal-thread-x, -22%), 0, 0) rotate(-6deg);
  transform-origin: center;
  background: linear-gradient(90deg, transparent 4%, rgba(227, 197, 101, .25) 23%, #F0E0B0 50%, rgba(201, 162, 39, .3) 77%, transparent 96%);
  box-shadow: 0 0 12px rgba(227, 197, 101, .5);
  opacity: var(--royal-thread-opacity, 0);
  pointer-events: none;
}
body[data-scroll-mode="3"] .invite-card__corner {
  opacity: var(--royal-corner-opacity, .75);
  filter: drop-shadow(0 0 var(--royal-corner-glow, 0px) rgba(201, 162, 39, .48));
}

body[data-scroll-mode="3"] .timeline::before {
  opacity: .28;
}
body[data-scroll-mode="3"] .timeline::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%) scaleY(var(--royal-story-line, 0));
  transform-origin: top;
  background: linear-gradient(to bottom, var(--gold-soft), var(--gold), var(--sakura));
  box-shadow: 0 0 10px rgba(201, 162, 39, .3);
  pointer-events: none;
}
body[data-scroll-mode="3"] .timeline__item::after {
  z-index: 2;
  width: var(--royal-node-size, 12px);
  height: var(--royal-node-size, 12px);
  opacity: var(--royal-node-opacity, .42);
  transform: translate(-50%, -50%) scale(var(--royal-node-scale, .68));
  filter: drop-shadow(0 0 var(--royal-node-glow, 4px) rgba(201, 162, 39, .58));
}
body[data-scroll-mode="3"] .timeline__photo,
body[data-scroll-mode="3"] .timeline__text {
  translate: 0 var(--royal-item-lift, 8px);
}

body[data-scroll-mode="3"] .royal-wagasa {
  display: block;
  position: absolute;
  z-index: 0;
  width: clamp(160px, 23vw, 280px);
  top: clamp(4.6rem, 8vw, 6.8rem);
  left: 50%;
  translate: -50% -16%;
  opacity: var(--royal-wagasa-opacity, .16);
  filter: drop-shadow(0 14px 22px rgba(69, 18, 29, .16));
  pointer-events: none;
}
body[data-scroll-mode="3"] .royal-wagasa__canopy {
  transform: scaleX(var(--royal-wagasa-scale, .18));
  transform-origin: 110px 91px;
}
body[data-scroll-mode="3"] .celebration .section__head,
body[data-scroll-mode="3"] .celebration .cards {
  position: relative;
  z-index: 1;
}
body[data-scroll-mode="3"] .celebration .card {
  translate: 0 var(--royal-card-rise, 14px);
}

body[data-scroll-mode="3"] .gallery__item {
  translate: 0 var(--royal-gallery-y, 0px);
  rotate: var(--royal-gallery-tilt, 0deg);
  will-change: translate, rotate;
}

body[data-scroll-mode="3"] .details__grid {
  position: relative;
  isolation: isolate;
}
body[data-scroll-mode="3"] .details__grid::before,
body[data-scroll-mode="3"] .details__grid::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
  opacity: var(--royal-frame-opacity, 0);
  clip-path: inset(var(--royal-frame-inset, 50%) 0 var(--royal-frame-inset, 50%) 0);
}
body[data-scroll-mode="3"] .details__grid::before {
  inset: -22px;
  border: 1px solid color-mix(in srgb, var(--gold) 80%, transparent);
  border-radius: min(22vw, 240px) min(22vw, 240px) 18px 18px;
  box-shadow: inset 0 0 0 5px rgba(201, 162, 39, .06), 0 0 18px rgba(201, 162, 39, .12);
}
body[data-scroll-mode="3"] .details__grid::after {
  inset: -14px;
  border: 1px solid color-mix(in srgb, var(--gold-soft) 34%, transparent);
  border-radius: min(21vw, 232px) min(21vw, 232px) 13px 13px;
}
body[data-scroll-mode="3"] .details__grid > * {
  position: relative;
  z-index: 1;
}

body[data-scroll-mode="3"] .rsvp::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 5% 8% 0;
  background:
    radial-gradient(ellipse 32% 30% at 22% 70%, rgba(227, 197, 101, .09), transparent 72%),
    radial-gradient(ellipse 32% 30% at 78% 70%, rgba(229, 157, 178, .055), transparent 72%);
  opacity: var(--royal-finale-glow, .5);
  pointer-events: none;
}
body[data-scroll-mode="3"] .royal-knot {
  display: block;
  position: relative;
  z-index: 2;
  width: min(640px, 92vw);
  margin: -1.4rem auto 1rem;
  overflow: visible;
  pointer-events: none;
}
body[data-scroll-mode="3"] .royal-knot__shadow,
body[data-scroll-mode="3"] .royal-knot__thread {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: var(--royal-knot-offset, 1);
}
body[data-scroll-mode="3"] .royal-knot__shadow {
  stroke: rgba(69, 18, 29, .55);
  stroke-width: 6;
}
body[data-scroll-mode="3"] .royal-knot__thread {
  stroke: var(--gold-soft);
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(227, 197, 101, .4));
}
body[data-scroll-mode="3"] .royal-knot__jewel {
  fill: var(--gold-pale);
  stroke: var(--maroon);
  stroke-width: 2;
  opacity: var(--royal-knot-jewel-opacity, 0);
  scale: var(--royal-knot-jewel-scale, .4);
  transform-origin: 320px 62px;
}
body[data-scroll-mode="3"] .envelope {
  position: relative;
  z-index: 2;
}

/* ============ PAGE-WIDE SCROLL EFFECTS ============ */
.scroll-effects {
  position: fixed;
  inset: 0;
  z-index: 42;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.scroll-effects__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.scroll-effects__wagasa {
  position: absolute;
  left: 0;
  top: 0;
  width: 256px;
  height: 256px;
  pointer-events: none;
  transform-origin: 50% 42%;
  will-change: transform;
  opacity: 0;
  visibility: hidden;
}
.scroll-effects__wagasa.is-visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 700px) {
  .music-toggle { left: 12px; bottom: 12px; width: 76px; height: 48px; }
  .music-toggle__art { width: 76px; height: 48px; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card--wedding { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .details__grid { grid-template-columns: 1fr; }
  .timeline::before { left: 14px; }
  .timeline__item { grid-template-columns: 1fr; gap: 1.2rem; margin-left: 2.4rem; }
  .timeline__item::after { left: -2.4rem; top: 1.2rem; transform: none; margin-left: 8px; }
  body[data-scroll-mode="3"] .timeline::after { left: 14px; transform: scaleY(var(--royal-story-line, 0)); }
  body[data-scroll-mode="3"] .timeline__item::after {
    transform: scale(var(--royal-node-scale, .68));
  }
  .timeline__item:nth-child(even) .timeline__photo { order: 0; }
  .timeline__item:nth-child(even) .timeline__text { text-align: left; }

  .gallery__item--half { grid-column: span 6; aspect-ratio: 3 / 2; }
  .gallery__item--third { grid-column: span 3; }
  .gallery__item--pano { aspect-ratio: 2 / 1; }
}

@media (max-width: 700px) {
  .nav__toggle {
    display: grid; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
  }
  .nav__toggle span { width: 24px; height: 1.6px; background: var(--gold-soft); transition: transform .3s ease, opacity .3s ease; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

  .nav { padding: .7rem 1.1rem; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: color-mix(in srgb, var(--maroon-deep) 96%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 0 solid color-mix(in srgb, var(--gold) 55%, transparent);
    max-height: 0; overflow: hidden;
    transition: max-height .4s ease;
  }
  .nav__links.open { max-height: 420px; border-bottom-width: 1px; }
  .nav__links a { padding: 1rem; width: 100%; text-align: center; }
  .nav__links a::after { display: none; }
  .nav__cta { border-radius: 0; border: none; border-top: var(--gold-border); }

  .cards { grid-template-columns: 1fr; }
  .card--wedding { grid-template-columns: 1fr; row-gap: .3rem; text-align: center; padding: 2.2rem 1.6rem; }
  .card--wedding .card__icon { grid-row: auto; margin: 0 auto 1rem; }
  .card--wedding p:last-child { margin-inline: auto; }

  .gallery__item--third { grid-column: span 6; aspect-ratio: 4 / 3; }
  .gallery__item--pano { aspect-ratio: 4 / 3; }

  /* the code above the words, both centred, when there is only one column */
  .photoshare { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .photoshare__body .btn { margin-inline: auto; }

  /* a shorter grove on phones, so the crowns clear the countdown */
  .hero__sakura-scene { height: 200px; }

  .invite-card__paper {
    --corner-size: 42px;
    --corner-inset: 15px;
    padding-block: 3.4rem;
  }
  .countdown { flex-wrap: wrap; }
  .hero__sub::before, .hero__sub::after { width: 26px; }

  body[data-scroll-mode="3"] .hero__curtain { width: 31vw; }
  body[data-scroll-mode="3"] .royal-wagasa {
    width: 152px;
    top: 5.2rem;
    opacity: min(var(--royal-wagasa-opacity, .16), .34);
  }
  body[data-scroll-mode="3"] .details__grid::before { inset: -11px; }
  body[data-scroll-mode="3"] .details__grid::after { inset: -6px; }
  body[data-scroll-mode="3"] .royal-knot { margin-top: -.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-scroll-mode="3"] .hero__curtain--left { transform: translate3d(-24%, 0, 0); }
  body[data-scroll-mode="3"] .hero__curtain--right { transform: translate3d(24%, 0, 0); }
  body[data-scroll-mode="3"] .invite-card { scale: 1; }
  body[data-scroll-mode="3"] .invite-card::after { opacity: .38; top: 16%; transform: rotate(-6deg); }
  body[data-scroll-mode="3"] .timeline::after { transform: translateX(-50%) scaleY(1); }
  body[data-scroll-mode="3"] .timeline__photo,
  body[data-scroll-mode="3"] .timeline__text,
  body[data-scroll-mode="3"] .celebration .card,
  body[data-scroll-mode="3"] .gallery__item { translate: none; rotate: none; }
  body[data-scroll-mode="3"] .royal-wagasa__canopy { transform: none; }
  body[data-scroll-mode="3"] .royal-knot__shadow,
  body[data-scroll-mode="3"] .royal-knot__thread { stroke-dashoffset: 0; }
}

