/* ==========================================================
   Panha & Tara — e-invitation · draft v1 "Letterpress Folio"
   tokens → base → opening → chapters
   ========================================================== */

:root {
  /* paper */
  --paper: #f6f0e1;
  --paper-2: #eee5cf;
  --paper-3: #e3d6b6;
  --card: #fbf7ec;
  /* olive */
  --olive-950: #151a0b;
  --olive-900: #1b2010;
  --olive-800: #262c16;
  --olive-700: #363e1f;
  --olive-600: #56612f;
  --olive-500: #6b7a3e;
  --olive-300: #a9b17e;
  /* ink on paper (contrast vs --paper: 13.6 / 8.2 / 5.1) */
  --ink: #22270f;
  --ink-2: #414829;
  --ink-3: #5c6343;
  /* gold */
  --gold-800: #5a4311;
  --gold-700: #7d5f22;
  --gold-500: #b08a45;
  --gold-300: #d8bf84;
  --gold-100: #f2e4bc;
  --line: rgba(125, 95, 34, 0.42);
  --line-l: rgba(216, 191, 132, 0.4);

  --foil-d: linear-gradient(100deg, #4f3a0e 0%, #7d5f22 24%, #a4823f 42%, #c9a866 50%, #a4823f 58%, #7d5f22 76%, #4f3a0e 100%);
  --foil-l: linear-gradient(100deg, #b08a45 0%, #d8bf84 24%, #fbf0cf 44%, #e6cf95 56%, #b08a45 80%, #d8bf84 100%);

  /* type */
  --f-moul: "Moul", "Moulpali", serif;
  --f-disp: "Moul", "Moulpali", serif;
  /* small ceremonial labels: Moul blots below ~18px, so they use the bold body face */
  --f-label: "Noto Serif Khmer", serif;
  --f-body: "Noto Serif Khmer", "Cormorant Garamond", serif;
  --f-serif: "Cormorant Garamond", "Noto Serif Khmer", serif;
  --f-script: "Pinyon Script", cursive;

  --t-body: clamp(17px, 0.6vw + 15px, 19px);
  --t-small: clamp(15px, 0.3vw + 14px, 16px);
  --t-h2: clamp(28px, 4.2vw + 12px, 52px);

  --ease-silk: cubic-bezier(0.22, 1, 0.36, 1);
  --gut: clamp(16px, 5vw, 64px);
  --tex-cream: url(../assets/images/css/bg-04.webp);
  --tex-cream-2: url(../assets/images/css/bg-05.webp);
  --tex-olive: url(../assets/images/css/bg-03.webp);
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}
body {
  background: var(--paper) var(--tex-cream) 0 0 / 512px;
  background-blend-mode: multiply;
  color: var(--ink);
  font: 400 var(--t-body) / 2 var(--f-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="en"] body {
  font-family: var(--f-serif);
  font-weight: 600;
  line-height: 1.6;
  font-size: calc(var(--t-body) * 1.08);
}
body.is-locked {
  overflow: hidden;
  height: 100svh;
}
img {
  display: block;
  max-width: 100%;
}
svg {
  display: block;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
a {
  color: inherit;
}
::selection {
  background: var(--gold-300);
  color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}
/* Khmer phrases: lines break between phrases only */
.ph {
  white-space: nowrap;
}
/* even rag for centred text; harmless where unsupported */
.h2,
.lt,
.cover__lunar,
.gift__p,
.thanks p,
.lake__t p,
.count__t,
.parents__col p,
.sl__c {
  text-wrap: balance;
}

/* ---------- foil type ----------
   background-clip:text only paints inside the box, so foil text gets padding
   above/below for Khmer vowels and subscripts (never clipped) */
.foil-d,
.foil-l {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-size: 220% 100%;
  background-position: 50% 50%;
  padding: 0.32em 0.08em 0.26em;
  margin: -0.32em -0.08em -0.26em;
}
.foil-d {
  background-image: var(--foil-d);
}
.foil-l {
  background-image: var(--foil-l);
}

/* ---------- shared type ---------- */
.h2 {
  font: 400 var(--t-h2) / 1.9 var(--f-disp);
  display: inline-block;
}
html[lang="en"] .h2 {
  font-family: var(--f-serif);
  font-weight: 500;
  font-style: italic;
  line-height: 1.2;
  font-size: calc(var(--t-h2) * 1.15);
}
.eyebrow {
  font: 600 12px/1.6 var(--f-serif);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-700);
}
html[lang="km"] .eyebrow:not(:lang(en)) {
  font: 700 15px/2 var(--f-label);
  letter-spacing: 0;
  text-transform: none;
}
.sec-head {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-bottom: clamp(36px, 7vh, 72px);
}
.rule-orn {
  width: min(64vw, 260px);
  margin-top: 6px;
}
.rule-orn svg {
  width: 100%;
  height: auto;
}

/* decorative elements: gold vector art (js/orn-art.js); paths carry class "kb-fill" */
.orn {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.kb-fill {
  fill: url(#g-foil-d);
}
.band--olive .kb-fill,
.thanks .kb-fill,
.is-light .kb-fill {
  fill: url(#g-foil);
}
/* embossed into the olive flap, as on a debossed envelope */
.flap__border {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 3%;
  z-index: 1;
  pointer-events: none;
}
.flap__border .kb-fill {
  fill: #5e6a2f;
}
.flap__border svg {
  filter: drop-shadow(-0.6px -0.6px 0 rgba(255, 255, 230, 0.22)) drop-shadow(0.8px 0.8px 0.6px rgba(0, 0, 0, 0.45));
}
.wax-crest .kb-fill {
  fill: #8a6a2a;
}
.card__medal .orn {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
/* legacy hand-drawn kit (unused now) */
.do-fill {
  fill: url(#g-foil-d);
}
.do-line {
  fill: none;
  stroke: #8c6b2c;
  stroke-width: 1.2;
  stroke-linecap: round;
}
.do-thin {
  stroke-width: 0.7;
}
.do-vein {
  fill: none;
  stroke: rgba(255, 248, 225, 0.45);
  stroke-width: 1.4;
  stroke-linecap: round;
}
.is-light .do-fill,
.band--olive .do-fill,
.thanks .do-fill {
  fill: url(#g-foil);
}
.is-light .do-line,
.band--olive .do-line,
.thanks .do-line {
  stroke: #d8bf84;
}
.wax-crest .do-fill {
  fill: #8a6a2a;
}
.wax-crest .do-line {
  stroke: #8a6a2a;
}
.wax-crest .do-vein {
  display: none;
}

/* ---------- the couple's monogram (their logo, filled with foil via a mask) ---------- */
.mono {
  display: block;
  aspect-ratio: 1000 / 888;
  width: 100%;
  background: var(--foil-d);
  background-size: 220% 100%;
  background-position: 50% 50%;
  -webkit-mask: url(../assets/images/logo/monogram.png) center / contain no-repeat;
  mask: url(../assets/images/logo/monogram.png) center / contain no-repeat;
}
.mono--l {
  background-image: var(--foil-l);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.mono--flap {
  position: absolute;
  left: 50%;
  top: 10%;
  width: 22%;
  translate: -50% 0;
  z-index: 2;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}
.card__crest {
  width: 62cqw;
  height: auto;
  margin: 2cqw 0 1cqw;
  filter: drop-shadow(0 2px 3px rgba(90, 67, 17, 0.25));
}
.card__inv {
  font: 400 4.2cqw/2 var(--f-moul);
  color: var(--ink);
}
html[lang="en"] .card__inv {
  font: italic 500 5cqw/1.4 var(--f-serif);
}
.bar__mark .mono {
  width: 40px;
}
.cover__mono {
  width: clamp(130px, 22svh, 240px);
  margin: 2px 0;
}
.mono--end {
  width: clamp(130px, 30vw, 220px);
  margin-top: 18px;
}

/* ---------- lockup: the couple's names (legacy) ---------- */
.lockup {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  font-family: var(--f-disp);
  font-weight: 400;
  line-height: 1.5;
  container-type: inline-size;
}
.lockup .lk-a {
  grid-area: 1 / 1;
  justify-self: end;
  margin-right: 0.35em;
}
.lockup .lk-b {
  grid-area: 2 / 2;
  justify-self: start;
  margin-left: 0.15em;
  margin-top: -0.55em;
}
.lockup .lk-amp {
  grid-area: 1 / 2 / 3 / 2;
  align-self: center;
  justify-self: start;
  font: italic 500 0.62em/1 var(--f-serif);
  color: var(--gold-700);
  margin: -0.3em 0 0 -0.18em;
}

/* ==========================================================
   OPENING
   ========================================================== */
.gate {
  --ew: min(88vw, 560px);
  --eh: calc(var(--ew) / 1.45);
  --ring: clamp(28px, 5svh, 56px);
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: var(--olive-950);
  color: var(--gold-100);
}
/* an olive linen table under a warm lamp */
.gate__bg {
  position: absolute;
  inset: -3%;
  background:
    radial-gradient(70% 46% at 50% 50%, rgba(255, 226, 160, 0.16), rgba(255, 226, 160, 0) 70%),
    #2a3117 var(--tex-olive) 0 0 / 420px;
  background-blend-mode: normal, multiply;
}
.gate__frame {
  position: absolute;
  inset: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  border: 1px solid rgba(216, 191, 132, 0.28);
  pointer-events: none;
}
.gate__frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(216, 191, 132, 0.14);
}
.gate__shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 70% at 50% 52%, rgba(21, 26, 11, 0) 30%, rgba(14, 17, 7, 0.85) 100%);
}
.gate__head {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(50% + var(--eh) / 2 + var(--ring));
  text-align: center;
  padding: 0 var(--gut);
}
.gate__kicker {
  display: inline-block;
  font: 400 clamp(19px, 2.4vw + 10px, 30px) / 1.9 var(--f-moul);
}
.gate__sub {
  font: italic 500 clamp(17px, 1vw + 13px, 22px) / 1.4 var(--f-serif);
  color: var(--gold-300);
  letter-spacing: 0.04em;
}
.gate__hint {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + var(--eh) / 2 + var(--ring));
  text-align: center;
  font: 400 var(--t-small) / 2 var(--f-body);
  color: var(--gold-100);
  padding: 0 var(--gut);
}
.gate__hint > span {
  display: inline-block;
  padding: 6px 18px;
  border-top: 1px solid var(--line-l);
  border-bottom: 1px solid var(--line-l);
}
html[lang="en"] .gate__hint {
  font-family: var(--f-serif);
  font-size: 18px;
  font-style: italic;
}
.gate__veil {
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}
.lang {
  font: 600 13px/1 var(--f-serif);
  letter-spacing: 0.14em;
  min-width: 48px;
  height: 40px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(251, 247, 236, 0.82);
  color: var(--ink);
}
html[lang="en"] .lang {
  font: 400 14px/1 var(--f-body);
  letter-spacing: 0;
}
.lang--gate {
  position: absolute;
  z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + 26px);
  right: 26px;
  background: rgba(21, 26, 11, 0.4);
  color: var(--gold-100);
  border-color: var(--line-l);
}

/* scene: sized by JS (--ew/--eh envelope, --cw/--ch card) */
.scene {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--ew);
  height: var(--eh);
  margin: calc(var(--eh) / -2) 0 0 calc(var(--ew) / -2);
  perspective: 1400px;
}
.env {
  position: absolute;
  inset: 0;
}
.env__ground {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -9%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
  filter: blur(8px);
}
.env__stage {
  position: absolute;
  inset: 0;
  perspective: 1200px;
  perspective-origin: 50% 0%;
}
.env__stage > * {
  position: absolute;
}
.env__back {
  inset: 0;
  z-index: 1;
  border-radius: 4px;
  background: #3c4523 var(--tex-olive) 0 0 / 360px;
  background-blend-mode: multiply;
  box-shadow:
    inset 0 30px 40px -8px rgba(0, 0, 0, 0.55),
    0 2px 2px rgba(0, 0, 0, 0.3),
    0 24px 50px rgba(0, 0, 0, 0.5);
}
.env__pocket {
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: 4px;
  overflow: hidden;
}
.pk {
  position: absolute;
  inset: 0;
}
.pk b {
  position: absolute;
  inset: 0;
  background: var(--olive-500) var(--tex-olive) 0 0 / 360px;
}
.pk b::after {
  content: "";
  position: absolute;
  inset: 0;
}
.pk--l,
.pk--r {
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.35)) drop-shadow(2px 0 3px rgba(0, 0, 0, 0.2));
}
.pk--b {
  filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.3));
}
.pk--l b {
  clip-path: polygon(0 0, 53% 55%, 0 100%);
}
.pk--l b::after {
  background: linear-gradient(95deg, rgba(255, 250, 220, 0.12), rgba(0, 0, 0, 0.06));
}
.pk--r b {
  clip-path: polygon(100% 0, 47% 55%, 100% 100%);
}
.pk--r b::after {
  background: linear-gradient(265deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.03));
}
.pk--b b {
  clip-path: polygon(0 100%, 50% 47%, 100% 100%);
}
.pk--b b::after {
  background: linear-gradient(180deg, rgba(255, 250, 220, 0.14), rgba(0, 0, 0, 0.12));
}
.env__date {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9%;
  text-align: center;
  font: 400 calc(var(--ew) * 0.034) / 2 var(--f-body);
  letter-spacing: 0.32em;
}
.env__flapshade {
  left: 0;
  right: 0;
  top: 0;
  height: 61%;
  z-index: 4;
  pointer-events: none;
  filter: blur(6px);
  transform: translateY(6px);
}
.env__flapshade::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  clip-path: url(#clip-flap);
}
.env__flap {
  left: 0;
  right: 0;
  top: 0;
  height: 60%;
  z-index: 5;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  pointer-events: none;
}
.flap__face {
  position: absolute;
  inset: 0;
  clip-path: url(#clip-flap);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flap__front {
  background: #6f7e41 var(--tex-olive) 0 0 / 360px;
}
.flap__front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(176deg, rgba(255, 250, 225, 0.16), rgba(255, 250, 225, 0) 45%, rgba(0, 0, 0, 0.16));
}
.flap__foil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 1;
}
.flap__foil path {
  fill: none;
  stroke: url(#g-foil);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}
.lockup--flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 9%;
  font-size: calc(var(--ew) * 0.062);
  z-index: 2;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}
.flap__back {
  transform: rotateX(180deg);
  background: #e9dfc4 var(--tex-cream-2) 0 0 / 360px;
  background-blend-mode: multiply;
  box-shadow: inset 0 -40px 50px rgba(0, 0, 0, 0.18);
}
.flap__crest {
  position: absolute;
  left: 50%;
  top: 20%;
  width: 16%;
  translate: -50% 0;
  opacity: 0.85;
}
/* wax seal */
.seal {
  --lift: 0;
  left: 50%;
  top: 60%;
  width: 22%;
  aspect-ratio: 1;
  translate: -50% -50%;
  z-index: 6;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 calc(3px + var(--lift) * 16px) calc(4px + var(--lift) * 14px) rgba(0, 0, 0, 0.5));
}
.seal svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.seal::before {
  content: "";
  position: absolute;
  inset: -34%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(251, 225, 160, 0.4), rgba(251, 225, 160, 0));
  animation: seal-glow 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes seal-glow {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}
