/* Wedding invite. Design tokens per docs/08-design-spec.md §6 (PROPOSAL, awaiting OI-25 sign-off). */
:root {
  --ivory: #fcf4e3;
  --ink: #2b0d12;
  --maroon: #7a1626;
  --maroon-deep: #4a0c17;
  --gold: #d9a441;
  --gold-soft: #f0d08a;
  --card-shadow: 0 18px 50px rgba(20, 4, 10, 0.35);
  --font-display: "Rozha One", Georgia, "Times New Roman", serif;
  --font-body: "Spectral", Georgia, "Times New Roman", serif;
  --font-dev: "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;
  --col: 480px;
  --gutter: 16px;
  /* sky (set by sky.js) */
  --sky-top: #1b1030;
  --sky-mid: #4a2340;
  --sky-hz: #8a4a4a;
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Crect width='56' height='56' fill='%238E1B2E'/%3E%3Cpath d='M0 0H56M0 0V56' stroke='%23A2354A' stroke-width='1'/%3E%3Cg fill='%23E58FA0' opacity='.85'%3E%3Ccircle cx='28' cy='28' r='2.4'/%3E%3Cpath d='M28 19 l2 6 -2 2 -2 -2z M28 37 l2 -6 -2 -2 -2 2z M19 28 l6 2 2 -2 -2 -2z M37 28 l-6 2 -2 -2 2 -2z'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--maroon-deep) var(--tile);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}
body.locked {
  overflow: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
.dev {
  font-family: var(--font-dev);
}
:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip-a11y {
  position: absolute;
  left: -9999px;
}
.skip-a11y:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--ivory);
  color: var(--ink);
  padding: 8px 12px;
}

/* ---------- sky (fixed, inside the column on desktop) ---------- */
#sky {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
#sky .sky-grad,
#sky canvas {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(100%, var(--col));
}
#sky .sky-grad {
  background: linear-gradient(
    to bottom,
    var(--sky-top) 0%,
    var(--sky-mid) 58%,
    var(--sky-hz) 100%
  );
}
#sky canvas {
  height: 100%;
}

main {
  position: relative;
  z-index: 1;
  width: min(100%, var(--col));
  margin: 0 auto;
}
.wrap {
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.sec {
  position: relative;
  padding-block: 72px;
}
.kmark {
  display: block;
  height: 0;
}
.kmark-mid {
  position: absolute;
  top: 55%;
}

/* ---------- opening ---------- */
#opening {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: auto;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  padding: max(20px, env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}
#opening.gone {
  display: none;
}
#opening.fade {
  transition: opacity 0.4s ease;
  opacity: 0;
}
.op-inner {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.op-logo-wrap {
  position: relative;
  height: min(40svh, 400px);
  aspect-ratio: 564 / 1070;
  max-width: 100%;
  will-change: transform;
  transform-origin: 49% 53.9%;
}
.op-logo-wrap img,
.op-window-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.op-logo-frame {
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}
.op-window-glow {
  -webkit-mask: url(/assets/img/opening/logo-window-mask.png) center / 100% 100%
    no-repeat;
  mask: url(/assets/img/opening/logo-window-mask.png) center / 100% 100%
    no-repeat;
  background: #e6d1aa;
  transition: background 0.8s ease;
}
.op-window-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: radial-gradient(
    ellipse at 50% 55%,
    #fff6d8 0%,
    #ffd98a 45%,
    #f2a84b 100%
  );
}
#opening.s-glow .op-window-glow::after {
  opacity: 1;
}
#opening.s-glow .op-logo-window {
  opacity: 0;
  transition: opacity 0.8s ease;
}
#opening .op-fadeout {
  transition: opacity 0.3s ease;
}
#opening.s-zoom .op-fadeout {
  opacity: 0;
}
#opening.s-zoom .op-logo-wrap {
  transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(var(--zoom, 6));
  transition: transform 1.4s cubic-bezier(0.65, 0, 0.35, 1);
}
#opening.s-sky .op-window-glow::after {
  opacity: 0;
}
#opening.s-sky .op-window-glow {
  background: linear-gradient(
    to bottom,
    var(--sky-top),
    var(--sky-mid) 58%,
    var(--sky-hz)
  );
  transition: background 1s ease;
}
#opening.s-zoom {
  background: transparent;
  overflow: hidden;
}
#opening.s-zoom .op-bg {
  opacity: 0;
  transition: opacity 0.9s ease 0.5s;
}
#opening.s-out {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.op-bg {
  position: fixed;
  inset: 0;
  background: var(--maroon-deep) var(--tile);
  z-index: -1;
}
.op-date {
  margin: 4px 0 0;
  color: var(--gold-soft);
  letter-spacing: 0.12em;
  font-size: 15px;
}
.op-ganesha {
  width: min(26vw, 110px, 13svh);
}
.op-diya {
  position: relative;
  background: none;
  border: 0;
  padding: 8px 18px 4px;
  cursor: pointer;
  border-radius: 999px;
  min-height: 64px;
}
.op-diya svg {
  width: 120px;
  height: 70px;
  display: block;
}
.op-diya::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(240, 208, 138, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
.op-diya .flame {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 14px;
  height: 22px;
  margin-left: -7px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(
    circle at 50% 70%,
    #fff6c8,
    #ffc23a 55%,
    rgba(255, 120, 0, 0) 72%
  );
  opacity: 0;
  transform-origin: 50% 100%;
}
.op-diya.lit .flame {
  opacity: 1;
  animation: flick 0.18s ease-in-out infinite alternate;
}
.op-diya.lit::after {
  animation: none;
  opacity: 0;
}
.op-hint {
  margin: 0;
  font-size: 19px;
  color: var(--ivory);
}
.op-sound {
  margin: 0;
  font-size: 15px;
  color: var(--gold-soft);
  font-style: italic;
}
.op-skip {
  margin-top: 6px;
  background: none;
  border: 0;
  color: var(--gold-soft);
  font: 500 18px var(--font-body);
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: 48px;
  padding: 8px 14px;
  cursor: pointer;
}
@keyframes pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}
@keyframes flick {
  from {
    transform: scaleY(1) skewX(-2deg);
  }
  to {
    transform: scaleY(1.12) skewX(2deg);
  }
}

/* ---------- invitation ---------- */
.sec-invite {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding-top: 96px;
}
.invite {
  background: rgba(30, 8, 16, 0.42);
  border-radius: 22px;
  padding-block: 28px;
  margin-inline: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 12px rgba(20, 4, 10, 0.35);
}
.invocation {
  font-size: 22px;
  color: var(--gold-soft);
  margin: 0 0 12px;
}
.intro,
.relation,
.parents {
  margin: 0;
  font-size: 19px;
  max-width: 34ch;
}
.hosts {
  margin: 6px 0;
  font: 600 21px var(--font-body);
  color: var(--gold-soft);
  max-width: 30ch;
}
.names {
  margin: 18px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 400;
}
.names .name {
  font-family: var(--font-display);
  font-size: clamp(40px, 11vw, 54px);
  line-height: 1.1;
  color: var(--ivory);
}
.names .with {
  font-style: italic;
  font-size: 20px;
  margin: 4px 0;
  color: var(--gold-soft);
}

