/* ════════════════════════════════════════════════════════════════
   Rehan & Taylor — heirloom invitation, brought to life
   palette: parchment cream · antique gold · periwinkle · olive script
   ════════════════════════════════════════════════════════════════ */

:root {
  --cream:      #F8F3E6;
  --cream-2:    #F3EBD8;
  --cream-3:    #EAE0C5;
  --paper:      #FBF8EF;
  --ink:        #4A5034;
  --ink-soft:   #79805C;
  --olive:      #76814B;
  --olive-deep: #535C33;
  --gold:       #B2974F;
  --gold-2:     #D6C28C;
  --gold-3:     #EFE3BC;
  --gold-line:  rgba(178, 151, 79, .55);
  --peri:       #9FAED4;
  --peri-2:     #C5D0E9;
  --peri-3:     #E7ECF7;
  --peri-ink:   #67779F;
  --rose-err:   #A66A4F;
  --script:     'Pinyon Script', cursive;
  --serif:      'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sc:         'Cormorant SC', 'Cormorant Garamond', Georgia, serif;
  --shadow-lg:  0 36px 90px -32px rgba(74, 70, 45, .4);
  --shadow-md:  0 18px 50px -20px rgba(74, 70, 45, .3);
  --ease-out:   cubic-bezier(.22, .8, .3, 1);
  --ease-soft:  cubic-bezier(.45, 0, .2, 1);
}

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

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  /* prevent iOS Safari from auto-inflating text */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.locked { overflow: hidden; }

/* parchment grain + soft vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 252, 240, .85), transparent 60%),
    radial-gradient(130% 100% at 50% 100%, rgba(214, 194, 140, .18), transparent 55%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

::selection { background: var(--peri-2); color: var(--olive-deep); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

a { color: var(--olive); }

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

/* fixed stationery frame on the viewport */
.page-frame {
  position: fixed;
  inset: 14px;
  z-index: 70;
  pointer-events: none;
  border: 1px solid var(--gold-line);
  opacity: 0;
  transition: opacity 1.2s ease .4s;
}
.page-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(178, 151, 79, .28);
}
body.revealed .page-frame { opacity: 1; }

/* ── shared type ──────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--sc);
  font-size: .82rem;
  letter-spacing: .42em;
  text-transform: lowercase;
  color: var(--gold);
  margin-bottom: .9rem;
}

.script-h {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.18;
  color: var(--olive);
  margin-bottom: .6rem;
}

.motif-h {
  width: 124px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  opacity: .9;
}

.btn {
  display: inline-block;
  font-family: var(--sc);
  font-size: .92rem;
  letter-spacing: .28em;
  text-transform: lowercase;
  text-decoration: none;
  padding: .95rem 2.3rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out),
              background-color .35s, color .35s, border-color .35s;
}

.btn-gold {
  color: #FFFDF4;
  border: 1px solid rgba(120, 96, 41, .5);
  background: linear-gradient(115deg, #A98E4E, #C9B273 38%, #E7D9A8 50%, #C9B273 62%, #A98E4E);
  background-size: 220% 100%;
  background-position: 0% 0;
  text-shadow: 0 1px 2px rgba(96, 75, 28, .45);
  box-shadow: 0 12px 30px -12px rgba(140, 113, 53, .55);
}
.btn-gold:hover {
  background-position: 95% 0;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -14px rgba(140, 113, 53, .65);
}

.btn-ghost {
  color: var(--olive);
  border: 1px solid var(--gold-line);
  background: transparent;
}
.btn-ghost:hover {
  background: rgba(214, 194, 140, .18);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.btn-sm { padding: .6rem 1.3rem .52rem; font-size: .8rem; letter-spacing: .2em; }

/* ══════════════════ The envelope gate ══════════════════ */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(110% 80% at 50% 20%, #FCF8EC, #F1E8D2 70%, #E8DCBE);
  transition: opacity .9s var(--ease-soft), visibility .9s;
}
.gate::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.gate.away {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.4rem;
  padding: 1rem;
}

