/* Phulkari Dawn — Anand Karaj invitation */
:root {
  --maroon: #4A0B17;
  --maroon-2: #6E1424;
  --wine: #2B060D;
  --saffron: #E8892B;
  --marigold: #F2A93B;
  --magenta: #B8336A;
  --gold: #D4A24C;
  --gold-light: #F4DDA0;
  --ivory: #FBF3E4;
  --paper: #F6E9D2;
  --ink: #3A0D16;
  --ink-soft: #6B3A40;
  --serif: "Cormorant Garamond", Georgia, serif;
  --caps: "Cinzel", "Times New Roman", serif;
  --script: "Pinyon Script", "Cormorant Garamond", cursive;
  --gurmukhi: "Noto Serif Gurmukhi", serif;
  --gold-grad: linear-gradient(135deg, #F7E2A6 0%, #D4A24C 50%, #8F6424 100%);
  --ease: cubic-bezier(.22, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wine);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100svh; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--ivory); color: var(--ink); padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { top: 16px; }

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--caps);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin: 0 0 .8rem;
  color: var(--gold);
}
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 8vw, 3.2rem);
  line-height: 1.08;
  margin: 0 0 1.4rem;
}
.pa-line {
  font-family: var(--gurmukhi);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 .3rem;
  color: var(--maroon-2);
}

/* Phulkari band: the embroidered cloth as a strip with a stitched gold edge */
.band {
  height: 46px;
  background: url("img/phulkari.webp") center / 260px auto repeat-x;
  position: relative;
}
.band::before, .band::after {
  content: ""; position: absolute; left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 10px);
}
.band::before { top: 3px; }
.band::after { bottom: 3px; }

/* ================= Intro ================= */
.intro {
  position: fixed; inset: 0; z-index: 50;
  overflow: hidden;
  background: var(--wine);
  transition: opacity 1.1s ease, visibility 1.1s;
}
.intro.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

.intro__film {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}

.veil {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background: url("img/phulkari.webp") center / cover;
  transition: transform 2.2s var(--ease) .25s;
  box-shadow: 0 0 40px rgba(0,0,0,.55);
}
.veil::after {
  /* deepen the cloth so the seal reads, and stitch a gold hem at the opening */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(43,6,13,.35), rgba(43,6,13,.78) 55%, rgba(43,6,13,.9));
}
.veil--left { left: 0; border-right: 3px dashed var(--gold); }
.veil--right { right: 0; border-left: 3px dashed var(--gold); background-position: right center; }
.veil--right { transform: scaleX(1); }
.is-playing .veil--left { transform: translateX(-104%); }
.is-playing .veil--right { transform: translateX(104%); }

.garland {
  position: absolute; left: 50%; top: 0;
  width: min(100%, 560px);
  height: min(34svh, 330px);
  object-fit: cover;
  object-position: 50% 0;
  transform: translateX(-50%);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
  mask-image: linear-gradient(180deg, #000 72%, transparent);
}
.garland--intro { z-index: 3; transform-origin: 50% 0; animation: sway 6s ease-in-out infinite; }
.is-playing .garland--intro { transition: transform 1.8s var(--ease), opacity 1.2s; transform: translate(-50%, -110%); opacity: 0; animation: none; }
@keyframes sway {
  0%, 100% { transform: translateX(-50%) rotate(-.6deg); }
  50% { transform: translateX(-50%) rotate(.6deg); }
}

.seal {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(min(30svh, 290px)) 16px 40px;
  text-align: center;
  color: var(--ivory);
  transition: opacity .7s ease, transform .9s var(--ease);
}
.is-playing .seal { opacity: 0; transform: scale(.92); pointer-events: none; }

.seal__medal {
  position: relative;
  width: min(46vw, 210px); aspect-ratio: 1;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.6));
  animation: medal-in 1.4s var(--ease) both;
}
.seal__stitch { transform-origin: center; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes medal-in { from { opacity: 0; transform: scale(.8); } }
.seal__onkar {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--gurmukhi); font-weight: 700;
  font-size: min(20vw, 92px);
  line-height: 1;
  padding-bottom: .12em;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.seal__eyebrow {
  font-family: var(--caps); letter-spacing: .3em; text-transform: uppercase;
  font-size: .78rem; color: var(--gold-light);
  margin: 1.6rem 0 .2rem;
  animation: rise 1s var(--ease) .5s both;
}
.seal__names {
  font-family: var(--script);
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  line-height: 1.2;
  margin: 0 0 1.8rem;
  text-shadow: 0 3px 16px rgba(0,0,0,.7);
  animation: rise 1s var(--ease) .75s both;
}
.seal__names span { color: var(--marigold); font-size: .8em; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.tap {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .85rem 1.7rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgba(43,6,13,.65);
  color: var(--gold-light);
  font-family: var(--caps); font-size: .78rem; letter-spacing: .24em; text-transform: uppercase;
  backdrop-filter: blur(4px);
  animation: rise 1s var(--ease) 1s both;
}
.tap:hover, .tap:focus-visible { background: var(--maroon-2); }
.tap__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--marigold);
  box-shadow: 0 0 0 0 rgba(242,169,59,.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(242,169,59,0); } 100% { box-shadow: 0 0 0 0 rgba(242,169,59,0); } }

