/* ───────── Tokens ───────── */
:root {
  --bg: #FBF7F3;
  --bg-lilac: #F3ECF8;
  --bg-peach: #FCEFE8;
  --ink: #2F1D40;
  --ink-2: #5C4772;
  --muted: #8A7798;
  --lilac: #C9B6E4;
  --lilac-2: #E7DDF3;
  --peach: #F6BFA8;
  --coral: #E07A66;
  --gold: #C49A5C;
  --gold-2: #E6CB97;
  --line: rgba(47, 29, 64, .12);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 18px 40px -20px rgba(59, 35, 80, .45);
  --shadow-sm: 0 8px 22px -14px rgba(59, 35, 80, .45);
  color-scheme: light;
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100vh; height: 100svh; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

.wrap { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; text-align: center; position: relative; }

.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase;
  color: var(--coral);
}
.eyebrow.light { color: var(--gold-2); }
.title {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(40px, 11.5vw, 58px); line-height: 1.04; letter-spacing: -.015em;
  margin: .22em 0 .2em; font-variation-settings: 'opsz' 144;
}
.sub { color: var(--muted); font-size: 15px; margin: 0 auto; max-width: 30ch; }
.amp { font-family: var(--serif); font-style: italic; color: var(--coral); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ───────── Envelope intro ───────── */
.intro {
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .09 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  position: fixed; inset: 0; z-index: 100; overflow: hidden; touch-action: none;
  display: flex; align-items: center; justify-content: center;
  /* same deep plum night sky as the closing scene */
  background: linear-gradient(180deg, #2B1A3D 0%, #22142F 100%);
  transition: opacity 1s ease, visibility 1s;
}
.intro.gone { opacity: 0; visibility: hidden; }

/* Backdrop: twinkling stars (same style as the ending) */
.intro-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.stage, .intro-top, .env-hint, .tc-continue { z-index: 2; }
.intro-top {
  position: absolute; left: 0; right: 0; top: calc(11vh + env(safe-area-inset-top)); text-align: center;
  transition: opacity .6s ease;
}
.intro.open .intro-top { opacity: 0; }

/* Shree Ganesh medallion: top-right through the story and envelope, gone once the seal is tapped */
.intro-ganesh {
  position: absolute; z-index: 8; pointer-events: none;
  top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right));
  width: 50px; height: 50px; overflow: visible;
  filter: drop-shadow(0 0 5px rgba(246, 223, 169, .45));
  opacity: 0; animation: ganeshIn 1.6s ease .4s forwards;
  transition: opacity .6s ease, transform .6s ease;
}
@keyframes ganeshIn { from { opacity: 0; transform: scale(.85); } to { opacity: .95; transform: none; } }
.intro.open .intro-ganesh { animation: ganeshOut .7s ease forwards; }
@keyframes ganeshOut { from { opacity: .95; transform: none; } to { opacity: 0; transform: scale(.9); } }
.lite .intro-ganesh { filter: none; }
/* …and the same Ganesh at the head of the invitation card, in a deeper gold that reads on paper */
.card-ganesh { --gn: url(#gnGoldDeep); display: block; width: 46px; height: 46px; margin: 2px auto 6px; overflow: visible; }
.card-mantra {
  margin: 0 0 12px; text-align: center;
  font-family: 'Tiro Devanagari Hindi', 'Noto Serif Devanagari', 'Mangal', serif;
  font-size: 18px; line-height: 1.4; letter-spacing: .02em; color: #A97B3C;
}

/* Envelope */
.stage { position: relative; display: grid; place-items: center; }
.card-glow {
  position: absolute; width: 150vmin; height: 150vmin; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(246, 223, 169, .42) 0%, rgba(246, 191, 168, .12) 35%, transparent 62%);
  opacity: 0; transform: scale(.4); transition: opacity 1.2s ease, transform 1.8s cubic-bezier(.2, .8, .2, 1);
}
.intro.out .card-glow { opacity: 1; transform: scale(1); }
.env {
  position: relative; width: min(84vw, 360px); aspect-ratio: 1.5;
  perspective: 1400px; cursor: pointer;
  animation: envFloat 4.5s ease-in-out infinite;
}
.intro.open .env { animation: none; cursor: default; }
@keyframes envFloat { 0%, 100% { transform: translateY(0) rotate(-.7deg); } 50% { transform: translateY(-9px) rotate(.7deg); } }
.env-part { position: absolute; inset: 0; }
.env-back {
  z-index: 0; border-radius: 10px; overflow: hidden;
  background: var(--grain), linear-gradient(160deg, #D7C4EE, #BEA3E0);
  box-shadow: 0 34px 60px -22px rgba(0, 0, 0, .65);
}
.env-liner {
  position: absolute; inset: 5% 5% 34% 5%; border-radius: 6px;
  background: radial-gradient(#D4AE72 1.4px, transparent 1.9px) 0 0 / 14px 14px, #F6E3E6;
}
.env-flap {
  bottom: auto; height: 62%; z-index: 3;
  transform-origin: 50% 0; transform-style: preserve-3d;
  transition: transform .85s cubic-bezier(.45, .05, .25, 1), z-index 0s .42s, opacity .7s ease;
}
.env-flap svg { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flap-in { transform: rotateX(180deg); }
.env-front { z-index: 2; border-radius: 10px; overflow: hidden; }
.env-front svg { display: block; width: 100%; height: 100%; }

/* Wax seal */
.env-wax {
  position: absolute; left: 50%; top: 58%; z-index: 4; width: 86px; height: 86px; margin: -43px 0 0 -43px;
  border: 0; padding: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 7px 9px rgba(70, 16, 8, .45));
}
.env-wax::before {
  content: ''; position: absolute; inset: -9px; border-radius: 50%;
  border: 1.5px solid rgba(246, 191, 168, .65); animation: ring 2.2s ease-out infinite;
}
.wax-half { position: absolute; inset: 0; display: block; transition: transform .95s cubic-bezier(.5, 0, .75, 0), opacity .7s ease .25s; }
.wax-half svg { display: block; width: 100%; height: 100%; }
.wax-l { clip-path: polygon(0 0, 52% 0, 46% 20%, 55% 38%, 46% 58%, 54% 78%, 49% 100%, 0 100%); }
.wax-r { clip-path: polygon(52% 0, 100% 0, 100% 100%, 49% 100%, 54% 78%, 46% 58%, 55% 38%, 46% 20%); }
.intro.crack .env-wax { animation: waxShake .28s ease-in-out; }
.intro.crack .env-wax::before { display: none; }
@keyframes waxShake { 25% { transform: rotate(-7deg) scale(1.05); } 50% { transform: rotate(6deg) scale(1.05); } 75% { transform: rotate(-3deg); } }
.intro.split .wax-l { transform: translate(-36px, 170px) rotate(-40deg); opacity: 0; }
.intro.split .wax-r { transform: translate(36px, 180px) rotate(44deg); opacity: 0; }

/* The card: tucked inside → rises out → takes centre stage */
.title-card {
  position: absolute; left: 50%; top: 0; z-index: 1;
  width: min(80vw, 330px); padding: 10px; border-radius: 4px;
  background: #FFFCF8 var(--grain);
  box-shadow: 0 30px 60px -26px rgba(0, 0, 0, .6), 0 2px 6px rgba(59, 35, 80, .1);
  transform-origin: 50% 0;
  transform: translate(-50%, var(--y-in, 14px)) scale(var(--s-in, .86));
  clip-path: inset(0 0 var(--clip-in, 60%) 0);
  transition: transform 1s cubic-bezier(.3, .8, .25, 1), clip-path 1s cubic-bezier(.3, .8, .25, 1);
}
.intro.flap .env-flap { transform: rotateX(180deg); z-index: 0; }
.intro.rise .title-card { transform: translate(-50%, var(--y-rise)) scale(var(--s-in, .86)); clip-path: inset(0 0 0 0); }
.intro.out .env-part, .intro.out .env-wax {
  opacity: 0; transition: transform 1s cubic-bezier(.5, 0, .75, 0), opacity .7s ease .25s;
}
.intro.out .env-back, .intro.out .env-front { transform: translateY(65vh) rotate(5deg); }
.intro.out .env-flap { transform: translateY(65vh) rotate(5deg) rotateX(180deg); }
.intro.out .title-card {
  z-index: 5; transform: translate(-50%, var(--y-out)) scale(1);
  box-shadow: 0 0 60px rgba(246, 223, 169, .35), 0 30px 60px -26px rgba(0, 0, 0, .6);
  transition: transform 1.15s cubic-bezier(.3, .8, .25, 1) .12s, box-shadow 1.2s ease;
}

.env-hint {
  position: absolute; left: 0; right: 0; bottom: calc(15vh + env(safe-area-inset-bottom)); margin: 0; text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: rgba(255, 255, 255, .82);
  animation: pulse 2s ease-in-out infinite; transition: opacity .3s;
}
.intro.open .env-hint { opacity: 0; animation: none; }

/* ───────── Prelude: story lines, then a burst of lights ───────── */
.story { position: absolute; inset: 0; z-index: 6; transition: opacity .8s ease; }
.intro.lighting .story, .intro:not(.prelude) .story { opacity: 0; pointer-events: none; }
.story-line {
  position: absolute; left: 28px; right: 28px; top: 46%; margin: 0; text-align: center;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(25px, 7vw, 34px); line-height: 1.32; color: #FFF3E6;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(calc(-50% + 34px)); filter: blur(6px);
  transition: opacity .9s ease, transform 1s cubic-bezier(.2, .8, .2, 1), filter .9s ease;
}
.story-line.on { opacity: 1; transform: translateY(-50%); filter: blur(0); }
.story-line.past { opacity: 0; transform: translateY(calc(-50% - 44px)); filter: blur(6px); }
.story-line em { color: #F6DFA9; }
.story-line.first { font-size: clamp(36px, 10.5vw, 48px); color: #F6DFA9; }
.story-dots {
  position: absolute; left: 0; right: 0; bottom: calc(21vh + env(safe-area-inset-bottom));
  display: flex; justify-content: center; gap: 6px;
}
.story-dots span { width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .25); transition: width .4s, background .4s; }
.story-dots span.on { width: 18px; background: #F6DFA9; }
.story-hint {
  position: absolute; left: 0; right: 0; bottom: calc(8vh + env(safe-area-inset-bottom));
  display: flex; flex-direction: column-reverse; align-items: center; gap: 12px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: rgba(255, 255, 255, .72);
  transition: opacity .5s ease;
}
.story-hint span {
  width: 12px; height: 12px; border-left: 1.5px solid currentColor; border-top: 1.5px solid currentColor;
  animation: hintUp 1.6s ease-in-out infinite;
}
@keyframes hintUp { 0%, 100% { transform: translateY(5px) rotate(45deg); opacity: .4; } 50% { transform: translateY(-4px) rotate(45deg); opacity: 1; } }
.lights { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 7; pointer-events: none; }

/* Envelope stays hidden during the prelude, then rises out of the glow */
.stage { transition: opacity 1.3s ease, transform 1.6s cubic-bezier(.2, .8, .2, 1); }
.intro.prelude .stage { opacity: 0; transform: scale(.94); pointer-events: none; }
/* The envelope arrives wrapped in a golden halo that slowly dims */
.env { filter: drop-shadow(0 0 0 rgba(255, 214, 150, 0)); transition: filter 2s ease; }
.intro.glowing .env { filter: drop-shadow(0 0 26px rgba(255, 214, 150, .85)); transition: filter .6s ease; }
.intro.prelude .intro-top, .intro.prelude .env-hint { opacity: 0; animation: none; }
.tc-frame {
  position: relative; text-align: center; padding: 22px 16px 26px;
  border: 1px solid var(--gold-2);
}
.tc-frame::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(196, 154, 92, .35); pointer-events: none; }
.tc-art { width: 150px; display: block; margin: 0 auto 6px; }
.tc-names {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(42px, 12.5vw, 56px); line-height: .98; letter-spacing: -.02em;
  margin: 12px 0 6px; display: flex; flex-direction: column; align-items: center;
  font-variation-settings: 'opsz' 144;
}
.tc-names .amp { font-size: .5em; line-height: 1.25; }
.tc-line { margin: 0; color: var(--ink-2); font-size: 15px; }
.tc-rule { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 11px; margin: 14px auto 10px; max-width: 200px; }
.tc-rule span { flex: 1; height: 1px; background: var(--gold-2); }
.tc-date { font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--coral); }
.tc-continue {
  position: absolute; left: 50%; bottom: calc(5vh + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: none; border: 0; min-height: 48px; padding: 8px 16px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: rgba(255, 255, 255, .85);
  display: flex; flex-direction: column; align-items: center; gap: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .7s ease;
}
.tc-continue span { width: 1px; height: 26px; background: linear-gradient(rgba(255, 255, 255, .85), transparent); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
.intro.ready .tc-continue { opacity: 1; pointer-events: auto; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* ───────── Hero ───────── */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 64px 20px 48px; text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(60% 40% at 12% 12%, rgba(201, 182, 228, .55), transparent 70%),
    radial-gradient(55% 38% at 92% 32%, rgba(246, 191, 168, .5), transparent 70%),
    radial-gradient(80% 45% at 50% 105%, rgba(231, 221, 243, .9), transparent 70%),
    var(--bg);
}
.h-item { opacity: 0; transform: translateY(22px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i) * 140ms + 200ms); }
.hero.in .h-item { opacity: 1; transform: none; }
.arch {
  width: min(62vw, 260px); aspect-ratio: 3 / 4; margin: 18px 0 10px;
  border-radius: 999px 999px 24px 24px; overflow: hidden;
  border: 6px solid #fff; outline: 1px solid var(--gold-2); outline-offset: 7px;
  box-shadow: var(--shadow); background: var(--lilac-2);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.hero-names {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(48px, 15vw, 76px); line-height: .98; letter-spacing: -.02em; margin: 14px 0 4px;
  display: flex; flex-direction: column; align-items: center;
  font-variation-settings: 'opsz' 144;
}
.hero-names .amp { font-size: .55em; line-height: 1.2; }
.hero-line { margin: 4px 0 0; font-size: 17px; color: var(--ink-2); }
.hero-date { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--coral); }

.scroll-cue {
  margin-top: 26px; font-size: 10px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(var(--muted), transparent); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -40px; left: var(--l);
  width: var(--s); height: calc(var(--s) * 1.25);
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, var(--peach), var(--lilac));
  opacity: .65; will-change: transform;
  animation: fall var(--d) linear var(--delay) infinite;
}
@keyframes fall {
  0% { transform: translate3d(0, -5vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--x), 108vh, 0) rotate(520deg); }
}

/* ───────── Scratch card ───────── */
.scratch-sec { background: linear-gradient(180deg, var(--bg), var(--bg-peach)); padding-bottom: 72px; }
.scratch-wrap {
  position: relative; width: min(74vw, 300px); aspect-ratio: 3 / 4; margin: 30px auto 0;
  border-radius: 999px 999px 30px 30px; padding: 10px;
  background: linear-gradient(145deg, #F1DCB0, var(--gold) 45%, #F3E0B8 70%, var(--gold));
  box-shadow: var(--shadow);
}
.scratch-inner {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 999px 999px 22px 22px;
  background: radial-gradient(90% 60% at 50% 30%, #fff, #FBF1F6);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 14px;
}
.sd-eyebrow { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--coral); }
.sd-day { font-family: var(--serif); font-size: clamp(76px, 24vw, 104px); line-height: 1; font-weight: 300; margin: 2px 0; font-variation-settings: 'opsz' 144; }
.sd-month { font-size: 13px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.sd-week { font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.sd-city { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); margin-top: 14px; }
.scratch-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: grab; transition: opacity .8s ease;
}
.scratch-canvas.done { opacity: 0; pointer-events: none; }
.scratch-hint { font-family: var(--serif); font-style: italic; font-size: 17px; margin: 22px 0 4px; color: var(--ink-2); transition: opacity .4s; }
.link-btn { background: none; border: 0; padding: 10px; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.cue-dark { margin-top: 18px; color: var(--ink-2); }
.cue-dark span { background: linear-gradient(var(--ink-2), transparent); }

/* ───────── Invitation ───────── */
.invite-sec { background: var(--bg-peach); padding-top: 40px; }
.invite-card {
  background: #fff; border-radius: 30px; padding: 44px 24px 40px; position: relative;
  box-shadow: var(--shadow);
}
.invite-card::before {
  content: ''; position: absolute; inset: 10px; border-radius: 22px;
  border: 1px solid var(--gold-2); pointer-events: none;
}
.invite-intro { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.5; color: var(--ink-2); margin: 0 auto 8px; max-width: 28ch; }
.invite-name { font-family: var(--serif); font-style: italic; font-size: clamp(46px, 14vw, 62px); line-height: 1.05; margin: 18px 0 6px; font-variation-settings: 'opsz' 144; }
.rel { font-size: 10.5px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--coral); }
.parents { font-size: 15px; color: var(--ink-2); margin-top: 2px; }
.rings-divider { display: flex; align-items: center; gap: 12px; color: var(--gold); margin: 26px 0 4px; }
.rings-divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-2)); }
.rings-divider span:last-child { background: linear-gradient(90deg, var(--gold-2), transparent); }
.invite-closing { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); margin: 34px 0 6px; }
.invite-sign { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin: 0; }