.gate-kicker {
  font-family: var(--sc);
  letter-spacing: .46em;
  text-transform: lowercase;
  font-size: .85rem;
  color: var(--gold);
  animation: fadeDown 1.4s var(--ease-out) both;
}

.gate-hint {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.05rem;
  animation: fadeUp 1.4s var(--ease-out) .35s both, hintPulse 2.6s ease-in-out 2s infinite;
}

.gate-skip {
  position: absolute;
  bottom: -4.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  font-family: var(--sc);
  font-size: .78rem;
  letter-spacing: .3em;
  color: var(--ink-soft);
  cursor: pointer;
  opacity: .7;
  transition: opacity .3s, color .3s;
}
.gate-skip:hover { opacity: 1; color: var(--olive); }

@keyframes hintPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* envelope construction */
.envelope {
  position: relative;
  width: min(540px, 88vw);
  aspect-ratio: 10 / 6.6;
  animation: envFloat 5.5s ease-in-out infinite;
}
.gate.open .envelope { animation: none; }

@keyframes envFloat {
  0%, 100% { transform: translateY(0) rotate(-.4deg); }
  50% { transform: translateY(-9px) rotate(.4deg); }
}

.env-shadow {
  position: absolute;
  left: 6%; right: 6%; bottom: -11%;
  height: 13%;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(98, 90, 58, .35), transparent 70%);
}

.env-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #EDE3C8, #E3D6B2);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(166, 140, 78, .35);
}