/* ---------- cards ---------- */
.card {
  background: var(--ivory);
  color: var(--ink);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow:
    var(--card-shadow),
    0 0 0 2px var(--gold) inset;
}
.eyebrow {
  margin: 0 0 4px;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon);
  font-weight: 600;
}
.title {
  margin: 0;
  font: 400 clamp(34px, 9vw, 42px)/1.15 var(--font-display);
  color: var(--maroon);
  text-wrap: balance;
}
.title.small {
  font-size: 28px;
}
.title .dev {
  font-size: 0.62em;
  color: #9a6b1f;
  margin-left: 6px;
}
.special {
  margin: 8px 0 0;
  font-style: italic;
  font-size: 20px;
  color: var(--maroon-deep);
}
.facts {
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}
.facts div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: baseline;
}
.facts dt {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a5a3a;
}
.facts dd {
  margin: 0;
  font-size: 20px;
  min-width: 0;
}
.facts .time {
  font-size: 22px;
  font-weight: 600;
  color: var(--maroon);
}
.programme {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.programme li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(122, 22, 38, 0.15);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.programme .p-time {
  font-size: 22px;
  font-weight: 600;
  color: var(--maroon);
  text-align: right;
}
.note {
  margin: 10px 0 0;
  font-size: 18px;
  font-style: italic;
  color: #6a4a35;
}
.dress {
  margin-top: 16px;
}
.dress-label {
  margin: 0 0 8px;
  font-size: 18px;
}
.dress-line {
  margin: 0;
  font-size: 20px;
  font-style: italic;
  color: var(--maroon-deep);
}
.dots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 10px;
}
.dots li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}
.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
  flex: none;
}
.actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--maroon);
  background: var(--maroon);
  color: var(--ivory);
  font: 600 18px var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost {
  background: transparent;
  color: var(--maroon);
}
.btn-small {
  min-height: 48px;
  font-size: 18px;
  padding: 8px 14px;
}
.btn-primary {
  width: 100%;
  font-size: 19px;
}
.cal {
  position: relative;
}
.cal summary {
  list-style: none;
}
.cal summary::-webkit-details-marker {
  display: none;
}
.cal[open] summary {
  background: var(--maroon);
  color: var(--ivory);
}
.cal-menu {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- chapters ---------- */
.chapter {
  position: relative;
  padding-bottom: 18svh;
}
.scene {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
.chapter .details {
  position: relative;
  z-index: 2;
  margin: -8svh max(var(--gutter), env(safe-area-inset-right)) 0
    max(var(--gutter), env(safe-area-inset-left));
}

/* placeholders (replaced in M06) */
.ph {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  border: 2px dashed rgba(252, 244, 227, 0.55);
  border-radius: 14px;
  color: rgba(252, 244, 227, 0.85);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.08);
}
.ph small {
  opacity: 0.7;
  font-size: 12px;
}
.ph-round {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
}
.ph-top {
  left: 4%;
  right: 4%;
  top: 3%;
  height: 18%;
}
.ph-center {
  left: 18%;
  right: 18%;
  top: 26%;
  height: 42%;
}
.ph-bottom {
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  border-radius: 14px 14px 0 0;
}
.ph-frame {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  border-radius: 0;
  background: none;
  border-color: rgba(252, 244, 227, 0.25);
}
.ph-back {
  top: 18%;
  height: 46%;
}
.ph-left {
  left: 3%;
  width: 30%;
  top: 12%;
  height: 40%;
}
.ph-right {
  right: 3%;
  width: 30%;
  top: 12%;
  height: 40%;
}
.ph-front {
  left: 26%;
  right: 26%;
  top: 44%;
  height: 36%;
}
.ph-hero {
  left: 8%;
  right: 8%;
  top: 16%;
  height: 58%;
}

/* ---------- countdown ---------- */
.countdown {
  text-align: center;
}
.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.cd-unit b {
  display: block;
  font: 400 clamp(30px, 9vw, 40px)/1.1 var(--font-display);
  color: var(--maroon);
  font-variant-numeric: tabular-nums;
}
.cd-unit span {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a5a3a;
}
.cd-msg {
  margin: 10px 0 0;
  font: 400 26px var(--font-display);
  color: var(--maroon);
}

/* ---------- next day ---------- */
.sec-nextday {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.nd-line {
  margin: 0;
  font-size: 21px;
  font-style: italic;
}
.nd-flip {
  margin: 8px 0 0;
  font: 400 clamp(64px, 20vw, 96px)/1 var(--font-display);
  color: var(--gold-soft);
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}
.nd-arrow {
  font-size: 0.45em;
  opacity: 0.8;
}
.nd-month {
  margin: 4px 0 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 16px;
}

/* ---------- hashtag ---------- */
.sec-hashtag {
  text-align: center;
  padding-bottom: 110px;
}
.ht-caption {
  margin: 0;
  font-size: 18px;
}
.ht-tag {
  margin: 6px 0 0;
  font: 400 clamp(32px, 10vw, 44px)/1.1 var(--font-display);
  color: var(--ivory);
  word-break: break-word;
}

/* ---------- RSVP ---------- */
.deadline {
  margin: 4px 0 14px;
  font-size: 18px;
  font-style: italic;
  color: var(--maroon-deep);
}
#rsvp-form {
  display: grid;
  gap: 16px;
}
.field {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field label,
.field legend {
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--maroon);
  padding: 0;
}
.field input[type="text"],
.field input[type="number"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  font: 400 19px var(--font-body);
  color: var(--ink);
  background: #fffdf7;
  border: 1.5px solid rgba(122, 22, 38, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 52px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(122, 22, 38, 0.18);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(122, 22, 38, 0.4);
  font-size: 17px;
  color: var(--ink);
}
.chip input:checked + span {
  background: var(--maroon);
  color: var(--ivory);
  border-color: var(--maroon);
}
.chip input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.err {
  margin: 0;
  color: #a0182e;
  font-size: 18px;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.if-yes {
  display: grid;
  gap: 16px;
}
.if-yes[hidden] {
  display: none;
}
.rsvp-done,
.rsvp-fail {
  margin-top: 8px;
  display: grid;
  gap: 12px;
}
.done-msg {
  margin: 0;
  font-size: 20px;
}

/* ---------- contact & footer ---------- */
.contact {
  text-align: center;
}
.c-name {
  margin: 10px 0 0;
  font: 600 21px var(--font-body);
}
.c-num {
  margin: 2px 0 0;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.selectable {
  user-select: all;
  -webkit-user-select: all;
}
.contact .actions {
  justify-content: center;
}
.footer {
  text-align: center;
  padding-bottom: 140px;
}
.f-logo {
  width: 120px;
  margin: 0 auto 10px;
}
.f-line {
  margin: 0;
  font: 400 28px var(--font-display);
  color: var(--gold-soft);
}
.f-tag {
  margin: 4px 0 0;
  font-size: 18px;
}
.f-names {
  margin: 2px 0 0;
  font-size: 18px;
  opacity: 0.85;
}

/* ---------- floating controls ---------- */
.rsvp-pill {
  position: fixed;
  z-index: 20;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  min-height: 52px;
  min-width: 88px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font: 700 18px var(--font-body);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.rsvp-pill.hide {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.mute {
  position: fixed;
  z-index: 20;
  left: calc(16px + env(safe-area-inset-left, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--maroon-deep);
  color: var(--gold-soft);
  cursor: pointer;
}

/* ---------- root page ---------- */
.root-page main.root {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px 16px;
  width: min(100%, 480px);
  margin: 0 auto;
}
.root-logo {
  width: min(60vw, 240px);
}
.root-line {
  margin: 0;
  color: var(--gold-soft);
  font-size: 18px;
}
.root-sub {
  margin: 0;
  font-size: 17px;
}

/* ---------- desktop backdrop ---------- */
@media (min-width: 520px) {
  main {
    box-shadow: 0 0 0 1px rgba(240, 208, 138, 0.2);
  }
}

/* ---------- calm / reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .op-diya::after,
  .op-diya.lit .flame {
    animation: none;
  }
}
.calm .op-diya::after {
  animation: none;
}

/* ---------- M04a: Haldi motion (design spec §5 Haldi) ---------- */
.layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.layer > .ph {
  pointer-events: none;
}
.hl-drapes .ph-top {
  transform-origin: 50% 0;
  animation: sway 6s ease-in-out infinite;
}
@keyframes sway {
  0%,
  100% {
    transform: rotate(-1.5deg);
  }
  50% {
    transform: rotate(1.5deg);
  }
}
.hl-heads {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
}
.sf {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 15%;
  max-width: 72px;
  aspect-ratio: 1;
  margin-left: -7.5%;
  transform: rotate(var(--a, 0deg));
  transform-origin: 50% 100%;
  transition: transform 0.35s ease-out;
}
.sf svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.6s ease;
}
/* Variant swap placeholder: HL-2a (sun low) is half-open, HL-2b (sun high) fully open. Real art swaps images in M06. */
.sf[data-v="low"] svg {
  transform: scale(0.82);
}
.sf[data-v="high"] svg {
  transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .hl-drapes .ph-top {
    animation: none;
  }
  .sf,
  .sf svg {
    transition: none;
  }
}
.calm .hl-drapes .ph-top {
  animation: none;
}
.calm .sf,
.calm .sf svg {
  transition: none;
}

/* ---------- M04b: Sangeet motion (design spec §5 Sangeet) ---------- */
.sg-umb {
  animation: sway 8s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.sg-umb-2 {
  animation-duration: 9s;
  animation-delay: -3s;
}
.sg-lights {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 30%;
  overflow: visible;
  pointer-events: none;
}
.sg-lights path {
  fill: none;
  stroke: rgba(214, 190, 150, 0.5);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.sg-bulb {
  fill: #6b5a3c;
  transition:
    fill 0.25s ease,
    filter 0.25s ease;
}
.sg-bulb.on {
  fill: #ffd98a;
  filter: drop-shadow(0 0 1.2px #ffc24a);
  animation: twinkle var(--tw, 3s) ease-in-out var(--td, 0s) infinite;
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sg-umb,
  .sg-bulb.on {
    animation: none;
  }
  .sg-bulb {
    transition: none;
  }
}
.calm .sg-umb,
.calm .sg-bulb.on {
  animation: none;
}
.calm .sg-bulb {
  transition: none;
}

/* ---------- M04c: next-day beat (design spec §5 Next-day) ---------- */
.nd-flip {
  perspective: 600px;
}
.nd-to {
  display: inline-block;
  transform-origin: 50% 0;
  transform: rotateX(-90deg);
  opacity: 0;
  transition:
    transform 0.6s cubic-bezier(0.3, 1.4, 0.5, 1),
    opacity 0.2s ease;
}
.nd-from {
  transition: opacity 0.6s ease;
}
.nd-flip.flipped .nd-to {
  transform: none;
  opacity: 1;
}
.nd-flip.flipped .nd-from {
  opacity: 0.8;
}
.calm .nd-to,
.calm .nd-from {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .nd-to,
  .nd-from {
    transition: none;
  }
}
/* Full-width band with the Invitation's scrim tint, for contrast over the day sky (DS-15). */
.nextday {
  background: rgba(30, 8, 16, 0.6);
  border-radius: 0;
  padding: 28px 16px;
  width: 100%;
  box-sizing: border-box;
  text-shadow: 0 1px 12px rgba(20, 4, 10, 0.35);
}

/* ---------- M04d: phera flames (design spec §5 Wedding) ---------- */
.wd-hero {
  position: absolute;
  inset: 0;
}
.pheras {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 16%;
  height: 58%;
  pointer-events: none;
}
.pf {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 18px;
  height: 10px;
  margin: -5px 0 0 -9px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(#d9a441, #9a6418);
}
.pf-flame {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 10px;
  height: 16px;
  margin-left: -5px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(
    circle at 50% 70%,
    #fff6c8,
    #ffc23a 55%,
    rgba(255, 120, 0, 0) 72%
  );
  opacity: 0;
  transform: scale(0.3);
  transform-origin: 50% 100%;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.pf.lit .pf-flame {
  opacity: 1;
  transform: none;
  animation: flick 0.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 6px rgba(255, 190, 80, 0.9));
}
@media (prefers-reduced-motion: reduce) {
  .pf.lit .pf-flame {
    animation: none;
  }
  .pf-flame {
    transition: none;
  }
}
.calm .pf.lit .pf-flame {
  animation: none;
}
.calm .pf-flame {
  transition: none;
}

/* ---------- M04e: havan fire, embers, rose petals (design spec §5 Wedding) ---------- */
.wd-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- M04f: hashtag merge (design spec §5 Hashtag B4) ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ht-stage {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
}
/* Final state (default: no JS, calm, reduced motion): #AbhiSeParmanent */
.ht-t {
  display: none;
}
/* Start state, set by JS before the merge plays: "ABHIshek PARul" (or "PARul ABHIshek" on /parul) */
.ht-start .ht-h,
.ht-start .ht-n {
  display: none;
}
.ht-start .ht-t {
  display: inline;
  color: var(--gold-soft);
}
.ht-k {
  transition: color 0.5s ease;
}
.ht-start .ht-k {
  color: var(--gold-soft);
}
.ht-start .ht-t1 {
  margin-right: 0.3em;
}
.ht-start[data-first="p"] .ht-k1,
.ht-start[data-first="p"] .ht-t1 {
  order: 2;
}
.ht-start[data-first="p"] .ht-t1 {
  margin-right: 0;
}
.ht-start[data-first="p"] .ht-t2 {
  margin-right: 0.3em;
}
.ht-ghost {
  position: absolute;
  color: var(--gold-soft);
  pointer-events: none;
  white-space: nowrap;
}
.ht-shimmer .ht-stage {
  background: linear-gradient(
      100deg,
      var(--ivory) 35%,
      #ffe7a6 50%,
      var(--ivory) 65%
    )
    0 0 / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 0.6s ease-out 1 forwards;
}
.ht-shimmer .ht-stage > * {
  color: transparent;
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

/* ---------- M06: art swap-in and layer tinting (design spec §4, §11) ---------- */
.art {
  position: absolute;
}
.art.ph-round {
  position: relative;
} /* OP-1 Ganesha keeps its in-flow box */
.layer > .art {
  pointer-events: none;
}
.art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: filter 0.8s ease;
}
.ph-bottom.art img,
.ph-top.art img {
  object-position: 50% 100%;
}
.ph-top.art img {
  object-position: 50% 0;
}
.ph-frame.art img {
  object-fit: cover;
}
/* Spec §4: the art is painted in neutral light; tint it to the sky. Overlay colours are applied as a
   drop-in filter approximation (CLAUDE DEFAULT): dusk = warm, night = darker and cooler. */
:root[data-tint="dusk"] .scene .art img {
  filter: sepia(0.15) saturate(1.05) brightness(0.92);
}
:root[data-tint="night"] .scene .art img {
  filter: brightness(0.55) saturate(0.8) hue-rotate(-8deg);
}
/* Lit by fire or fairy lights: tinted less at night (spec §4). */
:root[data-tint="night"] .scene .art[data-asset="SG-5"] img,
:root[data-tint="night"] .scene .art[data-asset="WD-1"] img {
  filter: brightness(0.8);
}
.calm .art img {
  transition: none;
}

/* ---------- M09: art hooks for the diya (OP-2) and sunflower heads (HL-2 variants) ---------- */
.op-diya-img {
  width: 132px;
  height: auto;
  display: block;
}
/* Flame sits on the wick; position is a CLAUDE DEFAULT, re-set on the approved OP-2 art. */
.op-diya:has(.op-diya-img) .flame {
  left: var(--wick-x, 50%);
  top: var(--wick-y, 6px);
}
.sf-art {
  height: auto;
  aspect-ratio: auto;
}
.sf-img {
  width: 100%;
  height: auto;
  display: none;
}
.sf-art .sf-img[data-for="mid"] {
  display: block;
}
.sf-art[data-v="low"]:has(.sf-img[data-for="low"]) .sf-img[data-for="mid"],
.sf-art[data-v="high"]:has(.sf-img[data-for="high"]) .sf-img[data-for="mid"] {
  display: none;
}
.sf-art[data-v="low"] .sf-img[data-for="low"],
.sf-art[data-v="high"] .sf-img[data-for="high"] {
  display: block;
}
/* OP-2 art (approved 17 Oct): the wick tip sits at ~27.5% / 50% of the cut-out → flame base on it at 132 px wide. */
.op-diya:has(.op-diya-img) {
  --wick-x: 54px;
  --wick-y: 34px;
  flex-shrink: 0;
}
/* HL-4 art (17 Oct): the sunflowers run off the image's left/right edges; fade those edges into the sky. */
.art[data-asset="HL-4"] img {
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 7%,
    #000 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 7%,
    #000 93%,
    transparent 100%
  );
}
/* HL-1 art (18 Oct, try 1): a tall field of sunflowers (9:16, upper half empty). It sits behind the couple as a
   field they're sitting in: a taller band, layered under HL-4. */
.hl-foliage {
  z-index: 0;
}
.scene-haldi > .art[data-asset="HL-4"] {
  z-index: 1;
}
.hl-foliage .art[data-asset="HL-1"] {
  height: 46%;
}
.hl-foliage .art[data-asset="HL-1"] img {
  object-fit: cover;
  object-position: 50% 100%;
}
/* HL-3 art (18 Oct): the drapes hang from the very top edge, full width. */
.hl-drapes .art[data-asset="HL-3"] {
  top: 0;
  left: 0;
  right: 0;
  height: 21%;
}
/* SG-1/SG-2 art (18 Oct): larger umbrellas framing the scene; the pole fades out at the bottom (the art's pole is cut off). */
.scene-sangeet .art.sg-umb {
  width: 52%;
  height: auto;
  aspect-ratio: 1080 / 1040;
  top: 9%;
}
.scene-sangeet .art.sg-umb-1 {
  left: -4%;
}
.scene-sangeet .art.sg-umb-2 {
  right: -4%;
  left: auto;
}
.scene-sangeet .art.sg-umb img {
  object-position: 50% 0;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 98%);
}
/* SG-2 art (18 Oct) is a black twin of SG-1 leaning the same way: mirror it so the pair frames the scene. */
.scene-sangeet .art.sg-umb-2 img {
  transform: scaleX(-1);
}
/* SG-4 / WD-3 frame art (18 Oct): full canvas kept; contain + bottom so the trees are never cropped at the sides. */
.scene .art.ph-frame[data-asset="SG-4"] img,
.scene .art.ph-frame[data-asset="WD-3"] img {
  object-fit: contain;
  object-position: 50% 100%;
}
/* SG-5 art (18 Oct): the lehenga hem and shoe run off the image's bottom edge; fade that edge. */
.scene-sangeet .art[data-asset="SG-5"] {
  left: 10%;
  right: 10%;
  top: 40%;
  height: 40%;
}
.scene-sangeet .art[data-asset="SG-5"] img {
  object-position: 50% 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 82%, transparent 100%);
}

/* =====================================================================================================
   M11 (D23, 18 Oct): one painted illustration per chapter on paper; text set on the art. Replaces the
   layered scenes and the photographic sky. Colours come from the paper tones in sky.js (smooth blends).
   ===================================================================================================== */
main {
  color: var(--ink);
}
/* Invitation on paper: ink text, no dark scrim. */
.invite {
  background: none;
  text-shadow: none;
}
.invocation {
  color: #9a6b1f;
}
.hosts {
  color: var(--maroon);
}
.names .name {
  color: var(--maroon);
}
.names .with {
  color: #9a6b1f;
}
.intro,
.relation,
.parents {
  color: var(--ink);
}

/* Chapter = full-width illustration + a paper details block under it. */
.chapter-art {
  padding-bottom: 32px;
}
.scene-art {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 9 / 16;
}
.scene-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 6%,
    #000 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 6%,
    #000 93%,
    transparent 100%
  );
}
.scene-ph {
  position: absolute;
  inset: 14px;
  border: 2px dashed rgba(122, 22, 38, 0.28);
  border-radius: 18px;
  display: grid;
  place-items: start center;
  padding-top: 18px;
  color: rgba(122, 22, 38, 0.55);
  font-size: 14px;
}
/* Text sits in the painting's empty middle band (the prompts leave the middle ~45% plain paper). */
.scene-text {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 27%;
  bottom: 28%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}
.scene-text .eyebrow {
  color: #8a5a1c;
}
.scene-text .title {
  font-size: clamp(44px, 13vw, 58px);
}
.scene-text .special {
  margin: 2px 0 0;
  font-size: 20px;
  color: var(--maroon-deep);
}
.s-time {
  margin: 10px 0 0;
  font: 600 23px var(--font-body);
  color: var(--maroon);
}
.s-venue {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  max-width: 28ch;
}
/* Details under the art: paper, not a floating card. */
.details.paper {
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  padding-top: 8px;
}
.details.paper .dress {
  margin-top: 0;
}
.details.paper .programme {
  margin-top: 0;
}

/* Next-day beat on paper. */
.nextday {
  background: none;
  text-shadow: none;
}
.nd-line {
  color: var(--maroon-deep);
}
.nd-flip {
  color: var(--maroon);
}
.nd-month {
  color: #8a5a1c;
}

/* From the hashtag down: deep maroon, with a soft blend in from the wedding paper. */
.sec-hashtag {
  background: linear-gradient(180deg, transparent 0, var(--maroon-deep) 140px);
  color: var(--ivory);
}
.sec-rsvp,
#contact,
.footer {
  background: var(--maroon-deep);
  color: var(--ivory);
}
/* Details sit fully below the art (the old card overlap margin no longer applies). */
.chapter .details.paper {
  margin: 0;
  position: relative;
  z-index: 2;
}
/* SC-WD (v2.1): the Wedding text sits in the sky above the dome (top band), as in Abhishek's references. */
#wedding .scene-text {
  gap: 2px;
}
#wedding .scene-text .title {
  font-size: clamp(36px, 10.5vw, 48px);
  line-height: 1.05;
}
#wedding .scene-text .s-venue {
  font-size: 18px;
}
/* Scene art (18 Oct): each painting keeps its own shape (--ar from content config); its text box is set inline. */
.scene-art {
  aspect-ratio: var(--ar, 9 / 16);
}
.scene-art .scene-img {
  object-fit: contain;
}
#sangeet .scene-text .title {
  font-size: clamp(36px, 10vw, 46px);
  line-height: 1.05;
}
#sangeet .scene-text .s-venue {
  font-size: 18px;
}
#haldi .scene-text .title {
  font-size: clamp(40px, 11.5vw, 54px);
}
.s-venue.below {
  margin: 0 0 14px;
  font-size: 19px;
  text-align: center;
  max-width: none;
}
#haldi .scene-text {
  gap: 4px;
}
@media (max-width: 370px) {
  #haldi .scene-text .s-venue {
    font-size: 16px;
  }
  #haldi .scene-text .s-time {
    font-size: 21px;
  }
}
#wedding .scene-text .s-venue {
  font-size: 16px;
  max-width: none;
}