/* ───────── Carousel ───────── */
.story-sec { background: linear-gradient(180deg, var(--bg-peach), var(--bg-lilac)); }
.carousel { margin-top: 30px; }
.track {
  position: relative;
  display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 10px calc(50% - min(35vw, 140px)) 20px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 min(70vw, 280px); scroll-snap-align: center; margin: 0; }
.slide .ph {
  aspect-ratio: 3 / 4; border-radius: 999px 999px 22px 22px; overflow: hidden;
  border: 5px solid #fff; box-shadow: var(--shadow-sm); background: var(--lilac-2);
  transform: scale(.88); opacity: .55; transition: transform .5s ease, opacity .5s ease;
}
.slide.active .ph { transform: none; opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide figcaption { font-family: var(--serif); font-style: italic; font-size: 17px; margin-top: 12px; color: var(--ink-2); opacity: 0; transition: opacity .4s; }
.slide.active figcaption { opacity: 1; }
.car-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 4px; }
.car-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: opacity .3s, transform .2s;
}
.car-btn:active { transform: scale(.94); }
.car-btn:disabled { opacity: .35; cursor: default; }
.dots, .ldots { display: flex; gap: 6px; align-items: center; }
.dots button { width: 24px; height: 24px; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.dots button::after { content: ''; width: 7px; height: 7px; border-radius: 99px; background: var(--lilac); transition: width .3s, background .3s; }
.dots button.on::after { width: 20px; background: var(--ink); }

/* ───────── Event ───────── */
.event-sec { background: var(--bg-lilac); }
/* Ring slider */
.ring-slider { margin: 26px auto 0; max-width: 360px; }
.rs-label { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-2); margin: 0 0 12px; transition: color .4s; }
.ring-slider.done .rs-label { color: var(--coral); }
.rs-track {
  position: relative; height: 72px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1px rgba(196, 154, 92, .35), var(--shadow-sm);
  overflow: hidden;
}
.rs-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 72px; border-radius: 999px;
  background: linear-gradient(90deg, var(--lilac-2), #F8DCCF);
}
.rs-finger { position: absolute; right: 22px; bottom: -6px; width: 30px; height: 60px; }
.rs-knob {
  position: absolute; left: 4px; top: 4px; width: 64px; height: 64px; border-radius: 50%;
  border: 0; padding: 0; background: radial-gradient(circle at 40% 35%, #fff, #F1E8FA);
  box-shadow: 0 6px 14px -4px rgba(59, 35, 80, .45);
  display: grid; place-items: center; touch-action: none; cursor: grab; z-index: 2;
}
.rs-knob svg { width: 48px; height: 48px; }
.rs-knob.snap { transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.ring-slider:not(.touched) .rs-knob { animation: nudge 2.4s ease-in-out infinite 1s; }
.ring-slider.done .rs-knob { background: transparent; box-shadow: none; cursor: default; }
@keyframes nudge { 0%, 70%, 100% { transform: translateX(0); } 80% { transform: translateX(14px); } 90% { transform: translateX(0); } }

/* Event details card */
.event-card {
  position: relative; margin-top: 22px;
  background: linear-gradient(170deg, #fff 40%, #FDF4EF); border-radius: 30px;
  padding: 32px 22px 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center;
}
.venue-label { margin-top: 22px; }
.event-tag { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--ink-2); margin: 0 auto; max-width: 24ch; }
.when { margin: 20px 0 6px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); width: 100%; max-width: 280px; }
.when-date { font-family: var(--serif); font-size: 22px; line-height: 1.25; }
.when-time { font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--coral); margin-top: 6px; }
.venue-name { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.15; margin-top: 8px; }
.venue-addr { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--ink); background: transparent; transition: transform .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: #fff; }