/* ================= Controls ================= */
.controls {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; gap: 10px; align-items: center;
}
.controls[hidden] { display: none; }
.ctl {
  border: 1px solid rgba(212,162,76,.7);
  background: rgba(43,6,13,.7);
  color: var(--gold-light);
  border-radius: 999px;
  padding: .5rem 1rem;
  font-family: var(--caps); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.ctl[hidden] { display: none; }
.ctl--round { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
.ctl svg { width: 20px; height: 20px; fill: currentColor; }
.ctl .ico-off { display: none; }
.ctl[aria-pressed="false"] .ico-on { display: none; }
.ctl[aria-pressed="false"] .ico-off { display: block; }

.petals { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }

/* ================= Hero ================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
  color: var(--ivory);
  text-align: center;
}
.hero__bg {
  position: absolute; inset: 0;
  background: url("media/gurdwara-end.webp") center 70% / cover;
}
.hero__wash { display: none; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(74,11,23,.72) 0%, rgba(74,11,23,.5) 55%, rgba(43,6,13,.12) 78%, rgba(43,6,13,.6) 100%);
}
.garland--hero { z-index: 2; height: min(26svh, 250px); animation: sway 7s ease-in-out infinite; transform-origin: 50% 0; }
.hero__text {
  position: relative; z-index: 3;
  padding: min(24svh, 230px) 16px 0;
  max-width: 560px;
}
.hero__onkar {
  font-family: var(--gurmukhi); font-weight: 700;
  font-size: 2.4rem; line-height: 1; margin: 0 0 .6rem;
  color: var(--gold-light);
  text-shadow: 0 2px 12px rgba(74,11,23,.8);
}
.hero .eyebrow { color: var(--gold-light); text-shadow: 0 1px 8px rgba(43,6,13,.9); font-size: .64rem; }
.hero__lead {
  font-style: italic; font-size: 1.05rem; margin: 0 auto .4rem; max-width: 22em;
  text-shadow: 0 1px 10px rgba(43,6,13,.9);
}
.hero__names {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(3.4rem, 16vw, 5.4rem);
  line-height: 1.02;
  margin: .2rem 0 .8rem;
  display: flex; flex-direction: column; align-items: center;
  text-shadow: 0 4px 22px rgba(74,11,23,.85);
}
.hero__names em { font-style: normal; font-size: .55em; color: var(--marigold); margin: -.15em 0; }
.hero__date {
  display: inline-block;
  font-family: var(--caps); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .55rem 1rem;
  border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
  background: rgba(74,11,23,.45);
  margin: 0;
}
.scroll-cue {
  position: absolute; bottom: calc(26px + env(safe-area-inset-bottom)); left: 50%; z-index: 3;
  width: 26px; height: 42px; margin-left: -13px;
  border: 1.5px solid var(--gold-light); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--gold-light);
  animation: cue 1.8s infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.fade { opacity: 0; }
.is-open .fade { animation: fade-up 1.2s var(--ease) var(--d, 0s) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ================= Invitation ================= */
.invite { background: var(--paper); }
.invite__card {
  max-width: 560px; margin: 0 auto;
  padding: 3.2rem 16px 3.6rem;
  text-align: center;
}
.invite__hosts { font-family: var(--caps); font-size: .95rem; letter-spacing: .08em; margin: 1.4rem 0 .4rem; color: var(--maroon-2); }
.invite__copy { font-style: italic; color: var(--ink-soft); margin: .2rem auto; max-width: 22em; }
.invite__name { font-family: var(--script); font-size: clamp(2.6rem, 11vw, 3.4rem); line-height: 1.15; margin: .6rem 0 0; color: var(--maroon); }
.invite__with { font-family: var(--caps); letter-spacing: .3em; font-size: .7rem; color: var(--gold); margin: .3rem 0; }
.knot { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 2rem; }
.knot span { width: 70px; height: 1px; background: var(--gold); }
.knot i { width: 12px; height: 12px; transform: rotate(45deg); background: var(--saffron); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--gold); }

/* ================= Story ================= */
.story {
  background: var(--maroon);
  color: var(--ivory);
  padding: 4rem 16px 4.5rem;
  display: grid; gap: 2.2rem;
  justify-items: center;
}
.story__arch {
  width: min(78vw, 340px);
  aspect-ratio: 9 / 15;
  border-radius: 999px 999px 14px 14px;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 8px var(--maroon), 0 0 0 9px rgba(212,162,76,.6), 0 30px 60px rgba(0,0,0,.45);
}
.story__film { width: 100%; height: 100%; object-fit: cover; }
.story__text { max-width: 30rem; text-align: center; }
.story__text p { color: #EBD8C4; }
.story .display { color: var(--ivory); }
.countdown { text-align: center; width: 100%; max-width: 30rem; }
.countdown__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown__grid div {
  border: 1px solid rgba(212,162,76,.5); border-radius: 10px;
  padding: .8rem 0 .6rem;
  background: rgba(43,6,13,.35);
}
.countdown__grid span { display: block; font-family: var(--caps); font-size: 1.7rem; color: var(--gold-light); line-height: 1.1; }
.countdown__grid small { font-family: var(--caps); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }

/* ================= Laavan ================= */
.laavan {
  background: var(--ivory) url("img/phulkari.webp") center / 520px;
  background-blend-mode: luminosity;
  position: relative;
  padding: 4.5rem 16px;
  text-align: center;
}
.laavan::before { content: ""; position: absolute; inset: 0; background: rgba(251,243,228,.92); }
.laavan > * { position: relative; }
.laavan .display { color: var(--maroon); }
.laavan__intro { max-width: 30rem; margin: 0 auto 2.4rem; color: var(--ink-soft); }
.laavan__list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 34rem;
  display: grid; gap: 1rem; text-align: left;
}
.laav {
  position: relative;
  display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: center;
  padding: 1.1rem 1.1rem 1.1rem .9rem;
  background: #fff;
  border: 1px solid rgba(212,162,76,.45);
  border-left: 4px solid var(--saffron);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(74,11,23,.08);
}
.laav h3 { font-family: var(--caps); font-weight: 600; font-size: 1rem; letter-spacing: .08em; margin: 0 0 .2rem; color: var(--maroon-2); }
.laav p { margin: 0; font-size: 1.02rem; color: var(--ink-soft); line-height: 1.45; }
.laav__ring { grid-row: 1; grid-column: 1; width: 60px; height: 60px; transform: rotate(-90deg); }
.laav__ring circle { fill: none; stroke: rgba(212,162,76,.3); stroke-width: 3; }
.laav__ring .laav__arc {
  stroke: var(--saffron); stroke-linecap: round;
  stroke-dasharray: 163.4;
  stroke-dashoffset: 163.4;
  transition: stroke-dashoffset 1.6s var(--ease) .3s;
}
.laav.is-in .laav__arc { stroke-dashoffset: calc(163.4 - 163.4 * var(--n) / 4); }
.laav__num {
  grid-row: 1; grid-column: 1;
  justify-self: center;
  font-family: var(--gurmukhi); font-weight: 700; font-size: 1.5rem; color: var(--maroon);
}

/* ================= Events ================= */
.events { background: var(--paper); text-align: center; padding-bottom: 4rem; }
.events > .eyebrow { margin-top: 3.4rem; }
.events .display { color: var(--maroon); }
.events__list { display: grid; gap: 1.4rem; max-width: 34rem; margin: 0 auto; padding: 0 16px; }
.event {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 14px 40px rgba(74,11,23,.1);
  border: 1px solid rgba(212,162,76,.35);
}
.event__head {
  position: relative;
  padding: 1.3rem 1.3rem 1.1rem;
  background: linear-gradient(120deg, var(--maroon) 0%, var(--maroon-2) 100%);
  color: var(--ivory);
}
.event__head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background: url("img/phulkari.webp") center / 180px repeat-x;
}
.event__when { font-family: var(--caps); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-light); margin: 0 0 .3rem; }
.event__name { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; line-height: 1.1; margin: 0; }
.event__pa { font-family: var(--gurmukhi); font-size: 1rem; color: var(--marigold); margin: .2rem 0 0; }
.event__body { padding: 1.5rem 1.3rem 1.3rem; }
.event__body p { margin: 0 0 .5rem; font-size: 1.02rem; color: var(--ink-soft); }
.event__body strong { color: var(--ink); font-weight: 600; }
.event__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: .6rem 1.2rem;
  border: 1px solid var(--maroon-2);
  border-radius: 999px;
  background: transparent;
  color: var(--maroon-2);
  font-family: var(--caps); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none;
  transition: background .25s, color .25s;
}
.btn:hover, .btn:focus-visible { background: var(--maroon-2); color: var(--ivory); }
.btn--solid { background: var(--maroon-2); color: var(--ivory); }
.btn--solid:hover, .btn--solid:focus-visible { background: var(--maroon); }
.btn--ghost { border-color: var(--gold); color: var(--gold-light); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: rgba(212,162,76,.18); color: var(--gold-light); }