.is-opening .seal::before {
  animation: none;
  opacity: 0;
}
.seal:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 6px;
}

/* the card's top edge inside the envelope */
.env__insert {
  left: 6%;
  right: 6%;
  top: 7%;
  bottom: 10%;
  z-index: 2;
  border-radius: 2px;
  background: var(--card) var(--tex-cream) 0 0 / 420px;
  background-blend-mode: multiply;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.25);
}
.env__insert::before {
  content: "";
  position: absolute;
  inset: 7% 5%;
  border: 1px solid var(--line);
}

/* ---------- the gatefold card ---------- */
.card {
  --cw: 320px;
  --ch: 464px;
  position: absolute;
  opacity: 0;
  left: 50%;
  top: 50%;
  width: var(--cw);
  height: var(--ch);
  margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2);
  z-index: 2;
  perspective: 1800px;
  pointer-events: none;
  container-type: inline-size;
}
.card__in,
.door__face {
  background: var(--card) var(--tex-cream) 0 0 / 420px;
  background-blend-mode: multiply;
}
.card__in {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 14px 34px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.card__frame {
  position: absolute;
  inset: 3.6cqw;
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: -1.6cqw;
}
.card__body {
  position: absolute;
  inset: 7cqw 7cqw 6cqw;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 1.2cqw;
}
.card__kicker {
  font: 700 4.4cqw/2 var(--f-label);
}
.card__arch {
  width: 58cqw;
  height: 70cqw;
  border-radius: 29cqw 29cqw 2px 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 1.6cqw var(--card), 0 0 0 calc(1.6cqw + 1px) var(--line);
}
.card__arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 35%;
}
.lockup--card {
  font-size: 11.5cqw;
  margin-top: 1cqw;
}
.card__date {
  font: 400 3.7cqw/2 var(--f-body);
  color: var(--ink-2);
}
html[lang="en"] .card__date {
  font: 500 4.6cqw/1.5 var(--f-serif);
  letter-spacing: 0.06em;
}
html[lang="en"] .card__kicker {
  font: italic 500 5.4cqw/1.5 var(--f-serif);
}