/* ───────── Guessing game ───────── */
.guess-sec { background: linear-gradient(180deg, var(--bg-lilac), var(--bg)); }
.letter {
  background: #FFFDF9; border-radius: 10px; padding: 36px 20px 26px; margin-top: 30px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.letter::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 7px;
  background: repeating-linear-gradient(135deg, var(--coral) 0 10px, transparent 10px 18px, var(--lilac) 18px 28px, transparent 28px 36px);
}
.letter.swap > * { opacity: 0; transform: translateX(-18px); }
.letter > * { transition: opacity .25s, transform .25s; }
.l-num { font-size: 10.5px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.q { font-family: var(--serif); font-size: clamp(24px, 7vw, 30px); line-height: 1.22; margin: 14px auto 26px; max-width: 18ch; }
.seals { display: flex; justify-content: center; gap: 10px; }
.gseal { width: 88px; background: none; border: 0; padding: 4px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: opacity .3s; }
.gseal .wax {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-size: 25px; color: #fff;
  background: radial-gradient(circle at 34% 30%, var(--c1), var(--c2));
  box-shadow: 0 6px 12px -4px rgba(59, 35, 80, .45), inset 0 -4px 8px rgba(0, 0, 0, .18), inset 0 3px 6px rgba(255, 255, 255, .35);
  transition: transform .2s;
}
.gseal:active .wax { transform: scale(.92); }
.gseal .gl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gseal.dim { opacity: .4; }
.gseal.picked .wax { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c2), 0 8px 16px -4px rgba(59, 35, 80, .5); }
.gseal .wax.stamp { animation: stamp .5s cubic-bezier(.3, 1.6, .5, 1); }
.gseal.correct { opacity: 1; }
.gseal.correct .wax { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #2E9B6C, 0 8px 16px -4px rgba(59, 35, 80, .5); }
.gseal.correct .gl::after { content: ' ✓'; color: #2E9B6C; }
.gseal.wrong .wax { filter: grayscale(.5); }
.gseal:disabled { cursor: default; }
.ldots span.right { background: #2E9B6C; }
.ldots span.wrong { background: var(--coral); }
.letter.shake { animation: shake .45s; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes stamp { 0% { transform: scale(1.5) rotate(-12deg); } 60% { transform: scale(.92) rotate(3deg); } 100% { transform: none; } }
.pick-note { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); margin: 20px 0 0; }
.pick-note b { color: var(--coral); font-weight: 500; }
.letter-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.nav-btn { background: none; border: 0; min-height: 44px; min-width: 72px; font-size: 14px; font-weight: 600; color: var(--ink); }
.nav-btn:disabled { opacity: .3; }
.ldots span { width: 7px; height: 7px; border-radius: 99px; background: var(--lilac); transition: background .3s, width .3s; }
.ldots span.on { width: 18px; background: var(--ink); }
.ldots span.done { background: var(--coral); }
.guess-done { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--coral); margin: 18px 0 0; }

/* ───────── RSVP ───────── */
.rsvp-sec { background: var(--bg); }
.contacts { display: grid; gap: 14px; margin-top: 28px; }
.contact {
  background: #fff; border-radius: 24px; padding: 20px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; text-align: left;
}
.contact .nm { font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.15; }
.contact .rl { font-size: 10.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--coral); }
.contact .num { grid-column: 1 / -1; font-size: 16px; color: var(--ink-2); margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.contact .call {
  grid-row: 1 / 3; grid-column: 2; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-lilac); color: var(--ink); text-decoration: none;
}
.contact .acts { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 14px; }
.chip {
  flex: 1; min-height: 46px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-decoration: none;
}
.chip.wa { background: #1F7A55; border-color: #1F7A55; color: #fff; }
.chip:active { transform: scale(.97); }

/* ───────── Countdown ───────── */
.countdown-sec {
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(201, 182, 228, .25), transparent 70%),
    linear-gradient(180deg, #2F1D40, #47305F);
  color: #fff; padding-top: 0; overflow: hidden;
}
.countdown-sec .title { color: #fff; }
.lanterns { display: flex; justify-content: center; gap: 30px; height: 170px; margin-bottom: 18px; }
.lantern { background: none; border: 0; padding: 0; transform-origin: 50% 0; display: block; }
.lantern:nth-child(2) { margin-top: 16px; }
.lantern .sway { display: block; transform-origin: 50% 0; animation: sway 4.5s ease-in-out infinite alternate; }
.lantern:nth-child(2) .sway { animation-delay: -1.5s; }
.lantern:nth-child(3) .sway { animation-delay: -3s; }
.lantern.swing { animation: swing 2.4s ease-out; }
.lantern svg { display: block; filter: drop-shadow(0 0 16px rgba(246, 191, 168, .55)); }
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes swing { 0% { transform: rotate(0); } 12% { transform: rotate(24deg); } 32% { transform: rotate(-17deg); } 52% { transform: rotate(10deg); } 72% { transform: rotate(-5deg); } 88% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 22px; }
.cd-box { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; padding: 14px 2px 12px; }
.cd-num { font-family: var(--serif); font-size: clamp(28px, 9vw, 40px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); margin-top: 4px; }
.cd-note { font-family: var(--serif); font-style: italic; color: rgba(255, 255, 255, .7); margin: 22px 0 0; }
.bless { margin-top: 44px; padding-top: 34px; border-top: 1px solid rgba(255, 255, 255, .12); }
.bless-btn {
  min-height: 54px; padding: 0 30px; border-radius: 999px; border: 0;
  background: linear-gradient(135deg, var(--peach), #F3A3B5 50%, var(--lilac));
  color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: .04em;
  box-shadow: 0 10px 30px -10px rgba(246, 191, 168, .8);
  transition: transform .15s;
}
.bless-btn:active { transform: scale(.95); }
.bless-btn span { display: inline-block; margin-right: 6px; }
.bless-btn.pulse span { animation: bloom .6s; }
@keyframes bloom { 50% { transform: scale(1.5) rotate(40deg); } }
.bless-count { font-family: var(--serif); font-style: italic; color: rgba(255, 255, 255, .72); margin: 14px 0 0; min-height: 1.6em; }

/* ───────── Footer ───────── */
.footer {
  background: linear-gradient(180deg, #47305F, #2A1939); color: #fff; text-align: center;
  margin-top: -1px;
  padding: 20px 0 calc(110px + env(safe-area-inset-bottom));
}
.foot-mono {
  width: 76px; height: 76px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--gold-2);
  font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--gold-2);
}
.foot-names { font-family: var(--serif); font-style: italic; font-size: 40px; margin-top: 16px; line-height: 1.1; }
.foot-date { font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-2); margin-top: 10px; }
.foot-line { font-family: var(--serif); font-style: italic; color: rgba(255, 255, 255, .7); margin: 14px 0 0; }

/* ───────── Floating UI ───────── */
.music-btn {
  position: fixed; z-index: 60;
  right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom));
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; gap: 3px;
  opacity: 0; transform: scale(.6); pointer-events: none; transition: opacity .5s, transform .5s;
}
.music-btn.show { opacity: 1; transform: none; pointer-events: auto; }
.music-btn i { width: 3px; height: 16px; border-radius: 2px; background: var(--ink); transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.music-btn i:nth-child(2) { animation-delay: -.3s; }
.music-btn i:nth-child(3) { animation-delay: -.6s; }
.music-btn i:nth-child(4) { animation-delay: -.15s; }
.music-btn.muted i { animation: none; transform: scaleY(.25); }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 90; pointer-events: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 95;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ───────── Larger screens ───────── */
@media (min-width: 760px) {
  .section { padding: 110px 0; }
  .hero { padding-top: 80px; }
}

/* ───────── Reduced motion ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .petals { display: none; }
}

/* ───────── Scroll journey: day → night sky ───────── */
body { background: #F3ECF8; }
.sky { position: fixed; inset: 0; z-index: -1; background: #F3ECF8; pointer-events: none; }
.sky-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 45% at 85% 8%, rgba(255, 255, 255, .6), transparent 70%),
    radial-gradient(60% 40% at 8% 92%, rgba(255, 255, 255, .35), transparent 70%);
}
.stars { position: absolute; inset: 0; opacity: 0; }
.star {
  position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, .85);
  animation: twinkle var(--t) ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .2; } to { opacity: 1; } }