.env-liner {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 58%;
  clip-path: polygon(1.5% 0, 98.5% 0, 50% 94%);
  background:
    radial-gradient(22px 22px at 24px 24px, rgba(159, 174, 212, .55) 28%, transparent 32%),
    radial-gradient(22px 22px at 72px 60px, rgba(197, 208, 233, .5) 28%, transparent 32%),
    radial-gradient(22px 22px at 120px 24px, rgba(159, 174, 212, .55) 28%, transparent 32%),
    radial-gradient(22px 22px at 168px 60px, rgba(197, 208, 233, .5) 28%, transparent 32%),
    linear-gradient(180deg, #DCE2F1, #C6D0E8);
  background-size: 192px 96px, 192px 96px, 192px 96px, 192px 96px, 100% 100%;
}

.env-card {
  position: absolute;
  left: 5.5%; right: 5.5%;
  top: 7%; bottom: 9%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: linear-gradient(180deg, #FCF9F0, #F6F0DF);
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(90, 80, 45, .18), inset 0 0 0 1px rgba(178, 151, 79, .4);
  transition: transform 1s var(--ease-soft);
}
.env-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(178, 151, 79, .3);
  border-radius: 2px;
  pointer-events: none;
}
.gate.lift .env-card { transform: translateY(-56%) scale(1.04); }

.env-card-crest { width: clamp(54px, 11vw, 72px); height: auto; }
.env-card-names {
  font-family: var(--script);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  color: var(--olive);
  line-height: 1;
}
.env-card-date {
  font-family: var(--sc);
  font-size: .8rem;
  letter-spacing: .38em;
  color: var(--gold);
}

.env-front {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 8px;
  clip-path: polygon(0 0, 50% 42%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(170deg, #F3EAD2 8%, #E9DDBE 60%, #E0D2AC);
  box-shadow: inset 0 0 0 1px rgba(166, 140, 78, .35);
}
.env-front::before,
.env-front::after {
  content: "";
  position: absolute;
  top: 0;
  width: 56%;
  height: 100%;
  background: linear-gradient(115deg, rgba(120, 100, 50, .12), transparent 38%);
}
.env-front::before { left: 0; }
.env-front::after {
  right: 0;
  transform: scaleX(-1);
}

.env-flap {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 58%;
  z-index: 4;
  clip-path: polygon(0 0, 100% 0, 50% 96%);
  background: linear-gradient(190deg, #F1E7CC, #E2D4AE 85%);
  box-shadow: inset 0 -1px 0 rgba(166, 140, 78, .4);
  transform-origin: top center;
  transform: rotateX(0deg);
  backface-visibility: hidden;
  transition: transform 1s var(--ease-soft), z-index 0s .45s;
}
.envelope { perspective: 1400px; }
.gate.open .env-flap {
  transform: rotateX(-178deg);
  z-index: 1;
}

.seal {
  position: absolute;
  left: 50%;
  top: 56%;
  z-index: 5;
  width: clamp(86px, 18vw, 110px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 6px 10px rgba(70, 76, 40, .45));
  transition: transform .4s var(--ease-out), opacity .45s, filter .4s;
}
.seal svg { width: 100%; height: 100%; display: block; }
.seal:hover {
  transform: translate(-50%, -50%) scale(1.06) rotate(-3deg);
  filter: drop-shadow(0 10px 16px rgba(70, 76, 40, .5));
}
.gate.open .seal {
  transform: translate(-50%, -50%) scale(1.3) rotate(14deg);
  opacity: 0;
  pointer-events: none;
}

/* ══════════════════ Nav ══════════════════ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem clamp(1.4rem, 4vw, 3rem);
  background: rgba(248, 243, 230, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(178, 151, 79, .3);
  transform: translateY(-110%);
  transition: transform .6s var(--ease-out);
}
.nav.show { transform: translateY(0); }

.nav-mono {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: .18em;
  text-decoration: none;
  color: var(--olive-deep);
}
.nav-mono em {
  font-family: var(--script);
  font-style: normal;
  color: var(--gold);
  margin: 0 .1em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.nav-links a {
  font-family: var(--sc);
  font-size: .85rem;
  letter-spacing: .26em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink);
  transition: color .3s;
}
.nav-links a:hover { color: var(--gold); }

.nav-cta {
  padding: .45rem 1.2rem .4rem;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  color: var(--olive) !important;
}
.nav-cta:hover {
  background: rgba(214, 194, 140, .2);
}

/* ══════════════════ Hero ══════════════════ */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(5rem, 10vh, 7rem) 1.4rem 4.5rem;
  overflow: hidden;
}

#petalCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* corner bouquets */
.spray {
  position: absolute;
  z-index: 1;
  width: clamp(170px, 24vw, 350px);
  height: auto;
  opacity: 0;
  transition: opacity 1.6s ease 1.1s, transform .2s linear;
  will-change: transform;
}
body.revealed .spray { opacity: .94; }
.spray.tl { top: -2%; left: -1.5%; }
.spray.tr { top: -2%; right: -1.5%; transform: scaleX(-1); }
.spray.bl { bottom: -3%; left: -1.5%; transform: scaleY(-1); }
.spray.br { bottom: -3%; right: -1.5%; transform: scale(-1); }

/* tall climbing columns along the hero edges */
.side-col {
  position: absolute;
  bottom: 0;
  z-index: 1;
  width: clamp(120px, 12vw, 184px);
  height: auto;
  opacity: 0;
  transition: opacity 1.8s ease 1.5s;
  pointer-events: none;
}
body.revealed .side-col { opacity: .92; }
.side-col.left { left: .4%; }
.side-col.right { right: .4%; transform: scaleX(-1); }
@media (max-width: 1180px) { .side-col { display: none; } }

/* the gold arch — always spans the full hero height; narrows (rather than
   shrinks) on slim screens so the silhouette keeps framing the content */
.arch {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  aspect-ratio: 1000 / 1300;
  max-width: 100%;
  pointer-events: none;
}

.arch-line {
  stroke: url(#goldStroke);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.arch-line.outer { stroke-width: 2.2; }
.arch-line.inner { stroke-width: 1; }
body.revealed .arch-line {
  transition: stroke-dashoffset 2.6s var(--ease-soft) .25s;
  stroke-dashoffset: 0;
}

.crown-spray {
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transform-origin: 500px 110px;
  transition: opacity 1.4s ease 1.5s, transform 1.4s var(--ease-out) 1.5s;
}
body.revealed .crown-spray {
  opacity: 1;
  transform: none;
}

/* inline crown for narrow screens, where the arch-pinned one would collide with text */
.crown-flow {
  display: none;
  width: min(420px, 86vw);
  height: auto;
  margin: 0 auto .2rem;
}
@media (max-width: 1100px) {
  .arch .crown-spray { display: none; }
  .crown-flow { display: block; }
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 640px;
  margin-top: clamp(3rem, 9vh, 6rem);
}

/* staggered entrance */
.hr-1, .hr-2, .hr-3, .hr-4, .hr-5, .hr-6, .hr-7, .hr-8, .hr-9, .hr-10 {
  opacity: 0;
  transform: translateY(18px);
}
body.revealed .hr-1, body.revealed .hr-2, body.revealed .hr-3,
body.revealed .hr-4, body.revealed .hr-5, body.revealed .hr-6,
body.revealed .hr-7, body.revealed .hr-8, body.revealed .hr-9,
body.revealed .hr-10 {
  animation: riseIn 1.2s var(--ease-out) both;
}
body.revealed .hr-1  { animation-delay: .9s; }
body.revealed .hr-2  { animation-delay: 1.05s; }
body.revealed .hr-3  { animation-delay: 1.2s; }
body.revealed .hr-4  { animation-delay: 1.4s; }
body.revealed .hr-5  { animation-delay: 1.6s; }
body.revealed .hr-6  { animation-delay: 1.75s; }
body.revealed .hr-7  { animation-delay: 2s; }
body.revealed .hr-8  { animation-delay: 2.15s; }
body.revealed .hr-9  { animation-delay: 2.35s; }
body.revealed .hr-10 { animation-delay: 3s; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.bismillah {
  font-family: var(--script);
  font-size: clamp(1.55rem, 4.2vw, 2.35rem);
  line-height: 1.2;
  color: var(--olive);
  margin-bottom: .35rem;
}
.bismillah .swt {
  font-family: var(--sc);
  font-size: .42em;
  letter-spacing: .22em;
  vertical-align: super;
  color: var(--gold);
}
.hero-motif {
  width: 116px;
  height: auto;
  display: block;
  margin: 0 auto 1.3rem;
  opacity: .9;
}

.hosts {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  letter-spacing: .06em;
  color: var(--olive-deep);
  margin-bottom: .8rem;
}

.invite-line {
  font-style: italic;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 1.4rem;
}

.names {
  font-weight: 400;
  display: flex;
  flex-direction: column;
  gap: .14em;
  margin-bottom: 1.2rem;
}
.names .name {
  font-family: var(--script);
  font-size: clamp(2.5rem, 9vw, 5.8rem);
  line-height: 1.12;
  color: var(--olive);
  text-shadow: 0 2px 0 rgba(255, 255, 250, .7);
}
.names .amp {
  font-family: var(--script);
  font-size: clamp(1.6rem, 4.6vw, 3rem);
  color: var(--peri-ink);
  line-height: 1;
}

.hero-flourish {
  width: min(300px, 70%);
  height: auto;
  margin: 0 auto .9rem;
  display: block;
}

.date-strip {
  font-family: var(--sc);
  font-size: clamp(.95rem, 2.4vw, 1.15rem);
  letter-spacing: .34em;
  color: var(--ink);
  margin-bottom: 2.1rem;
}
.date-strip span { color: var(--gold); }
.date-strip i { font-style: normal; color: var(--gold); margin: 0 .3em; }

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}
.scroll-word {
  font-family: var(--sc);
  font-size: .75rem;
  letter-spacing: .4em;
  color: var(--ink-soft);
}
.scroll-line {
  width: 1px;
  height: 44px;
  background: var(--gold);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--olive-deep);
  animation: scrollDrip 2.2s var(--ease-soft) infinite;
}
@keyframes scrollDrip {
  0% { top: -100%; }
  55%, 100% { top: 100%; }
}

/* ══════════════════ Scroll reveals ══════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease-out) var(--d, 0s),
              transform 1s var(--ease-out) var(--d, 0s);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ══════════════════ Countdown ══════════════════ */

.countdown {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(4rem, 9vh, 6.5rem) 1.4rem;
}

.timer {
  display: inline-flex;
  align-items: stretch;
  gap: clamp(.6rem, 3vw, 1.6rem);
  margin-top: 1.2rem;
  padding: 1.4rem clamp(1.2rem, 4vw, 2.8rem) 1.2rem;
  background: linear-gradient(180deg, var(--paper), var(--cream-2));
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  box-shadow: var(--shadow-md), inset 0 0 0 4px var(--cream), inset 0 0 0 5px rgba(178, 151, 79, .35);
}

.t-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(3rem, 9vw, 4.6rem);
}
.t-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 5.5vw, 3rem);
  line-height: 1;
  color: var(--olive-deep);
  font-variant-numeric: tabular-nums;
}
.t-label {
  font-family: var(--sc);
  font-size: .72rem;
  letter-spacing: .3em;
  color: var(--gold);
  margin-top: .35rem;
}
.t-dot {
  align-self: center;
  color: var(--gold);
  font-size: 1.6rem;
  line-height: 1;
}

/* ══════════════════ Events ══════════════════ */

.events {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(3rem, 7vh, 5rem) clamp(1.2rem, 4vw, 3rem) clamp(4rem, 9vh, 6rem);
}

.event-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: stretch;
  max-width: 1060px;
  margin: 1.6rem auto 0;
}