/* ======================================================================================================
   D24 (18 Oct): one illustrated card set. Every screen sits on cream paper painted by the same hand
   (PG-OP opening, PG-INV invitation, the three scenes, PG-CL closing); type follows the Haldi sample:
   a script for titles, small caps for labels, a quiet serif for reading. No tiles, no maroon blocks, no cards.
   ====================================================================================================== */
:root {
  --paper: #f7eedc;
  --paper-2: #f3e6cc;
  --ink: #3b1c14;
  --ink-soft: #6b4a35;
  --gold-line: #b8893a;
  --gold-ink: #8c6420;
  --font-display: "Great Vibes", "Snell Roundhand", "Apple Chancery", cursive;
  --font-caps: "Cormorant SC", "Cormorant Garamond", Georgia, serif;
  --font-body: "Spectral", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
body {
  background: var(--paper);
  color: var(--ink);
}
main {
  color: var(--ink);
}

/* ---------- ornament divider (ORN-1, or a drawn gold rule until the art exists) ---------- */
.orn {
  height: 34px;
  margin: 18px auto;
  width: min(78%, 300px);
  position: relative;
  background: linear-gradient(
      90deg,
      transparent,
      var(--gold-line) 18%,
      var(--gold-line) 42%,
      transparent 46%,
      transparent 54%,
      var(--gold-line) 58%,
      var(--gold-line) 82%,
      transparent
    )
    center / 100% 1.5px no-repeat;
}
.orn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  transform: rotate(45deg);
  border: 1.5px solid var(--gold-line);
}
.orn.orn-art {
  height: 54px;
  width: min(92%, 380px);
  background: url(/assets/img/art/ORN-1.webp) center / contain no-repeat;
}
.orn.orn-art::after {
  display: none;
}

/* ---------- type ---------- */
.eyebrow {
  font: 600 17px/1.3 var(--font-caps);
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--gold-ink);
}
.title {
  font: 400 clamp(52px, 15vw, 66px)/1.05 var(--font-display);
  color: var(--maroon);
  letter-spacing: 0;
}
.title .dev {
  font-family: var(--font-dev);
  font-size: 0.42em;
  color: var(--gold-ink);
  vertical-align: 0.35em;
  margin-left: 0.15em;
}

/* ---------- opening: one painted page ---------- */
#opening {
  background: var(--paper);
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 0;
}
.op-stage {
  position: relative;
  height: 100svh;
  aspect-ratio: 9 / 16;
  flex: none;
  transform-origin: 50% 60%;
}
.op-paint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.op-arch {
  position: absolute;
  inset: 3.5% max(6%, calc(50% - 50vw + 14px)) 3%;
  border: 1.5px solid var(--gold-line);
  border-radius: 50% 50% 14px 14px / 17% 17% 14px 14px;
}
.op-arch::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(184, 137, 58, 0.45);
  border-radius: inherit;
}
.op-ganesha {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  max-width: none;
  transform: translate(-50%, -50%);
}
.op-ganesha img {
  width: 100%;
  height: auto;
}
.op-text {
  position: absolute;
  left: calc(50% - min(50%, 50vw) + 30px);
  right: calc(50% - min(50%, 50vw) + 30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.op-date {
  margin: 0;
  font: 600 17px/1.3 var(--font-caps);
  letter-spacing: 0.16em;
  color: var(--gold-ink);
}
.op-hint {
  margin: 0;
  font: 400 clamp(34px, 10vw, 42px)/1.15 var(--font-display);
  color: var(--maroon);
}
.op-sound {
  margin: 0;
  font: italic 400 18px var(--font-body);
  color: var(--ink-soft);
}
.op-skip {
  margin-top: 4px;
  color: var(--maroon);
  font: 600 19px var(--font-caps);
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.op-diya {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  transform: translate(-50%, -50%);
  padding: 0;
  min-height: 0;
  border-radius: 50%;
}
.op-diya::after {
  inset: -14% -8%;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(255, 196, 92, 0.45),
    rgba(255, 196, 92, 0)
  );
  animation: glowpulse 2.6s ease-in-out infinite;
  z-index: -1;
}
@keyframes glowpulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}
.op-diya-img {
  width: 100%;
}
.op-diya:has(.op-diya-img) {
  --wick-x: 40.9%;
  --wick-y: 34.9%;
}
.op-diya.lit::after {
  animation: none;
  opacity: 1;
  transform: scale(1.4);
  transition: transform 0.6s ease;
}
#opening .op-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: radial-gradient(
    60% 45% at 50% 78%,
    rgba(255, 190, 90, 0.35),
    rgba(255, 190, 90, 0)
  );
}
#opening.s-glow .op-stage::after {
  opacity: 1;
}
#opening.s-zoom {
  background: transparent;
}
#opening.s-zoom .op-fadeout {
  opacity: 0;
}

/* ---------- painted pages: the painting's top and bottom bands, plain paper between ---------- */
.page {
  position: relative;
  isolation: isolate;
}
.page[data-page]:not([data-noart]) {
  --bt: 22;
  --bb: 22;
}
.page[data-page]:not([data-noart])::before,
.page[data-page]:not([data-noart])::after {
  content: "";
  position: absolute;
  left: 50%;
  width: min(100%, 560px);
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background-image: var(--page);
  background-size: 100% auto;
  background-repeat: no-repeat;
}
.page[data-page]:not([data-noart])::before {
  top: 0;
  height: calc(min(100vw, 560px) * 16 / 9 * var(--band-top) / 100);
  background-position: 50% 0;
  -webkit-mask-image: linear-gradient(#000 75%, transparent);
  mask-image: linear-gradient(#000 75%, transparent);
}
.page[data-page]:not([data-noart])::after {
  bottom: 0;
  height: calc(min(100vw, 560px) * 16 / 9 * var(--band-bot) / 100);
  background-position: 50% 100%;
  -webkit-mask-image: linear-gradient(transparent, #000 25%);
  mask-image: linear-gradient(transparent, #000 25%);
}
.page[data-page]:not([data-noart]) {
  padding-top: calc(min(100vw, 560px) * 16 / 9 * var(--band-top) / 100 * 0.82);
  padding-bottom: calc(
    min(100vw, 560px) * 16 / 9 * var(--band-bot) / 100 * 0.9
  );
}
.page[data-noart]::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  transform: translateX(-50%);
  top: 22px;
  width: min(calc(100% - 36px), 500px);
  height: 190px;
  border: 1.5px solid var(--gold-line);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}

/* ---------- invitation page ---------- */
.sec-invite {
  min-height: 100svh;
  padding-top: 110px;
  padding-bottom: 80px;
}
.invite {
  background: none;
  text-shadow: none;
  gap: 4px;
  max-width: 520px;
  margin-inline: auto;
}
.invocation {
  font-size: 22px;
  color: var(--gold-ink);
  margin-bottom: 10px;
}
.intro,
.relation,
.parents {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
}
.hosts {
  font: 600 23px/1.35 var(--font-caps);
  letter-spacing: 0.04em;
  color: var(--maroon);
  margin: 6px 0;
}
.names {
  margin: 14px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.names .name {
  font: 400 clamp(54px, 15.5vw, 76px)/1.08 var(--font-display);
  color: var(--maroon);
}
.names .with {
  font: italic 400 22px var(--font-body);
  color: var(--gold-ink);
  margin: 2px 0;
}
#countdown.countdown {
  background: none;
  box-shadow: none;
  padding: 0;
  margin-top: 2px;
  text-align: center;
}
.cd-grid {
  gap: 6px;
}
.cd-unit b {
  font: 600 clamp(34px, 10vw, 42px)/1.1 var(--font-caps);
  color: var(--maroon);
}
.cd-unit span {
  font: 600 14px var(--font-caps);
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.cd-msg {
  font-family: var(--font-display);
  font-size: 36px;
}

/* ---------- scenes ---------- */
.scene-text .title {
  font-size: clamp(50px, 14vw, 62px);
}
#haldi .scene-text .title {
  font-size: clamp(54px, 15vw, 66px);
}
#sangeet .scene-text .title {
  font-size: clamp(46px, 13vw, 56px);
}
#wedding .scene-text .title {
  font-size: clamp(48px, 13.5vw, 60px);
}
.scene-text .eyebrow {
  font-size: 16px;
}
.s-time {
  font: 600 22px var(--font-caps);
  letter-spacing: 0.06em;
  color: var(--maroon);
}
.s-venue {
  color: var(--ink);
}
.details.paper {
  color: var(--ink);
}
.dress-label {
  font: 600 18px var(--font-caps);
  letter-spacing: 0.08em;
  color: var(--gold-ink);
}
.dress-line {
  color: var(--ink-soft);
}
.programme li {
  border-color: rgba(184, 137, 58, 0.35);
}
.programme .p-time {
  font: 600 21px var(--font-caps);
  color: var(--maroon);
}

/* ---------- buttons: hand-lettered feel, thin gold-maroon lines ---------- */
.btn {
  border-width: 1.5px;
  font: 600 19px var(--font-caps);
  letter-spacing: 0.06em;
  box-shadow: 0 2px 0 rgba(184, 137, 58, 0.35);
}
.btn-ghost {
  background: rgba(255, 250, 240, 0.55);
}

/* ---------- next day: a quiet paper interlude ---------- */
.sec-nextday {
  min-height: 72svh;
}
.nd-line {
  font: 400 clamp(36px, 10vw, 44px)/1.1 var(--font-display);
  color: var(--maroon);
  font-style: normal;
}
.nd-flip {
  font: 600 clamp(56px, 17vw, 76px)/1 var(--font-caps);
  color: var(--maroon);
}
.nd-month {
  font: 600 18px var(--font-caps);
  letter-spacing: 0.2em;
  color: var(--gold-ink);
}

/* ---------- closing page: hashtag, RSVP, contact, footer on PG-CL ---------- */
.sec-hashtag,
.sec-rsvp,
#contact,
.footer {
  background: none;
  color: var(--ink);
}
.page-close .sec {
  padding-block: 28px;
}
.page-close[data-noart] {
  padding-top: 90px;
}
.ht-caption {
  font: 600 18px var(--font-caps);
  letter-spacing: 0.12em;
  color: var(--gold-ink);
}
.ht-tag {
  font: 400 clamp(44px, 13vw, 58px)/1.1 var(--font-display);
  color: var(--maroon);
}
.ht-start .ht-t,
.ht-start .ht-k,
.ht-ghost {
  color: var(--gold-ink);
}
.ht-shimmer .ht-stage {
  background-image: linear-gradient(
    100deg,
    var(--maroon) 35%,
    #c9922e 50%,
    var(--maroon) 65%
  );
}
.card {
  background: none;
  box-shadow: none;
  color: var(--ink);
  padding: 0;
  border-radius: 0;
}
.card.rsvp,
.card.contact {
  max-width: 520px;
  margin-inline: auto;
  text-align: left;
}
.card.contact {
  text-align: center;
}
.rsvp .title,
.contact .title {
  text-align: center;
}
.title.small {
  font-size: clamp(40px, 11vw, 48px);
}
.deadline {
  text-align: center;
  color: var(--ink-soft);
}
.field label,
.field legend {
  font: 600 17px var(--font-caps);
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--maroon);
}
.field input,
.field textarea {
  background: rgba(255, 251, 242, 0.85);
  border: 1px solid rgba(184, 137, 58, 0.7);
  border-radius: 10px;
  color: var(--ink);
}
.chip span {
  background: rgba(255, 251, 242, 0.85);
  border: 1px solid rgba(184, 137, 58, 0.8);
  color: var(--ink);
}
.c-name {
  font: 600 22px var(--font-caps);
  color: var(--maroon);
}
.c-num {
  color: var(--ink);
}
.footer {
  padding-bottom: 40px;
}
.f-line {
  font: 400 clamp(36px, 10vw, 44px)/1.1 var(--font-display);
  color: var(--maroon);
}
.f-tag,
.f-names {
  color: var(--ink-soft);
  font-family: var(--font-caps);
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ---------- floating controls on paper ---------- */
.rsvp-pill {
  background: var(--maroon);
  color: var(--paper);
  border: 1.5px solid var(--gold);
  font: 600 19px var(--font-caps);
  letter-spacing: 0.08em;
  box-shadow: 0 6px 18px rgba(59, 28, 20, 0.25);
}
.mute {
  background: var(--paper);
  color: var(--maroon);
  border-color: var(--gold-line);
}
.root-line {
  font: 400 clamp(34px, 10vw, 44px)/1.15 var(--font-display);
  color: var(--maroon);
}
.root-sub {
  color: var(--ink-soft);
}
.f-logo {
  width: 130px;
}

/* ---------- D24 v2: opening = the couple's card (OP-BG) with their jharokha, Ganesha and the diya; B1 zoom kept ---------- */
#opening {
  background: #7c1a27;
}
.op-stage[data-art] ~ .op-bg,
#opening:has(.op-stage[data-art]) .op-bg {
  display: none;
}
.op-stage .op-logo-wrap {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: auto;
  aspect-ratio: 564 / 1070;
  margin-left: calc(var(--w) / -2);
  margin-top: calc(var(--w) * -0.9486);
  z-index: 2;
}
.op-stage .op-logo-frame {
  filter: drop-shadow(0 10px 22px rgba(30, 4, 10, 0.45));
}
.op-date {
  position: absolute;
  left: calc(50% - min(50%, 50vw) + 24px);
  right: calc(50% - min(50%, 50vw) + 24px);
  margin: 0;
  text-align: center;
  font: 600 17px/1.3 var(--font-caps);
  letter-spacing: 0.16em;
  color: #f3d58e;
  text-shadow: 0 1px 6px rgba(40, 4, 12, 0.6);
}
.op-ganesha {
  z-index: 1;
}
.op-hint {
  color: #fff4de;
  font-size: clamp(32px, 9.5vw, 40px);
  text-shadow: 0 1px 10px rgba(40, 4, 12, 0.7);
}
.op-sound {
  color: #f3d58e;
  text-shadow: 0 1px 6px rgba(40, 4, 12, 0.6);
}
.op-text {
  gap: 2px;
}
.op-skip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #f3d58e;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(40, 4, 12, 0.6);
  z-index: 3;
}
.op-diya {
  z-index: 2;
}
#opening.s-zoom .op-paint {
  opacity: 0;
  transition: opacity 0.9s ease 0.5s;
}
#opening .op-stage::after {
  z-index: 1;
}