.door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  transform-style: preserve-3d;
}
.door--l {
  left: 0;
  transform-origin: 0 50%;
}
.door--r {
  right: 0;
  transform-origin: 100% 50%;
}
.door__face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.door__out::before {
  /* double foil frame, the inner edge left open at the seam */
  content: "";
  position: absolute;
  inset: 3.6cqw 0 3.6cqw 3.6cqw;
  border: 1px solid var(--line);
  border-right: 0;
  box-shadow: inset 1.6cqw 1.6cqw 0 -0.8cqw transparent;
}
.door--r .door__out::before {
  inset: 3.6cqw 3.6cqw 3.6cqw 0;
  border-right: 1px solid var(--line);
  border-left: 0;
}
.door__out::after {
  /* the fold: soft shading toward the seam */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, 0.14));
}
.door--l .door__out {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}
/* inside faces: seen once the card is unfolded (programme · venue) */
.door__inside {
  transform: rotateY(180deg);
  background-size: auto, 420px;
  padding: 7cqw 5cqw 7cqw;
  text-align: center;
  color: var(--ink);
  overflow: hidden;
  display: grid;
  align-content: center;
}
.door--l .door__inside {
  background-image: linear-gradient(270deg, rgba(0, 0, 0, 0.13), rgba(0, 0, 0, 0) 22%), var(--tex-cream);
}
.door--r .door__inside {
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.13), rgba(0, 0, 0, 0) 22%), var(--tex-cream);
}
.door__inside::before {
  content: "";
  position: absolute;
  inset: 3.6cqw 0 3.6cqw 3.6cqw;
  border: 1px solid var(--line);
  border-right: 0;
  pointer-events: none;
}
.door--r .door__inside::before {
  inset: 3.6cqw 3.6cqw 3.6cqw 0;
  border-right: 1px solid var(--line);
  border-left: 0;
}
.tri__h {
  display: inline-block;
  font: 400 4.6cqw/1.8 var(--f-disp);
}
.tri__k {
  font: 700 2.6cqw/2 var(--f-label);
  color: var(--gold-700);
}
.tri__sub {
  font: 500 2.5cqw/1.9 var(--f-body);
  color: var(--ink-2);
  margin-bottom: 2.4cqw;
  padding-bottom: 2cqw;
  border-bottom: 1px solid var(--line);
}
.tri__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2.6cqw;
  text-align: left;
}
.tri__list li {
  display: grid;
  grid-template-columns: 9.6cqw 1fr;
  gap: 1.4cqw;
  align-items: baseline;
}
.tri__list b {
  font: 600 2.7cqw/1.7 var(--f-body);
  color: var(--gold-700);
  text-align: right;
  white-space: nowrap;
}
.tri__list span {
  font: 400 2.7cqw/1.7 var(--f-body);
  color: var(--ink);
}
.tri__crest {
  width: 15cqw;
  margin: 3cqw auto 1cqw;
}
.tri__name {
  display: inline-block;
  font: 400 4.2cqw/1.75 var(--f-disp);
}
.tri__hall {
  display: inline-block;
  margin: 1.4cqw 0 3cqw;
  padding: 0 3cqw;
  border: 1px solid var(--line);
  border-radius: 99px;
  font: 500 2.6cqw/1.9 var(--f-body);
  color: var(--gold-700);
}
.tri__when {
  font: 500 2.9cqw/2 var(--f-body);
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.6cqw 0;
}
.tri__orn {
  width: 30cqw;
  margin: 4cqw auto 0;
}
html[lang="en"] .tri__h,
html[lang="en"] .tri__name {
  font: italic 500 5cqw/1.3 var(--f-serif);
}
html[lang="en"] .tri__k {
  font: 600 1.9cqw/2 var(--f-serif);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
html[lang="en"] .tri__list b,
html[lang="en"] .tri__list span,
html[lang="en"] .tri__sub,
html[lang="en"] .tri__when,
html[lang="en"] .tri__hall {
  font-family: var(--f-serif);
  font-size: 2.8cqw;
  line-height: 1.45;
}
.door__orn {
  position: absolute;
  top: 6cqw;
  width: 22cqw;
}
.door--l .door__orn {
  left: 6cqw;
}
.door--r .door__orn {
  right: 6cqw;
}
.door__orn--b {
  top: auto;
  bottom: 6cqw;
}
.card__medal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26cqw;
  translate: -50% -50%;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
  z-index: 3;
}