.event-card {
  position: relative;
  background: linear-gradient(180deg, var(--paper), #F5EEDC);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  padding: 3.4rem 2rem 2.4rem;
  box-shadow: var(--shadow-md);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out),
              opacity 1s var(--ease-out) var(--d, 0s);
}
.event-card.in { transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.event-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(178, 151, 79, .3);
  border-radius: 3px;
  pointer-events: none;
}
.event-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
}

.event-crest {
  width: 92px;
  height: 92px;
  margin: -1rem auto .4rem;
  display: block;
  transition: transform .6s var(--ease-out);
}
.event-card:hover .event-crest { transform: rotate(8deg) scale(1.05); }

.event-name {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.1rem);
  color: var(--olive);
  margin-bottom: .8rem;
}

.event-date {
  font-family: var(--sc);
  font-size: .95rem;
  letter-spacing: .22em;
  color: var(--ink);
}
.event-time {
  font-style: italic;
  color: var(--ink-soft);
  margin-top: .3rem;
}

.event-flourish {
  width: 190px;
  height: auto;
  margin: 1rem auto;
  display: block;
  opacity: .9;
}

.event-venue {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: .04em;
  color: var(--olive-deep);
}
.event-addr {
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: .3rem;
  margin-bottom: 1.5rem;
}