/* ================= RSVP ================= */
.rsvp {
  background: var(--maroon);
  color: var(--ivory);
  padding: 4.5rem 16px;
  text-align: center;
}
.rsvp .display { color: var(--ivory); }
.rsvp__form {
  max-width: 28rem; margin: 0 auto;
  display: grid; gap: 1.1rem;
  text-align: left;
}
.field { display: grid; gap: .35rem; }
.field > span, .choice legend { font-family: var(--caps); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); }
.field small { text-transform: none; letter-spacing: 0; font-family: var(--serif); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 1.05rem;
  padding: .7rem .9rem;
  border-radius: 10px;
  border: 1px solid rgba(212,162,76,.55);
  background: rgba(251,243,228,.06);
  color: var(--ivory);
}
.field select option { color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--marigold); outline-offset: 1px; }
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.choice legend { margin-bottom: .4rem; }
.choice label {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .9rem;
  border: 1px solid rgba(212,162,76,.45); border-radius: 10px;
  cursor: pointer;
}
.choice input { accent-color: var(--marigold); width: 18px; height: 18px; }
.choice label:has(input:checked) { background: rgba(232,137,43,.18); border-color: var(--marigold); }
.rsvp__actions { display: grid; gap: .6rem; margin-top: .4rem; }
.rsvp .btn { border-color: var(--gold); color: var(--gold-light); }
.rsvp .btn--solid { background: var(--saffron); border-color: var(--saffron); color: var(--wine); }
.rsvp .btn--solid:hover, .rsvp .btn--solid:focus-visible { background: var(--marigold); }