/* ==========================================================
   TOP BAR + MUSIC
   ========================================================== */
.bar {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 8px 18px;
  transition:
    transform 0.5s var(--ease-silk),
    background-color 0.4s;
  transform: translateY(-110%);
}
.bar.on {
  transform: none;
}
.bar.on.hd {
  transform: translateY(-110%);
}
.bar.scr {
  background: rgba(246, 240, 225, 0.92);
  box-shadow: 0 1px 0 var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .bar.scr {
    background: rgba(246, 240, 225, 0.78);
    backdrop-filter: blur(10px);
  }
}
.bar__mark {
  font: 400 16px/1.9 var(--f-disp);
  text-decoration: none;
  color: var(--gold-700);
}
.bar__mark i {
  font: italic 500 17px/1 var(--f-serif);
  color: var(--gold-500);
  padding: 0 2px;
}
.mus {
  position: fixed;
  z-index: 45;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(251, 247, 236, 0.9);
  color: var(--gold-700);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 6px 18px rgba(34, 39, 15, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
}
body.is-open .mus {
  opacity: 1;
  pointer-events: auto;
}
.mus svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.mus__bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: eq 1.1s ease-in-out infinite;
}
.mus__bar:nth-child(2) {
  animation-delay: -0.3s;
}
.mus__bar:nth-child(3) {
  animation-delay: -0.6s;
}
.mus__bar:nth-child(4) {
  animation-delay: -0.8s;
}
@keyframes eq {
  50% {
    transform: scaleY(0.35);
  }
}
.mus.off .mus__bar {
  animation: none;
  transform: scaleY(0.3);
}

/* ==========================================================
   COVER
   ========================================================== */