.event-actions {
  display: flex;
  gap: .7rem;
  justify-content: center;
  flex-wrap: wrap;
}

.event-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  padding: 1.5rem 0;
}
.event-divider span {
  flex: 1;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-line), transparent);
}
.event-divider-bloom { width: 30px; height: 30px; }

/* ══════════════════ Quote band ══════════════════ */

.quote {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 5vw, 4rem);
  text-align: center;
  padding: clamp(4.5rem, 10vh, 7rem) 1.4rem;
  background:
    linear-gradient(180deg, rgba(197, 208, 233, 0), rgba(197, 208, 233, .26) 22%, rgba(197, 208, 233, .26) 78%, rgba(197, 208, 233, 0));
}

.quote-sprig {
  width: clamp(80px, 11vw, 150px);
  height: auto;
  opacity: .92;
  flex-shrink: 0;
}
.quote-sprig.left { transform: rotate(-4deg); }
.quote-sprig.right { transform: rotate(4deg) scaleX(-1); }

.quote-script {
  font-family: var(--script);
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.3;
  color: var(--olive-deep);
}
.quote-sub {
  margin-top: 1.1rem;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--peri-ink);
}

/* ══════════════════ RSVP ══════════════════ */

.rsvp {
  position: relative;
  z-index: 2;
  padding: clamp(4rem, 9vh, 6.5rem) clamp(1.2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rsvp-card {
  position: relative;
  width: min(720px, 100%);
  background: linear-gradient(180deg, var(--paper), #F4EDDB);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  padding: clamp(2.6rem, 6vw, 4rem) clamp(1.6rem, 6vw, 4.5rem) clamp(2.4rem, 5vw, 3.6rem);
  overflow: hidden;
}
.rsvp-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(178, 151, 79, .3);
  border-radius: 3px;
  pointer-events: none;
}

.rsvp-corner {
  position: absolute;
  width: clamp(110px, 20vw, 170px);
  height: auto;
  opacity: .55;
  pointer-events: none;
}
.rsvp-corner.c-tl { top: -3%; left: -2%; }
.rsvp-corner.c-tr { top: -3%; right: -2%; transform: scaleX(-1); }
.rsvp-corner.c-bl { bottom: -4%; left: -2%; transform: scaleY(-1); }
.rsvp-corner.c-br { bottom: -4%; right: -2%; transform: scale(-1); }

.rsvp-head {
  position: relative;
  text-align: center;
  margin-bottom: 2.2rem;
}
.rsvp-note {
  font-style: italic;
  color: var(--ink-soft);
}

#rsvpForm {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
}

/* floating-label fields */
.field {
  position: relative;
  flex: 1;
}
.field input,
.field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gold-line);
  padding: .85rem 2px .5rem;
  transition: border-color .3s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--olive);
}
.field label {
  position: absolute;
  left: 2px;
  top: .85rem;
  font-style: italic;
  color: var(--ink-soft);
  pointer-events: none;
  transition: transform .35s var(--ease-out), font-size .35s, color .35s, top .35s;
}
.field label i { font-size: .85em; }
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: -.55rem;
  font-size: .82rem;
  font-style: normal;
  font-family: var(--sc);
  letter-spacing: .18em;
  color: var(--gold);
}