/* ---------- painted pages (PG-INV, PG-CL): the painting's top and bottom bands, its own paper colour between ---------- */
.page[data-page]:not([data-noart]) {
  background-color: var(--page-paper);
  padding-top: calc(min(100vw, 560px) * var(--ar) * var(--pad-top, 16) / 100);
  padding-bottom: calc(
    min(100vw, 560px) * var(--ar) * var(--band-bot) / 100 * 0.92
  );
}
.page[data-page]:not([data-noart])::before {
  height: calc(min(100vw, 560px) * var(--ar) * var(--band-top) / 100);
  -webkit-mask-image: linear-gradient(#000 86%, transparent);
  mask-image: linear-gradient(#000 86%, transparent);
}
.page[data-page]:not([data-noart])::after {
  height: calc(min(100vw, 560px) * var(--ar) * var(--band-bot) / 100);
  -webkit-mask-image: linear-gradient(transparent, #000 14%);
  mask-image: linear-gradient(transparent, #000 14%);
}
.sec-invite.page {
  min-height: 0;
  padding-left: 0;
  padding-right: 0;
}
.sec-invite[data-page] .invocation,
.sec-invite[data-page] .intro,
.sec-invite[data-page] .hosts,
.sec-invite[data-page] .relation {
  max-width: 56%;
  margin-inline: auto;
}
.page-close[data-page] {
  --pad-top: 19;
}
.page-close .sec-hashtag {
  padding-top: 0;
}
.page-close[data-page] .ht-caption,
.page-close[data-page] .ht-tag {
  max-width: 70%;
  margin-inline: auto;
}

/* ---------- next-day beat on ND-1 ---------- */
.sec-nextday {
  min-height: 0;
  padding: 0;
  display: block;
}
.nd-art {
  margin: 0;
}
.nd-art .scene-text {
  justify-content: center;
}
.nd-art .nd-line {
  color: var(--maroon);
  text-shadow: 0 1px 10px rgba(255, 240, 220, 0.8);
}
.nd-art .nd-flip,
.nd-art .nd-month {
  text-shadow: 0 1px 10px rgba(255, 240, 220, 0.8);
}
.sec-invite[data-page] .invocation,
.sec-invite[data-page] .intro,
.sec-invite[data-page] .hosts,
.sec-invite[data-page] .relation {
  max-width: 66%;
}
.sec-invite[data-page] .hosts {
  font-size: 21px;
}
.page-close[data-page] {
  --pad-top: 25;
}
.page-close[data-page] .ht-caption {
  max-width: 72%;
}
.page-close[data-page] .ht-tag {
  max-width: none;
  font-size: clamp(38px, 10.5vw, 50px);
  white-space: nowrap;
}
@media (max-height: 700px) {
  .op-date {
    font-size: 13px;
    letter-spacing: 0.12em;
  }
  .op-hint {
    font-size: 28px;
  }
  .op-sound {
    font-size: 15px;
  }
  .op-skip {
    font-size: 16px;
  }
  .op-stage .op-ganesha {
    width: 15% !important;
  }
}
.nd-art .scene-text.nextday {
  width: auto;
  padding: 0;
  background: none;
}
.op-diya:has(.op-diya-img) {
  --wick-x: 69.5%;
  --wick-y: calc(55% - 22px);
} /* D24: new OP-2 (the diya used in all the paintings); wick tip at the spout */

/* ---------- D24 review fixes (M15) ---------- */
/* a real flame on the diya: taller, with a warm halo */
.op-diya .flame {
  width: 18px;
  height: 34px;
  margin-left: -9px;
  box-shadow:
    0 0 18px 8px rgba(255, 190, 80, 0.55),
    0 0 40px 18px rgba(255, 160, 60, 0.25);
}
.op-diya:has(.op-diya-img) {
  --wick-y: calc(55% - 33px);
}
/* the invitation page fades into the paper instead of ending on a hard edge */
.page[data-page]:not([data-noart]) {
  background: linear-gradient(
    var(--page-paper) calc(100% - 70px),
    rgba(248, 232, 204, 0)
  );
}
.page[data-page]:not([data-noart])::after {
  -webkit-mask-image: linear-gradient(
    transparent,
    #000 14%,
    #000 88%,
    transparent
  );
  mask-image: linear-gradient(transparent, #000 14%, #000 88%, transparent);
}
/* chapter details read like the back of a card: centred, dotted rules, quiet buttons */
.details.paper {
  text-align: center;
}
.details.paper .actions {
  justify-content: center;
}
.details.paper .dots {
  justify-items: start;
  width: max-content;
  margin-inline: auto;
}
.details.paper .dress-label {
  text-align: center;
}
.programme {
  max-width: 420px;
  margin-inline: auto;
}
.programme li {
  border-bottom: 1px dotted rgba(184, 137, 58, 0.8);
  border-top: 0;
  text-align: left;
}
.details.paper .note {
  text-align: center;
}
.btn {
  border-radius: 999px;
}
.btn:not(.btn-ghost) {
  background: var(--maroon);
}
.btn-ghost {
  background: transparent;
  border-color: rgba(122, 22, 38, 0.7);
}
/* RSVP on paper: written lines, not boxes */
.field input,
.field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--gold-line);
  border-radius: 0;
  padding-left: 2px;
  padding-right: 2px;
  box-shadow: none;
}
.field textarea {
  border: 1px solid rgba(184, 137, 58, 0.55);
  border-radius: 6px;
  background: rgba(255, 251, 242, 0.35);
}
.field input:focus,
.field textarea:focus {
  box-shadow: none;
  border-color: var(--maroon);
}
.chip span {
  background: transparent;
}
.field input[type="text"],
.field input[type="number"],
.field input[type="tel"] {
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--gold-line);
  border-radius: 0;
  box-shadow: none;
  padding-left: 2px;
}
.field textarea {
  background: rgba(255, 251, 242, 0.35);
  border: 1px solid rgba(184, 137, 58, 0.55);
  border-radius: 6px;
}
#haldi .scene-text .s-venue {
  font-size: 16px;
  line-height: 1.4;
}
@media (max-width: 370px) {
  #haldi .scene-text .title {
    font-size: 48px;
  }
  #haldi .scene-text .special {
    font-size: 18px;
  }
  #haldi .scene-text .s-venue {
    font-size: 15px;
  }
  #sangeet .scene-text .title {
    font-size: 42px;
  }
}
/* M16: a tapered flame (teardrop) on the wick tip, not a capsule */
.op-diya .flame {
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50% 0 50% 50%;
  background: radial-gradient(
    circle at 60% 40%,
    #fffbe6 0,
    #ffe27a 28%,
    #ffb02e 55%,
    rgba(255, 110, 20, 0.85) 75%
  );
  transform-origin: 50% 100%;
  box-shadow:
    0 0 14px 6px rgba(255, 190, 80, 0.5),
    0 0 34px 14px rgba(255, 150, 50, 0.22);
}
.op-diya.lit .flame {
  animation: flick2 0.22s ease-in-out infinite alternate;
}
@keyframes flick2 {
  from {
    transform: rotate(-45deg) scale(1, 1.05);
  }
  to {
    transform: rotate(-41deg) scale(0.94, 1.16);
  }
}
.op-diya .flame {
  transform: rotate(-45deg);
}
.op-diya:has(.op-diya-img) {
  --wick-y: calc(55% - 18px);
}
@media (prefers-reduced-motion: reduce) {
  .op-diya.lit .flame {
    animation: none;
  }
}
/* M17: the opening's middle is one flowing column between the logo and the diya, so text can never sit on Ganesha
   whatever the phone's shape (Rule 5). */
.op-mid {
  position: absolute;
  left: calc(50% - min(50%, 50vw) + 20px);
  right: calc(50% - min(50%, 50vw) + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  gap: 0;
}
.op-mid .op-date {
  position: static;
  white-space: nowrap;
  font-size: min(17px, 3.9vw);
  letter-spacing: 0.12em;
}
.op-mid .op-ganesha {
  position: static;
  transform: none;
  margin: 0;
  width: min(24vw, 11.5svh);
}
.op-mid .op-hint {
  font-size: min(40px, 9.6vw, 4.6svh);
  line-height: 1.12;
}
.op-mid .op-sound {
  font-size: min(18px, 4.4vw, 2.3svh);
}
.op-mid .op-skip {
  position: static;
  transform: none;
  font-size: min(19px, 4.8vw, 2.4svh);
  min-height: 40px;
}
.page-close[data-page] .ht-tag {
  font-size: min(50px, 9.2vw);
}
#countdown .cd-grid {
  column-gap: 14px;
}
#countdown .cd-unit span {
  font-size: 13px;
  letter-spacing: 0.08em;
}
.op-mid .op-ganesha {
  width: min(33vw, 14.85svh);
} /* Abhishek 18 Oct: Ganesha a bit bigger, diya a bit smaller */

/* ======================= M19: motion on the paintings (D25) ======================= */
.motion #main .scene-art {
  overflow: hidden;
}
.motion #main .scene-art .scene-img {
  transform: scale(calc(1.09 - 0.09 * var(--p, 0.5)))
    translateY(calc((0.5 - var(--p, 0.5)) * 2.4%));
  transform-origin: 50% 40%;
  will-change: transform;
}
.scene-art canvas.fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.scene-art .tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.scene-art .scene-text {
  z-index: 2;
}
.motion #main .scene-text .title,
.motion #main .scene-text .eyebrow,
.motion #main .scene-text p {
  text-shadow:
    0 0 10px rgba(255, 248, 232, 0.95),
    0 0 2px rgba(255, 248, 232, 0.9);
}
/* Sangeet: golden sunset, then night falls as you scroll (the text keeps a pool of lamplight) */
#sangeet .tint {
  mix-blend-mode: multiply;
  opacity: clamp(0, (var(--p, 0.5) - 0.22) / 0.4, 1);
  background: linear-gradient(
    to bottom,
    rgb(22, 18, 70),
    rgba(40, 24, 86, 0.85) 40%,
    rgba(30, 14, 46, 0.6)
  );
  -webkit-mask-image: radial-gradient(
    ellipse 38% 19% at 48% 41%,
    transparent 55%,
    #000 100%
  );
  mask-image: radial-gradient(
    ellipse 38% 19% at 48% 41%,
    transparent 55%,
    #000 100%
  );
}
#sangeet .tint::before {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: soft-light;
  opacity: calc(1 - clamp(0, (var(--p, 0.5) - 0.2) / 0.4, 1));
  background: linear-gradient(
    to bottom,
    rgba(255, 140, 60, 0.9),
    rgba(255, 170, 90, 0.4) 50%,
    transparent
  );
}
/* Wedding: golden hour, then indigo twilight below the lettering; the fire becomes the main light */
#wedding .tint {
  mix-blend-mode: multiply;
  opacity: calc(clamp(0, (var(--p, 0.5) - 0.38) / 0.4, 1) * 0.95);
  background: linear-gradient(
    to bottom,
    transparent 22%,
    rgba(58, 52, 120, 0.55) 40%,
    rgba(40, 30, 90, 0.5) 70%,
    rgba(30, 20, 60, 0.35)
  );
}
#wedding .tint::before {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: soft-light;
  opacity: calc(0.8 - 0.8 * clamp(0, (var(--p, 0.5) - 0.3) / 0.4, 1));
  background: radial-gradient(
    ellipse 80% 50% at 50% 30%,
    rgba(255, 190, 90, 0.9),
    transparent 70%
  );
}
/* Haldi: the late-morning light warms towards noon */
#haldi .tint {
  mix-blend-mode: soft-light;
  opacity: calc(0.2 + 0.4 * var(--p, 0.5));
  background: radial-gradient(
    ellipse 90% 60% at 60% 10%,
    rgba(255, 220, 120, 0.9),
    transparent 70%
  );
}
/* phera flames sit around the havan on the painting */
#wedding .pheras {
  inset: 0;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  z-index: 2;
}
#wedding .wd-fx {
  z-index: 2;
}
/* text rises in, line by line */
.reveal #main .scene-text > *,
.reveal #invitation .page-body > *,
.reveal #main .details > * {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal #main .scene-text.in > *,
.reveal #invitation .page-body.in > *,
.reveal #main .details.in > * {
  opacity: 1;
  transform: none;
}
.reveal .in > *:nth-child(2) {
  transition-delay: 0.12s;
}
.reveal .in > *:nth-child(3) {
  transition-delay: 0.24s;
}
.reveal .in > *:nth-child(4) {
  transition-delay: 0.36s;
}
.reveal .in > *:nth-child(5) {
  transition-delay: 0.48s;
}
.reveal .in > *:nth-child(6) {
  transition-delay: 0.6s;
}
.reveal .in > *:nth-child(n + 7) {
  transition-delay: 0.7s;
}
@media (prefers-reduced-motion: reduce) {
  .motion #main .scene-art .scene-img {
    transform: none;
  }
  .reveal #main .scene-text > *,
  .reveal #invitation .page-body > *,
  .reveal #main .details > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* reveal without moving layout boxes (keeps the text-fit measurements exact) */
