/* ==========================================================
   Garvit & Akruti — enter through the flowers
   Type: Imperial Script (names) · Boska (serif) · Tenor Sans (labels) · Cinzel (Sagai)
         Amita (Devanagari)
   ========================================================== */

:root {
  --script: "Great Vibes", "Pinyon Script", "Snell Roundhand", cursive;
  --roman: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --serif: "Boska", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --label: "Tenor Sans", "Gill Sans", "Helvetica Neue", Arial, sans-serif;
  --deva: "Amita", "Tiro Devanagari Hindi", "Kohinoor Devanagari", "Noto Serif Devanagari", serif;

  --velvet: #1C050B;
  --velvet-2: #2E0812;
  --velvet-3: #0E0206;
  --paper: #F5ECDD;
  --paper-2: #EFE4D0;
  --ink: #2A1014;
  --ink-2: #66494A;
  --gold: #C9A24E;
  --gold-hi: #F3DFA2;
  --gold-lo: #8F6A2A;
  --gold-ink: #7A5A1F;
  --foil: linear-gradient(100deg, #8F6A2A 0%, #E9CF8C 14%, #C9A24E 28%, #FFF3C8 42%, #B88D3E 58%, #F1D78F 76%, #9A7330 90%, #E9CF8C 100%);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(20px, 5vw, 80px);

  --t-label: .6875rem;
  --t-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --t-line: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  --t-lead: clamp(1.65rem, 1.2rem + 1.9vw, 2.65rem);
  --t-name: clamp(4.2rem, 2rem + 8vw, 9.5rem);
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: hidden; }
main > section, main > footer { overflow-x: clip; }
.lotus-mark { max-width: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background-color: var(--velvet);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* a whisper of paper grain over everything */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: url("/assets/tex/grain.png") repeat;
  background-size: 240px 240px;
  opacity: .55;
  mix-blend-mode: soft-light;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.label {
  font-family: var(--label);
  font-size: var(--t-label);
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  line-height: 1.5;
}

:focus-visible { outline: 1px solid var(--gold); outline-offset: 5px; }

/* gold foil type */
.foil {
  background-image: var(--foil);
  background-size: 260% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 11s ease-in-out infinite;
}
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* handwriting reveal for the script */
.ink {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 44%, transparent 56%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 0%, #000 44%, transparent 56%, transparent 100%);
  -webkit-mask-size: 260% 100%;
          mask-size: 260% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: var(--ink, 0%) 0;
          mask-position: var(--ink, 0%) 0;
}

/* ---------- buttons ---------- */
.btn {
  --b-ink: var(--c-ink, var(--ink));
  --b-bg: var(--c-bg, var(--paper));
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 50px; padding: 0 1.9em;
  border: 1px solid var(--b-ink);
  background: var(--b-ink); color: var(--b-bg);
  font-family: var(--label); font-size: var(--t-label); letter-spacing: .26em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border-radius: 0;
  transition: color .6s var(--ease), border-color .6s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--b-bg);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .6s var(--ease);
}
.btn:hover::before { transform: scaleY(1); }
.btn:hover { color: var(--b-ink); }
.btn--line { background: transparent; color: var(--b-ink); border-color: color-mix(in srgb, var(--b-ink) 40%, transparent); }
.btn--line::before { background: var(--b-ink); }
.btn--line:hover { color: var(--b-bg); border-color: var(--b-ink); }
.btn--gold { --b-ink: var(--gold-hi); --b-bg: var(--velvet); }

/* ==========================================================
   TOP BAR
   ========================================================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gutter);
  color: var(--ink);
  opacity: 0; transform: translateY(-110%);
  transition: opacity .6s var(--ease), transform .8s var(--ease), color .6s var(--ease);
  pointer-events: none;
}
.topbar.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.topbar[data-tone="dark"] { color: var(--gold-hi); }
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--top-bg, var(--paper)) 92%, transparent), transparent);
}
.topbar__mono {
  font-family: var(--script); font-variation-settings: "opsz" 40;
  font-size: 1.75rem; line-height: 1; text-decoration: none; padding: 6px 4px;
}
.topbar__mono span { font-size: .7em; margin: 0 .08em; }
.topbar__link {
  font-family: var(--label); font-size: var(--t-label); letter-spacing: .28em; text-transform: uppercase;
  text-decoration: none; padding: 12px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.topbar__link:hover { background-size: 100% 1px; }

/* ==========================================================
   HERO + THRESHOLD
   ========================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  overflow: hidden;
  display: grid; place-items: center;
  color: #F6E9D3;
  background:
    radial-gradient(62% 52% at 50% 46%, #9B1B2C 0%, #6E0E1E 42%, transparent 78%),
    radial-gradient(120% 80% at 50% 118%, #1E0207 0%, transparent 55%),
    linear-gradient(180deg, #4A0812 0%, #33050D 100%);
}
.hero__dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.hero__glow {
  position: absolute; left: 50%; top: 47%; z-index: 0;
  width: min(120vmin, 1100px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 186, 150, .22) 0%, rgba(214, 80, 70, .1) 38%, transparent 68%);
  pointer-events: none;
}
.hero__content {
  position: relative; z-index: 2;
  width: 100%;
  padding: 104px 16px 88px; /* top: valance · bottom: the next section's arch */
  text-align: center;
}
/* a woven damask in the velvet, strongest at the edges */
.hero__damask {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='120' viewBox='0 0 84 120'%3E%3Cg fill='none' stroke='%23D9B464' stroke-width='.9'%3E%3Cpath d='M42 4 C62 26 62 50 42 60 C22 50 22 26 42 4 Z'/%3E%3Cpath d='M42 60 C62 70 62 94 42 116 C22 94 22 70 42 60 Z'/%3E%3Cpath d='M0 60 C20 50 20 26 0 4 M84 60 C64 50 64 26 84 4 M0 60 C20 70 20 94 0 116 M84 60 C64 70 64 94 84 116'/%3E%3Ccircle cx='42' cy='32' r='3'/%3E%3Ccircle cx='42' cy='88' r='3'/%3E%3Ccircle cx='0' cy='60' r='2'/%3E%3Ccircle cx='84' cy='60' r='2'/%3E%3C/g%3E%3C/svg%3E") repeat center / 84px 120px;
  opacity: .085;
  -webkit-mask-image: radial-gradient(60% 55% at 50% 50%, transparent 0%, #000 85%);
          mask-image: radial-gradient(60% 55% at 50% 50%, transparent 0%, #000 85%);
}
/* the couple in a fine copperplate script (Corinthia, the closest free match to Edwardian Script) */
.names {
  font-family: "Corinthia", var(--script) !important; font-weight: 400 !important; text-transform: none;
  font-size: clamp(5rem, 3rem + 5vw, 7.6rem) !important; letter-spacing: 0; line-height: .92 !important;
}
.names .foil, .close__family .foil {
  background-image: none; -webkit-text-fill-color: #F3D27E; color: #F3D27E; animation: none;
  text-shadow: 0 2px 0 rgba(90, 30, 10, .35), 0 6px 24px rgba(0, 0, 0, .35);
}
.names__amp { font-family: "Corinthia", var(--script) !important; font-style: normal; font-weight: 400 !important; text-transform: none; letter-spacing: 0; font-size: .62em !important; margin: -.1em 0 -.06em !important; }
.names__line > span { padding: .12em .2em .1em !important; margin: -.12em -.2em -.1em !important; }
.hero__fam {
  margin-top: 2px; font-family: "Marcellus", var(--roman); font-weight: 400;
  font-size: clamp(.95rem, .8rem + .45vw, 1.2rem); letter-spacing: .3em; text-transform: uppercase; color: #F6E2AC;
}
.hero__label { margin-top: 6px !important; }
.close__family { font-family: "Marcellus", var(--roman) !important; font-weight: 400; text-transform: uppercase; font-size: clamp(1.7rem, 1.1rem + 1.8vw, 2.7rem) !important; line-height: 1.2 !important; letter-spacing: .12em; }
.close__family > span { padding: .1em .15em !important; margin: -.1em -.15em !important; }

/* the jharokha: a gold-foil Mughal arch around the names */
.crest {
  position: relative; margin: 0 auto;
  width: min(540px, 88vw);
  padding: clamp(84px, 12vh, 112px) clamp(22px, 6vw, 64px) clamp(40px, 6vh, 60px);
}
.crest > *:not(.crest__arch):not(.crest__finial) { position: relative; }
.crest__arch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.crest__panel { fill: url(#heroPanel); stroke: none; }
.crest__arch .l { fill: none; stroke: url(#heroFoil); stroke-width: 1.5; }
.crest__arch .l--thin { stroke-width: .8; opacity: .8; }
.crest__finial {
  position: absolute; left: 50%; top: -10px; width: 13px; height: 13px;
  transform: translateX(-50%) rotate(45deg);
  background: linear-gradient(135deg, #FFF3C8, #C9A24E 55%, #8F6A2A);
  box-shadow: 0 0 18px rgba(255, 214, 140, .55);
}
.crest__base {
  position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: linear-gradient(135deg, #FFF3C8, #C9A24E 55%, #8F6A2A);
}
.flourish { display: block; width: min(220px, 60%); height: 20px; margin: 18px auto; overflow: visible; }
.flourish path, .flourish circle { fill: none; stroke: #D9B464; stroke-width: 1; vector-effect: non-scaling-stroke; }
.flourish circle { fill: #D9B464; }
.hero__om { font-family: var(--deva); font-size: 1.05rem; color: var(--gold); letter-spacing: .04em; }
.hero__label { margin-top: 0; color: #E6D2AE; }
.names {
  margin: clamp(14px, 3vh, 30px) 0 clamp(14px, 3vh, 26px);
  font-family: var(--script); font-weight: 400;
  font-size: clamp(4.4rem, 2rem + 7vw, 8.6rem);
  line-height: 1;
  display: grid; justify-items: center;
}
.names__line { display: block; }
/* a true capital G (Imperial Script's G reads like a lowercase g) */
.cap { font-family: "Great Vibes", var(--script); font-size: 1.02em; }
/* room for the flourishes so the foil isn't clipped */
.names__line > span { display: inline-block; padding: .26em .42em .2em; margin: -.26em -.42em -.2em; }
.names__amp { display: block; font-size: .5em; line-height: .9; margin: -.06em 0 -.02em; }
.names__amp > span { display: inline-block; padding: .2em .3em; margin: -.2em -.3em; }
.hero__dates { color: #EAD9BC; display: inline-flex; align-items: center; gap: 1.1em; flex-wrap: wrap; justify-content: center; }
.sep { width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); }

.curtain {
  position: absolute; inset: 0; z-index: 3;
  width: 100%; height: 100%;
  pointer-events: none;
}
.threshold { display: none; }

/* before the curtain parts */
html.js:not(.is-open):not(.no-curtain) body { overflow: hidden; }
html.js:not(.is-open):not(.no-curtain) .hero__content { opacity: 0; }
html.js:not(.is-open):not(.no-curtain) .threshold {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 14px;
  padding: 0 24px max(9svh, 64px);
  background: transparent; border: 0; cursor: pointer;
  touch-action: none; -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
}
.threshold__guest {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); color: #F6E6C6;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .6);
}
.threshold__guest span { font-style: normal; }
.threshold__hint {
  font-family: var(--label); font-size: var(--t-label); letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold-hi);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .7);
  animation: breathe 3.2s ease-in-out infinite;
}
.threshold:focus-visible .threshold__hint { outline: 1px solid var(--gold); outline-offset: 8px; }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
html.no-curtain .curtain { display: none; }
/* the official G ♥ A logo */
.threshold__logo { width: clamp(84px, 9vw, 118px); height: auto; filter: drop-shadow(0 0 14px rgba(255, 236, 214, .22)) drop-shadow(0 2px 10px rgba(0, 0, 0, .6)); }
.hero__logo { display: block; width: clamp(103px, 8.4vw, 125px); height: auto; margin: 16px auto 0; filter: drop-shadow(0 0 16px rgba(255, 236, 214, .18)); }
.topbar__mono img { display: block; height: 36px; width: auto; }
.topbar[data-tone="dark"] .topbar__mono img { filter: drop-shadow(0 0 8px rgba(255, 236, 214, .25)); }
.close__mark img { height: 36px; width: auto; filter: drop-shadow(0 0 8px rgba(255, 236, 214, .2)); }

/* ==========================================================
   LETTER
   ========================================================== */
.letter {
  --c-bg: #F5ECDD; --c-ink: #2A1014;
  background: var(--c-bg);
  padding: clamp(110px, 18vh, 210px) var(--gutter) clamp(100px, 16vh, 190px);
  text-align: center;
  color: var(--c-ink);
}
.lotus { width: 120px; height: 56px; margin: 0 auto 44px; display: block; overflow: visible; }
.ganesha { width: clamp(220px, 30vw, 340px); margin: 0 auto 34px; }
.ganesha img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(120, 60, 20, .14)); }
.ganesha:not([hidden]) + .lotus { display: none; }
.letter__dear { font-style: italic; font-size: var(--t-line); color: #7A1730; margin-bottom: 26px; }
.letter__lead {
  max-width: 23ch; margin: 0 auto;
  font-weight: 300; font-size: var(--t-lead); line-height: 1.28; letter-spacing: -.012em;
}
.letter__body { max-width: 44ch; margin: 38px auto 0; color: var(--ink-2); }
.letter__sign {
  margin-top: 44px; font-style: italic; font-size: var(--t-line); color: #7A1730;
}
.letter__sign::before {
  content: ""; display: block; width: 44px; height: 1px; margin: 0 auto 22px;
  background: var(--gold);
}

/* ==========================================================
   THE CELEBRATIONS — five arched cards, one per day
   ========================================================== */
.programme {
  --c-bg: #EFE4D0; --c-ink: #2A1014;
  background: var(--c-bg); color: var(--c-ink);
  padding: clamp(90px, 14vh, 160px) 0 clamp(80px, 12vh, 140px);
  overflow-x: clip;
}
.programme__head { text-align: center; padding: 0 var(--gutter); }
.programme__eyebrow { color: var(--gold-ink); }
.programme__title {
  margin: 14px 0 0;
  font-weight: 300; font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.4rem); line-height: 1.05; letter-spacing: -.02em;
}
.programme__hint { display: none; margin-top: 18px; color: var(--ink-2); }
.dcards {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 22px);
  max-width: 1320px; margin: clamp(44px, 7vh, 70px) auto 0; padding: 0 var(--gutter);
}
.dc a {
  position: relative; display: flex; flex-direction: column; height: 100%;
  padding: 12px 12px 22px;
  background: var(--c-bg); color: var(--c-ink); text-decoration: none;
  border-radius: 999px 999px 6px 6px;
  box-shadow: 0 1px 0 rgba(42, 16, 20, .06), 0 24px 50px -32px rgba(42, 16, 20, .5);
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
.dc a::after {
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--c-accent) 55%, transparent);
  border-radius: 999px 999px 3px 3px;
}
.dc a:hover { transform: translateY(-8px); box-shadow: 0 1px 0 rgba(42, 16, 20, .06), 0 40px 60px -34px rgba(42, 16, 20, .6); }
.dc__art {
  display: block; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 50% 50% 2px 2px / 40% 40% 2px 2px;
}
.dc__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.dc a:hover .dc__art img { transform: scale(1.06); }
.dc__date { display: flex; align-items: center; gap: 10px; margin: 18px 6px 0; }
.dc__date b { font-family: var(--serif); font-weight: 300; font-size: 2.6rem; line-height: 1; letter-spacing: -.03em; color: var(--c-hi); }
.dc__date span { font-family: var(--label); font-size: .625rem; letter-spacing: .24em; text-transform: uppercase; line-height: 1.5; color: var(--c-ink-2); border-left: 1px solid color-mix(in srgb, var(--c-ink) 20%, transparent); padding-left: 10px; }
.dc__name { margin: 14px 6px 0; font-size: clamp(1.35rem, 1rem + .7vw, 1.65rem); line-height: 1.1; }
.dc--sagai .dc__name { font-family: var(--roman); font-size: clamp(1.1rem, .9rem + .6vw, 1.35rem); letter-spacing: .14em; }
.dc__hi { margin: 4px 6px 0; font-family: var(--deva); font-size: 1rem; color: var(--c-hi); }
.dc__meta { margin: auto 6px 0; padding-top: 14px; display: grid; gap: 4px; font-family: var(--label); font-size: .625rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c-ink-2); }
.dc__meta span:first-child { color: var(--c-ink); }

/* ==========================================================
   CHAPTERS
   ========================================================== */
.chapter {
  position: relative;
  background: var(--c-bg);
  color: var(--c-ink);
  padding: clamp(110px, 17vh, 190px) var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  align-items: center;
}

.chapter > .art { grid-column: 1 / span 6; justify-self: end; width: min(100%, 480px); }
.chapter > .chapter__text { grid-column: 8 / span 5; }
.chapter--flip > .art { grid-column: 7 / span 6; justify-self: start; grid-row: 1; }
.chapter--flip > .chapter__text { grid-column: 2 / span 5; grid-row: 1; }

/* worlds — each day keeps the palette of its own invitation */
/* general theme (Byahaat, Mehendi): ivory, wine and marigold */
.w-byahaat, .dc--byahaat { --c-bg: #F6EEE1; --c-ink: #3A0E18; --c-ink-2: #6A4D48; --c-accent: #B8742A; --c-hi: #8A1C2E; }
.w-mehendi, .dc--mehendi { --c-bg: #F4E9E1; --c-ink: #3A0E18; --c-ink-2: #6A4D48; --c-accent: #B8742A; --c-hi: #8A1C2E; }
/* Roman: black marble, crimson roses, gold */
.w-sagai, .dc--sagai   { --c-bg: #140608; --c-ink: #F4E8D6; --c-ink-2: #CDB9A0; --c-accent: #D8B46A; --c-hi: #E2C27E; }
/* jungle carnival: turmeric cream, palm green, hibiscus */
.w-haldi, .dc--haldi   { --c-bg: #FBF0D3; --c-ink: #2E2410; --c-ink-2: #6A5434; --c-accent: #3F6B45; --c-hi: #D2562E; }
/* lotus and red */
.w-shaadi, .dc--shaadi  { --c-bg: #5A0A16; --c-ink: #FBEFDE; --c-ink-2: #E7CDB0; --c-accent: #F1D592; --c-hi: #F6E3C4; }

.w-byahaat, .w-mehendi { background: radial-gradient(60% 50% at 25% 50%, rgba(232, 160, 60, .1), transparent 70%), var(--c-bg); }
.w-mehendi { background: radial-gradient(60% 50% at 75% 50%, rgba(232, 160, 60, .1), transparent 70%), var(--c-bg); }

.w-sagai::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(45% 55% at 26% 50%, rgba(130, 16, 32, .45), transparent 70%);
}
.w-shaadi {
  background:
    radial-gradient(70% 40% at 50% 40%, #8C1628 0%, transparent 70%),
    radial-gradient(90% 60% at 50% 100%, #2E040B 0%, transparent 70%),
    var(--c-bg);
}
.lotus-mark {
  position: absolute; left: 50%; top: clamp(30px, 6vh, 70px); z-index: 0 !important;
  width: min(1100px, 150vw); height: auto; transform: translateX(-50%);
  color: rgba(241, 213, 146, .11); pointer-events: none;
}
.lotus-sep { width: 86px; height: 40px; margin: clamp(36px, 6vh, 54px) auto 0; color: var(--c-accent); display: block; }
/* the carnival awning — the one playful edge on the page */
.w-haldi::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 44px;
  background: repeating-linear-gradient(90deg,
    #E7A3A0 0 64px, #F7DDB0 64px 128px, #8FB592 128px 192px, #EEA47C 192px 256px, #F3C6C3 256px 320px);
  -webkit-mask: radial-gradient(32px 16px at 32px 28px, #000 98%, transparent) 0 0 / 64px 44px repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% 28px no-repeat;
          mask: radial-gradient(32px 16px at 32px 28px, #000 98%, transparent) 0 0 / 64px 44px repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% 28px no-repeat;
}

/* Roman: Greek-key friezes and inscriptional capitals */
.key {
  position: absolute; left: 0; right: 0; height: 22px; z-index: 1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M0 1.5H22M0 20.5H22M2 20.5V5H17V16H7V9H13V12.5' fill='none' stroke='%23D8B46A' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x 0 0 / 22px 22px;
  opacity: .75;
}
.key--top { top: clamp(40px, 6vh, 64px); }
.key--bottom { bottom: calc(var(--rise) + clamp(16px, 3vh, 28px)); }
.w-sagai .chapter__name { font-family: var(--roman); font-weight: 400; letter-spacing: .1em; font-size: clamp(3.4rem, 1.6rem + 5.2vw, 6.8rem); line-height: 1; margin-left: 0; }
.w-sagai .chapter__line { font-style: italic; }

/* jungle carnival: palm leaves and a striped edge */
.jungle { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.leaf { position: absolute; width: clamp(150px, 20vw, 300px); }
.leaf svg { display: block; width: 100%; height: auto; overflow: visible; }
.leaf .lf { fill: #4F8247; }
.leaf .rib { fill: none; stroke: #C9E0A8; stroke-width: 1.2; opacity: .55; }
.leaf--1 { left: -60px; bottom: 90px; transform: rotate(-28deg); }
.leaf--1 .lf { fill: #3F6B45; }
.leaf--2 { left: -40px; bottom: 30px; transform: rotate(-8deg) scale(.8); }
.leaf--3 { right: -70px; top: 70px; transform: rotate(200deg); }
.leaf--4 { right: -30px; top: 140px; transform: rotate(168deg) scale(.75); }
.leaf--4 .lf { fill: #6E9B5A; }
.w-haldi { padding-top: calc(clamp(110px, 17vh, 190px) + 20px); }
.w-haldi .chapter__name { color: #3F6B45; }
.w-haldi .theme { background: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 10px, rgba(247,221,176,.45) 10px 20px); border-style: dashed; }

/* the art, in a jharokha arch with a drawn foil line */
.art { position: relative; aspect-ratio: 5 / 7; z-index: 1; }
.art__frame {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: 50% 50% 2px 2px / 35.7% 35.7% 2px 2px;
  background: rgba(0, 0, 0, .06);
  box-shadow: 0 40px 70px -40px rgba(20, 4, 8, .55);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.art__frame img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); will-change: transform; }
.art__line {
  position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px);
  overflow: visible; pointer-events: none;
}
.art__line path { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .9; }

/* chapter text */
.chapter__text { position: relative; z-index: 2; max-width: 31rem; }
.chapter__num { color: var(--c-ink-2); display: flex; align-items: baseline; gap: 1.1em; }
.chapter__num span { color: var(--c-accent); letter-spacing: .12em; }
.chapter__name {
  margin-top: 18px;
  font-weight: 300; font-size: var(--t-name); line-height: .92; letter-spacing: -.035em;
  margin-left: -.04em;
}
.ch { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.ch > span { display: inline-block; will-change: transform; }
.chapter__hi { margin-top: 12px; font-family: var(--deva); font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); color: var(--c-hi); line-height: 1.3; }
.chapter__hi i { font-family: var(--serif); font-size: .72em; color: var(--c-ink-2); margin-left: .25em; }
.chapter__line { margin-top: 26px; font-style: italic; font-size: var(--t-line); line-height: 1.38; letter-spacing: -.005em; max-width: 26ch; }
.chapter__meta {
  display: grid; grid-template-columns: auto 1fr; gap: 26px clamp(28px, 4vw, 56px);
  margin-top: 36px; padding-top: 26px;
  border-top: 1px solid color-mix(in srgb, var(--c-ink) 18%, transparent);
}
.chapter__meta dt { color: var(--c-ink-2); margin-bottom: 8px; }
.chapter__meta dd { font-size: 1.3rem; line-height: 1.3; }
.chapter__meta dd span { display: block; font-family: var(--label); font-size: var(--t-label); letter-spacing: .22em; text-transform: uppercase; color: var(--c-ink-2); margin-top: 8px; }
.chapter__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.theme {
  margin-top: 24px; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .5em 1em;
  padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--c-hi) 45%, transparent);
  background: rgba(255, 255, 255, .35);
}
.theme .label { color: var(--c-ink-2); }
.theme b { font-weight: 400; font-style: italic; font-size: 1.3rem; color: var(--c-accent); }
.theme__words { font-family: var(--label); font-size: var(--t-label); letter-spacing: .24em; text-transform: uppercase; color: var(--c-hi); }

/* ---------- finale ---------- */
.chapter--finale {
  grid-template-columns: 1fr; justify-items: center; text-align: center;
  padding-top: clamp(120px, 20vh, 220px); padding-bottom: clamp(120px, 20vh, 220px);
}
.chapter--finale > * { grid-column: 1 !important; position: relative; z-index: 2; }
.finale__head { display: grid; justify-items: center; }
.chapter--finale .chapter__num { justify-content: center; }
.chapter__name--xl { font-size: clamp(5rem, 2rem + 13vw, 13rem); margin-top: 10px; }
.art--finale { width: min(78vw, 420px); margin-top: clamp(40px, 6vh, 64px); justify-self: center !important; }
.finale__line { max-width: 30ch; margin: clamp(44px, 7vh, 70px) auto 0; text-align: center; }
.rites {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 760px); margin-top: 22px;
  border-top: 1px solid rgba(226, 194, 126, .32); border-bottom: 1px solid rgba(226, 194, 126, .32);
}
.rites li { display: grid; justify-items: center; align-content: start; gap: 12px; padding: 30px 8px; }
.rites li + li { border-left: 1px solid rgba(226, 194, 126, .22); }
.rites .label { color: var(--c-accent); }
.rites__icon { width: 46px; height: 46px; background: var(--foil); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.rites__time { font-weight: 300; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.2rem); line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.rites__time small { font-size: .42em; letter-spacing: .04em; font-style: italic; }
.rites__note { font-style: italic; font-size: .95rem; color: var(--c-ink-2); }
.finale__venue { margin-top: 40px; font-size: 1.6rem; line-height: 1.3; }
.finale__venue .label { display: block; margin-top: 10px; color: var(--c-ink-2); }
.chapter--finale .chapter__actions { justify-content: center; }

/* ==========================================================
   COUNTDOWN
   ========================================================== */
.next {
  --c-bg: #F5ECDD; --c-ink: #2A1014;
  background: var(--c-bg); color: var(--c-ink);
  text-align: center;
  padding: clamp(100px, 16vh, 170px) var(--gutter);
}
.next__label { font-style: italic; font-size: var(--t-line); color: #7A1730; }
.next__clock { display: flex; justify-content: center; gap: clamp(14px, 5vw, 80px); margin-top: 30px; }
.next__clock > div { display: grid; justify-items: center; gap: 14px; }
.roll {
  position: relative; display: block; overflow: hidden;
  font-weight: 300; font-size: clamp(3.2rem, 1.4rem + 7vw, 7.6rem); line-height: 1.05; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums lining-nums;
  min-width: 1.15em;
}
.roll .r { display: block; }
.roll .r + .r { position: absolute; inset: 0; }
.next__clock small { color: var(--ink-2); }
.next__list {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1080px; margin: clamp(48px, 8vh, 80px) auto 0;
  border-top: 1px solid rgba(42, 16, 20, .14);
}
.next__list:empty { display: none; }
.next__list li + li { border-left: 1px solid rgba(42, 16, 20, .1); }
.next__list a {
  display: grid; gap: 6px; justify-items: center; padding: 22px 8px 6px;
  text-decoration: none; color: var(--ink); transition: color .4s var(--ease);
}
.next__list a:hover { color: #7A1730; }
.nl__name { font-size: 1.3rem; line-height: 1.15; }
.nl__when { font-family: var(--label); font-size: .625rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
.nl__left { font-style: italic; font-size: 1.05rem; color: #7A1730; }
.next__list li.is-next .nl__name { font-weight: 400; }
.next__list li.is-next { position: relative; }
.next__list li.is-next::before {
  content: ""; position: absolute; left: 50%; top: -4px; width: 7px; height: 7px;
  transform: translateX(-50%) rotate(45deg); background: var(--gold);
}
.next__list li.is-done { opacity: .38; }
.next__done { font-style: italic; font-size: var(--t-lead); margin-top: 14px; color: #7A1730; }

/* ==========================================================
   CLOSE
   ========================================================== */
.close {
  --c-bg: #3A0610; --c-ink: #F3E5CE;
  position: relative;
  background:
    radial-gradient(55% 60% at 30% 42%, rgba(155, 27, 44, .6) 0%, transparent 70%),
    var(--c-bg);
  color: var(--c-ink);
  padding: clamp(110px, 17vh, 190px) var(--gutter) 44px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px);
  align-items: center;
}
.art--close { grid-column: 2 / span 4; }
.close__text { grid-column: 7 / span 5; max-width: 30rem; }
.close__eyebrow { color: var(--gold); }
.close__elders { margin-top: 14px; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.25; }
.close__firms { margin-top: 20px; display: grid; gap: 6px; font-family: var(--label); font-size: var(--t-label); letter-spacing: .2em; text-transform: uppercase; color: #CDB79A; }
.close__regards { margin-top: 60px; font-style: italic; font-size: var(--t-line); color: #D8C2A2; }
.close__family {
  font-family: var(--script);
  font-size: clamp(3.4rem, 2rem + 4.6vw, 6rem); line-height: 1.1; margin-top: 4px;
}
.close__family > span { display: inline-block; padding: .22em .4em .2em; margin: -.22em -.4em -.2em; }
.close__contact { margin-top: 18px; display: flex; gap: 26px; flex-wrap: wrap; font-family: var(--label); letter-spacing: .16em; font-size: .9rem; }
.close__contact a { text-decoration: none; border-bottom: 1px solid rgba(201, 162, 78, .5); padding-bottom: 3px; transition: color .4s, border-color .4s; }
.close__contact a:hover { color: var(--gold-hi); border-color: var(--gold-hi); }
.close__actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; --c-ink: #F3E5CE; --c-bg: #3A0610; }
.close__mark {
  grid-column: 1 / -1; margin-top: clamp(80px, 14vh, 140px);
  display: flex; justify-content: center; align-items: center; gap: 14px;
  font-family: var(--label); font-size: var(--t-label); letter-spacing: .34em; text-transform: uppercase; color: #9C8468;
}
.close__mark span { font-family: var(--script); font-size: 1.4em; letter-spacing: 0; text-transform: none; color: var(--gold); }
.close__mark i { width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); }

/* ==========================================================
   SLOTS FOR GENERATED ARTWORK (switched on from main.js)
   ========================================================== */
.foil-mark {
  display: inline-block; vertical-align: middle;
  background-image: var(--foil); background-size: 220% 100%;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}
.foil-mark[hidden], .corner[hidden], .rites__icon[hidden] { display: none !important; }
.hero__ganesha { display: block; width: 58px; height: 58px; margin: 0 auto 16px; }
.p-icon { width: 1.1em; height: 1.1em; margin-right: .5em; vertical-align: -.14em; }
.chapter__icon { width: 24px; height: 24px; margin-right: -.35em; align-self: center; }
.corner {
  position: absolute; z-index: 1; width: clamp(46px, 7vw, 74px); aspect-ratio: 1;
  background-image: var(--foil);
  -webkit-mask: url("/assets/foil/corner.png") center / contain no-repeat;
          mask: url("/assets/foil/corner.png") center / contain no-repeat;
  pointer-events: none;
}
.corner--tl { top: 14px; left: 14px; }
.corner--tr { top: 14px; right: 14px; transform: scaleX(-1); }
.corner--bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.corner--br { bottom: 14px; right: 14px; transform: scale(-1, -1); }

html.has-hall .hero {
  background:
    radial-gradient(55% 50% at 50% 48%, rgba(60, 8, 16, .15) 0%, rgba(20, 4, 8, .32) 75%),
    linear-gradient(180deg, rgba(24, 5, 10, .2) 0%, rgba(24, 5, 10, .08) 45%, rgba(12, 2, 6, .55) 100%),
    url("/assets/img/hall-wide.jpg?v=1") center / cover no-repeat,
    #1C050B;
}
@media (max-aspect-ratio: 1 / 1) {
  html.has-hall .hero {
    background:
      radial-gradient(70% 48% at 50% 48%, rgba(60, 8, 16, .15) 0%, rgba(20, 4, 8, .32) 75%),
      linear-gradient(180deg, rgba(24, 5, 10, .2) 0%, rgba(24, 5, 10, .08) 45%, rgba(12, 2, 6, .55) 100%),
      url("/assets/img/hall-tall.jpg?v=1") center / cover no-repeat,
      #1C050B;
  }
}
html.has-velvet .close::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("/assets/tex/velvet.jpg?v=1") center / cover;
  opacity: .5; mix-blend-mode: soft-light;
}
/* the real crushed-velvet photo sits under the drawn pleats, so the drapes read as fabric, not paint */
html.has-velvet .drape__velvet {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255, 190, 170, .14), transparent 60%),
    linear-gradient(180deg, transparent 50%, rgba(14, 0, 3, .6) 100%),
    repeating-linear-gradient(90deg,
      rgba(10, 0, 2, .62) 0, rgba(10, 0, 2, .22) calc(var(--fold) * .18), rgba(255, 150, 150, 0) calc(var(--fold) * .36),
      rgba(255, 175, 170, .2) calc(var(--fold) * .47), rgba(255, 150, 150, 0) calc(var(--fold) * .58),
      rgba(10, 0, 2, .28) calc(var(--fold) * .8), rgba(10, 0, 2, .62) var(--fold)),
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0) 0, rgba(10, 0, 2, .3) calc(var(--fold) * .9), rgba(255, 160, 160, .06) calc(var(--fold) * 1.25),
      rgba(0, 0, 0, 0) calc(var(--fold) * 1.61)),
    url("/assets/tex/velvet.jpg?v=1") 0 0 / auto 100% repeat-x,
    #5E0814;
  background-blend-mode: normal, normal, normal, normal, normal, normal;
  filter: hue-rotate(14deg) saturate(1.35) brightness(1.3) contrast(1.04);
}
html.has-velvet .drape--r .drape__velvet { background-position: 0 0, 0 0, 37px 0, 61px 0, 100% 0, 0 0; }
.letter, .programme, .next { position: relative; }
html.has-paper .letter::before,
html.has-paper .programme::before,
html.has-paper .next::before,
html.has-paper .w-byahaat::before,
html.has-paper .w-mehendi::before,
html.has-paper .w-haldi::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("/assets/tex/paper.jpg?v=1") center / cover;
  opacity: .6; mix-blend-mode: multiply;
}

.chapter--finale > .lotus-mark { position: absolute; z-index: 0; }
.chapter--finale > .edge, .chapter--finale > .lotus-mark { grid-column: auto !important; }
.chapter--finale > .edge { position: absolute; z-index: 4; }
html.has-marble .w-sagai::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("/assets/tex/marble.jpg?v=1") center / cover; opacity: .35; mix-blend-mode: screen;
}

/* ==========================================================
   EDGES — each section rises into the one above as an arch,
   crowned with a small gold gem
   ========================================================== */
.edge {
  position: absolute; left: 0; right: 0; top: -71px; height: 72px; z-index: 4;
  pointer-events: none; color: var(--c-bg);
}
.edge svg { display: block; width: 100%; height: 100%; }
.edge path { fill: currentColor; }
.edge i {
  position: absolute; left: 50%; top: 3px; width: 9px; height: 9px;
  transform: translateX(-50%) rotate(45deg);
  background: linear-gradient(135deg, #F6E3A6, #B88D3E);
  box-shadow: 0 0 0 4px var(--c-bg), 0 0 0 5px rgba(201, 162, 78, .55);
}
.letter .edge { color: #F5ECDD; }
.programme .edge { color: #EFE4D0; }
.next .edge { color: #F5ECDD; }
.close .edge { color: #3A0610; }

/* The section itself rises into the one above, cut to the arch by a mask, so the curve
   carries the section's own paper, marble or gradient instead of a flat painted shape.
   (A transparent top border adds the height; backgrounds paint under borders.) */
:root { --rise: 72px; }
main > section:not(.hero), main > footer {
  border-top: var(--rise) solid transparent;
  background-origin: border-box;
  margin-top: calc(-1 * var(--rise));
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 V46 C320 46 520 10 720 10 C920 10 1120 46 1440 46 V72 Z'/%3E%3C/svg%3E") 0 0 / 100% var(--rise) no-repeat,
    linear-gradient(#000, #000) 0 calc(var(--rise) - 1px) / 100% calc(100% - var(--rise) + 1px) no-repeat;
          mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 72' preserveAspectRatio='none'%3E%3Cpath d='M0 72 V46 C320 46 520 10 720 10 C920 10 1120 46 1440 46 V72 Z'/%3E%3C/svg%3E") 0 0 / 100% var(--rise) no-repeat,
    linear-gradient(#000, #000) 0 calc(var(--rise) - 1px) / 100% calc(100% - var(--rise) + 1px) no-repeat;
}
/* textures drawn on pseudo-elements reach up into the risen arch too */
html.has-paper .letter::before, html.has-paper .programme::before, html.has-paper .next::before,
html.has-paper .w-byahaat::before, html.has-paper .w-mehendi::before, html.has-paper .w-haldi::before,
.w-sagai::before, html.has-marble .w-sagai::after, html.has-velvet .close::before { top: calc(-1 * var(--rise)); }
/* the old painted curve is no longer needed; only its gem stays, tucked just under the crown */
.edge svg { visibility: hidden; }
.edge i { top: 18px; }

/* ==========================================================
   ROYAL VELVET DRAPES (the opening)
   ========================================================== */
.drapes { position: absolute; inset: 0; z-index: 5; pointer-events: none; --fold: 88px; }
html.no-curtain .drapes { display: none; }
.drape {
  position: absolute; top: 0; bottom: 0; width: 50.6%;
  background: linear-gradient(90deg, #5E3F0F 0%, #D9B464 30%, #8F6A2A 55%, #F3DB98 78%, #6B4A14 100%);
  will-change: clip-path;
}
.drape--l { left: 0; }
.drape--r { right: 0; }
.drape__velvet {
  position: absolute; inset: 0; overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px 160px,
    radial-gradient(120% 60% at 50% -10%, rgba(255, 190, 170, .16), transparent 60%),
    linear-gradient(180deg, transparent 55%, rgba(18, 0, 4, .55) 100%),
    repeating-linear-gradient(90deg,
      rgba(12, 0, 3, .55) 0, rgba(12, 0, 3, .2) calc(var(--fold) * .18), rgba(255, 150, 150, .0) calc(var(--fold) * .36),
      rgba(255, 170, 170, .16) calc(var(--fold) * .47), rgba(255, 150, 150, .0) calc(var(--fold) * .58),
      rgba(12, 0, 3, .25) calc(var(--fold) * .8), rgba(12, 0, 3, .55) var(--fold)),
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0) 0, rgba(10, 0, 2, .32) calc(var(--fold) * .9), rgba(255, 160, 160, .07) calc(var(--fold) * 1.25),
      rgba(0, 0, 0, 0) calc(var(--fold) * 1.61)),
    linear-gradient(90deg, #5E0814, #7E0E20 50%, #5E0814);
  background-blend-mode: overlay, normal, normal, normal, normal, normal;
}
.drape--r .drape__velvet { background-position: 0 0, 0 0, 0 0, 37px 0, 61px 0, 0 0; }
/* a real velvet photo (generated in Flow) replaces the drawn fabric; it squeezes as the drapes gather */
html.has-drape .drape__velvet {
  background: url("/assets/img/drape.jpg") 0 0 / calc(var(--gather, 1) * 100%) 100% repeat-x;
}
html.has-drape .drape--r .drape__velvet { background-position: 100% 0; }
.fringe {
  position: absolute; left: 0; right: 0; bottom: 0; height: 52px;
  background:
    linear-gradient(180deg, #F3DB98, #A87C30) 0 0 / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, #F6E3A6 0 1.5px, #B88D3E 1.5px 3px, #7E5E22 3px 4px, transparent 4px 6px) 0 7px / 100% 45px no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent);
          mask-image: linear-gradient(180deg, #000 65%, transparent);
}
.valance {
  position: absolute; left: 0; right: 0; top: 0; height: 88px; z-index: 2;
  filter: drop-shadow(0 3px 0 #C9A24E) drop-shadow(0 12px 16px rgba(0, 0, 0, .45));
}
.valance__braid {
  position: absolute; inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px 160px,
    radial-gradient(70px 46px at 70px 18px, rgba(255, 170, 170, .16), transparent 70%) 0 0 / 140px 88px repeat-x,
    linear-gradient(180deg, rgba(10, 0, 2, .55), transparent 30%, transparent 62%, rgba(10, 0, 2, .45)),
    repeating-linear-gradient(80deg, rgba(10, 0, 2, .35) 0, rgba(255, 160, 160, .08) 9px, rgba(10, 0, 2, .3) 18px),
    #6E0B1C;
  background-blend-mode: overlay, normal, normal, normal, normal;
  -webkit-mask: radial-gradient(70px 40px at 70px 48px, #000 98%, transparent) 0 0 / 140px 88px repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% 48px no-repeat;
          mask: radial-gradient(70px 40px at 70px 48px, #000 98%, transparent) 0 0 / 140px 88px repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% 48px no-repeat;
}
/* a real swagged valance photo (cut out) replaces the drawn one */
html.has-valance .valance { filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .45)); height: clamp(90px, 13vh, 140px); }
html.has-valance .valance__braid { background: url("/assets/img/valance.png") center top / auto 100% repeat-x; -webkit-mask: none; mask: none; }
html.has-tassel .tieback { background: none; box-shadow: none; height: 0; }
html.has-tassel .tieback i { width: 64px; height: 150px; top: -30px; clip-path: none; background: url("/assets/img/tassel.png?v=1") center top / contain no-repeat; }
html.has-tassel .tieback--l i { right: -30px; }
html.has-tassel .tieback--r i { left: -30px; transform: scaleX(-1); }
.seal {
  position: absolute; left: 50%; top: 46%; z-index: 3;
  width: 136px; height: 136px; border-radius: 50%;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  background: radial-gradient(circle at 38% 32%, #FFF3C8 0%, #E3C27A 30%, #B88D3E 62%, #7A5518 100%);
  box-shadow: 0 14px 34px rgba(20, 0, 4, .6), inset 0 0 0 2px rgba(255, 243, 200, .6);
}
.seal::before {
  content: ""; position: absolute; inset: 10px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #8E1426, #4A0611 80%);
  box-shadow: inset 0 0 0 1px rgba(243, 219, 152, .8), inset 0 0 0 5px rgba(74, 6, 17, 1), inset 0 0 0 6px rgba(243, 219, 152, .45);
}
.seal img { position: relative; width: 79%; height: auto; filter: drop-shadow(0 0 8px rgba(255, 236, 214, .35)); }
.tieback {
  position: absolute; z-index: 2; height: 11px; opacity: 0;
  transform: translateY(-50%);
  background: repeating-linear-gradient(-55deg, #F4DE9E 0 3px, #B48A3C 3px 6px, #7E5E22 6px 7px);
  border-radius: 6px; box-shadow: 0 4px 8px rgba(20, 0, 4, .5);
}
.tieback i {
  position: absolute; top: 3px; width: 22px; height: 78px;
  background:
    radial-gradient(circle at 50% 8px, #FBE7AE 0 6px, transparent 7px),
    linear-gradient(180deg, transparent 14px, #E3C27A 14px, #B88D3E 22px, transparent 22px),
    repeating-linear-gradient(90deg, #F3DB98 0 1.5px, #A87C30 1.5px 3px) 0 22px / 100% 56px no-repeat;
  clip-path: polygon(30% 0, 70% 0, 70% 26%, 100% 100%, 0 100%, 30% 26%);
}
.tieback--l i { right: -8px; }
.tieback--r i { left: -8px; }
@media (max-width: 700px) {
  .valance { height: 64px; }
  .valance__braid {
    -webkit-mask: radial-gradient(50px 28px at 50px 36px, #000 98%, transparent) 0 0 / 100px 64px repeat-x, linear-gradient(#000, #000) 0 0 / 100% 36px no-repeat;
            mask: radial-gradient(50px 28px at 50px 36px, #000 98%, transparent) 0 0 / 100px 64px repeat-x, linear-gradient(#000, #000) 0 0 / 100% 36px no-repeat;
  }
  .seal { width: 112px; height: 112px; top: 44%; }
  .fringe { height: 40px; }
  .tieback i { height: 62px; width: 18px; }
}

/* a generated gold frame can replace the drawn arch lines */
html.has-frame .crest__arch .l { display: none; }
/* keep every line of text between the frame's pillars and above its plinth */
html.has-frame .crest { padding: clamp(162px, 21vh, 204px) min(104px, 19vw) clamp(92px, 13vh, 116px); }
html.has-frame .hero__label { letter-spacing: .16em; line-height: 1.7; }
/* The frame keeps its true proportions: the arch (top 555px of the 1000px image), the plinth
   (bottom 260px) and the pillar width (190px) are drawn at the image's own scale, and only the
   plain twisted shafts between the capitals and the lower lotuses grow with the text.
   --cw is the crest's width; the frame box is 110% of it, so one image pixel = 1.1 * --cw / 746. */
.crest { --cw: min(540px, 88vw); width: var(--cw); }
html.has-frame .crest { aspect-ratio: 746 / 1028; --px: calc(var(--cw) * 1.1 / 746); }
html.has-frame .crest::before {
  content: ""; position: absolute; inset: -4% -5% -3%; pointer-events: none; box-sizing: border-box;
  border-style: solid; border-color: transparent;
  border-width: calc(var(--px) * 555) calc(var(--px) * 190) calc(var(--px) * 260);
  border-image: url("/assets/img/frame.png?v=1") 555 190 260 / calc(var(--px) * 555) calc(var(--px) * 190) calc(var(--px) * 260) / 0 stretch;
  filter: drop-shadow(0 10px 18px rgba(10, 0, 3, .55));
}

html.has-hall .hero__damask { display: none; }
html.has-hall .hero__glow { opacity: .55; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 95;
  transform: translate(-50%, 140%); opacity: 0;
  background: var(--paper); color: var(--ink); padding: 12px 20px;
  font-family: var(--label); font-size: var(--t-label); letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: transform .6s var(--ease), opacity .6s var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1000px) {
  .programme__hint { display: block; }
  .dcards {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 6px var(--gutter) 30px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .dcards::-webkit-scrollbar { display: none; }
  .dc { flex: 0 0 min(64vw, 260px); scroll-snap-align: center; }
}
@media (max-width: 900px) {
  .chapter, .chapter--flip, .close {
    grid-template-columns: 1fr; row-gap: 46px; justify-items: center;
  }
  .chapter > .art, .chapter--flip > .art { grid-column: 1; grid-row: 1; justify-self: center; width: min(84vw, 400px); }
  .chapter > .chapter__text, .chapter--flip > .chapter__text { grid-column: 1; grid-row: 2; justify-self: center; width: min(84vw, 400px); }
  .art--close { grid-column: 1; width: min(70vw, 320px); }
  .close__text { grid-column: 1; text-align: center; }
  .close__contact, .close__actions { justify-content: center; }
  .chapter--finale { row-gap: 0; }
}

@media (max-width: 600px) {
  :root { --rise: 40px; }
  .edge { top: -39px; height: 40px; }
  .edge i { top: 11px; width: 7px; height: 7px; box-shadow: 0 0 0 3px var(--c-bg), 0 0 0 4px rgba(201, 162, 78, .55); }
  .chapter, .chapter--flip { padding-top: 92px; padding-bottom: 84px; row-gap: 38px; }
  .w-haldi { padding-top: 112px; }
  .chapter--finale { padding-top: 96px; padding-bottom: 88px; }
  .letter { padding-top: 96px; padding-bottom: 92px; }
  .programme { padding-top: 92px; padding-bottom: 76px; }
  .next { padding-top: 92px; padding-bottom: 96px; }
  .close { padding-top: 92px; row-gap: 40px; }
  .close__mark { margin-top: 64px; }
  .key--top { top: 30px; } .key--bottom { bottom: calc(var(--rise) + 18px); }
  .ganesha { width: min(72vw, 280px); }
  .chapter__actions .btn { width: 100%; }
  :root { --t-name: clamp(3.9rem, 19vw, 5.4rem); }
  .hero__content { padding: 80px 10px 52px; }
  .crest { --cw: 92vw; padding: 96px 22px 48px; }
  .flourish { margin: 14px auto; }
  .names { font-size: clamp(4.2rem, 21vw, 5.4rem) !important; letter-spacing: 0; }
  .hero__fam { letter-spacing: .24em; }
  .hero__label { letter-spacing: .16em !important; font-size: .625rem; }
  .hero__label { letter-spacing: .24em; }
  .hero__dates { letter-spacing: .22em; flex-direction: column; gap: 10px; }
  .hero__dates .sep { width: 3px; height: 3px; }
  .letter { text-align: left; }
  .letter__lead, .letter__body { margin-left: 0; }
  .lotus { margin-left: 0; }
  .letter__sign::before { margin-left: 0; }
  .leaf { width: 150px; opacity: .9; }
  .leaf--3, .leaf--4 { top: 40px; }
  .chapter__meta { grid-template-columns: 1fr; gap: 20px; }
  .btn { padding: 0 1.4em; letter-spacing: .2em; }
  .chapter__actions .btn { flex: 1 1 auto; }
  .rites li { padding: 24px 4px; }
  .next__list { grid-template-columns: 1fr; text-align: left; border-top: 0; }
  .next__list li + li { border-left: 0; }
  .next__list li { border-top: 1px solid rgba(42, 16, 20, .12); }
  .next__list a { grid-template-columns: 1fr auto; grid-template-areas: "name left" "when left"; justify-items: start; align-items: center; column-gap: 14px; padding: 16px 2px; }
  .nl__name { grid-area: name; } .nl__when { grid-area: when; } .nl__left { grid-area: left; justify-self: end; }
  .next__list li.is-next::before { left: -12px; top: 50%; transform: translateY(-50%) rotate(45deg); }
  .rites .label { letter-spacing: .16em; font-size: .625rem; }
  .rites__time { font-size: 1.75rem; }
  .finale__venue { font-size: 1.35rem; }
}

/* ==========================================================
   REDUCED MOTION
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* the real curtain film (Flow / Veo) replaces the drawn drapes when it exists */
.curtain-film { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
html.has-film .drape, html.has-film .valance, html.has-film .tieback { display: none; }