.cover {
  position: relative;
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top, 0px) + 64px) var(--gut) 72px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 252, 242, 0.9), rgba(255, 252, 242, 0) 60%),
    radial-gradient(90% 50% at 50% 100%, rgba(107, 122, 62, 0.12), rgba(107, 122, 62, 0));
}
.cover__grid {
  display: grid;
  justify-items: center;
  gap: clamp(14px, 2.4svh, 28px);
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
.arch {
  position: relative;
  width: min(68vw, 29svh, 320px);
  aspect-ratio: 4 / 5;
}
.arch__win {
  position: absolute;
  inset: 0;
  border-radius: 999px 999px 3px 3px;
  overflow: hidden;
  background: var(--paper-3);
  box-shadow: 0 30px 60px -28px rgba(34, 39, 15, 0.55);
}
.arch__win img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: 60% 30%;
}
.arch__line {
  position: absolute;
  inset: -9px;
  border-radius: 999px 999px 6px 6px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.arch__line::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 9px;
  height: 9px;
  translate: -50% 0;
  rotate: 45deg;
  background: var(--paper);
  border: 1px solid var(--gold-500);
}
.cover__text {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: clamp(2px, 0.6svh, 14px);
  width: 100%;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
}
.kicker__t {
  font: 700 clamp(16px, 0.6vw + 14px, 20px) / 2 var(--f-label);
  white-space: nowrap;
}
html[lang="en"] .kicker__t {
  font: italic 500 20px/1.5 var(--f-serif);
}
.kicker__rule {
  width: clamp(22px, 7vw, 64px);
  height: 1px;
  background: var(--line);
}
.lockup--xl {
  font-size: clamp(46px, 9vw + 10px, 112px);
  line-height: 1.45;
  margin: -0.12em 0 -0.08em;
}
.cover__en {
  font: 600 clamp(12px, 0.3vw + 11px, 14px) / 1.6 var(--f-serif);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.cover__en i {
  font: italic 500 1.25em/1 var(--f-serif);
  text-transform: none;
  letter-spacing: 0;
  color: var(--gold-500);
  padding: 0 0.2em;
}
.cover__inv {
  font: 400 var(--t-small) / 2 var(--f-body);
  color: var(--ink-3);
}
html[lang="en"] .cover__inv {
  font: italic 500 19px/1.5 var(--f-serif);
}
.datelock {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100%, 380px);
}
.datelock__side {
  display: grid;
  justify-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2px 4px;
}
.datelock small {
  font: 400 13px/1.9 var(--f-body);
  color: var(--ink-3);
}
.datelock__side b {
  font: 500 clamp(16px, 0.5vw + 14px, 19px) / 1.9 var(--f-body);
  color: var(--ink);
  white-space: nowrap;
}
.datelock__day {
  padding: 0 clamp(14px, 4vw, 26px);
}
.datelock__day b {
  display: inline-block;
  font: 400 clamp(46px, 4vw + 30px, 72px) / 1.5 var(--f-disp);
}
html[lang="en"] .datelock__day b {
  font: 500 clamp(54px, 4vw + 36px, 84px) / 1.2 var(--f-serif);
}
html[lang="en"] .datelock small {
  font: 600 11px/1.9 var(--f-serif);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
html[lang="en"] .datelock__side b {
  font: 600 18px/1.6 var(--f-serif);
}
.cover__lunar {
  font: 400 var(--t-small) / 1.95 var(--f-body);
  color: var(--ink-2);
  max-width: 24em;
}
.cover__venue {
  font: 500 var(--t-small) / 1.9 var(--f-body);
  color: var(--ink);
}
.cover__venue .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 10px 0.2em;
  rotate: 45deg;
  background: var(--gold-500);
}
.cue {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-decoration: none;
  font: 400 13px/1.8 var(--f-body);
  color: var(--ink-3);
}
.cue i {
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--gold-500), rgba(176, 138, 69, 0));
  transform-origin: top;
  animation: cue 2.2s var(--ease-silk) infinite;
}
@keyframes cue {
  0% {
    transform: scaleY(0);
  }
  60% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* ==========================================================
   BANDS
   ========================================================== */
.band {
  position: relative;
  padding: clamp(84px, 14svh, 160px) var(--gut);
}
.band--paper2 {
  background: var(--paper-2) var(--tex-cream-2) 0 0 / 512px;
  background-blend-mode: multiply;
}
.band--olive {
  background: var(--olive-800) var(--tex-olive) 0 0 / 420px;
  background-blend-mode: multiply;
  color: var(--paper);
}

/* ---------- LETTER ---------- */
.sheet {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 88px) clamp(26px, 7vw, 72px) clamp(52px, 8vw, 80px);
  background: var(--card) var(--tex-cream) 0 0 / 420px;
  background-blend-mode: multiply;
  text-align: center;
  box-shadow:
    0 1px 1px rgba(34, 39, 15, 0.12),
    0 18px 40px -12px rgba(34, 39, 15, 0.28),
    0 50px 90px -40px rgba(34, 39, 15, 0.35);
  transform-origin: 50% 0;
}
.sheet__frame {
  position: absolute;
  inset: 12px;
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: -6px;
  pointer-events: none;
}
.sheet__orn {
  position: absolute;
  width: clamp(54px, 15vw, 84px);
}
.sheet__orn--tl {
  left: 20px;
  top: 20px;
}
.sheet__orn--tr {
  right: 20px;
  top: 20px;
}
.sheet__orn--bl {
  left: 20px;
  bottom: 20px;
}
.sheet__orn--br {
  right: 20px;
  bottom: 20px;
}
.sheet__crest {
  width: 76px;
  margin: 0 auto 4px;
}
.sheet .h2 {
  font-size: clamp(26px, 2.6vw + 16px, 40px);
}
.sheet .rule-orn {
  margin: 4px auto clamp(24px, 4vh, 36px);
}
.lt {
  font: 400 var(--t-body) / 2.05 var(--f-body);
  color: var(--ink-2);
  padding: 0.25em 0;
}
.lt--a {
  color: var(--gold-700);
  font-weight: 500;
}
.lt--h {
  color: var(--ink);
  font-weight: 600;
}
html[lang="en"] .lt {
  font: 600 clamp(19px, 0.6vw + 17px, 22px) / 1.6 var(--f-serif);
}
html[lang="en"] .lt--h {
  font-weight: 600;
  font-style: italic;
}
.parents {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: clamp(28px, 5vh, 44px);
  padding-top: clamp(26px, 4vh, 36px);
  border-top: 1px solid var(--line);
}
.parents__col h3 {
  font: 700 16px/2 var(--f-label);
  color: var(--gold-700);
  margin-bottom: 2px;
}
html[lang="en"] .parents__col h3 {
  font: 600 12px/1.8 var(--f-serif);
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.parents__col p {
  font: 500 var(--t-body) / 1.95 var(--f-body);
  color: var(--ink);
}
.parents__orn {
  width: 22px;
  opacity: 0.9;
}

/* ---------- COUPLE ---------- */
.couple {
  display: grid;
  justify-items: center;
  gap: clamp(30px, 5vh, 48px);
  max-width: 1120px;
  margin: 0 auto;
}
.couple__photo {
  width: min(84vw, 380px);
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 3px 3px;
  overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(34, 39, 15, 0.55);
  order: -1;
}
.couple__photo img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: 50% 30%;
}
.person {
  display: grid;
  justify-items: center;
  text-align: center;
}
.person small {
  font: 700 15px/2 var(--f-label);
  color: var(--gold-700);
}
html[lang="en"] .person small {
  font: 600 12px/1.8 var(--f-serif);
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.person__name {
  display: inline-block;
  font: 400 clamp(28px, 2vw + 20px, 40px) / 1.95 var(--f-disp);
  white-space: nowrap;
}
html[lang="en"] .person__name {
  font: 400 clamp(38px, 3vw + 28px, 58px) / 1.4 var(--f-script);
}
.person > span {
  font: 400 var(--t-small) / 1.9 var(--f-body);
  color: var(--ink-2);
}
.person > .person__of {
  color: var(--ink-3);
  font-style: normal;
}

/* ---------- THE DAY (olive) ---------- */
.band--olive .h2 {
  font-size: clamp(34px, 4.4vw + 16px, 60px);
}
.sec-head--light .eyebrow {
  color: var(--gold-300);
}
.count {
  max-width: 560px;
  margin: 0 auto clamp(76px, 12vh, 120px);
  text-align: center;
}
.count__t {
  font: 400 var(--t-small) / 2 var(--f-body);
  color: var(--gold-300);
  margin-bottom: 10px;
}
.count__g {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-l);
  border-bottom: 1px solid var(--line-l);
}
.count__g div {
  display: grid;
  justify-items: center;
  padding: 10px 0 8px;
}
.count__g div + div {
  border-left: 1px solid var(--line-l);
}
.count__g b {
  font: 500 clamp(30px, 2vw + 24px, 46px) / 1.5 var(--f-serif);
  color: var(--gold-100);
  font-variant-numeric: tabular-nums;
}
html[lang="km"] .count__g b {
  font: 500 clamp(28px, 2vw + 22px, 42px) / 1.75 var(--f-body);
}
.count__g small {
  font: 400 14px/1.8 var(--f-body);
  color: rgba(246, 240, 225, 0.72);
}
.prog {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.prog__thread {
  position: absolute;
  left: 96px;
  top: 14px;
  bottom: 30px;
  width: 1px;
  background: rgba(216, 191, 132, 0.22);
}
.prog__thread i {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--gold-300), var(--gold-500));
  transform-origin: top;
  transform: scaleY(0);
}
.prog__list {
  list-style: none;
  padding: 0;
}
.pi {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  padding-bottom: clamp(30px, 5vh, 48px);
}
.pi:last-child {
  padding-bottom: 0;
}
.pi__time {
  padding-right: 22px;
  text-align: right;
  display: grid;
  align-content: start;
}
.pi__time b {
  font: 500 24px/1.6 var(--f-serif);
  color: var(--gold-100);
  font-variant-numeric: tabular-nums;
}
html[lang="km"] .pi__time b {
  font: 500 21px/1.8 var(--f-body);
}
.pi__time small {
  font: 400 14px/1.6 var(--f-body);
  color: var(--gold-300);
}
html[lang="en"] .pi__time small {
  font: 600 11px/1.6 var(--f-serif);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.pi__node {
  position: absolute;
  left: 96px;
  top: 16px;
  width: 11px;
  height: 11px;
  margin-left: -5px;
  rotate: 45deg;
  border: 1px solid var(--gold-300);
  background: var(--olive-800);
  transition:
    background-color 0.6s,
    box-shadow 0.6s;
}
.pi.lit .pi__node {
  background: var(--gold-300);
  box-shadow: 0 0 0 5px rgba(216, 191, 132, 0.14), 0 0 18px rgba(242, 228, 188, 0.6);
}
.pi__body {
  padding-left: 26px;
}
.pi__body h3 {
  font: 400 clamp(19px, 1vw + 16px, 22px) / 1.95 var(--f-disp);
  color: var(--paper);
}
html[lang="en"] .pi__body h3 {
  font: 600 24px/1.4 var(--f-serif);
}
.pi__body p {
  font: 400 var(--t-small) / 1.95 var(--f-body);
  color: rgba(246, 240, 225, 0.78);
}
html[lang="en"] .pi__body p {
  font: 600 18px/1.5 var(--f-serif);
}

/* ---------- STORY (pinned, horizontal) ---------- */
.story {
  position: relative;
  height: 100svh;
  overflow: hidden;
}
.story__head {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 var(--gut);
}
.story__head .h2 {
  font-size: clamp(26px, 2.6vw + 16px, 44px);
}
.story__count {
  font: 500 15px/1 var(--f-serif);
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.story__count b {
  font-weight: 600;
  color: var(--gold-700);
}
.story__trk {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: clamp(22px, 5vw, 64px);
  padding: calc(env(safe-area-inset-top, 0px) + 120px) var(--gut) 56px;
  width: max-content;
}
.sl {
  flex: 0 0 auto;
  width: clamp(270px, 76vw, 460px);
  margin: 0;
}
.sl__img {
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 24px 50px -24px rgba(34, 39, 15, 0.55);
}
.sl img {
  width: 100%;
  height: min(46svh, 470px);
  object-fit: cover;
}
.sl figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  margin-top: 16px;
  align-items: start;
}
.sl__n {
  grid-row: span 2;
  font: 500 15px/2.2 var(--f-serif);
  color: var(--gold-500);
  letter-spacing: 0.08em;
}
.sl__t {
  display: inline-block;
  font: 400 clamp(19px, 1vw + 16px, 23px) / 1.8 var(--f-disp);
  justify-self: start;
}
html[lang="en"] .sl__t {
  font: italic 600 22px/1.4 var(--f-serif);
}
.sl__c {
  font: 400 var(--t-small) / 1.9 var(--f-body);
  color: var(--ink-2);
}
html[lang="en"] .sl__c {
  font: 600 18px/1.45 var(--f-serif);
}
.story__bar {
  position: absolute;
  left: var(--gut);
  right: var(--gut);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
  height: 1px;
  background: var(--line);
}
.story__bar i {
  position: absolute;
  inset: 0;
  background: var(--gold-700);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- LOTUS LAKE ---------- */
.lake {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--olive-950);
  touch-action: pan-y;
  cursor: pointer;
  color: var(--paper);
}
.lake__bg {
  position: absolute;
  inset: -8% 0;
  background:
    linear-gradient(180deg, rgba(21, 26, 11, 0.55) 0%, rgba(21, 26, 11, 0.12) 30%, rgba(21, 26, 11, 0.45) 58%, rgba(21, 26, 11, 0.92) 100%),
    url(../assets/images/misc/candle.webp) 55% 50% / cover;
}
.lake canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.lake__t {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 11svh);
  text-align: center;
  z-index: 2;
  pointer-events: none;
  padding: 0 var(--gut);
}
.lake__t .h2 {
  font-size: clamp(26px, 2.6vw + 16px, 44px);
}
.lake__t p {
  font: 400 var(--t-small) / 2 var(--f-body);
  color: rgba(246, 240, 225, 0.88);
  margin-top: 4px;
}
html[lang="en"] .lake__t p {
  font: italic 500 19px/1.5 var(--f-serif);
}
.lant {
  position: absolute;
  width: 42px;
  margin: -21px 0 0 -21px;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 0 12px rgba(251, 225, 160, 0.9));
}