.reveal #main .scene-text > * {
  transform: none;
  filter: blur(3px);
  transition:
    opacity 0.8s ease,
    filter 0.8s ease;
}
.reveal #main .scene-text.in > * {
  filter: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal #main .scene-text > * {
    filter: none;
  }
}
/* M19b (Abhishek 15:10): night falls on the SKY only; the lights, the couple and the décor keep their colour */
#sangeet .tint {
  mix-blend-mode: normal;
  opacity: clamp(0, (var(--p, 0.5) - 0.2) / 0.38, 1);
  background: linear-gradient(
    to bottom,
    #120f3a,
    #1f1850 45%,
    #3a2a62 80%,
    #4a3468
  );
  -webkit-mask: url(/assets/img/art/SC-SG-sky.webp) 0 0 / 100% 100% no-repeat;
  mask: url(/assets/img/art/SC-SG-sky.webp) 0 0 / 100% 100% no-repeat;
}
#sangeet .tint::before {
  mix-blend-mode: normal;
  opacity: calc(0.75 - 0.75 * clamp(0, (var(--p, 0.5) - 0.15) / 0.3, 1));
  background: linear-gradient(to bottom, #f2a25c, #f6c28a 50%, #f7d9b0);
}
#sangeet .scene-text p,
#sangeet .scene-text .title,
#sangeet .scene-text .eyebrow {
  transition:
    color 0.6s ease,
    text-shadow 0.6s ease,
    opacity 0.8s ease,
    filter 0.8s ease;
}
#sangeet .scene-art.night .scene-text .eyebrow {
  color: #f3d58e;
  text-shadow: 0 1px 8px rgba(10, 6, 30, 0.9);
}
#sangeet .scene-art.night .scene-text .title {
  color: #fff1d6;
  text-shadow: 0 1px 12px rgba(10, 6, 30, 0.95);
}
#sangeet .scene-art.night .scene-text .title .dev {
  color: #f3d58e;
}
#sangeet .scene-art.night .scene-text .s-time {
  color: #ffe3a3;
  text-shadow: 0 1px 8px rgba(10, 6, 30, 0.9);
}
/* M19c: readable at every point of the dusk (the lettering carries its own halo: cream by day, ink by night) */
#sangeet .scene-text .eyebrow,
#sangeet .scene-text .title,
#sangeet .scene-text .s-time {
  text-shadow:
    0 0 6px #fff6e6,
    0 0 12px #fff6e6,
    0 0 22px rgba(255, 246, 230, 0.9);
}
#sangeet .scene-text .eyebrow {
  color: #6e4210;
}
#sangeet .scene-art.night .scene-text .eyebrow,
#sangeet .scene-art.night .scene-text .title,
#sangeet .scene-art.night .scene-text .s-time {
  text-shadow:
    0 0 6px #140e36,
    0 0 12px #140e36,
    0 0 24px rgba(20, 14, 54, 0.95);
}
#sangeet .scene-text .eyebrow,
#sangeet .scene-text .title,
#sangeet .scene-text .s-time {
  text-shadow:
    0 0 4px #fff6e6,
    0 0 8px #fff6e6,
    0 0 14px #fff6e6,
    0 0 26px rgba(255, 246, 230, 0.95);
}
#sangeet .scene-art.night .scene-text .eyebrow,
#sangeet .scene-art.night .scene-text .title,
#sangeet .scene-art.night .scene-text .s-time {
  text-shadow:
    0 0 4px #140e36,
    0 0 8px #140e36,
    0 0 14px #140e36,
    0 0 26px rgba(20, 14, 54, 0.95);
}
#sangeet .scene-text .eyebrow {
  color: #4e1a12;
  font-weight: 600;
}

/* ===== M20: Grok living-painting videos over the poster frame; same drift, mask and fades as the still ===== */
.scene-art .scene-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 6%,
    #000 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 6%,
    #000 93%,
    transparent 100%
  );
}
.scene-art .scene-vid.on {
  opacity: 1;
}
.motion #main .scene-art .scene-vid {
  transform: scale(calc(1.09 - 0.09 * var(--p, 0.5)))
    translateY(calc((0.5 - var(--p, 0.5)) * 2.4%));
  transform-origin: 50% 40%;
}
@media (prefers-reduced-motion: reduce) {
  .scene-art .scene-vid {
    display: none;
  }
}
/* M22: hashtag on the opening, under the date */
.op-mid .op-tag {
  margin: 0;
  font: 400 min(30px, 7.6vw, 3.6svh)/1.1 var(--font-display);
  color: #fff4de;
  text-shadow: 0 1px 10px rgba(40, 4, 12, 0.7);
}

/* ===== M23: wax-seal envelope opening (default). html.open-diya shows the diya opening instead (A/B). ===== */
.open-seal .op-stage,
.open-seal #opening .op-bg {
  display: none !important;
}
.open-diya .op-env {
  display: none;
}
.open-seal #opening {
  background: #efe3cb;
}
.op-env {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}
.env-stage {
  position: relative;
  height: 100svh;
  aspect-ratio: 9 / 16;
  max-width: 100vw;
  flex: none;
  transform-origin: 50% 30%;
}
@media (max-aspect-ratio: 9/16) {
  .env-stage {
    height: auto;
    width: 100vw;
    aspect-ratio: 9 / 16;
  }
}
.env-body,
.env-flap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.env-flap {
  transform-origin: 50% 0;
  transform: rotateX(0deg);
  backface-visibility: hidden;
  z-index: 2;
  transition: transform 1s cubic-bezier(0.45, 0.05, 0.3, 1);
}
.env-ganesha {
  position: absolute;
  left: 50%;
  top: 9%;
  width: 25%;
  transform: translateX(-50%);
  z-index: 3;
}
.env-ganesha img {
  width: 100%;
  height: auto;
}
.env-seal {
  position: absolute;
  left: 50%;
  top: 53%;
  width: 29%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 4;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}
.env-seal img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition:
    transform 0.7s cubic-bezier(0.3, 0.7, 0.3, 1),
    opacity 0.7s ease;
}
.env-seal .seal-l {
  clip-path: polygon(
    0 0,
    52% 0,
    47% 22%,
    54% 41%,
    46% 60%,
    53% 80%,
    48% 100%,
    0 100%
  );
}
.env-seal .seal-r {
  clip-path: polygon(
    52% 0,
    100% 0,
    100% 100%,
    48% 100%,
    53% 80%,
    46% 60%,
    54% 41%,
    47% 22%
  );
}
.env-seal::after {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  border: 1.5px solid rgba(184, 137, 58, 0.55);
  animation: sealpulse 2.4s ease-out infinite;
}
@keyframes sealpulse {
  0% {
    transform: scale(0.82);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}
.env-seal.broken::after {
  animation: none;
  opacity: 0;
}
.env-seal.broken .seal-l {
  transform: translate(-26%, 8%) rotate(-24deg);
  opacity: 0;
}
.env-seal.broken .seal-r {
  transform: translate(26%, 10%) rotate(22deg);
  opacity: 0;
}
.env-text {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 64%;
  bottom: 3%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  z-index: 3;
}
.env-date {
  margin: 0;
  font: 600 min(17px, 4vw) var(--font-caps);
  letter-spacing: 0.14em;
  color: var(--gold-ink);
  white-space: nowrap;
}
.env-tag {
  margin: 0;
  font: 400 min(36px, 9vw, 4.4svh)/1.1 var(--font-display);
  color: var(--maroon);
}
.env-text .orn {
  margin: 0 auto;
}
.env-hint {
  margin: 0;
  font: 400 min(30px, 7.4vw, 3.6svh)/1.15 var(--font-display);
  color: var(--maroon);
}
.env-skip {
  margin: 0;
  color: var(--maroon) !important;
  text-shadow: none !important;
  font: 600 min(18px, 4.6vw) var(--font-caps) !important;
}
#opening.e-open .env-flap {
  transform: rotateX(178deg);
}
#opening.e-open .op-fadeout {
  opacity: 0;
  transition: opacity 0.35s ease;
}
#opening.e-in .env-stage {
  transform: scale(2.4) translateY(14%);
  opacity: 0;
  transition:
    transform 1.1s cubic-bezier(0.5, 0, 0.3, 1),
    opacity 0.9s ease 0.2s;
}
@media (prefers-reduced-motion: reduce) {
  .env-seal::after {
    animation: none;
  }
  .env-flap,
  .env-seal img {
    transition: none;
  }
}
.env-text {
  top: 63%;
  bottom: 4%;
  justify-content: space-around;
}
.env-skip {
  min-height: 40px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
#opening.e-in .env-stage {
  transition:
    transform 0.9s cubic-bezier(0.5, 0, 0.3, 1),
    opacity 0.6s ease 0.15s;
}
.env-text .env-skip {
  position: static !important;
  transform: none !important;
  left: auto;
  top: auto;
}

/* =====================================================================================================
   M24 "Royal v2" (approved 18 Oct 16:58): oxblood, wine, ivory, antique gold, deep olive, ink.
   Pinyon Script (names, titles) · Cinzel (engraved caps) · Cormorant Garamond (reading).
   Alternating full-width bands; damask on oxblood; chamfered buttons; RSVP as writing lines.
   ===================================================================================================== */
:root {
  --oxblood: #4a1420;
  --wine: #6e1e2b;
  --ivory: #f4ecdd;
  --parch: #eadfc9;
  --gold: #b8913f;
  --gold-hi: #e3c27a;
  --olive: #36412a;
  --ink: #2e1a14;
  --ink-soft: #5e4636;
  --maroon: var(--wine);
  --maroon-deep: var(--oxblood);
  --gold-ink: #8c6a2a;
  --gold-line: var(--gold);
  --paper: var(--ivory);
  --font-display: "Pinyon Script", "Snell Roundhand", cursive;
  --font-caps: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Cormorant Garamond", Garamond, Georgia, serif;
  --damask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='88' viewBox='0 0 64 88'%3E%3Cg fill='none' stroke='%23652232' stroke-width='1.2' opacity='.85'%3E%3Cpath d='M32 6c8 10 18 14 18 26S40 50 32 58C24 50 14 44 14 32S24 16 32 6z'/%3E%3Cpath d='M32 18c4 6 9 9 9 15s-5 10-9 14c-4-4-9-8-9-14s5-9 9-15z'/%3E%3Cpath d='M32 58v24M24 74c4-2 6-6 8-10 2 4 4 8 8 10'/%3E%3Cpath d='M0 44c6-4 10-10 10-18M64 44c-6-4-10-10-10-18'/%3E%3C/g%3E%3C/svg%3E");
  --chamfer: polygon(
    9px 0,
    calc(100% - 9px) 0,
    100% 9px,
    100% calc(100% - 9px),
    calc(100% - 9px) 100%,
    9px 100%,
    0 calc(100% - 9px),
    0 9px
  );
}
html {
  scroll-behavior: auto;
}
body {
  background: var(--ivory);
  color: var(--ink);
  font: 400 20px/1.55 var(--font-body);
}
main {
  color: var(--ink);
}
[id] {
  scroll-margin-top: 64px;
}

/* ---------- menu bar ---------- */
.topnav {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(6px + env(safe-area-inset-top, 0px))
    max(14px, env(safe-area-inset-right, 0px)) 6px
    max(14px, env(safe-area-inset-left, 0px));
  background: rgba(74, 20, 32, 0.97);
  border-bottom: 1px solid rgba(184, 145, 63, 0.6);
  box-shadow: 0 6px 18px -10px rgba(30, 6, 12, 0.6);
  transform: translateY(-110%);
  transition: transform 0.5s ease;
}
body:not(.locked) .topnav {
  transform: none;
}
.tn-logo {
  flex: none;
  display: block;
  line-height: 0;
}
.tn-logo img {
  height: 42px;
  width: auto;
}
.topnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 1;
  justify-content: center;
  gap: clamp(10px, 4vw, 26px);
}
.topnav a {
  font: 600 clamp(10.5px, 2.9vw, 12.5px) var(--font-caps);
  letter-spacing: 0.16em;
  color: var(--ivory);
  text-decoration: none;
  padding: 10px 0 6px;
  border-bottom: 1px solid transparent;
  display: inline-block;
}
.topnav a.on {
  color: var(--gold-hi);
  border-bottom-color: var(--gold-hi);
}
.topnav a:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}