/* Sections let the sky show through */
.scratch-sec, .invite-sec, .story-sec, .event-sec, .guess-sec, .rsvp-sec, .countdown-sec, .footer { background: transparent; }
.hero {
  background:
    radial-gradient(60% 40% at 12% 12%, rgba(201, 182, 228, .45), transparent 70%),
    radial-gradient(55% 38% at 92% 32%, rgba(246, 191, 168, .4), transparent 70%);
}
.invite-sec { padding-top: 88px; }

/* ───────── Gold thread ───────── */
main { position: relative; }
.section > .wrap, .footer > .wrap { position: relative; z-index: 1; }
.thread { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; overflow: visible; }
.thread-base { fill: none; stroke: rgba(196, 154, 92, .22); stroke-width: 1.2; stroke-dasharray: 2 7; stroke-linecap: round; }
.thread-line { fill: none; stroke: #C49A5C; stroke-width: 1.8; stroke-linecap: round; }
.thread-tip { fill: #F6DFA9; filter: drop-shadow(0 0 5px rgba(246, 223, 169, .95)); transition: opacity .3s; }
.knot .k-halo { fill: rgba(246, 223, 169, .0); transition: fill .5s; }
.knot .k-out { fill: #FFF9F0; stroke: rgba(196, 154, 92, .5); stroke-width: 1.4; transition: stroke .4s; }
.knot .k-in { fill: #C49A5C; opacity: .25; transition: opacity .4s; }
.knot .k-out, .knot .k-halo { transform-box: fill-box; transform-origin: center; }
.knot.lit .k-out { stroke: #C49A5C; animation: knotPop .6s cubic-bezier(.3, 1.6, .5, 1); }
.knot.lit .k-in { opacity: 1; }
.knot.lit .k-halo { fill: rgba(246, 223, 169, .35); animation: halo 2.6s ease-in-out infinite; }
@keyframes knotPop { 0% { transform: scale(1); } 45% { transform: scale(1.6); } 100% { transform: scale(1); } }
@keyframes halo { 0%, 100% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1.2); opacity: 1; } }


/* ───────── Photo stack ───────── */
.stack-wrap { margin-top: 30px; }
.stack { position: relative; width: min(72vw, 290px); aspect-ratio: 29 / 38; margin: 0 auto; }
.pcard {
  position: absolute; inset: 0; margin: 0;
  background: #FFFDF9; padding: 10px 10px 0; border-radius: 6px;
  box-shadow: 0 18px 34px -18px rgba(59, 35, 80, .55), 0 1px 3px rgba(59, 35, 80, .12);
  display: flex; flex-direction: column;
  transition: transform .5s cubic-bezier(.3, 1.25, .5, 1), opacity .3s;
  touch-action: pan-y; -webkit-user-select: none; user-select: none;
}
.pcard.top { cursor: grab; }
.pcard.dragging { transition: none; cursor: grabbing; }
.pcard .pc-ph { flex: 1; min-height: 0; overflow: hidden; border-radius: 3px; }
.pcard img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pcard figcaption { height: 52px; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-2); }
.stack-ui { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: min(72vw, 290px); margin: 30px auto 0; }
.stack-count { font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 44px; text-align: left; }
.stack-hint { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); }
.stack-next {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-sm); flex: none;
}
.stack-next:active { transform: scale(.94); }

/* ───────── Walking couple on the thread ───────── */
.walker .w-flip { transition: transform .25s ease; }
.thread.walking .w-bob { animation: wbob .3s ease-in-out infinite alternate; }
@keyframes wbob { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-2px) rotate(4deg); } }
.mh { opacity: 0; transform-box: fill-box; transform-origin: center; }
.thread.met .mh { opacity: 1; animation: heartPop .7s cubic-bezier(.3, 1.6, .5, 1), heartFloat 2.4s ease-in-out .7s infinite; }
@keyframes heartPop { 0% { transform: scale(0); } 100% { transform: scale(1.4); } }
@keyframes heartFloat { 0%, 100% { transform: scale(1.4) translateY(0); } 50% { transform: scale(1.55) translateY(-4px); } }