/* ---------- GALLERY: four numbered sets of four ---------- */
.gal {
  --gap: clamp(8px, 1.2vw, 14px);
  display: grid;
  gap: clamp(44px, 8vh, 84px);
  max-width: 1180px;
  margin: 0 auto;
}
.gset__h {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.gset__h b {
  font: 500 clamp(30px, 2vw + 22px, 44px) / 1 var(--f-serif);
  color: var(--gold-700);
}
.gset__h span {
  font: 700 15px/2 var(--f-label);
  color: var(--ink-2);
}
html[lang="en"] .gset__h span {
  font: 600 12px/1.8 var(--f-serif);
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.gset__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.gset__grid button {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: var(--paper-3);
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 1;
}
.gset--l .gset__grid button {
  aspect-ratio: 3 / 2;
}
.gset--p .gset__grid button {
  aspect-ratio: 4 / 5;
}
.gset__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-silk);
}
.gset__grid button:hover img {
  transform: scale(1.04);
}
@media (min-width: 900px) {
  .gset--p .gset__grid,
  .gset--s .gset__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* lightbox */
.lb {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(17, 21, 9, 0.97);
  color: var(--paper);
}
.lb[hidden] {
  display: none;
}
.lb__trk {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.lb__trk::-webkit-scrollbar {
  display: none;
}
.lb__s {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  display: grid;
  place-items: center;
  padding: 64px 12px 72px;
}
.lb__s img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lb__n {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  text-align: center;
  font: 500 15px/1 var(--f-serif);
  letter-spacing: 0.2em;
  color: var(--gold-300);
}
.lb__x,
.lb__nav {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-l);
  background: rgba(21, 26, 11, 0.6);
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--gold-100);
}
.lb__x svg,
.lb__nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lb__x {
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 14px;
}
.lb__nav {
  top: 50%;
  margin-top: -24px;
  display: none;
}
.lb__nav--p {
  left: 18px;
}
.lb__nav--n {
  right: 18px;
}
@media (hover: hover) and (pointer: fine) {
  .lb__nav {
    display: grid;
  }
}