/* ---------- bands ---------- */
.band {
  position: relative;
  overflow: hidden;
}
.band-in {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  padding-block: 56px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.band-ox {
  background:
    radial-gradient(
      120% 70% at 50% 0%,
      rgba(120, 32, 46, 0.55),
      transparent 70%
    ),
    var(--damask) 0 0 / 64px 88px,
    var(--oxblood);
  color: var(--ivory);
}
.band-ol {
  background: var(--olive);
  color: var(--ivory);
}
.band-iv {
  background: var(--ivory);
}
.eyebrow {
  margin: 0;
  font: 600 13px/1.4 var(--font-caps);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.band-ox .eyebrow,
.band-ol .eyebrow {
  color: var(--gold-hi);
}
.fleuron {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  width: min(64%, 260px);
  margin: 2px auto;
}
.fleuron::before,
.fleuron::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
}
.fleuron span {
  font: 15px var(--font-caps);
}
.band-ox .fleuron {
  color: var(--gold-hi);
}
.orn,
.orn.orn-art {
  height: 18px;
  width: min(64%, 260px);
  margin: 14px auto;
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
}
.orn::before,
.orn::after,
.orn.orn-art::before,
.orn.orn-art::after {
  content: "";
  position: static;
  flex: 1;
  height: 1px;
  width: auto;
  border: 0;
  transform: none;
  margin: 0;
  background: currentColor;
}
.orn {
  background: radial-gradient(circle, var(--gold) 0 3px, transparent 3.5px)
    center / 9px 9px no-repeat;
}

/* ---------- hero ---------- */
.hero .band-in {
  padding-block: 92px 64px;
  min-height: 86svh;
  align-content: center;
}
.hero-names {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0;
}
.hero-names .name {
  font: 400 clamp(58px, 17vw, 92px)/1 var(--font-display);
  color: #f7ebd3;
}
.hero-names .amp {
  font: 400 clamp(36px, 9vw, 48px)/1 var(--font-display);
  color: var(--gold-hi);
  margin: 2px 0;
}
.hero-date {
  margin: 0;
  font: 600 clamp(14px, 3.9vw, 17px) var(--font-caps);
  letter-spacing: 0.2em;
  color: var(--ivory);
}
.hero .countdown {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  justify-items: center;
  background: none;
  box-shadow: none;
  padding: 0;
}
.hero .cd-grid {
  display: flex;
  align-items: flex-start;
  gap: clamp(6px, 2.4vw, 14px);
  margin: 0;
}
.hero .cd-unit {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 3.1ch;
}
.hero .cd-unit b {
  font: 500 clamp(30px, 9vw, 42px)/1 var(--font-caps);
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.hero .cd-unit span {
  font: 600 10px var(--font-caps);
  letter-spacing: 0.18em;
  color: var(--gold-hi);
  text-transform: uppercase;
}
.cd-sep {
  font: 500 clamp(26px, 7vw, 36px)/1 var(--font-caps);
  color: var(--gold);
  font-style: normal;
}
.hero .cd-msg {
  font: 400 34px var(--font-display);
  color: var(--ivory);
}
.flor {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: min(46%, 300px);
  height: auto;
}
.flor-l {
  left: -8%;
  bottom: -2%;
}
.flor-r {
  right: -8%;
  top: 4%;
}

/* ---------- invitation wording (on the painted page) ---------- */
.sec-invite.page {
  padding-top: calc(
    min(100vw, 560px) * var(--ar) * var(--band-top) / 100 * 0.78
  );
}
.invocation {
  font-family: var(--font-body);
}
.intro,
.relation,
.parents {
  font: 400 20px/1.55 var(--font-body);
  color: var(--ink);
}
.hosts {
  font: 600 clamp(15px, 4.2vw, 18px)/1.5 var(--font-caps);
  letter-spacing: 0.08em;
  color: var(--wine);
}
.names .name {
  font: 400 clamp(52px, 15vw, 76px)/1.05 var(--font-display);
  color: var(--wine);
}
.names .with {
  font: italic 400 22px var(--font-body);
  color: var(--gold-ink);
}

/* ---------- calendar ---------- */
.dates .band-in {
  padding-block: 48px;
}
.mcal {
  width: min(100%, 330px);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 8px;
  font: 500 19px var(--font-body);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.mcal .h {
  font: 600 11px var(--font-caps);
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(184, 145, 63, 0.5);
}
.mcal .d {
  position: relative;
  padding: 5px 0;
}
.mcal .mark {
  color: var(--wine);
  font-weight: 600;
}
.mcal .ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 40px;
  transform: translate(-50%, -50%) rotate(-8deg);
  overflow: visible;
}
.mcal .ring path {
  fill: none;
  stroke: var(--wine);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-dasharray: 140;
  stroke-dashoffset: 0;
}
.motion .mcal:not(.drawn) .ring path {
  stroke-dashoffset: 140;
}
.mcal.drawn .ring path {
  transition: stroke-dashoffset 1.2s ease;
}

/* ---------- celebrations ---------- */
.celebrations .band-in {
  padding-block: 40px;
}
.cel {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.cel li + li {
  border-left: 1px solid rgba(244, 236, 221, 0.3);
}
.cel a {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 4px 6px;
  color: var(--ivory);
  text-decoration: none;
}
.cel svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--gold-hi);
  stroke-width: 1.3;
}
.cel b {
  font: 600 12px var(--font-caps);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cel span {
  font: 400 16px var(--font-body);
  opacity: 0.92;
}

/* ---------- scenes ---------- */
.scene-text .eyebrow {
  color: var(--gold-ink);
  font-size: 13px;
}
.scene-text .title,
.title {
  font: 400 clamp(52px, 15vw, 66px)/1.05 var(--font-display);
  color: var(--wine);
}
#sangeet .scene-text .title {
  font-size: clamp(48px, 14vw, 60px);
}
#wedding .scene-text .title {
  font-size: clamp(50px, 14vw, 62px);
}
.s-time {
  font: 600 clamp(15px, 4.3vw, 19px) var(--font-caps);
  letter-spacing: 0.12em;
  color: var(--wine);
}
.s-venue,
.special {
  font-family: var(--font-body);
}
.special {
  font-style: italic;
  font-size: 21px;
  color: var(--ink-soft);
}
.details.paper {
  background: var(--ivory);
  padding-block: 8px 44px;
}
.programme li {
  font: 500 20px var(--font-body);
  border-bottom: 1px solid rgba(184, 145, 63, 0.45);
}
.programme .p-time {
  font: 600 15px var(--font-caps);
  letter-spacing: 0.08em;
  color: var(--wine);
}
.note {
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- buttons ---------- */
.btn,
.btn-ghost,
.btn-small,
.cal summary.btn {
  -webkit-tap-highlight-color: transparent;
  border-radius: 0;
  clip-path: var(--chamfer);
  min-height: 48px;
  padding: 13px 26px;
  font: 600 13px var(--font-caps) !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: none;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}
.btn:not(.btn-ghost) {
  background: linear-gradient(#7a2333, #5e1825);
  color: #f6e9cc;
  border: 1px solid var(--gold);
  box-shadow:
    inset 0 0 0 3px #5e1825,
    inset 0 0 0 4px rgba(227, 194, 122, 0.65);
}
.btn:not(.btn-ghost):hover {
  background: linear-gradient(#86293a, #66192a);
}
.btn-ghost {
  background: transparent;
  color: var(--wine);
  border: 1px solid var(--gold);
}
.btn-ghost:hover {
  background: rgba(184, 145, 63, 0.12);
}
.cal[open] summary.btn {
  background: rgba(184, 145, 63, 0.16);
  color: var(--wine);
}
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.actions {
  justify-content: center;
  gap: 12px;
}

/* ---------- closing: hashtag, RSVP, contact, footer ---------- */
.close-top,
.close-bottom {
  position: relative;
  background: var(--ivory);
}
.close-top[data-art] {
  background:
    url(/assets/img/art/PG-CL.webp) 50% 0 / min(100%, 560px) auto no-repeat,
    var(--ivory);
  padding-top: calc(min(100vw, 560px) * 0.28);
}
.close-bottom[data-art] {
  background:
    url(/assets/img/art/PG-CL.webp) 50% 100% / min(100%, 560px) auto no-repeat,
    var(--ivory);
  padding-bottom: calc(min(100vw, 560px) * 0.42);
}
.sec-hashtag {
  padding-block: 10px 48px;
  background: none;
}
.ht-caption {
  font: 600 13px var(--font-caps);
  letter-spacing: 0.22em;
  color: var(--gold-ink);
}
.ht-tag {
  font: 400 clamp(40px, 11vw, 56px)/1.1 var(--font-display) !important;
  color: var(--wine);
  white-space: nowrap;
}
.sec-rsvp {
  padding-block: 0 !important;
}
.sec-rsvp .wrap {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding-block: 64px;
}
.sec-rsvp .flor-l {
  top: -4%;
  bottom: auto;
  width: min(38%, 240px);
  opacity: 0.9;
}
.card.rsvp {
  background: none;
  color: var(--ivory);
  text-align: left;
}
.card.rsvp .title {
  color: #f7ebd3;
  text-align: center;
  font-size: clamp(48px, 13vw, 60px);
}
.deadline {
  text-align: center;
  font: italic 400 20px var(--font-body);
  color: rgba(244, 236, 221, 0.85);
  margin: 2px 0 26px;
}
#rsvp-form {
  display: grid;
  gap: 26px;
}
.field label,
.field legend {
  font: 600 12px var(--font-caps) !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-hi) !important;
}
.field input[type="text"],
.field input[type="number"],
.field input[type="tel"] {
  font: 400 21px var(--font-body);
  color: var(--ivory);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(227, 194, 122, 0.7);
  border-radius: 0;
  padding: 8px 2px 10px;
  box-shadow: none;
  width: 100%;
}
.field textarea {
  font: 400 20px var(--font-body);
  color: var(--ivory);
  background: rgba(244, 236, 221, 0.05);
  border: 1px solid rgba(227, 194, 122, 0.5);
  border-radius: 0;
  clip-path: var(--chamfer);
  padding: 10px 12px;
  width: 100%;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(244, 236, 221, 0.45);
  font-style: italic;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-hi);
  box-shadow: 0 1px 0 0 var(--gold-hi);
}
.chips {
  gap: 10px;
}
.chip span {
  min-height: 46px;
  padding: 10px 16px 10px 14px;
  border-radius: 0;
  border: 1px solid rgba(227, 194, 122, 0.55);
  background: transparent;
  color: #f6e9cc;
  font: 600 12px var(--font-caps) !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  gap: 9px;
  clip-path: var(--chamfer);
}
.chip span::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  transform: rotate(45deg);
  border: 1px solid var(--gold-hi);
}
.chip input:checked + span {
  background: rgba(227, 194, 122, 0.18);
  color: #fff4dc;
  border-color: var(--gold-hi);
}
.chip input:checked + span::before {
  background: var(--gold-hi);
}
.chip input:focus-visible + span {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}
.err {
  font: italic 400 17px var(--font-body);
  color: #f2b6aa;
}
.sec-rsvp .btn:not(.btn-ghost) {
  justify-self: center;
  min-width: 220px;
}
.sec-rsvp .btn-ghost {
  color: #f6e9cc;
  border-color: var(--gold-hi);
}
.rsvp-done {
  border: 1px solid var(--gold-hi);
  outline: 1px solid rgba(227, 194, 122, 0.35);
  outline-offset: 5px;
  padding: 26px 18px;
  text-align: center;
  justify-items: center;
}
.done-msg {
  font: 400 22px var(--font-body);
  color: var(--ivory);
}
.rsvp-fail p {
  color: var(--ivory);
}
#contact {
  background: none;
}
.card.contact .title {
  color: var(--wine);
}
.c-name {
  font: 600 16px var(--font-caps);
  letter-spacing: 0.14em;
  color: var(--wine);
}
.c-num {
  font: 500 22px var(--font-body);
}
.card.contact .btn,
.card.contact .btn-ghost {
  min-width: 130px;
}
.footer {
  padding-block: 24px 30px;
}
.f-line {
  font: 400 clamp(42px, 12vw, 54px) var(--font-display);
  color: var(--wine);
}
.f-tag,
.f-names {
  font: 600 13px var(--font-caps);
  letter-spacing: 0.2em;
  color: var(--gold-ink);
}

/* ---------- floating RSVP and mute ---------- */
.rsvp-pill {
  border-radius: 0;
  clip-path: var(--chamfer);
  background: linear-gradient(#7a2333, #5e1825);
  color: #f6e9cc;
  border: 1px solid var(--gold);
  box-shadow:
    inset 0 0 0 3px #5e1825,
    inset 0 0 0 4px rgba(227, 194, 122, 0.65);
  font: 600 13px var(--font-caps);
  letter-spacing: 0.2em;
  padding: 12px 22px;
  min-height: 48px;
}
.mute {
  background: var(--oxblood);
  color: var(--gold-hi);
  border: 1px solid var(--gold);
}

/* the envelope keeps its paper; its words use the new type */
.env-date {
  font-family: var(--font-caps);
  letter-spacing: 0.18em;
}
.env-tag,
.env-hint {
  font-family: var(--font-display);
}
@media (prefers-reduced-motion: reduce) {
  .topnav {
    transition: none;
  }
  .mcal .ring path {
    stroke-dashoffset: 0 !important;
  }
}
/* M24 fixes: framed (not clipped) buttons and tags so their gold borders stay whole */
.btn,
.btn-ghost,
.btn-small,
.cal summary.btn,
.rsvp-pill,
.chip span,
.field textarea {
  clip-path: none !important;
  border-radius: 2px !important;
}
.btn-ghost {
  box-shadow:
    inset 0 0 0 3px var(--ivory),
    inset 0 0 0 4px rgba(184, 145, 63, 0.45);
}
.sec-rsvp .btn-ghost {
  box-shadow: none;
}
.chip span {
  border-radius: 1px !important;
}
.close-top[data-art] {
  padding-top: calc(min(100vw, 560px) * 0.47);
}
.hosts {
  font-size: clamp(14px, 3.9vw, 16px);
  letter-spacing: 0.06em;
}
/* side florals (FL-L / FL-R): climb in from the edges, behind the lettering */
.hero .flor {
  height: 92%;
  width: auto;
  max-width: 46%;
  top: auto;
  bottom: 0;
  object-fit: contain;
}
.hero .flor-l {
  left: -15%;
}
.hero .flor-r {
  right: -14%;
  bottom: 0;
  top: auto;
}
.sec-rsvp .flor-l {
  top: auto;
  bottom: -6%;
  left: -18%;
  width: min(42%, 260px);
  opacity: 0.5;
}
@media (min-width: 700px) {
  .hero .flor-l {
    left: calc(50% - 400px);
  }
  .hero .flor-r {
    right: calc(50% - 400px);
  }
}
.hero .band-in {
  text-shadow: 0 2px 14px rgba(40, 6, 14, 0.75);
}
.hero .band-in {
  padding-bottom: min(46vw, 230px);
}
.hero .flor {
  max-width: none;
  width: auto;
}
.hero .flor-l {
  top: 52px;
  bottom: auto;
  left: -9%;
  height: min(64vw, 320px);
}
.hero .flor-r {
  bottom: 0;
  top: auto;
  right: -6%;
  height: min(60vw, 300px);
}
@media (min-width: 700px) {
  .hero .flor-l {
    left: calc(50% - 330px);
    height: 380px;
  }
  .hero .flor-r {
    right: calc(50% - 330px);
    height: 360px;
  }
}
.hero .flor-l {
  top: 40px;
  left: -12%;
  height: min(96vw, 470px);
}
.hero .flor-r {
  right: -10%;
  height: min(98vw, 480px);
}
@media (min-width: 700px) {
  .hero .flor-l {
    left: -12%;
  }
  .hero .flor-r {
    right: -10%;
  }
}
.hero .cd-grid,
.hero-date,
.hero .eyebrow {
  position: relative;
  z-index: 2;
}
.hero .flor-l {
  height: min(78vw, 400px);
  left: -14%;
}
.hero .flor-r {
  height: min(70vw, 360px);
  right: -12%;
}
@media (max-width: 370px) {
  .hero .cd-grid {
    gap: 4px;
  }
  .hero .cd-unit span {
    font-size: 9px;
    letter-spacing: 0.12em;
  }
  .hero .cd-unit b {
    font-size: 28px;
  }
  .hero .eyebrow {
    font-size: 11.5px;
    letter-spacing: 0.16em;
  }
  .hero-date {
    font-size: 13px;
    letter-spacing: 0.14em;
  }
  #haldi .scene-text .title {
    font-size: 46px;
  }
  #haldi .scene-text .special {
    font-size: 18px;
  }
}
.hero .band-in {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (max-width: 370px) {
  #haldi .scene-text .s-time {
    font-size: 14px;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }
}
@media (max-width: 340px) {
  .hero .cd-unit b {
    font-size: 24px;
  }
  .hero .cd-unit {
    min-width: 0;
  }
  .hero .cd-unit span {
    font-size: 8px;
    letter-spacing: 0.08em;
  }
  .cd-sep {
    font-size: 20px;
  }
  .hero-date {
    font-size: 12px;
    letter-spacing: 0.1em;
  }
}
@media (max-width: 370px) {
  .ht-tag {
    font-size: 11.5vw !important;
  }
}
/* M24 review fixes */
.hero .band-in {
  padding-bottom: min(34vw, 170px);
}
.cel b {
  white-space: nowrap;
  letter-spacing: 0.1em;
  font-size: 12.5px;
}
.topnav a {
  font-size: clamp(11.5px, 3.4vw, 14px);
  letter-spacing: 0.14em;
}
@media (max-width: 340px) {
  .topnav ul {
    gap: 8px;
  }
  .topnav a {
    letter-spacing: 0.08em;
  }
}