/* ================= Footer ================= */
.foot {
  position: relative;
  background: var(--wine);
  color: var(--ivory);
  text-align: center;
  padding: 220px 16px calc(5rem + env(safe-area-inset-bottom));
  overflow: hidden;
}
.foot__garland {
  position: absolute; top: 0; left: 50%; width: min(100%, 520px); height: 200px;
  object-fit: cover; object-position: 50% 0; transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.foot .pa-line { color: var(--marigold); font-size: 1.6rem; }
.foot__families { font-family: var(--script); font-size: 2.3rem; margin: .4rem 0 1.6rem; color: var(--gold-light); }

/* ================= Reveal + toast ================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 70;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: .7rem 1.1rem;
  background: var(--ivory); color: var(--ink);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  font-size: .98rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ================= Wider screens ================= */
@media (min-width: 820px) {
  .story { grid-template-columns: auto minmax(0, 30rem); align-items: center; justify-content: center; column-gap: 4rem; }
  .story__text { text-align: left; }
  .countdown { grid-column: 1 / -1; }
  .hero__bg { background-size: auto 100%; background-repeat: no-repeat; background-position: center; }
  .hero__wash {
    display: block; position: absolute; inset: 0;
    background: url("media/gurdwara-end.webp") center / cover;
    filter: blur(30px) brightness(.7);
    transform: scale(1.1);
  }
  .intro__film { object-fit: contain; background: var(--wine); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fade, .reveal { opacity: 1; transform: none; }
}