/* attendance choice */
.attend {
  border: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.attend-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.attend-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  text-align: center;
  padding: 1.5rem 1rem 1.2rem;
  border: 1px solid var(--gold-line);
  border-radius: 5px;
  background: rgba(255, 253, 244, .55);
  cursor: pointer;
  transition: border-color .35s, background-color .35s, transform .35s var(--ease-out), box-shadow .35s;
  overflow: hidden;
}
.attend-card strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: .04em;
  color: var(--ink);
}
.attend-card em {
  font-size: .95rem;
  color: var(--ink-soft);
}
.attend-bloom { width: 38px; height: 38px; margin-bottom: .3rem; opacity: .9; }
.attend-sprig { width: 17px; height: 48px; margin-bottom: .3rem; opacity: .85; }
.attend-opt input:checked + .attend-card {
  border-color: var(--olive);
  background: linear-gradient(180deg, rgba(231, 236, 247, .8), rgba(231, 236, 247, .35));
  box-shadow: 0 10px 26px -14px rgba(103, 119, 159, .55), inset 0 0 0 1px var(--olive);
  transform: translateY(-2px);
}
.attend-opt input:focus-visible + .attend-card {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* accept-only block */
.accept-only {
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
  max-height: 460px;
  opacity: 1;
  transition: max-height .7s var(--ease-soft), opacity .55s ease .12s;
  overflow: hidden;
}
.accept-only.hidden-block {
  max-height: 0;
  opacity: 0;
  transition: max-height .6s var(--ease-soft) .05s, opacity .3s ease;
}

.event-pick {
  border: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.event-pick legend {
  font-family: var(--sc);
  font-size: .85rem;
  letter-spacing: .26em;
  color: var(--gold);
  margin-bottom: .8rem;
}
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  padding: .9rem .8rem .75rem;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 253, 244, .55);
  transition: border-color .35s, background-color .35s, box-shadow .35s, transform .35s var(--ease-out);
}
.chip strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}
.chip em {
  font-family: var(--sc);
  font-style: normal;
  font-size: .72rem;
  letter-spacing: .26em;
  color: var(--ink-soft);
}
.chip input:checked + span {
  border-color: var(--olive);
  background: linear-gradient(180deg, #EEF1F9, #E3E9F5);
  box-shadow: inset 0 0 0 1px var(--olive);
  transform: translateY(-2px);
}
.chip input:checked + span strong { color: var(--olive-deep); }
.chip input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.row {
  display: flex;
  gap: 2rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.stepper-field { display: flex; flex-direction: column; gap: .55rem; }
.stepper-label {
  font-family: var(--sc);
  font-size: .85rem;
  letter-spacing: .26em;
  color: var(--gold);
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
}
.step-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  background: transparent;
  color: var(--olive);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .3s, border-color .3s, transform .25s var(--ease-out);
}
.step-btn:hover {
  background: rgba(214, 194, 140, .2);
  border-color: var(--gold);
  transform: scale(1.08);
}
.step-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  min-width: 1.6ch;
  text-align: center;
  color: var(--olive-deep);
}