/* ---------- VENUE ---------- */
.venue {
  display: grid;
  gap: clamp(36px, 6vh, 56px);
  max-width: 1120px;
  margin: 0 auto;
}
.venue__info {
  display: grid;
  justify-items: center;
  text-align: center;
}
.venue__name {
  font-size: clamp(28px, 3vw + 16px, 48px);
}
.venue__hall {
  margin-top: 6px;
}
.venue__hall > span {
  display: inline-block;
  font: 500 var(--t-body) / 1.9 var(--f-body);
  color: var(--gold-700);
  padding: 2px 20px;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.venue__when {
  display: grid;
  gap: 10px;
  margin: clamp(22px, 4vh, 34px) 0;
  width: min(100%, 420px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.venue__when div {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 10px;
  text-align: left;
}
.venue__when dt {
  font: 400 var(--t-small) / 1.9 var(--f-body);
  color: var(--ink-3);
}
.venue__when dd {
  margin: 0;
  font: 500 var(--t-small) / 1.9 var(--f-body);
  color: var(--ink);
}
html[lang="en"] .venue__when dt,
html[lang="en"] .venue__when dd {
  font-family: var(--f-serif);
  font-size: 18px;
  line-height: 1.6;
}
.venue__btns {
  display: grid;
  gap: 12px;
  width: min(100%, 360px);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 26px;
  border-radius: 99px;
  border: 1px solid var(--olive-700);
  background: var(--olive-700);
  color: var(--paper);
  font: 500 var(--t-small) / 1.6 var(--f-body);
  text-decoration: none;
  transition:
    background-color 0.3s,
    color 0.3s;
}
html[lang="en"] .btn {
  font: 600 17px/1.4 var(--f-serif);
  letter-spacing: 0.04em;
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn:hover {
  background: var(--olive-800);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  background: rgba(125, 95, 34, 0.08);
}
.venue__map {
  position: relative;
  padding: 10px;
  /* placeholder pin while the map loads */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b08a45' stroke-width='1.2'%3E%3Cpath d='M12 22s7-6.2 7-12a7 7 0 1 0-14 0c0 5.8 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3C/svg%3E") 50% 50% / 44px no-repeat,
    var(--card);
  box-shadow:
    0 1px 1px rgba(34, 39, 15, 0.12),
    0 24px 50px -24px rgba(34, 39, 15, 0.4);
  border-radius: 3px;
}
.venue__map::after {
  content: "";
  position: absolute;
  inset: 10px;
  box-shadow: inset 0 0 0 1px var(--line);
  pointer-events: none;
}
.venue__map iframe {
  display: block;
  width: 100%;
  height: clamp(280px, 44svh, 440px);
  border: 0;
  background: transparent;
  filter: sepia(0.22) saturate(0.85);
}

/* ---------- GIFT ---------- */
#gift {
  text-align: center;
}
.gift__p {
  max-width: 28em;
  margin: 0 auto clamp(28px, 5vh, 40px);
  color: var(--ink-2);
}
.qr {
  width: min(72vw, 300px);
  margin: 0 auto 22px;
  padding: 12px;
  background: #fff;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px var(--line),
    0 24px 50px -24px rgba(34, 39, 15, 0.4);
}
.qr img {
  width: 100%;
  border-radius: 3px;
}

/* ---------- THANKS ---------- */
.thanks {
  position: relative;
  min-height: 92svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background: var(--olive-950);
  color: var(--paper);
  padding: 96px var(--gut) calc(env(safe-area-inset-bottom, 0px) + 96px);
}
.thanks__bg {
  position: absolute;
  inset: -10% 0;
  background:
    linear-gradient(180deg, rgba(21, 26, 11, 0.9), rgba(21, 26, 11, 0.62) 45%, rgba(21, 26, 11, 0.92)),
    url(../assets/images/gallery/thumb/gallery-15.webp) 50% 50% / cover;
}
.thanks__in {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 560px;
}
.thanks__crest {
  width: 84px;
}
.thanks p {
  font: 400 var(--t-body) / 2 var(--f-body);
  color: rgba(246, 240, 225, 0.86);
}
html[lang="en"] .thanks p {
  font: italic 500 21px/1.5 var(--f-serif);
}
.lockup--end {
  font-size: clamp(40px, 6vw + 16px, 76px);
  margin-top: 18px;
}
.thanks .thanks__date {
  font: 600 13px/1 var(--f-serif);
  letter-spacing: 0.4em;
  color: var(--gold-300);
  margin-top: 8px;
}


/* ==========================================================
   THE INVITATION DETAILS (card in the envelope + first page)
   sized in em so one layout scales from the card to the page
   ========================================================== */
.detail {
  display: grid;
  justify-items: center;
  text-align: center;
  color: var(--ink);
  font-family: var(--f-body);
}
.detail > * + * {
  margin-top: 0.7em;
}
.detail__crest {
  width: 5.6em;
  height: auto;
  filter: drop-shadow(0 2px 3px rgba(90, 67, 17, 0.22));
}
.detail__k {
  display: inline-block;
  font: 400 1.5em/1.9 var(--f-disp);
}
.detail__par,
.detail__cp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.2em;
  width: 100%;
}
.detail__par p {
  font: 400 0.98em/2 var(--f-disp);
  text-wrap: balance;
  color: var(--ink);
}
.detail__inv {
  display: inline-block;
  font: 400 1.32em/1.9 var(--f-disp);
}
.detail__p {
  font: 400 0.98em/2.05 var(--f-body);
  color: var(--ink-2);
  max-width: 30em;
  text-wrap: balance;
}
.detail__cp small {
  display: block;
  font: 700 0.86em/2 var(--f-label);
  color: var(--gold-700);
}
.detail__cp b {
  display: inline-block;
  font: 400 1.42em/1.95 var(--f-disp);
  white-space: nowrap;
}
.detail__rule {
  width: min(16em, 80%);
}
.detail__lunar {
  font: 400 0.92em/2 var(--f-body);
  color: var(--ink-2);
  text-wrap: balance;
}
.detail__date {
  font: 400 1.12em/1.95 var(--f-disp);
  color: var(--ink);
}
.detail .detail__time,
.detail .detail__venue {
  margin-top: 0.15em;
  font: 600 1em/1.9 var(--f-body);
  color: var(--ink);
}
.detail__venue .dot {
  display: inline-block;
  width: 0.3em;
  height: 0.3em;
  margin: 0 0.6em 0.2em;
  rotate: 45deg;
  background: var(--gold-500);
}
html[lang="en"] .detail__k,
html[lang="en"] .detail__inv,
html[lang="en"] .detail__date {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
}
html[lang="en"] .detail__k {
  font-size: 1.7em;
}
html[lang="en"] .detail__par p,
html[lang="en"] .detail__p,
html[lang="en"] .detail__lunar,
html[lang="en"] .detail .detail__time,
html[lang="en"] .detail .detail__venue {
  font-family: var(--f-serif);
  font-weight: 600;
  line-height: 1.55;
}
html[lang="en"] .detail__cp b {
  font: 400 1.9em/1.4 var(--f-script);
}
html[lang="en"] .detail__cp small {
  font: 600 0.72em/1.8 var(--f-serif);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
/* on the card: same layout, smaller, without the long paragraph */
.detail--card {
  position: absolute;
  inset: 9cqw 8cqw;
  align-content: center;
  font-size: 3.5cqw;
}
.detail--card .detail__p {
  display: none;
}
.detail--card > * + * {
  margin-top: 0.55em;
}
.card__orn {
  position: absolute;
  width: 15cqw;
  z-index: 1;
}
.card__orn--tl { left: 5.5cqw; top: 5.5cqw; }
.card__orn--tr { right: 5.5cqw; top: 5.5cqw; }
.card__orn--bl { left: 5.5cqw; bottom: 5.5cqw; }
.card__orn--br { right: 5.5cqw; bottom: 5.5cqw; }

/* the first page is the invitation sheet itself */
.cover {
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 64px) clamp(12px, 3vw, 40px) 72px;
}
.cover__sheet {
  position: relative;
  width: min(100%, 680px);
  padding: clamp(52px, 9vw, 84px) clamp(20px, 6vw, 64px) clamp(48px, 8vw, 76px);
  background: var(--card) var(--tex-cream) 0 0 / 420px;
  background-blend-mode: multiply;
  box-shadow:
    0 1px 1px rgba(34, 39, 15, 0.12),
    0 18px 40px -12px rgba(34, 39, 15, 0.28),
    0 50px 90px -40px rgba(34, 39, 15, 0.35);
}
.cover__sheet .detail {
  font-size: clamp(15px, 1.1vw + 11px, 19px);
}
.cover__sheet .sheet__orn {
  width: clamp(52px, 14vw, 92px);
}


/* ---------- cover: crest, the couple's names, date, the guest ---------- */
.cvn {
  display: grid;
  justify-items: center;
}
.cvn b {
  display: inline-block;
  font: 400 1.75em/1.85 var(--f-disp);
  white-space: nowrap;
}
.cvn__amp {
  font: italic 500 1.5em/1 var(--f-serif);
  color: var(--gold-500);
  margin: -0.15em 0;
}
html[lang="en"] .cvn b {
  font: 400 2.3em/1.3 var(--f-script);
}
.detail--cover .detail__crest {
  width: 7.2em;
}
.guest {
  margin-top: 1.1em !important;
  padding: 0.5em 1.6em 0.6em;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.guest small {
  display: block;
  font: 700 0.86em/2 var(--f-label);
  color: var(--gold-700);
}
.guest b {
  display: block;
  font: 400 1.25em/1.95 var(--f-disp);
  color: var(--ink);
}
html[lang="en"] .guest small {
  font: italic 500 1em/1.6 var(--f-serif);
}
.guest--letter {
  border: 0;
  padding: 0;
  margin-top: 0.2em !important;
}
.gate__guest {
  margin-top: 6px;
}
.gate__guest small {
  display: block;
  font: 400 var(--t-small) / 1.8 var(--f-body);
  color: var(--gold-300);
}
.gate__guest b {
  display: block;
  font: 400 clamp(19px, 1vw + 16px, 24px) / 1.9 var(--f-moul);
  color: var(--gold-100);
}
/* letter: "son … together with … daughter" as on the printed card */
.detail__cp {
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
}
.detail__pair {
  font: 400 0.8em/2.6 var(--f-body);
  color: var(--ink-3);
  padding-bottom: 0.5em;
}
.detail--letter {
  font-size: clamp(15px, 1vw + 11.5px, 19px);
}
.sheet .detail--letter .detail__p {
  font-size: 1em;
}
.sec-sub {
  font: 400 var(--t-small) / 2 var(--f-body);
  color: var(--ink-2);
}
html[lang="en"] .sec-sub {
  font: italic 500 19px/1.5 var(--f-serif);
}
/* dress code */
.dress {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.dress__pending {
  padding: 28px 20px;
  border: 1px dashed var(--line);
  color: var(--ink-3);
  font: 400 var(--t-small) / 2 var(--f-body);
}
/* share */
.share {
  margin-top: 40px;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.share__t {
  font: 400 var(--t-small) / 2 var(--f-body);
  color: var(--gold-300);
}
.share__btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.share__b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 99px;
  border: 1px solid var(--line-l);
  background: rgba(21, 26, 11, 0.4);
  color: var(--gold-100);
  font: 500 15px/1 var(--f-body);
  text-decoration: none;
}
html[lang="en"] .share__b {
  font: 600 16px/1 var(--f-serif);
}
.share__b--main {
  background: var(--gold-300);
  color: var(--olive-900);
  border-color: var(--gold-300);
}
.share__b svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.share__note {
  min-height: 1.6em;
  font: 400 14px/1.6 var(--f-body);
  color: var(--gold-300);
}

/* ==========================================================
   DESKTOP
   ========================================================== */
@media (min-width: 900px) {
  .cover__mono {
    width: clamp(200px, 32svh, 320px);
  }
  .cover__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(40px, 6vw, 110px);
  }
  .arch {
    width: min(38vw, 58svh, 470px);
    justify-self: end;
  }
  .cover__text {
    justify-items: center;
  }
  .parents {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
  }
  .couple {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }
  .couple__photo {
    order: 0;
    width: min(32vw, 400px);
  }
  .venue {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
  .prog__thread,
  .pi__node {
    left: 140px;
  }
  .pi {
    grid-template-columns: 140px 1fr;
  }
  .pi__body {
    padding-left: 36px;
  }
  .sl img {
    height: min(52svh, 500px);
  }
}

/* short landscape phones */
@media (max-height: 560px) and (orientation: landscape) {
  .gate {
    --ring: 10px;
  }
  .gate__sub {
    display: none;
  }
}

/* ==========================================================
   REDUCED MOTION — content is static and fully visible
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .story {
    height: auto;
    padding: calc(env(safe-area-inset-top, 0px) + 120px) 0 72px;
  }
  .story__head {
    top: 58px;
  }
  .story__trk {
    position: static;
    width: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-top: 0;
  }
  .sl {
    scroll-snap-align: center;
  }
  .story__bar {
    display: none;
  }
}