/* ===== M26: the envelope opens on every side; the card rises and grows into the invitation ===== */
.env-body,
.env-flap {
  display: none !important;
}
.env-inside,
.env-f {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.env-stage {
  perspective: 1600px;
  transform-style: preserve-3d;
}
.env-f {
  backface-visibility: hidden;
  transition:
    transform 0.9s cubic-bezier(0.45, 0.05, 0.3, 1),
    opacity 0.5s ease 0.5s;
}
.env-left {
  transform-origin: 0 50%;
  z-index: 1;
}
.env-right {
  transform-origin: 100% 50%;
  z-index: 1;
}
.env-bottom {
  transform-origin: 50% 100%;
  z-index: 2;
}
.env-top {
  transform-origin: 50% 0;
  z-index: 3;
}
.env-ganesha {
  z-index: 4;
}
.env-seal {
  z-index: 5;
}
.env-text {
  z-index: 4;
}
#opening.e-top .env-top {
  transform: rotateX(178deg);
  opacity: 0;
}
#opening.e-sides .env-left {
  transform: rotateY(-178deg);
  opacity: 0;
}
#opening.e-sides .env-right {
  transform: rotateY(178deg);
  opacity: 0;
}
#opening.e-bottom .env-bottom {
  transform: rotateX(-178deg);
  opacity: 0;
}
#opening.e-top .op-fadeout,
#opening.e-top .env-ganesha {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.env-card {
  position: absolute;
  left: 16%;
  right: 16%;
  top: 30%;
  bottom: 30%;
  z-index: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  background: #f6eedf;
  border: 1px solid #b8913f;
  outline: 1px solid rgba(184, 145, 63, 0.5);
  outline-offset: -8px;
  box-shadow: 0 18px 40px -12px rgba(20, 4, 8, 0.6);
  transform: translateY(18%) scale(0.92);
  opacity: 0;
  transition:
    transform 1s cubic-bezier(0.3, 0.7, 0.3, 1),
    opacity 0.6s ease;
}
.env-card img {
  height: 30%;
  width: auto;
}
.ec-names {
  margin: 0;
  font: 400 min(42px, 10vw) var(--font-display);
  color: #6e1e2b;
  line-height: 1.1;
}
.ec-names span {
  color: #b8913f;
}
.ec-date {
  margin: 0;
  font: 600 min(13px, 3.2vw) var(--font-caps);
  letter-spacing: 0.16em;
  color: #8c6a2a;
}
#opening.e-card .env-card {
  opacity: 1;
  transform: translateY(-4%) scale(1);
}
#opening.e-in .env-stage {
  transform: none;
  opacity: 1;
  transition: none;
}
#opening.e-in .env-card {
  transform: scale(2.6);
  opacity: 0;
  transition:
    transform 0.9s cubic-bezier(0.5, 0, 0.3, 1),
    opacity 0.7s ease 0.15s;
}
#opening.e-in .env-inside {
  opacity: 0;
  transition: opacity 0.7s ease;
}
#opening.e-in {
  background: transparent;
}

/* ===== M26: the crown: hero → calendar → events, with the florals bleeding across the three bands ===== */
.crown {
  position: relative;
  overflow-x: clip;
}
.crown .band-in {
  z-index: 3;
}
.crown .hero .band-in {
  min-height: 0;
  padding-block: 72px 56px;
  max-width: 560px;
  gap: 10px;
}
.crown .hero-names .name {
  font-size: clamp(52px, 14.5vw, 80px);
}
.crown .hero-date {
  white-space: normal;
  text-wrap: balance;
}
.crown .hero .countdown {
  margin-top: 10px;
}
.crown .hero .cd-grid {
  gap: clamp(3px, 1.6vw, 10px);
}
.crown .hero .cd-unit b {
  font-size: clamp(26px, 7.4vw, 38px);
}
.crown .hero .cd-unit span {
  font-size: clamp(7.5px, 2.1vw, 10px);
  letter-spacing: 0.12em;
}
.crown .cd-sep {
  font-size: clamp(20px, 5.5vw, 30px);
}
.crown .dates .band-in {
  padding-block: 40px 44px;
  max-width: min(72%, 400px);
}
.crown .mcal {
  width: 100%;
  font-size: clamp(15px, 4.4vw, 19px);
}
.crown .celebrations .band-in {
  padding-block: 34px 38px;
  max-width: 560px;
}
.cel-title {
  margin: 0 0 6px;
  font: 600 15px var(--font-caps);
  letter-spacing: 0.26em;
  color: #f3e6c8;
  text-transform: uppercase;
}

/* M26: the sprays flank the hero (style board: left high, right low) and the right one bleeds across into the calendar band */
.crown {
  --fw: min(36vw, 200px);
  --cw: min(100vw, var(--col, 480px));
}
.crown .hero {
  position: relative;
  z-index: 2;
  overflow: visible;
}
.crown .dates {
  position: relative;
  z-index: 1;
}
.crown .hero > .flor {
  display: block;
  position: absolute;
  z-index: 1;
  pointer-events: none;
  width: var(--fw);
  height: auto;
  max-width: none;
  filter: drop-shadow(0 6px 14px rgba(20, 4, 8, 0.35));
}
.crown .hero > .flor-l {
  left: calc(50% - var(--cw) / 2 - var(--fw) * 0.16);
  top: 46px;
}
.crown .hero > .flor-r {
  right: calc(50% - var(--cw) / 2 - var(--fw) * 0.14);
  bottom: calc(var(--fw) * -0.62);
}
.crown .hero-names,
.crown .hero .fleuron,
.crown .hero-date {
  max-width: 64%;
  margin-inline: auto;
}
.crown .hero .countdown {
  max-width: 66%;
  margin-inline: auto;
}
.crown .hero .countdown .eyebrow {
  text-wrap: balance;
}
.crown .hero .cd-grid {
  gap: clamp(2px, 1vw, 8px);
}
.crown .hero .cd-unit b {
  font-size: clamp(24px, 6.6vw, 36px);
}
.crown .hero .cd-unit span {
  font-size: clamp(7px, 1.9vw, 9.5px);
  letter-spacing: 0.08em;
}
.crown .cd-sep {
  font-size: clamp(16px, 4.6vw, 26px);
}
.crown .dates .band-in {
  padding-block: 44px 40px;
  max-width: min(64%, 400px);
}
.crown .hero > .flor-l {
  width: calc(var(--fw) * 0.86);
  left: calc(50% - var(--cw) / 2 - var(--fw) * 0.2);
  top: 40px;
}
.crown .hero > .flor-r {
  bottom: calc(var(--fw) * -0.56);
}
#hero #countdown .cd-grid {
  column-gap: clamp(3px, 1.4vw, 10px);
  gap: clamp(3px, 1.4vw, 10px);
}
#hero #countdown .cd-unit {
  min-width: 0;
}
#hero #countdown .cd-unit span {
  font-size: clamp(7px, 1.9vw, 9.5px);
  letter-spacing: 0.08em;
}
#hero #countdown .cd-sep {
  margin-top: 2px;
}
#hero #countdown .cd-unit span {
  font-size: clamp(8.5px, 2.35vw, 11px);
  letter-spacing: 0.06em;
}
.env-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 12px;
  overflow: hidden;
}
.env-card img {
  height: min(26vw, 110px);
  width: auto;
  flex: none;
}
.ec-names {
  font-size: min(38px, 9.4vw);
}
/* M26 review fixes: spray clears the calendar heading; countdown labels back to elder size */
.crown .hero > .flor-r {
  bottom: calc(var(--fw) * -0.4);
}
.crown .dates .band-in {
  padding-top: calc(var(--fw) * 0.4 + 14px);
}
.crown .hero .countdown {
  max-width: 74%;
}
#hero #countdown .cd-unit span {
  font-size: clamp(10px, 2.7vw, 11px);
  letter-spacing: 0.04em;
}