/* ───────── Mehndi hidden-name hunt ───────── */
.mehndi-intro { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.45; color: var(--ink-2); max-width: 28ch; margin: 4px auto 0; }
.mehndi { position: relative; width: min(78vw, 310px); margin: 22px auto 0; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.mehndi svg { display: block; width: 100%; height: auto; overflow: visible; }
.mehndi .skin { filter: url(#handEdge) drop-shadow(0 18px 22px rgba(59, 35, 80, .2)); }
.mehndi .h {
  fill: none; stroke: #8E3F22; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400);
  transition: stroke-dashoffset 1.6s ease var(--d, 0s);
}
.mehndi:not(.ready) .h { opacity: 0; }
.mehndi.drawn .h { stroke-dashoffset: 0; }
.mehndi .hf { opacity: 0; transition: opacity .9s ease var(--d, 0s); }
.mehndi.drawn .hf { opacity: 1; }
.mehndi .hfill { fill: #8E3F22; }
.mehndi .hdots { fill: none; stroke: #8E3F22; stroke-width: 3; stroke-dasharray: .1 8; stroke-linecap: round; }
#hiddenName { font-family: var(--serif); font-style: italic; font-size: 13px; letter-spacing: .3px; fill: #8E3F22; transition: fill .5s; }
.mehndi .nz {
  opacity: 0; transform: scale(.5); pointer-events: none;
  transform-box: fill-box; transform-origin: center;
  transition: opacity .22s ease, transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.mehndi .nz.show { opacity: 1; transform: scale(1); pointer-events: auto; cursor: pointer; }
#nameRing { fill: rgba(246, 223, 169, .35); stroke: #C49A5C; stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center; }
.mehndi.found #hiddenName { fill: #B67A1C; }
.mehndi.found #nameRing { opacity: 1; animation: ringIn .7s cubic-bezier(.3, 1.6, .5, 1); }
.mehndi.found { cursor: default; }
@keyframes ringIn { from { transform: scale(2.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mehndi-ping {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  border: 2px solid var(--coral); opacity: 0; pointer-events: none;
}
.mehndi-ping.go { animation: ping .6s ease-out; }
@keyframes ping { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.mehndi-status { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); margin: 20px 0 0; min-height: 1.6em; }
.mehndi-status.win { color: var(--coral); }

/* ───────── Scratch card polish ───────── */
.scratch-wrap {
  padding: 7px;
  background: linear-gradient(145deg, #F4E3BE, #C49A5C 30%, #F6E7C6 52%, #B8894A 78%, #EBD3A2);
  box-shadow: 0 30px 50px -26px rgba(59, 35, 80, .55), 0 0 0 1px rgba(196, 154, 92, .35);
}
.scratch-wrap::before {
  content: ''; position: absolute; inset: -10px; pointer-events: none;
  border-radius: 999px 999px 38px 38px; border: 1px solid rgba(196, 154, 92, .45);
}
.scratch-wrap, .scratch-wrap * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.scratch-wrap.idle.in { animation: floaty 4.5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: rotate(-1.2deg) translateY(0); } 50% { transform: rotate(1.2deg) translateY(-6px); } }
.scratch-inner {
  border-radius: 999px 999px 24px 24px;
  background:
    radial-gradient(rgba(196, 154, 92, .16) 1px, transparent 1.5px) 0 0 / 14px 14px,
    radial-gradient(90% 60% at 50% 32%, #FFFDF8, #FBEFF3);
}
.scratch-inner::after {
  content: ''; position: absolute; inset: -20%; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .9) 50%, transparent 60%);
  transform: translateX(-120%);
}
.scratch-wrap.revealed .scratch-inner::after { animation: shine 1.4s ease .5s; }
@keyframes shine { to { transform: translateX(120%); } }
.sd-eyebrow { font-size: 24px; }
.sd-month { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.sd-month::before, .sd-month::after { content: ''; width: 22px; height: 1px; background: var(--gold); }

/* Animated fingertip showing guests how to scratch */
.swipe-hint {
  position: absolute; z-index: 5; left: 0; top: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 30%, rgba(255, 255, 255, .35) 62%, transparent 70%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .6), 0 4px 12px rgba(59, 35, 80, .25);
  opacity: 0;
}
.scratch-wrap.idle.in .swipe-hint { animation: swipeHint 3.2s ease-in-out 1s infinite; }
@keyframes swipeHint {
  0% { left: 28%; top: 62%; opacity: 0; }
  10% { opacity: 1; }
  35% { left: 72%; top: 48%; }
  60% { left: 30%; top: 38%; }
  85% { left: 70%; top: 28%; opacity: 1; }
  100% { left: 70%; top: 28%; opacity: 0; }
}

/* ───────── Closing envelope (scroll-driven) ───────── */
.closing { position: relative; height: 190vh; color: #fff; }
.closing-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px;
  padding: 24px 24px calc(70px + env(safe-area-inset-bottom));
}
.cl-env { position: relative; width: min(76vw, 320px); aspect-ratio: 1.45; perspective: 1200px; filter: drop-shadow(0 24px 34px rgba(0, 0, 0, .35)); }
.cl-back {
  position: absolute; inset: 0; z-index: 0; border-radius: 12px; overflow: hidden;
  background: linear-gradient(160deg, #D7C4EE, #BEA3E0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.cl-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 62%; z-index: 0;
  transform-origin: 50% 0; transform: rotateX(180deg); transform-style: preserve-3d; will-change: transform;
}
.cl-flap svg { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cl-card {
  position: absolute; left: 7%; right: 7%; top: 6%; height: 88%; z-index: 1;
  background: #FFFCF8; border-radius: 8px; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding-top: 9%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  transform: translateY(-78%); will-change: transform;
}
.cl-card .cm { font-family: var(--serif); font-style: italic; font-size: 30px; }
.cl-front { position: absolute; inset: 0; z-index: 2; border-radius: 12px; overflow: hidden; }
.cl-front svg { display: block; width: 100%; height: 100%; }
.cl-seal {
  position: absolute; left: 50%; top: 58%; z-index: 4; width: 78px; height: 78px;
  filter: drop-shadow(0 7px 9px rgba(70, 16, 8, .45));
  opacity: 0; transform: translate(-50%, -50%) scale(2.2); will-change: transform, opacity;
}
.cl-text { text-align: center; opacity: 0; will-change: transform, opacity; }
.cl-see { font-family: var(--serif); font-style: italic; font-size: clamp(40px, 12vw, 56px); line-height: 1.05; }
.cl-line { font-family: var(--serif); font-style: italic; color: rgba(255, 255, 255, .72); margin: 10px 0 0; }
.cl-hint { font-size: 10px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .45); margin: 18px 0 0; }

/* ═════════════════════════════════════════════════════════════
   TYPE SYSTEM — the single source of truth for text styles.
   Two families only:
     Fraunces (serif, regular 400, italic for display) — names, headings, lead text, numerals
     Manrope  (sans, 400 / 600 / 700)                  — body, buttons, small-caps labels
   Seven roles; everything on the page uses one of them.
   ═════════════════════════════════════════════════════════════ */
:root {
  --fs-display: clamp(44px, 13vw, 64px);   /* names */
  --fs-title:   clamp(36px, 10.5vw, 52px); /* section titles, big moments */
  /* reading sizes nudged up ~6–9% so older guests can read comfortably on a phone */
  --fs-heading: clamp(24px, 6.9vw, 30px);  /* questions, venue, contact names, story */
  --fs-lead:    19px;                      /* serif italic supporting text */
  --fs-body:    17px;                      /* sans body */
  --fs-button:  15px;                      /* buttons */
  --fs-label:   12px;                      /* small caps labels */
  --ls-label:   .2em;
}

/* 1 · Display — serif italic */
.hero-names, .tc-names, .invite-name, .cl-see, .story-line.first {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: var(--fs-display); line-height: 1; letter-spacing: -.02em;
}

/* 2 · Title — serif italic */
.title, .intro-invited {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: var(--fs-title); line-height: 1.08; letter-spacing: -.015em;
}

/* 3 · Heading — serif (italic for names/places, roman for questions) */
.story-line, .q, .venue-name, .contact .nm, .when-date, .sd-eyebrow, .cl-card .cm, .foot-mono, .gseal .wax, .cl-seal {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-heading); line-height: 1.28; letter-spacing: 0;
}
.story-line, .venue-name, .contact .nm, .sd-eyebrow, .cl-card .cm, .foot-mono, .gseal .wax, .cl-seal { font-style: italic; }
.gseal .wax, .cl-seal { line-height: 1; }
.q, .when-date { font-style: normal; }

/* Numerals — serif roman, sized for their box */
.sd-day { font-weight: 400; }
.cd-num { font-weight: 400; }

/* 4 · Lead — serif italic supporting text */
.invite-intro, .invite-closing, .event-tag, .rs-label, .mehndi-intro, .mehndi-status, .scratch-hint,
.pick-note, .guess-done, .pcard figcaption, .slide figcaption, .stack-hint, .cd-note, .bless-count,
.cl-line, .foot-line, .sd-city {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: var(--fs-lead); line-height: 1.45; letter-spacing: 0;
  text-wrap: balance;          /* no single word left alone on the last line */
}
.pick-note b { font-weight: 400; }

/* 5 · Body — sans */
.sub, .parents, .tc-line, .hero-line, .venue-addr, .sd-week, .contact .num, .gseal .gl {
  font-family: var(--sans); font-weight: 400; font-size: var(--fs-body); letter-spacing: 0;
}

/* 6 · Button — sans semibold */
.btn, .chip, .nav-btn, .bless-btn, .link-btn {
  font-family: var(--sans); font-weight: 600; font-size: var(--fs-button); letter-spacing: .02em;
}

/* 7 · Label — sans bold small caps */
.eyebrow, .hero-date, .env-hint, .tc-continue, .story-hint, .scroll-cue, .sd-month, .rel, .invite-sign,
.when-time, .l-num, .contact .rl, .cd-lbl, .cl-hint, .stack-count {
  font-family: var(--sans); font-weight: 700; font-size: var(--fs-label);
  letter-spacing: var(--ls-label); text-transform: uppercase;
}

/* "You're invited" on the opening screen */
.intro-invited { margin: 0; color: #F6DFA9; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }

/* ═════════════════════════════════════════════════════════════
   REALISM DETAILS — paper, foil, wax, tape, candlelight
   ═════════════════════════════════════════════════════════════ */
:root {
  /* warm paper fibre texture for light cards */
  --paper: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .3  0 0 0 0 .24  0 0 0 .07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>");
  --foil: linear-gradient(135deg, #F1D9A8, #C49A5C 32%, #F7E8C8 52%, #B8894A 78%, #EBD3A2);
}

/* Envelope: paper thickness + flap shadow that lifts away when it opens */
.env-back { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 34px 60px -22px rgba(0, 0, 0, .65); }
.flap-shadow { transition: opacity .25s ease; }
.intro.flap .flap-shadow { opacity: 0; }

/* Paper on every card */
.title-card { background: var(--paper), #FFFCF8; }
.invite-card, .contact { background: var(--paper), #fff; }
.event-card { background: var(--paper), linear-gradient(170deg, #fff 40%, #FDF4EF); }
.pcard { background: var(--paper), #FFFDF9; }
.cl-card { background: var(--paper), #FFFCF8; }
/* letters in the guessing game: ruled writing paper */
.letter { background: var(--paper), repeating-linear-gradient(180deg, transparent 0 31px, rgba(120, 140, 190, .12) 31px 32px), #FFFDF9; }

/* Gold foil frame on the title card + letterpress names */
.tc-frame {
  border: 1.5px solid transparent;
  background: var(--paper) padding-box, linear-gradient(#FFFCF8, #FFFCF8) padding-box, var(--foil) border-box;
}
.tc-names, .invite-name { text-shadow: 0 1px 0 rgba(255, 255, 255, .9), 0 -1px 0 rgba(47, 29, 64, .07); }

/* Gold corner flourishes (added by script to paper cards) */
.corner { position: absolute; width: 24px; height: 24px; color: var(--gold); pointer-events: none; opacity: .85; z-index: 1; }
.corner svg { display: block; width: 100%; height: 100%; }
.corner.tl { top: var(--ci, 7px); left: var(--ci, 7px); }
.corner.tr { top: var(--ci, 7px); right: var(--ci, 7px); transform: scaleX(-1); }
.corner.bl { bottom: var(--ci, 7px); left: var(--ci, 7px); transform: scaleY(-1); }
.corner.br { bottom: var(--ci, 7px); right: var(--ci, 7px); transform: scale(-1, -1); }
.invite-card { --ci: 15px; }
.cl-card .corner { width: 18px; height: 18px; }

/* Hand-poured wax seals in the guessing game */
.gseal .wax {
  position: relative;
  border-radius: 47% 53% 51% 49% / 53% 46% 54% 47%;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .3), 0 1px 0 rgba(255, 255, 255, .35);
}
.gseal .wax::before {
  content: ''; position: absolute; inset: 9px; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .28), 0 1px 0 rgba(255, 255, 255, .3);
}
.gseal .wax::after {
  content: ''; position: absolute; width: 11px; height: 8px; right: -3px; bottom: 9px; pointer-events: none;
  border-radius: 50% 60% 50% 40%; background: var(--c2); box-shadow: inset -1px -1px 2px rgba(0, 0, 0, .2);
}
/* …and on the closing envelope */
.cl-seal svg { display: block; width: 100%; height: 100%; }

/* Postmark on each letter */
.postmark { position: absolute; top: 10px; right: 6px; width: 84px; height: 54px; color: #9A6A5A; opacity: .38; transform: rotate(-10deg); pointer-events: none; }
.postmark svg { display: block; width: 100%; height: 100%; }

/* Washi tape holding each photo print */
.pcard::before {
  content: ''; position: absolute; top: -11px; left: 50%; width: 86px; height: 24px; z-index: 2;
  transform: translateX(-50%) rotate(-4deg);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .38) 0 6px, transparent 6px 12px), rgba(246, 191, 168, .75);
  clip-path: polygon(2% 0, 98% 0, 100% 20%, 98% 40%, 100% 60%, 98% 80%, 100% 100%, 2% 100%, 0 80%, 2% 60%, 0 40%, 2% 20%);
}

/* Opening story: larger, easy-to-read lines */
.story-line:not(.first) {
  font-size: clamp(29px, 8.4vw, 38px); line-height: 1.3;
  color: #FFF6EC; text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}
/* Opening story: brighter "Once upon a time…" */
.story-line.first {
  color: #FFEDC8;
  text-shadow: 0 0 26px rgba(255, 212, 150, .5), 0 2px 18px rgba(0, 0, 0, .35);
}
/* Soft breathing glow behind the story text + a faint warm horizon */
.story::before {
  content: ''; position: absolute; left: 50%; top: 46%; width: 150vmin; height: 150vmin; pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201, 182, 228, .22) 0%, rgba(246, 191, 168, .10) 30%, transparent 62%);
  animation: storyGlow 6s ease-in-out infinite alternate;
}
.story::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 100%, rgba(224, 122, 102, .16), transparent 70%);
}
@keyframes storyGlow { to { opacity: .65; transform: translate(-50%, -50%) scale(1.08); } }

/* Candle flicker inside the lanterns */
.lantern .flame { animation: flicker 2.6s ease-in-out infinite; }
.lantern:nth-child(2) .flame { animation-delay: -.9s; }
.lantern:nth-child(3) .flame { animation-delay: -1.7s; }
@keyframes flicker { 0%, 100% { opacity: .55; } 18% { opacity: .85; } 32% { opacity: .5; } 51% { opacity: .9; } 70% { opacity: .62; } 84% { opacity: .8; } }

/* ═════════ Detail pass 2 ═════════ */

/* Ring slider: satin ribbon track with stitching, glinting diamond */
.rs-track {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8EFF6 42%, #EEE0EF 58%, #FFFFFF 100%);
  box-shadow: inset 0 0 0 1px rgba(196, 154, 92, .35), inset 0 2px 4px rgba(255, 255, 255, .9), var(--shadow-sm);
}
.rs-track::before {
  content: ''; position: absolute; inset: 6px; border-radius: 999px; pointer-events: none;
  border: 1px dashed rgba(196, 154, 92, .4);
}
.rs-knob .glint { transform-box: fill-box; transform-origin: center; animation: glint 2.6s ease-in-out infinite; }
@keyframes glint { 0%, 55%, 100% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.2) rotate(20deg); opacity: 1; } 85% { transform: scale(.4); opacity: .6; } }

/* Countdown: flip-clock tiles */
.cd-num {
  position: relative; margin: 0 5px; padding: 6px 0 4px; border-radius: 10px;
  background: linear-gradient(180deg, #4A3063 0%, #3B2652 49.4%, #2C1B40 50.6%, #36234C 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 6px 10px -4px rgba(0, 0, 0, .6);
  transform-origin: 50% 50%;
}
.cd-num::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(0, 0, 0, .5); box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.cd-box { perspective: 300px; }
.cd-num.flip { animation: flipDigit .45s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes flipDigit { 0% { transform: rotateX(-85deg); filter: brightness(.6); } 100% { transform: rotateX(0); filter: none; } }

/* Gold thread: twisted cord + polished bead knots */
.thread-line { stroke: #B8894A; stroke-width: 2.4; }
.thread-twist { fill: none; stroke: #F6E3B4; stroke-width: 1.1; stroke-dasharray: 2.5 3.5; stroke-linecap: round; opacity: .9; }
.knot .k-out { fill: url(#beadG); stroke: rgba(120, 85, 40, .55); stroke-width: .8; }
.knot:not(.lit) .k-out { opacity: .5; }
.knot .k-in { fill: #fff; opacity: .85; }

/* Falling rose petals: soft gradient, a vein, and a 3D tumble */
.petal {
  background: radial-gradient(120% 100% at 30% 25%, #FFE6DC 0%, #F7C3B0 45%, #E89A86 100%);
  border-radius: 75% 6% 75% 16%;
  box-shadow: inset -2px -2px 4px rgba(170, 70, 60, .22), 0 2px 4px rgba(120, 60, 60, .12);
  opacity: .82; animation-name: fall3d;
}
.petal::after {
  content: ''; position: absolute; left: 22%; top: 22%; width: 62%; height: 1px;
  background: rgba(200, 110, 95, .35); transform: rotate(45deg); transform-origin: left center;
}
@keyframes fall3d {
  0% { transform: translate3d(0, -5vh, 0) rotateX(0) rotateZ(0); }
  50% { transform: translate3d(calc(var(--x) * .5), 50vh, 0) rotateX(180deg) rotateZ(260deg); }
  100% { transform: translate3d(var(--x), 108vh, 0) rotateX(360deg) rotateZ(520deg); }
}

/* Hero photo: gilded arch frame with a bevel and a soft glass reflection */
.arch {
  position: relative; border: 7px solid transparent;
  background: linear-gradient(var(--lilac-2), var(--lilac-2)) padding-box, var(--foil) border-box;
  outline-color: rgba(196, 154, 92, .55);
}
.arch::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .35);
  background: linear-gradient(115deg, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .12) 100%);
}

/* Event: tear-off calendar page + small icons */
.cal {
  position: relative; width: 132px; margin: 24px auto 10px; padding-bottom: 12px;
  background: var(--paper), #fff; border-radius: 12px; transform: rotate(-2deg);
  box-shadow: 0 12px 22px -12px rgba(59, 35, 80, .5), 0 1px 0 rgba(0, 0, 0, .04);
}
.cal-top {
  border-radius: 12px 12px 0 0; padding: 14px 0 7px; color: #fff;
  background: linear-gradient(180deg, #E8826D, #D3634F);
  font: 700 var(--fs-label)/1 var(--sans); letter-spacing: var(--ls-label); text-transform: uppercase;
}
.cal-day { font-family: var(--serif); font-size: 58px; line-height: 1; color: var(--ink); margin: 8px 0 8px; }
.cal-week { font: 700 var(--fs-label)/1 var(--sans); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--muted); }
.cal::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 5px; border-top: 1px dashed rgba(47, 29, 64, .18); }
.cal-rings { position: absolute; top: -6px; left: 0; right: 0; display: flex; justify-content: center; gap: 46px; z-index: 1; }
.cal-rings span { width: 8px; height: 15px; border-radius: 6px; background: linear-gradient(90deg, #9C9C9C, #F4F4F4, #9C9C9C); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.when-time, .venue-label { display: inline-flex; align-items: center; gap: 6px; }
.when-time { margin-top: 8px; color: var(--coral); }
.when-time svg, .venue-label svg { width: 14px; height: 14px; flex: none; }

/* RSVP: calling cards with a thin gold edge and an embossed monogram */
.contact {
  position: relative; overflow: hidden; border: 1px solid transparent;
  background: var(--paper) padding-box, linear-gradient(#fff, #fff) padding-box, var(--foil) border-box;
}
.contact > * { position: relative; z-index: 1; }
.contact::after {
  content: attr(data-mono); position: absolute; right: 12px; bottom: -16px; pointer-events: none;
  font-family: var(--serif); font-style: italic; font-size: 84px; line-height: 1;
  color: rgba(196, 154, 92, .1); text-shadow: 0 1px 0 rgba(255, 255, 255, .85);
}

/* Gold ornament under section titles */
.title-orn { width: 110px; margin: 4px auto 0; color: var(--gold); }
.title-orn svg { display: block; width: 100%; height: auto; }
.countdown-sec .title-orn { color: var(--gold-2); }

/* ═════════════════════════════════════════════════════════════
   PERFORMANCE — smooth on every phone
   ═════════════════════════════════════════════════════════════ */

/* Glass blur behind the music button is expensive while scrolling: use a solid button */
.music-btn { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, .94); }

/* Story lines: fade + drift only (animating blur is heavy on phones) */
.story-line, .story-line.on, .story-line.past { filter: none; }

/* Envelope glow: a soft light layer instead of a filter on the whole animating envelope */
.env, .intro.glowing .env { filter: none; }
.env::before {
  content: ''; position: absolute; inset: -34px; z-index: -1; border-radius: 28px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 214, 150, .65), rgba(255, 214, 150, 0));
  opacity: 0; transition: opacity 2s ease;
}
.intro.glowing .env::before { opacity: 1; transition: opacity .6s ease; }
.intro.out .title-card { transition: transform 1.15s cubic-bezier(.3, .8, .25, 1) .12s; }

/* Closing envelope: shadow on the paper itself, not a filter over the moving parts */
.cl-env { filter: none; }
.cl-back { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 24px 34px -10px rgba(0, 0, 0, .45); }

/* Gold thread: no blurred glow filter, no endlessly pulsing halos */
.thread-tip { filter: none; stroke: rgba(246, 223, 169, .45); stroke-width: 6; }
.knot.lit .k-halo { animation: none; }

/* Keep moving pieces on their own GPU layers */
.lantern, .lantern .sway, .rs-knob, .pcard, .walker, .cl-card, .cl-flap, .cl-seal { will-change: transform; }
.sky-glow, .stars { will-change: opacity; }

/* Flip tiles without a filter */
@keyframes flipDigit { 0% { transform: rotateX(-85deg); opacity: .5; } 100% { transform: none; opacity: 1; } }

/* Pause looping animations that aren't on screen */
.offscreen, .offscreen * { animation-play-state: paused !important; }
.stars.paused .star { animation-play-state: paused; }

/* Lite mode (low-end phones): same design, lighter effects */
.lite .petal { box-shadow: none; }
.lite .petal::after { display: none; }
.lite .lantern svg { filter: none; }
.lite .henna { filter: none; }
.lite .star { animation: none; opacity: .8; }
.lite .rs-knob .glint, .lite .scratch-wrap.idle.in, .lite .scratch-wrap.idle.in .swipe-hint { animation: none; }
.lite .env-wax, .lite .cl-seal { filter: none; }
.lite .thread.walking .w-bob { animation: none; }
.lite .card-glow { display: none; }

/* Guessing-game seals: poured-wax artwork (drawn by script) instead of flat circles */
.gseal .wax {
  width: 70px; height: 70px; background: none; box-shadow: none; border-radius: 50%;
  filter: drop-shadow(0 5px 6px rgba(59, 35, 80, .35));
}
.gseal .wax svg { display: block; width: 100%; height: 100%; }
.gseal .wax::after { display: none; }
.gseal .wax::before { content: none; }
.gseal.picked .wax, .gseal.correct .wax { box-shadow: none; }
.gseal.picked .wax::before, .gseal.correct .wax::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; box-shadow: none; pointer-events: none;
  border: 2px solid var(--c2);
}
.gseal.correct .wax::before { border-color: #2E9B6C; }
.lite .gseal .wax { filter: none; }

/* ═════════════════════════════════════════════════════════════
   RAJASTHANI ROYAL TOUCHES
   ═════════════════════════════════════════════════════════════ */

/* Hero: jharokha (palace balcony window) around the photo */
/* top margin = the frame's domes and finial that rise above the photo (1/3 of its width) + breathing room,
   so they never cover "Together with our families" */
.jharokha { position: relative; width: min(52vw, 230px); margin: calc(min(52vw, 230px) / 3 + 18px) 0 26px; }
.jharokha .arch { width: 100%; margin: 0; }
.jh-frame {
  position: absolute; left: -33.33%; top: -25%; width: 166.67%; height: 141.67%;
  pointer-events: none; overflow: visible;
  filter: drop-shadow(0 6px 10px rgba(120, 80, 30, .18));
}

/* Countdown: fort skyline on the night horizon */
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 130px; z-index: 0; pointer-events: none; }
.fort-lights { filter: drop-shadow(0 0 3px rgba(246, 223, 169, .9)); }
.fort-lights path:nth-child(2), .fort-lights rect:nth-child(5) { animation: windowGlow 4s ease-in-out infinite alternate; }
@keyframes windowGlow { from { opacity: 1; } to { opacity: .55; } }

/* Envelope lining (the visible strip inside the back): bandhani dots in rani pink */
.env-liner {
  background:
    radial-gradient(circle, #C94C78 0 .5px, #FFF1E6 .7px 1.3px, transparent 1.7px) 0 0 / 12px 12px,
    radial-gradient(circle, #F6C453 .85px, transparent 1.2px) 6px 6px / 12px 12px,
    #C94C78;
}

/* Gota patti: gold scalloped ribbon trim inside the invitation and event cards */
.invite-card::before, .event-card::before {
  content: ''; position: absolute; inset: 10px; pointer-events: none; z-index: 0;
  border-radius: 0; border: 6px solid transparent;
  border-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><g fill='%23C49A5C'><rect width='18' height='1.1'/><rect y='16.9' width='18' height='1.1'/><rect width='1.1' height='18'/><rect x='16.9' width='1.1' height='18'/><path d='M6 1.1a3 3 0 0 0 6 0zM6 16.9a3 3 0 0 1 6 0zM1.1 6a3 3 0 0 1 0 6zM16.9 6a3 3 0 0 0 0 6z'/><circle cx='3' cy='3' r='1.5'/><circle cx='15' cy='3' r='1.5'/><circle cx='3' cy='15' r='1.5'/><circle cx='15' cy='15' r='1.5'/></g><g fill='%23F7E6BE'><circle cx='9' cy='2.2' r='.7'/><circle cx='9' cy='15.8' r='.7'/><circle cx='2.2' cy='9' r='.7'/><circle cx='15.8' cy='9' r='.7'/></g></svg>") 6 round;
}
.invite-card .corner, .event-card .corner { display: none; }
.invite-card > *, .event-card > * { position: relative; z-index: 1; }
/* Sheesha (mirror-work) rows across the top and bottom of the invitation card */
.invite-card::after {
  content: ''; position: absolute; left: 26px; right: 26px; top: 22px; bottom: 22px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle, #FFFFFF 0 1.2px, #C9D3E6 1.6px 3px, #C49A5C 3.3px 4.2px, transparent 4.6px) top center / 22px 10px repeat-x,
    radial-gradient(circle, #FFFFFF 0 1.2px, #C9D3E6 1.6px 3px, #C49A5C 3.3px 4.2px, transparent 4.6px) bottom center / 22px 10px repeat-x;
}

/* Elephant & peacock pair on the invitation card */
.royal-pair { width: min(220px, 70%); margin: 4px auto 12px; }
.royal-pair svg { display: block; width: 100%; height: auto; }

.lite .fort-lights path, .lite .fort-lights rect { animation: none; }
.lite .jh-frame, .lite .fort-lights { filter: none; }

/* Name-only contacts (no phone number): a compact card */
.contact.contact-name { padding: 14px 20px; grid-template-columns: 1fr; }
.contact.contact-name .nm { font-size: 21px; }
.contact.contact-name::after { font-size: 56px; bottom: -10px; }
/* Hide family lines that aren't filled in (e.g. grandparents on one side only) */
.invite-card .rel:empty, .invite-card .parents:empty { display: none; }
.rel-grand { margin-top: 10px; }
.grand-list { white-space: normal; }
.invite-card .couple { display: block; }
.invite-card .couple + .couple { margin-top: 6px; }
.invite-card .pn { display: inline-block; }   /* breaks between people, not inside a name */
@media (max-width: 345px) { .invite-card .parents { font-size: 13.5px; letter-spacing: -.01em; } }   /* longest names still fit on one line */

/* ═════════ Transitions ═════════ */
/* Envelope → hero: the card flies into the arch and becomes the photo */
.morph-ghost {
  position: fixed; z-index: 150; margin: 0; transform-origin: 0 0;
  pointer-events: none; will-change: transform, opacity;
}
.morph-ghost .mg-paper {
  position: absolute; inset: 0; z-index: 2;
  background: var(--paper), #FFFCF8;
}
.hero.morphing .jharokha .arch { visibility: hidden; }

/* Event card unfolds like a folded invitation swinging down from its top edge.
   It tips AWAY from the viewer while folded, so it never grows past the screen edges. */
.fold-wrap { perspective: 1400px; }
.event-card.reveal {
  opacity: 0; transform-origin: 50% 0;
  transform: rotateX(-72deg);
  transition: opacity .5s ease, transform 1.2s cubic-bezier(.22, 1.1, .36, 1);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.event-card.reveal.in { opacity: 1; transform: none; }
.event-card::after {          /* the fold's shadow, lifting away as it opens */
  content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(59, 35, 80, .08), rgba(59, 35, 80, .42));
  opacity: 1; transition: opacity 1.1s ease .15s;
}
.event-card.in::after { opacity: 0; }
.lite .event-card.reveal { transform: rotateX(-55deg); transition-duration: .4s, .8s; }

/* Closing: a warm diya glow rises behind the sealed envelope */
.cl-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  background:
    radial-gradient(60% 42% at 50% 46%, rgba(255, 196, 110, .38), rgba(255, 150, 70, .14) 55%, transparent 75%),
    radial-gradient(120% 50% at 50% 100%, rgba(255, 170, 80, .22), transparent 70%);
  transition: opacity 2.6s ease; will-change: opacity;   /* own layer: the flicker never repaints the screen */
}
.closing.glow .cl-glow { opacity: 1; animation: diyaFlicker 3.2s ease-in-out 2.6s infinite alternate; }
@keyframes diyaFlicker { 0% { opacity: 1; } 35% { opacity: .82; } 60% { opacity: .95; } 100% { opacity: .86; } }
.lite .closing.glow .cl-glow { animation: none; }
.cl-env, .cl-text { position: relative; z-index: 1; }
.closing.glow .cl-see { text-shadow: 0 0 26px rgba(255, 200, 120, .45); transition: text-shadow 2.6s ease; }

/* Two small diyas beside "See you there": they light up as the glow rises */
.cl-see-row { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin-top: 6px; }
.diya { width: 34px; height: 41px; flex: none; overflow: visible; }
.diya-star { color: var(--gold-2); font-size: 18px; line-height: 1; padding-bottom: 8px; }
.diya .d-flame, .diya .d-halo { transform-box: fill-box; transform-origin: 50% 100%; opacity: 0; transform: scale(.2); transition: opacity 1.2s ease .4s, transform 1.2s cubic-bezier(.2, .8, .3, 1.2) .4s; }
.diya .d-halo { transform-origin: 50% 50%; }
.closing.glow .diya .d-flame, .closing.glow .diya .d-halo { opacity: 1; transform: none; }
.closing.glow .diya .d-flame { animation: diyaFlame 1.6s ease-in-out 1.6s infinite alternate; }
.closing.glow .diya .d-halo { animation: diyaHalo 2.2s ease-in-out 1.6s infinite alternate; }
.closing.glow .diya-r .d-flame { animation-duration: 1.9s; animation-delay: 1.9s; }
@keyframes diyaFlame { 0% { transform: scale(1, 1) skewX(0); } 30% { transform: scale(.94, 1.06) skewX(-3deg); } 65% { transform: scale(1.04, .95) skewX(2deg); } 100% { transform: scale(.97, 1.03) skewX(-1deg); } }
@keyframes diyaHalo { from { opacity: 1; transform: scale(1); } to { opacity: .75; transform: scale(.92); } }
.lite .closing.glow .diya .d-flame, .lite .closing.glow .diya .d-halo { animation: none; }
.lite .closing.glow .cl-see { text-shadow: none; }
.lite .hero.in .hero-names .hn { animation: none; }

/* Hero names: a single sweep of gold light across them, like foil catching the sun */
.hero-names .hn {
  color: var(--ink);
  background: linear-gradient(105deg, var(--ink) 0 40%, #8C6230 45%, #C9963F 50%, #8C6230 55%, var(--ink) 60% 100%) 100% 0 / 260% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding: 0 .12em;                                   /* room for the italic overhang so nothing is clipped */
}
.hero-names .hn.amp {      /* the "&" keeps its coral colour, with the same gold sweep */
  background-image: linear-gradient(105deg, var(--coral) 0 40%, #8C6230 45%, #C9963F 50%, #8C6230 55%, var(--coral) 60% 100%);
}
.hero.in .hero-names .hn { animation: nameShine 2.2s cubic-bezier(.45, 0, .3, 1) 1.5s 1 both; }
.hero.in .hero-names .hn-a { animation-delay: 1.75s; }
.hero.in .hero-names .hn-g { animation-delay: 1.95s; }
@keyframes nameShine { from { background-position: 100% 0; } to { background-position: 0% 0; } }   /* gradient always covers the text; the gold band slides left → right */

/* "Read it again" */
.cl-text { pointer-events: none; }
.cl-text.live { pointer-events: auto; }
.cl-again {
  margin-top: 22px; padding: 12px 24px; border-radius: 999px; cursor: pointer;
  font: 600 15px/1 var(--sans); letter-spacing: .04em; color: #FFF4E0;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(230, 203, 151, .55);
  -webkit-tap-highlight-color: transparent; transition: background .25s ease, transform .2s ease;
}
.cl-again:active { transform: scale(.96); background: rgba(255, 255, 255, .16); }
.cl-again span { color: #E6CB97; }

/* ═════════ Placement fixes ═════════ */
/* The gold thread and walking couple sit in the side margins: draw them above the cards
   so the couple is never cut off, and give the margins a little more room */
.thread { z-index: 2; }
.wrap { padding-left: 24px; padding-right: 24px; }

/* Letter: postmark sits in its own space above the "Letter 01 of 04" line */
.letter { padding-top: 62px; }
.postmark { top: 6px; right: 6px; width: 70px; height: 45px; }

/* Countdown labels: tighter tracking so "MINUTES"/"SECONDS" always fit their tile */
.cd-lbl { letter-spacing: .12em; }
@media (max-width: 359px) { .cd-lbl { font-size: 9.5px; letter-spacing: .08em; } }