.form-error {
  display: none;
  text-align: center;
  font-style: italic;
  color: var(--rose-err);
  margin-top: -.4rem;
}
.form-error.show { display: block; }

.btn-submit {
  align-self: center;
  font-size: 1rem;
  padding: 1.05rem 3rem .95rem;
}

/* success state */
.rsvp-success {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .6rem;
  padding: 1.5rem 0 .5rem;
}
.success-seal {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 8px 14px rgba(70, 76, 40, .4));
}
.rsvp-success.stamp .success-seal {
  animation: stampIn .7s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes stampIn {
  0%   { opacity: 0; transform: scale(1.9) rotate(-14deg); }
  60%  { opacity: 1; transform: scale(.94) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}
.success-script {
  font-family: var(--script);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  color: var(--olive);
  line-height: 1.1;
  margin-top: .8rem;
}
.success-sub {
  font-style: italic;
  color: var(--ink-soft);
  max-width: 42ch;
}
.linkish {
  margin-top: 1.2rem;
  background: none;
  border: none;
  font-family: var(--sc);
  font-size: .85rem;
  letter-spacing: .26em;
  color: var(--gold);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}
.linkish:hover { color: var(--olive); border-bottom-color: var(--olive); }

.rsvp-phone {
  margin-top: 2.6rem;
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 2;
}
.rsvp-phone a {
  font-style: normal;
  font-family: var(--sc);
  font-size: .95rem;
  letter-spacing: .14em;
  color: var(--olive);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-line);
  transition: color .3s, border-color .3s;
}
.rsvp-phone a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.rsvp-phone .sep { margin: 0 .9rem; color: var(--peri); font-style: normal; }

/* ══════════════════ Footer ══════════════════ */

.footer {
  position: relative;
  z-index: 2;
  margin-top: 2rem;
  padding: 4rem 1.4rem 5rem;
  text-align: center;
  background: linear-gradient(180deg, #4A5230, #383F22);
  color: var(--cream);
}

.footer-garland {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1.6rem;
}
.fg-lav { width: 30px; height: auto; opacity: .9; }
.fg-lav.l1 { transform: rotate(-14deg); }
.fg-lav.l2 { transform: rotate(14deg) scaleX(-1); }
.fg-fmn { width: 26px; height: 26px; margin-bottom: 8px; }
.fg-bud { width: 24px; height: auto; margin-bottom: 4px; }
.fg-bud.b1 { transform: rotate(-10deg); }
.fg-bud.b2 { transform: rotate(10deg) scaleX(-1); }
.fg-rose { width: 72px; height: 72px; }

.footer-mono {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: .2em;
  color: var(--gold-3);
}
.footer-mono em {
  font-family: var(--script);
  font-style: normal;
  color: var(--gold-2);
}
.footer-line {
  font-family: var(--script);
  font-size: 1.7rem;
  color: #D8DDF0;
  margin: .5rem 0 1.1rem;
}
.footer-fine {
  font-family: var(--sc);
  font-size: .78rem;
  letter-spacing: .3em;
  color: rgba(248, 243, 230, .55);
}

/* burst canvas overlay */
#burstCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 80;
  pointer-events: none;
}

/* ══════════════════ Responsive ══════════════════ */

/* tablets — stack the event cards before they get cramped */
@media (max-width: 980px) {
  .event-grid { grid-template-columns: 1fr; max-width: 560px; }
  .event-divider { flex-direction: row; padding: 0 2rem; }
  .event-divider span { height: 1px; width: auto; background: linear-gradient(90deg, transparent, var(--gold-line), transparent); }
}

@media (max-width: 760px) {
  .timer { border-radius: 28px; flex-wrap: wrap; justify-content: center; gap: 1rem 1.4rem; }
  .t-dot { display: none; }
  .t-cell { min-width: 4.4rem; }
}

@media (max-width: 640px) {
  .spray { width: clamp(120px, 34vw, 170px); }
  .spray.bl, .spray.br { width: 110px; }
  .hero { padding-bottom: 8rem; padding-inline: 2.4rem; }
  .hero-content { margin-top: 1.5rem; }
  .attend { grid-template-columns: 1fr; }
  .event-pick { grid-template-columns: 1fr; }
  .row { flex-direction: column; align-items: stretch; gap: 1.7rem; }
  .quote { flex-direction: column; gap: 1.6rem; }
  .quote-sprig { width: 96px; }
  .quote-sprig.right { display: none; }
  .rsvp-corner { opacity: .4; }
  .rsvp-phone .sep { display: block; visibility: hidden; height: 0; }
  .page-frame { inset: 8px; }
  .page-frame::before { inset: 3px; }
  .nav { padding: .7rem 1rem; }
  .nav-links { gap: 1rem; }
}

/* short viewports (landscape phones) — compress the hero so nothing collides */
@media (max-height: 580px) {
  .hero { padding-top: 4.5rem; padding-bottom: 3rem; }
  .hero-content { margin-top: 0; }
  .crown-flow { display: none; }
  .arch { display: none; }
  .bismillah { font-size: 1.15rem; }
  .hero-motif { width: 90px; margin-bottom: .5rem; }
  .hosts { font-size: 1.15rem; margin-bottom: .4rem; }
  .invite-line { font-size: .92rem; margin-bottom: .9rem; }
  .invite-line br { display: none; }
  .names { gap: .08em; margin-bottom: .7rem; }
  .names .name { font-size: clamp(1.8rem, 7vh, 3rem); }
  .names .amp { font-size: 1.4rem; }
  .hero-flourish { width: 220px; margin-bottom: .5rem; }
  .date-strip { font-size: .85rem; margin-bottom: 1.2rem; }
  .scroll-cue { display: none; }
  .spray { width: clamp(100px, 16vw, 170px); }
  .side-col { display: none; }
}

/* ══════════════════ Reduced motion ══════════════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  .reveal, .hr-1, .hr-2, .hr-3, .hr-4, .hr-5,
  .hr-6, .hr-7, .hr-8, .hr-9, .hr-10 {
    opacity: 1;
    transform: none;
  }
  .arch-line { stroke-dashoffset: 0; }
  .crown-spray { opacity: 1; transform: none; }
  body.revealed .spray { opacity: .94; }
}