/* ===== M27: the crown follows the sample: intro → a short line → calendar → celebrations, sprays down both sides ===== */
.crown {
  --fw: min(40vw, 215px);
  --cw: min(100vw, var(--col, 480px));
  --edge: calc(50% - var(--cw) / 2);
}
.crown > section {
  position: relative;
  overflow: visible;
}
.crown > .hero {
  z-index: 4;
}
.crown > .story {
  z-index: 3;
}
.crown > .dates {
  z-index: 2;
}
.crown > .celebrations {
  z-index: 1;
}
.crown .cflor {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  width: var(--fw);
  height: auto;
  max-width: none;
  filter: drop-shadow(0 6px 14px rgba(20, 4, 8, 0.3));
}
.crown .fl-a {
  left: calc(var(--edge) - var(--fw) * 0.2);
  top: calc(var(--navh, 64px) - 4px);
}
.crown .fl-b {
  right: calc(var(--edge) - var(--fw) * 0.16);
  bottom: calc(var(--fw) * -0.95);
}
.crown .fl-c {
  left: calc(var(--edge) - var(--fw) * 0.24);
  bottom: calc(var(--fw) * -0.85);
  width: calc(var(--fw) * 0.92);
}
.crown .fl-d {
  right: calc(var(--edge) - var(--fw) * 0.2);
  bottom: calc(var(--fw) * -1.45);
  width: calc(var(--fw) * 0.9);
}
/* the menu bar no longer sits on the names */
.crown .hero .band-in {
  padding-top: calc(var(--navh, 64px) + 30px);
}
/* the short line */
.story .band-in {
  padding-block: 40px 8px;
  max-width: min(60%, 340px);
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.st-title {
  margin: 0;
  font: 600 clamp(17px, 4.8vw, 22px)/1.3 var(--font-caps);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a1420;
  text-wrap: balance;
}
.st-text {
  margin: 0;
  font: 400 clamp(17px, 4.6vw, 20px)/1.45 var(--font-body);
  color: #2e1a14;
  text-wrap: balance;
}
.st-orn,
.cel-orn {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b8913f;
  font-size: 12px;
}
.st-orn::before,
.st-orn::after,
.cel-orn::before,
.cel-orn::after {
  content: "";
  width: 44px;
  height: 1px;
  background: currentColor;
  opacity: 0.8;
}
.cel-orn {
  color: #e3c27a;
  justify-content: center;
  margin: 0 0 14px;
}
/* calendar: no dead space above it */
.crown .dates .band-in {
  padding-block: 22px 40px;
  max-width: min(60%, 360px);
}
/* celebrations, like "The big day": title, ornament, icon columns with hairlines, narrower */
.crown .celebrations .band-in {
  padding-block: 34px 36px;
  max-width: min(72%, 400px);
}
.crown .cel-title {
  margin: 0 0 8px;
  font-size: clamp(16px, 4.4vw, 19px);
  letter-spacing: 0.2em;
}
.crown .cel a {
  gap: 7px;
  padding: 2px 4px;
}
.crown .cel svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.2;
}
.crown .cel b {
  font-size: clamp(10.5px, 2.9vw, 12.5px);
  letter-spacing: 0.08em;
  white-space: normal;
  text-wrap: balance;
  line-height: 1.3;
}
.crown .cel span {
  font: 600 clamp(10px, 2.7vw, 12px) var(--font-caps);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e9dcc0;
}
/* M27 tuning: the sprays' wide lower ends land in the seams between bands */
.crown {
  --fw: min(38vw, 175px);
}
.crown .fl-a {
  width: calc(var(--fw) * 0.86);
  left: calc(var(--edge) - var(--fw) * 0.26);
}
.crown .fl-b {
  bottom: calc(var(--fw) * -0.34);
}
.crown .fl-c {
  bottom: calc(var(--fw) * -0.3);
  width: calc(var(--fw) * 0.86);
  left: calc(var(--edge) - var(--fw) * 0.28);
}
.crown .fl-d {
  bottom: calc(var(--fw) * -0.4);
  width: calc(var(--fw) * 0.9);
}
.story .band-in {
  padding-top: 60px;
  max-width: min(68%, 360px);
}
.st-title {
  font-size: clamp(16px, 4.3vw, 20px);
  letter-spacing: 0.12em;
}
.crown .celebrations .band-in {
  max-width: min(80%, 420px);
  padding-top: 52px;
}
.crown .cel span {
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.crown .fl-b {
  bottom: calc(var(--fw) * -0.26);
}
.crown .fl-d {
  bottom: calc(var(--fw) * -0.2);
}
.crown .celebrations .band-in {
  padding-top: 58px;
}
.crown .cel b {
  font-size: clamp(11px, 3vw, 13px);
}
.crown .cel span {
  font: 600 clamp(15px, 4.1vw, 17px) var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  color: #f1e6ce;
}
.crown .cel b {
  white-space: nowrap;
  letter-spacing: 0.04em;
  font-size: clamp(19.5px, 3.95vw, 13.5px);
}
/* M27 review: sprays also run down the short-line band and the olive band */
.crown .fl-e {
  width: calc(var(--fw) * 0.78);
  left: calc(var(--edge) - var(--fw) * 0.4);
  top: 6px;
}
.crown .fl-f,
.crown .fl-g {
  width: calc(var(--fw) * 0.7);
  bottom: 0;
}
.crown .fl-f {
  left: calc(var(--edge) - var(--fw) * 0.5);
}
.crown .fl-g {
  right: calc(var(--edge) - var(--fw) * 0.48);
}
.crown > .celebrations {
  overflow: hidden;
}
@media (min-width: 521px) {
  .crown {
    overflow-x: visible;
  }
  .crown > .celebrations {
    overflow: visible;
  }
}
.crown .fl-f,
.crown .fl-g {
  width: calc(var(--fw) * 0.8);
  bottom: -2px;
}
.crown .fl-f {
  left: calc(var(--edge) - var(--fw) * 0.34);
}
.crown .fl-g {
  right: calc(var(--edge) - var(--fw) * 0.32);
}
.crown .celebrations .band-in {
  padding-bottom: 48px;
}

/* ===== M28: sample textures (velvet oxblood, parchment, olive) instead of the line damask ===== */
.crown > .hero {
  background:
    radial-gradient(
      130% 90% at 50% 40%,
      transparent 55%,
      rgba(30, 6, 12, 0.45) 100%
    ),
    url(/assets/img/tex/velvet-ox.webp) 0 0 / 512px 512px,
    #581a24;
}
.crown > .story,
.crown > .dates {
  background:
    url(/assets/img/tex/parchment.webp) 0 0 / 512px 512px,
    #f2e9d8;
}
.crown > .celebrations {
  background:
    radial-gradient(
      120% 100% at 50% 50%,
      transparent 60%,
      rgba(20, 24, 12, 0.35) 100%
    ),
    url(/assets/img/tex/olive.webp) 0 0 / 512px 512px,
    #3a422a;
}
/* bigger, richer sprays, closer to the text */
.crown {
  --fw: min(46vw, 230px);
}
.crown {
  --fw: min(44vw, 200px);
}
.crown .fl-a {
  left: calc(var(--edge) - var(--fw) * 0.3);
  top: calc(var(--navh, 64px) - 14px);
  width: calc(var(--fw) * 0.82);
}
.crown .fl-b {
  right: calc(var(--edge) - var(--fw) * 0.24);
}
.crown .hero .countdown {
  max-width: 70%;
}
/* one continuous parchment behind the short line and the calendar (no seam) */
.crown {
  background:
    url(/assets/img/tex/parchment.webp) 0 0 / 512px 512px,
    #f2e9d8;
}
.crown > .story,
.crown > .dates {
  background: transparent;
}

/* ===== M28: sample-style lily sprays (FL2-A..D, Abhishek's Grok art, 18 Oct 20:04): big, rich, close to the text ===== */
.crown {
  --fw: min(46vw, 220px);
}
.crown .cflor {
  filter: drop-shadow(0 8px 16px rgba(20, 4, 8, 0.28));
}
.crown .fl-a {
  width: var(--fw);
  left: calc(var(--edge) - var(--fw) * 0.14);
  top: calc(var(--navh, 64px) - 8px);
}
.crown .fl-b {
  width: calc(var(--fw) * 1.05);
  right: calc(var(--edge) - var(--fw) * 0.12);
  bottom: calc(var(--fw) * -0.6);
}
.crown .fl-c {
  width: calc(var(--fw) * 0.95);
  left: calc(var(--edge) - var(--fw) * 0.16);
  bottom: calc(var(--fw) * -0.45);
}
.crown .fl-d {
  width: var(--fw);
  right: calc(var(--edge) - var(--fw) * 0.14);
  bottom: calc(var(--fw) * -0.6);
}
.crown .fl-f,
.crown .fl-g {
  width: calc(var(--fw) * 0.8);
  bottom: 0;
  transform: scaleX(-1);
}
.crown .fl-f {
  left: calc(var(--edge) - var(--fw) * 0.42);
}
.crown .fl-g {
  right: calc(var(--edge) - var(--fw) * 0.42);
}
.crown {
  --fw: min(50vw, 230px);
}
.crown .fl-a {
  width: var(--fw);
  left: calc(var(--edge) - var(--fw) * 0.6);
  top: calc(var(--navh, 64px) - 8px);
}
.crown .fl-b {
  width: var(--fw);
  right: calc(var(--edge) - var(--fw) * 0.58);
  bottom: calc(var(--fw) * -0.75);
}
.crown .fl-c {
  width: var(--fw);
  left: calc(var(--edge) - var(--fw) * 0.6);
  bottom: calc(var(--fw) * -0.5);
}
.crown .fl-d {
  width: var(--fw);
  right: calc(var(--edge) - var(--fw) * 0.58);
  bottom: calc(var(--fw) * -0.7);
}
.crown .fl-f,
.crown .fl-g {
  width: calc(var(--fw) * 0.9);
}
.crown .fl-f {
  left: calc(var(--edge) - var(--fw) * 0.62);
}
.crown .fl-g {
  right: calc(var(--edge) - var(--fw) * 0.62);
}
.crown .hero .countdown {
  max-width: 64%;
}
.crown .fl-a {
  left: calc(var(--edge) - var(--fw) * 0.5);
}
.crown .fl-c {
  left: calc(var(--edge) - var(--fw) * 0.5);
}
.crown .fl-d {
  right: calc(var(--edge) - var(--fw) * 0.5);
}
.crown .fl-a {
  left: calc(var(--edge) - var(--fw) * 0.57);
}
.crown .fl-c {
  left: calc(var(--edge) - var(--fw) * 0.56);
}
.crown .fl-d {
  right: calc(var(--edge) - var(--fw) * 0.56);
}
/* M28b: organic placement (Abhishek 20:13) — each spray its own depth, size and tilt, like the sample */
.crown .fl-a {
  width: calc(var(--fw) * 1.08);
  left: calc(var(--edge) - var(--fw) * 0.42);
  top: calc(var(--navh, 64px) - 22px);
  transform: rotate(7deg);
  transform-origin: 0 0;
}
.crown .fl-b {
  width: calc(var(--fw) * 0.92);
  right: calc(var(--edge) - var(--fw) * 0.62);
  bottom: calc(var(--fw) * -0.62);
  transform: rotate(-4deg);
  transform-origin: 100% 100%;
}
.crown .fl-c {
  width: calc(var(--fw) * 1.12);
  left: calc(var(--edge) - var(--fw) * 0.68);
  bottom: calc(var(--fw) * -0.4);
  transform: rotate(-5deg);
  transform-origin: 0 100%;
}
.crown .fl-d {
  width: calc(var(--fw) * 0.9);
  right: calc(var(--edge) - var(--fw) * 0.42);
  bottom: calc(var(--fw) * -0.62);
  transform: rotate(5deg);
  transform-origin: 100% 100%;
}
.crown .fl-f {
  width: calc(var(--fw) * 0.75);
  left: calc(var(--edge) - var(--fw) * 0.5);
  transform: scaleX(-1) rotate(6deg);
}
.crown .fl-g {
  width: calc(var(--fw) * 0.95);
  right: calc(var(--edge) - var(--fw) * 0.7);
  transform: scaleX(-1) rotate(-3deg);
}
.crown .fl-a {
  left: calc(var(--edge) - var(--fw) * 0.52);
  transform: rotate(9deg);
}
@media (min-width: 521px) {
  .crown .fl-a {
    left: calc(var(--edge) - var(--fw) * 0.58);
  }
}
.crown .fl-a {
  left: calc(var(--edge) - var(--fw) * 0.44);
  transform: rotate(14deg);
  top: calc(var(--navh, 64px) - 30px);
}
.crown .fl-d {
  right: calc(var(--edge) - var(--fw) * 0.36);
}
@media (min-width: 521px) {
  .crown .fl-a {
    left: calc(var(--edge) - var(--fw) * 0.56);
  }
}
/* M28c (20:20): right hero spray and the olive sprays further in; the calendar spray leans out so the right edge isn't a straight column */
.crown .fl-b {
  right: calc(var(--edge) - var(--fw) * 0.4);
  bottom: calc(var(--fw) * -0.5);
  transform: rotate(-9deg);
}
.crown .fl-d {
  width: calc(var(--fw) * 0.82);
  right: calc(var(--edge) - var(--fw) * 0.34);
  bottom: calc(var(--fw) * -0.48);
  transform: rotate(16deg);
}
.crown .fl-f {
  width: calc(var(--fw) * 0.8);
  left: calc(var(--edge) - var(--fw) * 0.3);
}
.crown .fl-g {
  width: calc(var(--fw) * 0.9);
  right: calc(var(--edge) - var(--fw) * 0.42);
  transform: scaleX(-1) rotate(8deg);
}
.crown .fl-b {
  right: calc(var(--edge) - var(--fw) * 0.5);
  bottom: calc(var(--fw) * -0.42);
}
.crown .fl-f {
  left: calc(var(--edge) - var(--fw) * 0.42);
}
.crown .celebrations .band-in {
  padding-bottom: 64px;
}
.crown .fl-d {
  transform-origin: 100% 0;
  transform: rotate(-14deg);
}
.crown .fl-g {
  right: calc(var(--edge) - var(--fw) * 0.5);
}
.crown .fl-f {
  left: calc(var(--edge) - var(--fw) * 0.5);
}
.crown .fl-g {
  right: calc(var(--edge) - var(--fw) * 0.58);
}

/* ===== M29: the envelope opens slowly and without flicker; the seal lifts away with the flap instead of splitting ===== */
.env-f {
  will-change: transform, opacity;
  transform: translateZ(0);
  transition:
    transform 1.5s cubic-bezier(0.33, 0, 0.2, 1),
    opacity 1.5s cubic-bezier(0.4, 0, 0.6, 1);
}
#opening.e-top .env-top {
  transform: translateY(-16%) rotateX(62deg);
  opacity: 0;
}
#opening.e-sides .env-left {
  transform: translateX(-20%) rotateY(-58deg);
  opacity: 0;
}
#opening.e-sides .env-right {
  transform: translateX(20%) rotateY(58deg);
  opacity: 0;
}
#opening.e-bottom .env-bottom {
  transform: translateY(16%) rotateX(-58deg);
  opacity: 0;
}
#opening.e-top .op-fadeout,
#opening.e-top .env-ganesha {
  transition: opacity 0.8s ease;
}
.env-card {
  transition:
    transform 1.3s cubic-bezier(0.25, 0.7, 0.25, 1),
    opacity 1s ease;
  will-change: transform, opacity;
}
#opening.e-in .env-card {
  transition:
    transform 1.2s cubic-bezier(0.5, 0, 0.3, 1),
    opacity 1s ease 0.2s;
}
#opening.e-in .env-inside {
  transition: opacity 1s ease;
}
.env-seal img {
  transition:
    transform 1.2s cubic-bezier(0.33, 0, 0.2, 1),
    opacity 1.1s ease 0.15s;
  will-change: transform, opacity;
}
.env-seal:active img {
  transform: scale(0.94);
}
.env-seal.broken .seal-l,
.env-seal.broken .seal-r {
  transform: translateY(-70%) scale(0.86);
  opacity: 0;
}

/* ===== M29: dress-code band under each event, textured like the celebrations band ===== */
.dress-band {
  position: relative;
  overflow: hidden;
  color: #f4ecdd;
  text-align: center;
}
.dress-haldi {
  background:
    radial-gradient(
      120% 100% at 50% 50%,
      transparent 55%,
      rgba(40, 20, 4, 0.4) 100%
    ),
    url(/assets/img/tex/dress-haldi.webp) 0 0 / 512px 512px,
    #7a4a16;
}
.dress-sangeet {
  background:
    radial-gradient(
      120% 100% at 50% 50%,
      transparent 55%,
      rgba(10, 8, 24, 0.45) 100%
    ),
    url(/assets/img/tex/dress-sangeet.webp) 0 0 / 512px 512px,
    #2e264e;
}
.dress-wedding {
  background:
    radial-gradient(
      130% 100% at 50% 50%,
      transparent 55%,
      rgba(30, 6, 12, 0.45) 100%
    ),
    url(/assets/img/tex/velvet-ox.webp) 0 0 / 512px 512px,
    #581a24;
}
.db-in {
  position: relative;
  z-index: 2;
  max-width: min(66%, 420px);
  margin: 0 auto;
  padding: 38px 0 42px;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.db-title {
  margin: 0;
  font: 600 clamp(16px, 4.4vw, 19px) var(--font-caps);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f3e6c8;
}
.db-line {
  margin: 0;
  font: 400 clamp(18px, 4.9vw, 21px)/1.4 var(--font-body);
  color: #f4ecdd;
  text-wrap: balance;
}
.db-dots {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 10px;
  width: 100%;
}
.db-dots li {
  display: grid;
  justify-items: center;
  gap: 5px;
  font: 600 clamp(10.5px, 2.9vw, 12px) var(--font-caps);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f1e6ce;
}
.db-dots .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px #f4ecdd,
    0 0 0 3px rgba(184, 145, 63, 0.9),
    0 3px 8px rgba(0, 0, 0, 0.35);
}
.dress-band .cflor {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  height: auto;
  max-width: none;
  width: min(34vw, 170px);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}
.dress-band .fl-dl {
  left: calc(50% - min(50vw, 240px) - min(34vw, 170px) * 0.5);
  bottom: calc(min(34vw, 170px) * -0.9);
  transform: rotate(-6deg);
}
.dress-band .fl-dr {
  right: calc(50% - min(50vw, 240px) - min(34vw, 170px) * 0.48);
  top: -18px;
  transform: rotate(8deg);
}
/* M29: soft olive-to-painting fade from the celebrations band into the invitation (drawn by the crown, over the painting's top) */
.crown {
  position: relative;
  z-index: 2;
}
.crown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: clamp(60px, 13vw, 110px);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(52, 60, 38, 0.95) 0%,
    rgba(58, 66, 42, 0.6) 35%,
    rgba(58, 66, 42, 0.2) 70%,
    rgba(58, 66, 42, 0) 100%
  );
}
/* M30: the kept letters glow inside the names before the merge, so the eye sees where the hashtag comes from */
.ht-focus.ht-start .ht-k {
  color: var(--wine, #6e1e2b);
  text-shadow: 0 0 14px rgba(227, 194, 122, 0.85);
  transition:
    color 0.6s ease,
    text-shadow 0.6s ease;
}
.ht-focus.ht-start .ht-t {
  opacity: 0.45;
  transition: opacity 0.6s ease;
}
.ht-shimmer .ht-stage {
  animation-duration: 1.6s !important;
}

/* single-event wedding strip: one centred item */
.crown .cel {
  grid-template-columns: 1fr;
}
.crown .cel li + li {
  border-left: 0;
}

/* #VanyaFoundHerAnkur is ~9.1em wide in Pinyon Script: size it to the screen so it stays on one line */
.ht-tag {
  font-size: min(46px, calc((100vw - 56px) / 9.4)) !important;
  white-space: nowrap;
  word-break: normal;
}
.env-tag {
  font-size: min(34px, 8.4vw, 4.4svh) !important;
  white-space: nowrap;
}
.op-mid .op-tag {
  font-size: min(26px, 6.6vw, 3.6svh) !important;
  white-space: nowrap;
}
