/* ==========================================================================
   The Wedding of Alghifari & Laeli: main.css  (mobile-first)
   Design direction: "Pulang". See docs/DESIGN-DIRECTION.md
   Tablet/desktop overrides + reduced motion live in responsive.css
   ========================================================================== */

/* ---------------------------------------------------------------- fonts -- */
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------- tokens -- */
:root {
  /* Colour: taken from the couple's photographs */
  --c-ivory: #f7f2ea;         /* primary paper */
  --c-cream: #f3ebdf;         /* warm cream */
  --c-champagne: #ecdfcb;     /* champagne bands */
  --c-linen: #efe6d8;         /* soft beige */
  --c-print: #fbf8f2;         /* photo mats */
  --c-ink: #2b2622;           /* deep charcoal text (13.4:1 on ivory) */
  --c-ink-soft: #5f5650;      /* secondary text (6.4:1) */
  --c-clay: #765440;          /* subtle earth brown accent text (6:1) */
  --c-brass: #a88a5c;         /* restrained antique gold, ornament only */
  --c-night: #1f1b18;         /* deep charcoal bands (closing) */
  --c-night-2: #211a14;
  --c-on-night: #f2e8d8;
  --c-on-night-soft: #bfaf98;
  --c-lantern: #d4be93;
  --c-error: #9b2c1f;
  --c-hair: rgba(43, 38, 34, 0.12);
  --c-hair-gold: rgba(168, 138, 92, 0.45);
  --c-hair-strong: rgba(42, 35, 29, 0.24);
  --c-hair-night: rgba(216, 188, 138, 0.26);

  /* Type */
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --f-sans: "Jost", "Avenir Next", "Century Gothic", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Space */
  --gutter: clamp(1.5rem, 6.4vw, 2.5rem);
  --section-y: clamp(5.5rem, 22vw, 8rem);
  --wrap: 40rem;
  --wrap-narrow: 32rem;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.25, 0.6, 0.25, 1);
  --reveal-dur: 1.15s;
  --ease-curtain: cubic-bezier(0.76, 0, 0.24, 1);

  /* Safe areas (iPhone notch / home bar) */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);

  /* Textures (tiny inline SVGs) */
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .13 0 0 0 0 .09 .09 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Kawung (gold on light bands) */
  --kawung-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23a88a5c' stroke-opacity='.13' stroke-width='.8'%3E%3Cellipse cx='28' cy='14' rx='6.5' ry='12'/%3E%3Cellipse cx='28' cy='42' rx='6.5' ry='12'/%3E%3Cellipse cx='14' cy='28' rx='12' ry='6.5'/%3E%3Cellipse cx='42' cy='28' rx='12' ry='6.5'/%3E%3Ccircle cx='28' cy='28' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
  /* Kawung: classical four-petal Javanese geometry */
  --kawung: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23d8bc8a' stroke-opacity='.075' stroke-width='.8'%3E%3Cellipse cx='28' cy='14' rx='6.5' ry='12'/%3E%3Cellipse cx='28' cy='42' rx='6.5' ry='12'/%3E%3Cellipse cx='14' cy='28' rx='12' ry='6.5'/%3E%3Cellipse cx='42' cy='28' rx='12' ry='6.5'/%3E%3Ccircle cx='28' cy='28' r='1.4'/%3E%3Ccircle cx='0' cy='0' r='1.4'/%3E%3Ccircle cx='56' cy='0' r='1.4'/%3E%3Ccircle cx='0' cy='56' r='1.4'/%3E%3Ccircle cx='56' cy='56' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--c-night);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-ivory);
  color: var(--c-ink);
  font: 400 1rem/1.7 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, figure, blockquote, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: rgba(184, 146, 90, 0.35); color: var(--c-ink); }

html.is-locked, html.is-locked body,
html.is-lightbox, html.is-lightbox body { overflow: hidden; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.icon, .atap svg, .hero__mark, .dock svg, .music__icon, .lightbox svg, .choice__mark svg,
.venue-card__icon, .colophon__mark, .account__copy svg {
  fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip-link {
  position: fixed; left: 1rem; top: -100px; z-index: 100;
  padding: 0.75rem 1rem; background: var(--c-ink); color: var(--c-ivory);
  font-size: 0.875rem; text-decoration: none;
}
.skip-link:focus { top: calc(1rem + var(--safe-t)); }

:focus-visible { outline: 2px solid var(--c-clay); outline-offset: 3px; }
.cover :focus-visible, .section--night :focus-visible,
.lightbox :focus-visible { outline-color: var(--c-lantern); }

/* ----------------------------------------------------------- typography -- */
.eyebrow {
  margin: 0 0 1.1rem;
  font: 500 0.6875rem/1.5 var(--f-sans);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--c-clay);
}
.eyebrow--night { color: var(--c-lantern); }

.title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 12.5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  color: var(--c-ink);
  text-wrap: balance;
}
.title em, .amp { font-style: italic; font-weight: 300; color: var(--c-clay); }
.section--night .title, .cover .title { color: var(--c-on-night); }
.section--night .title em, .section--night .amp, .cover .amp, .stage .amp { color: var(--c-lantern); }

.sec-head { text-align: center; margin-bottom: clamp(3rem, 12vw, 4.25rem); }
.sec-mark {
  display: block; width: 44px; height: 19px; margin: 0 auto 1.35rem;
  fill: none; stroke: var(--c-brass); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 160; stroke-dashoffset: 0;
}
.js .sec-head[data-reveal] .sec-mark { stroke-dashoffset: 160; transition: stroke-dashoffset 2.2s var(--ease-soft) 0.25s; }
.js .sec-head[data-reveal].is-visible .sec-mark { stroke-dashoffset: 0; }
.sec-lead {
  max-width: 30rem;
  margin: 1.6rem auto 0;
  font-family: var(--f-display);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--c-ink-soft);
  text-wrap: pretty;
}
.sec-note { margin-top: 0.9rem; font-size: 0.875rem; color: var(--c-clay); }

/* --------------------------------------------------------------- layout -- */
.section { position: relative; padding-block: var(--section-y); background: var(--c-ivory) var(--paper); }
.section--linen { background-color: var(--c-linen); }
.section--champagne { background: var(--c-champagne) var(--kawung-light); }
.section--night { background: var(--c-night) var(--kawung); color: var(--c-on-night); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: calc(var(--gutter) + var(--safe-l)) calc(var(--gutter) + var(--safe-r)); }
.wrap--narrow { max-width: calc(var(--wrap-narrow) + 2 * var(--gutter)); }

/* Roof-mark divider */
.atap { display: flex; align-items: center; justify-content: center; gap: 1rem; max-width: 15rem; margin: 0 auto 2.75rem; color: var(--c-brass); }
.atap::before, .atap::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.55; }
.atap svg { width: 46px; height: 19px; stroke-width: 1.1; }
.atap--night { color: var(--c-lantern); }

/* --------------------------------------------------------------- images -- */
.pic { position: relative; display: block; overflow: hidden; background-color: var(--pic-color, var(--c-linen)); }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pic--fade img { opacity: 0; transition: opacity 0.9s var(--ease-out); }
.pic--fade.is-loaded img { opacity: 1; }
.pic.is-broken img { opacity: 0; }
.pic.is-broken::after {
  content: attr(data-alt);
  position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem;
  font: italic 300 0.9375rem/1.5 var(--f-display); text-align: center; color: rgba(255, 255, 255, 0.85);
}

/* -------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  min-height: 52px; padding: 0 1.75rem;
  border: 1px solid currentColor; border-radius: 0;
  background: transparent; color: var(--c-ink);
  font: 500 0.75rem/1 var(--f-sans); letter-spacing: 0.24em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s, transform 0.2s;
  -webkit-user-select: none; user-select: none;
}
.btn .icon { width: 17px; height: 17px; stroke-width: 1.3; }
.btn:hover { background: var(--c-ink); color: var(--c-ivory); }
@media (hover: hover) { .btn:hover { transform: translateY(-1px); } }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn--solid { background: var(--c-ink); color: var(--c-ivory); border-color: var(--c-ink); }
.btn--solid:hover { background: var(--c-clay); border-color: var(--c-clay); }
.btn--lantern { color: var(--c-lantern); border-color: rgba(216, 188, 138, 0.6); }
.btn--lantern:hover { background: var(--c-lantern); border-color: var(--c-lantern); color: var(--c-night); }
.btn--block { width: 100%; }
.btn--small { min-height: 44px; padding: 0 1.25rem; font-size: 0.6875rem; }
.btn__spinner {
  display: none; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
.is-submitting .btn__spinner { display: inline-block; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px;
  font: 500 0.75rem/1 var(--f-sans); letter-spacing: 0.24em; text-transform: uppercase;
  text-decoration: none; color: var(--c-ink);
  border-bottom: 1px solid var(--c-hair-strong);
  transition: border-color 0.3s;
}
.link-arrow .icon { transition: transform 0.4s var(--ease-out); }
.link-arrow:hover { border-color: var(--c-ink); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ======================================================== OPENING COVER == */
.cover {
  position: fixed; inset: 0; z-index: 50;
  background: var(--c-night) var(--kawung);
  color: var(--c-on-night);
  overflow: hidden;
  overscroll-behavior: contain;
  transition: transform 1.1s var(--ease-curtain), visibility 0s linear 1.1s;
}
.cover.is-leaving { transform: translate3d(0, -100%, 0); visibility: hidden; }

.cover__media, .cover__shade { position: absolute; inset: 0; }
.cover__media .pic { width: 100%; height: 100%; background: var(--c-night); }
.cover__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  transition: transform 7s var(--ease-out);
}
.cover.is-ready .cover__media img { transform: scale(1); }
.cover__shade {
  /* Dark only where text sits (top + bottom); the couple in the middle stays clear */
  background:
    linear-gradient(180deg, rgba(31, 27, 24, 0.8) 0%, rgba(31, 27, 24, 0.58) 24%, rgba(31, 27, 24, 0.2) 36%, rgba(31, 27, 24, 0) 43%,
      rgba(31, 27, 24, 0) 60%, rgba(31, 27, 24, 0.55) 74%, rgba(31, 27, 24, 0.9) 92%);
}

.cover__content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  height: 100%; overflow-y: auto;
  padding: calc(var(--safe-t) + clamp(2.75rem, 8vh, 4.5rem)) calc(var(--gutter) + var(--safe-r)) calc(var(--safe-b) + clamp(1.5rem, 4.5vh, 2.75rem)) calc(var(--gutter) + var(--safe-l));
  text-align: center;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.cover.is-leaving .cover__content { opacity: 0; transform: translateY(-14px); }

.cover__names {
  font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144;
  font-size: clamp(3.1rem, 15.5vw, 4.4rem); line-height: 0.98; letter-spacing: -0.02em;
  color: var(--c-on-night);
}
.cover__names > span:first-child { display: block; }
.cover__names .amp { font-size: 0.82em; margin-right: 0.12em; }
.cover__date { margin-top: 1.4rem; font: 500 0.75rem/1 var(--f-sans); letter-spacing: 0.42em; color: var(--c-on-night-soft); }

.cover__to { font-size: 0.75rem; letter-spacing: 0.1em; color: var(--c-on-night-soft); }
.cover__name {
  display: block; width: fit-content; max-width: 100%;
  margin: 0.7rem auto 1.6rem; padding: 0.55rem 1.4rem;
  border-block: 1px solid var(--c-hair-night);
  font-family: var(--f-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.55rem, 7vw, 2.05rem); line-height: 1.22;
  color: var(--c-on-night); overflow-wrap: anywhere; text-wrap: balance;
}
.cover__btn { min-width: min(100%, 15rem); }
.cover__note { margin-top: 1.1rem; font-size: 0.6875rem; line-height: 1.5; color: var(--c-on-night-soft); opacity: 0.85; }

/* Entrance: staggered fade-up once JS marks the cover ready */
.js .cover__top > *, .js .cover__guest > * {
  opacity: 0; transform: translate3d(0, 14px, 0);
  animation: cover-fallback 0s linear 3.5s forwards; /* shows content even if JS fails */
}
.js .cover.is-ready .cover__top > *, .js .cover.is-ready .cover__guest > * {
  animation: none; opacity: 1; transform: none;
  transition: opacity 1.1s var(--ease-out), transform 1.2s var(--ease-out);
}
.cover.is-ready .cover__top > :nth-child(1) { transition-delay: 0.25s; }
.cover.is-ready .cover__top > :nth-child(2) { transition-delay: 0.4s; }
.cover.is-ready .cover__top > :nth-child(3) { transition-delay: 0.55s; }
.cover.is-ready .cover__guest > :nth-child(1) { transition-delay: 0.75s; }
.cover.is-ready .cover__guest > :nth-child(2) { transition-delay: 0.85s; }
.cover.is-ready .cover__guest > :nth-child(3) { transition-delay: 1s; }
.cover.is-ready .cover__guest > :nth-child(4) { transition-delay: 1.1s; }
@keyframes cover-fallback { to { opacity: 1; transform: none; } }

/* Desktop stage is hidden on small screens (see responsive.css) */
.stage { display: none; }

/* ================================================================= HERO == */
.invitation { position: relative; background: var(--c-ivory); }

.hero {
  position: relative; display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh;
  padding-bottom: calc(5.75rem + var(--safe-b));
  background: var(--c-ivory) var(--paper);
  overflow: hidden; isolation: isolate;
}
.hero__media {
  position: relative; height: 64vh; height: 64svh; min-height: 22rem;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  will-change: transform;
}
.hero__media .pic { width: 100%; height: 100%; }
.hero__media img { transform: scale(1.06); transition: transform 2.6s var(--ease-soft); }
.is-open .hero__media img { transform: scale(1); }
.hero__content { position: relative; z-index: 1; margin-top: -2.25rem; padding-inline: var(--gutter); text-align: center; }
.hero__mark { width: 40px; height: 17px; margin: 0 auto 1rem; color: var(--c-clay); stroke-width: 1.1; }
.hero__names {
  font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144;
  font-size: clamp(3.3rem, 17vw, 5rem); line-height: 0.95; letter-spacing: -0.025em;
  color: var(--c-ink); outline: none;
}
.hero__line:first-child { display: block; }
.hero__line--amp .amp { font-size: 0.8em; margin-right: 0.1em; }
.hero__date { margin-top: 1.25rem; font: 500 0.75rem/1 var(--f-sans); letter-spacing: 0.4em; text-transform: uppercase; color: var(--c-ink-soft); }

.scroll-cue {
  position: absolute; left: 50%; bottom: calc(1.25rem + var(--safe-b)); width: 44px; height: 44px; margin-left: -22px;
  display: none;
}
.scroll-cue::before {
  content: ""; position: absolute; left: 50%; top: 4px; width: 1px; height: 34px; background: var(--c-hair-strong);
}
.scroll-cue::after {
  content: ""; position: absolute; left: calc(50% - 2px); top: 4px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--c-clay); animation: cue 2.4s var(--ease-out) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 25% { opacity: 1; } 80% { transform: translateY(30px); opacity: 0; } 100% { opacity: 0; } }

/* ======================================================= DATE & VENUE == */
.intro { text-align: center; padding-top: clamp(4rem, 16vw, 6rem); }
.intro__salam { margin-bottom: 1.25rem; font-family: var(--f-display); font-style: italic; font-size: 1.125rem; line-height: 1.5; color: var(--c-clay); }
.intro__text { max-width: 28rem; margin: 0 auto 3.75rem; color: var(--c-ink-soft); line-height: 1.85; text-wrap: pretty; }

.dateplate { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.1rem; max-width: 23rem; margin: 0 auto 3.75rem; }
.dateplate__side {
  display: grid; gap: 0.1rem; padding-block: 0.95rem;
  border-block: 1px solid var(--c-hair-strong);
  font: 500 0.75rem/1.6 var(--f-sans); letter-spacing: 0.28em; text-transform: uppercase; color: var(--c-ink);
}
.dateplate__num {
  font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144;
  font-size: clamp(6rem, 31vw, 8.75rem); line-height: 0.8; letter-spacing: -0.045em;
  font-variant-numeric: lining-nums; color: var(--c-ink);
  padding-bottom: 0.06em;
}

.venue-line .eyebrow { margin-bottom: 0.75rem; }
.venue-line__name {
  display: inline-block; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 7.5vw, 1.9rem); line-height: 1.2;
  text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease-out);
}
.venue-line__name:hover { background-size: 100% 1px; }
.venue-line__addr { margin: 0.4rem 0 1.25rem; font-size: 0.9375rem; color: var(--c-ink-soft); }

/* ================================================================ VERSE == */
/* One centred block (ornament, verse, source): equal top/bottom padding on the
   96–128px rhythm, a ~31rem measure, balanced lines. On desktop it centres in the
   invitation column because the section itself lives in that column. */
.verse {
  display: grid; place-items: center; text-align: center;
  padding-block: clamp(6rem, 4.6rem + 5vw, 7.5rem);
}
.verse__fig {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: calc(31rem + 2 * var(--gutter)); margin: 0 auto;
}
.verse__mark {
  display: block; height: 0.42em; margin-bottom: 1.1rem; overflow: visible;
  font-family: var(--f-display); font-size: 4.25rem; line-height: 0.82; color: var(--c-brass);
}
.verse__text p {
  font-family: var(--f-display); font-style: italic; font-weight: 300;
  font-variation-settings: "opsz" 18;            /* text optical size, not display */
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.1875rem);   /* ≈1.125rem on 360–430px · 1.1875rem from tablet up */
  line-height: 1.65; color: var(--c-ink); text-wrap: balance;
}
.verse__text p[dir="rtl"], .verse__text [lang="ar"] { font-size: 1.15em; line-height: 1.95; }
.verse__src { margin-top: 1.6rem; font: 500 0.6875rem/1 var(--f-sans); letter-spacing: 0.34em; text-transform: uppercase; color: var(--c-clay); }

/* =============================================================== COUPLE == */
.person {
  display: grid; gap: 2.25rem;
  max-width: var(--wrap); margin-inline: auto;
  padding-inline: calc(var(--gutter) + var(--safe-l)) calc(var(--gutter) + var(--safe-r));
}
.person__figure { position: relative; width: min(78%, 22rem); }
.person--bride .person__figure { margin-left: auto; }
.frame { position: relative; isolation: isolate; }
.frame::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 1px solid var(--c-brass); transform: translate(14px, 14px);
}
.person--bride .frame::after { transform: translate(-14px, 14px); }
.frame__img .pic { aspect-ratio: 3 / 4; }
.frame__img img { object-position: 50% 22%; }

.person__tag {
  position: absolute; top: 0; left: calc(100% + 1.6rem);
  display: flex; gap: 1.1rem;
  writing-mode: vertical-rl;
  font: 500 0.625rem/1 var(--f-sans); letter-spacing: 0.36em; text-transform: uppercase; color: var(--c-ink-soft);
}
.person__tag span:first-child { color: var(--c-clay); }
.person--bride .person__tag { left: auto; right: calc(100% + 1.6rem); transform: rotate(180deg); }

.person__body { max-width: 26rem; }
.person--bride .person__body { margin-left: auto; text-align: right; }
.person__name {
  margin-bottom: 1.1rem;
  font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144;
  font-size: clamp(2.3rem, 10.5vw, 3rem); line-height: 1.02; letter-spacing: -0.015em; text-wrap: balance;
}
.person__parents { font-size: 0.9375rem; line-height: 1.75; color: var(--c-ink-soft); }
.person__childof { display: block; margin-bottom: 0.15rem; font-family: var(--f-display); font-style: italic; font-size: 1.0625rem; color: var(--c-clay); }
.person__ig { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; margin-top: 0.75rem; font-size: 0.875rem; text-decoration: none; color: var(--c-ink); }

.couple__amp {
  display: flex; align-items: center; gap: 1.25rem;
  max-width: 20rem; margin: clamp(3rem, 12vw, 4.5rem) auto; padding-inline: var(--gutter);
  font-family: var(--f-display); font-style: italic; font-weight: 300; font-size: 4.5rem; line-height: 1; color: var(--c-clay);
}
.couple__amp::before, .couple__amp::after { content: ""; flex: 1; height: 1px; background: var(--c-hair-strong); }

/* ============================================ COUNTDOWN + SAVE THE DATE == */
.countdown { text-align: center; overflow: hidden; }
.countdown__glow {
  position: absolute; left: 50%; top: 36%; width: 150vw; max-width: 900px; aspect-ratio: 1;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 252, 246, 0.75), rgba(255, 252, 246, 0.2) 55%, transparent 72%);
}
.countdown .wrap { position: relative; }

.timer { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 25rem; margin: 0 auto; }
.timer__unit { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; padding: 0.25rem 0; }
.timer__unit + .timer__unit::before { content: ""; position: absolute; left: 0; top: 12%; height: 52%; width: 1px; background: var(--c-hair-gold); }
.timer__num {
  font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144;
  font-size: clamp(2.6rem, 12.5vw, 3.6rem); line-height: 1;
  font-variant-numeric: tabular-nums lining-nums; color: var(--c-ink);
}
.timer__label { font: 500 0.625rem/1 var(--f-sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--c-clay); }
.timer-done__title { font-family: var(--f-display); font-style: italic; font-weight: 300; font-size: clamp(2.4rem, 11vw, 3.25rem); line-height: 1.1; color: var(--c-ink); }
.timer-done__sub { max-width: 24rem; margin: 1rem auto 0; color: var(--c-ink-soft); }

.savedate { margin-top: clamp(4rem, 16vw, 5.5rem); }
.savedate__title { font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(2.2rem, 10vw, 2.75rem); line-height: 1; }
.savedate__title em { font-style: italic; color: var(--c-clay); }
.savedate__when { margin: 1.2rem 0 0.35rem; font: 500 0.8125rem/1.5 var(--f-sans); letter-spacing: 0.12em; color: var(--c-ink); }
.savedate__where { margin-bottom: 2.1rem; font-size: 0.9375rem; color: var(--c-ink-soft); }

/* =============================================================== EVENTS == */
.events__list { display: grid; gap: 1.25rem; max-width: 26rem; margin: 0 auto; }
.event-card {
  position: relative; padding: 2.75rem 1.75rem 2.25rem; text-align: center;
  background: var(--c-cream) var(--paper);
  border: 1px solid var(--c-hair-gold);
  box-shadow: 0 18px 40px -30px rgba(43, 38, 34, 0.45);
}
.event-card--alt { background-color: var(--c-champagne); }
/* Printed-card detail: fine inner rule + four small corner marks */
.event-card::before {
  content: ""; position: absolute; inset: 9px; pointer-events: none;
  border: 1px solid var(--c-hair);
  background:
    linear-gradient(var(--c-brass), var(--c-brass)) left 6px top 6px / 12px 1px no-repeat,
    linear-gradient(var(--c-brass), var(--c-brass)) left 6px top 6px / 1px 12px no-repeat,
    linear-gradient(var(--c-brass), var(--c-brass)) right 6px top 6px / 12px 1px no-repeat,
    linear-gradient(var(--c-brass), var(--c-brass)) right 6px top 6px / 1px 12px no-repeat,
    linear-gradient(var(--c-brass), var(--c-brass)) left 6px bottom 6px / 12px 1px no-repeat,
    linear-gradient(var(--c-brass), var(--c-brass)) left 6px bottom 6px / 1px 12px no-repeat,
    linear-gradient(var(--c-brass), var(--c-brass)) right 6px bottom 6px / 12px 1px no-repeat,
    linear-gradient(var(--c-brass), var(--c-brass)) right 6px bottom 6px / 1px 12px no-repeat;
}
.event-card__mark { display: block; width: 40px; height: 17px; margin: 0 auto 1.1rem; fill: none; stroke: var(--c-brass); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.event-card__title { font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(2.1rem, 9.5vw, 2.5rem); line-height: 1.05; letter-spacing: -0.01em; }
.event-card__date { margin-top: 0.75rem; font: 500 0.6875rem/1.5 var(--f-sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--c-ink-soft); }
.event-card__time { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 0.5rem; margin-top: 1.35rem; }
.event-card__clock { font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(3rem, 14vw, 3.5rem); line-height: 1; font-variant-numeric: lining-nums; color: var(--c-ink); }
.event-card__tz { font: 500 0.75rem/1 var(--f-sans); letter-spacing: 0.24em; color: var(--c-ink); }
.event-card__end { flex-basis: 100%; margin-top: 0.35rem; font-family: var(--f-display); font-style: italic; font-size: 1.125rem; color: var(--c-clay); }
.event-card__note { margin-top: 0.75rem; font-size: 0.875rem; color: var(--c-ink-soft); }
.event-card__rule { display: block; width: 2.75rem; height: 1px; margin: 1.6rem auto 1.35rem; background: var(--c-brass); }
.event-card__venue { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.3; }
.event-card__area { margin-top: 0.2rem; font-size: 0.875rem; color: var(--c-ink-soft); }
.event-card__actions { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-top: 1.6rem; }
.event-card__actions .btn { min-width: 12.5rem; }
.event-card__cal { font-size: 0.6875rem; }

/* ================================================================ STORY == */
.chapters {
  display: grid; gap: clamp(4.5rem, 16vw, 6rem);
  max-width: var(--wrap); margin-inline: auto;
  padding-inline: calc(var(--gutter) + var(--safe-l)) calc(var(--gutter) + var(--safe-r));
}
.chapter { position: relative; display: grid; gap: 2.25rem; }
/* Every story photo uses the same natural 2:3 frame (no awkward crops), alternating sides */
.chapter__figure { position: relative; width: min(68%, 16.5rem); isolation: isolate; }
.chapter__figure::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 1px solid var(--c-hair-gold); transform: translate(12px, 12px);
}
.chapter--alt .chapter__figure { margin-left: auto; }
.chapter--alt .chapter__figure::after { transform: translate(-12px, 12px); }
.chapter__figure .pic { aspect-ratio: 2 / 3; }
.chapter__kicker { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.6rem; }
.chapter__kicker::after { content: ""; flex: 1; height: 1px; background: var(--c-hair-strong); }
.chapter__no { font-family: var(--f-display); font-style: italic; font-weight: 300; font-size: 1.5rem; line-height: 1; color: var(--c-clay); }
.chapter__title { margin-bottom: 1.3rem; font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(2.3rem, 10.5vw, 2.85rem); line-height: 1.04; letter-spacing: -0.015em; }
.chapter__text p { font-family: var(--f-display); font-weight: 350; font-size: 1.0625rem; line-height: 1.82; color: var(--c-ink); text-wrap: pretty; }
.chapter__text p + p { margin-top: 1rem; }
.chapter__text p:first-child::first-letter {
  float: left; margin: 0.06em 0.12em 0 0;
  font-weight: 300; font-size: 3.55em; line-height: 0.8; font-variation-settings: "opsz" 144; color: var(--c-clay);
}

/* ============================================================== GALLERY == */
/* Soft photographic backdrop: a tiny, pre-blurred image (no runtime blur cost) under an ivory veil */
.gallery { overflow: hidden; isolation: isolate; background: var(--c-ivory); }
.gallery::before {
  content: ""; position: absolute; inset: -6%; z-index: -2;
  background: var(--gallery-backdrop, none) center / cover no-repeat;
  opacity: 0.5; transform: scale(1.06);
}
.gallery::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--c-ivory) 0%, rgba(247, 242, 234, 0.6) 16%, rgba(247, 242, 234, 0.45) 50%,
    rgba(247, 242, 234, 0.6) 84%, var(--c-ivory) 100%);
}
/* Mosaic restored from the first design (commit 2901493): feature (4:5) · two
   halves (2:3) · landscape rows (3:2). Same gap in both directions; 24px gutters
   plus safe-area on phones so no photo touches the screen edge. */
.mosaic {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem;          /* 10px */
  max-width: 46rem; margin: 0 auto; list-style: none;
  padding-block: 0; padding-inline: calc(1.5rem + var(--safe-l)) calc(1.5rem + var(--safe-r));
}
.mosaic__item { min-width: 0; }
.mosaic__item--feature, .mosaic__item--wide { grid-column: 1 / -1; }
.mosaic__btn { display: block; width: 100%; padding: 0; border: 0; background: none; overflow: hidden; cursor: zoom-in; }
.mosaic__item--feature .pic { aspect-ratio: 4 / 5; }
.mosaic__item--half .pic { aspect-ratio: 2 / 3; }
.mosaic__item--wide .pic { aspect-ratio: 3 / 2; }
.mosaic .pic img { transition: opacity 0.9s var(--ease-out), transform 1.4s var(--ease-out); }
@media (hover: hover) { .mosaic__btn:hover img { transform: scale(1.035); } }

/* ================================================================= RSVP == */
.rsvp__returning { max-width: 26rem; margin: -1.75rem auto 2.25rem; text-align: center; font-family: var(--f-display); font-style: italic; font-size: 0.9375rem; line-height: 1.6; color: var(--c-ink-soft); }
.form__fields { display: grid; gap: 1.85rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field { display: grid; gap: 0.6rem; min-width: 0; }
.field__label { padding: 0; font: 500 0.6875rem/1.4 var(--f-sans); letter-spacing: 0.26em; text-transform: uppercase; color: var(--c-ink); }
.field__opt { font-weight: 400; letter-spacing: 0.06em; text-transform: none; color: var(--c-ink-soft); }
.field__input {
  width: 100%; min-height: 52px; padding: 0.85rem 1rem;
  font-size: 1rem; /* ≥16px prevents iOS zoom */
  color: var(--c-ink); background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--c-hair-strong); border-radius: 0;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
}
.field__input::placeholder { color: #7d7166; opacity: 1; }
.field__input:hover { border-color: rgba(42, 35, 29, 0.45); }
.field__input:focus { outline: none; border-color: var(--c-ink); background: #fff; box-shadow: 0 0 0 3px rgba(138, 82, 56, 0.16); }
.field__input--area { min-height: 8.75rem; resize: vertical; line-height: 1.6; }
.field.has-error .field__input, .field.has-error .stepper { border-color: var(--c-error); }
.field__error { font-size: 0.8125rem; line-height: 1.45; color: var(--c-error); }
.field__error:empty { display: none; }
.field__hint { font-size: 0.8125rem; color: var(--c-ink-soft); }
.field__meta { display: flex; justify-content: space-between; gap: 1rem; }
.field__count { margin-left: auto; font-size: 0.75rem; font-variant-numeric: tabular-nums; color: var(--c-ink-soft); }
.field__count.is-near { color: var(--c-clay); }

.field--choice { margin: 0; padding: 0; border: 0; }
.field--choice legend { margin-bottom: 0.6rem; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.choice__opt { position: relative; display: block; }
.choice__opt input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice__box {
  display: grid; align-content: start; gap: 0.2rem; height: 100%; min-height: 7rem; padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--c-hair-strong); background: rgba(255, 255, 255, 0.45);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.choice__mark {
  display: grid; place-items: center; width: 24px; height: 24px; margin-bottom: 0.55rem;
  border: 1px solid var(--c-hair-strong); border-radius: 50%; color: transparent;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}
.choice__mark svg { width: 13px; height: 13px; stroke-width: 2; }
.choice__text { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.2; }
.choice__sub { font-size: 0.75rem; line-height: 1.4; color: var(--c-ink-soft); transition: color 0.3s; }
.choice__opt:hover .choice__box { border-color: rgba(42, 35, 29, 0.5); }
.choice__opt input:checked + .choice__box { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-ivory); }
.choice__opt input:checked + .choice__box .choice__sub { color: rgba(247, 242, 234, 0.78); }
.choice__opt input:checked + .choice__box .choice__mark { background: var(--c-lantern); border-color: var(--c-lantern); color: var(--c-night); }
.choice__opt input:focus-visible + .choice__box { outline: 2px solid var(--c-clay); outline-offset: 3px; }
.choice__opt input[aria-invalid="true"] + .choice__box { border-color: var(--c-error); }

.stepper { display: inline-grid; grid-template-columns: 52px 76px 52px; width: max-content; border: 1px solid var(--c-hair-strong); background: rgba(255, 255, 255, 0.6); }
.stepper__btn { min-height: 52px; border: 0; background: none; font-size: 1.35rem; line-height: 1; color: var(--c-ink); transition: background-color 0.25s; }
.stepper__btn:hover { background: var(--c-linen); }
.stepper__input {
  width: 100%; border: 0; border-inline: 1px solid var(--c-hair-strong); background: transparent;
  text-align: center; font-family: var(--f-display); font-size: 1.5rem; color: var(--c-ink);
  -moz-appearance: textfield; appearance: textfield;
}
.stepper__input::-webkit-inner-spin-button, .stepper__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__input:focus { outline: none; background: #fff; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin-top: 1.6rem; padding: 0.95rem 1.1rem; font-size: 0.875rem; line-height: 1.55; border-left: 2px solid; }
.form__status[data-kind="error"] { border-color: var(--c-error); background: rgba(155, 44, 31, 0.06); color: #7a2318; }
.form__status[data-kind="info"] { border-color: var(--c-brass); background: rgba(184, 146, 90, 0.12); color: var(--c-ink); }
#rsvp-submit { margin-top: 1.85rem; }
.form.is-submitting .form__fields { opacity: 0.6; }

.rsvp-success {
  padding: 2.75rem 1.5rem 2.5rem; text-align: center;
  border: 1px solid var(--c-hair-strong); outline: 1px solid var(--c-hair); outline-offset: -8px;
  background: rgba(255, 255, 255, 0.4);
}
.rsvp-success:focus { outline: 1px solid var(--c-hair); }
.rsvp-success__check { width: 64px; height: 64px; margin: 0 auto 1.5rem; fill: none; stroke: var(--c-clay); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.rsvp-success__check circle { stroke-dasharray: 151; stroke-dashoffset: 151; }
.rsvp-success__check path { stroke-dasharray: 36; stroke-dashoffset: 36; }
.rsvp-success.is-shown circle { animation: draw 0.9s var(--ease-out) forwards; }
.rsvp-success.is-shown path { animation: draw 0.5s var(--ease-out) 0.65s forwards; }
.rsvp-success__title { margin-bottom: 0.8rem; font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: 2.1rem; line-height: 1.1; }
.rsvp-success__text { max-width: 24rem; margin: 0 auto 1.9rem; color: var(--c-ink-soft); text-wrap: pretty; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* =============================================================== WISHES == */
.wishes { padding-top: 0; }
.wishes__count { margin: -2rem 0 2.25rem; text-align: center; font: 500 0.6875rem/1 var(--f-sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--c-clay); }
.wishes__count:empty { display: none; }
.wishes__list { border-top: 1px solid var(--c-hair); }
.wishes__list:empty { display: none; }
.wish { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--c-hair); }
.wish__avatar { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--c-brass); border-radius: 50%; font-family: var(--f-display); font-size: 1.05rem; color: var(--c-clay); }
.wish__body { min-width: 0; }
.wish__name { margin-bottom: 0.4rem; font: 500 0.75rem/1.4 var(--f-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-ink); overflow-wrap: anywhere; }
.wish__msg { font-family: var(--f-display); font-size: 1.0625rem; line-height: 1.65; color: var(--c-ink-soft); white-space: pre-line; overflow-wrap: anywhere; }
.wish.is-new { animation: wish-in 1.2s var(--ease-out) both; }
@keyframes wish-in {
  0% { opacity: 0; transform: translateY(-10px); background-color: rgba(216, 188, 138, 0.3); }
  40% { opacity: 1; transform: none; }
  100% { background-color: rgba(216, 188, 138, 0); }
}
.wishes__more { display: flex; margin: 2.25rem auto 0; }

.wishes__state[data-kind="empty"], .wishes__state[data-kind="error"], .wishes__state[data-kind="offline"] {
  padding: 2.75rem 1.25rem; text-align: center; border: 1px dashed var(--c-hair-strong);
}
.wishes-empty__title { margin-bottom: 0.5rem; font-family: var(--f-display); font-size: 1.4rem; line-height: 1.3; }
.wishes-empty__text { max-width: 22rem; margin: 0 auto 1.25rem; font-size: 0.9375rem; color: var(--c-ink-soft); }
.wishes__state[data-kind="offline"] .wishes-empty__text { margin-bottom: 0; }
.wish-skeleton { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--c-hair); }
.wish-skeleton__dot { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
.wish-skeleton__lines { display: grid; gap: 0.55rem; padding-top: 0.2rem; }
.wish-skeleton__lines span { height: 10px; }
.wish-skeleton__lines span:nth-child(1) { width: 32%; }
.wish-skeleton__lines span:nth-child(2) { width: 92%; }
.wish-skeleton__lines span:nth-child(3) { width: 68%; }
.wish-skeleton__dot, .wish-skeleton__lines span {
  background: linear-gradient(90deg, var(--c-linen) 0%, #f6efe4 50%, var(--c-linen) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ================================================================= GIFT == */
.gift__action { text-align: center; }
.collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.65s var(--ease-out), opacity 0.5s var(--ease-out); }
.collapse.is-open { grid-template-rows: 1fr; opacity: 1; }
.collapse__inner { min-height: 0; overflow: hidden; }
.accounts { display: grid; gap: 1rem; padding-top: 2.5rem; }
.account {
  position: relative; padding: 1.95rem 1.6rem 1.7rem; overflow: hidden;
  background: var(--c-ivory) var(--kawung-light); color: var(--c-ink);
  border: 1px solid var(--c-hair-gold);
  outline: 1px solid var(--c-hair); outline-offset: -8px;
  box-shadow: 0 18px 40px -30px rgba(43, 38, 34, 0.45);
}
.account__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.account__label { font: 500 0.625rem/1.3 var(--f-sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--c-clay); }
.account__bank { font: 600 0.75rem/1.3 var(--f-sans); letter-spacing: 0.26em; text-transform: uppercase; color: var(--c-ink); }
/* The number is the one thing guests must read and type: a text-size Fraunces
   (opsz 28, weight 480) instead of the thin display cut, on --c-ink.
   Fraunces has lining figures by default but no tabular figures (no `tnum`
   in the font), so every digit sits in an equal 0.66em box (widest digit
   "0" = 0.655em). That box already includes the 0.04em tracking. */
.account__number {
  display: flex; flex-wrap: nowrap; gap: 0.32em;
  font-family: var(--f-display); font-weight: 480; font-variation-settings: "opsz" 28;
  font-size: 1.5rem; line-height: 1.2; letter-spacing: 0.04em;
  font-variant-numeric: lining-nums tabular-nums; color: var(--c-ink); white-space: nowrap;
}
.account__group { display: inline-flex; }
.account__digit { display: inline-block; width: 0.66em; text-align: center; letter-spacing: 0; }
.account__holder { margin: 0.55rem 0 1.5rem; font: 500 0.75rem/1.4 var(--f-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-ink-soft); }
.account__holder span { text-transform: none; letter-spacing: 0.04em; }
.account__copy {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0 1.1rem;
  border: 1px solid var(--c-ink); background: transparent; color: var(--c-ink);
  font: 500 0.6875rem/1 var(--f-sans); letter-spacing: 0.2em; text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.account__copy svg { width: 16px; height: 16px; stroke-width: 1.3; }
.account__copy:hover, .account__copy.is-copied { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-ivory); }
.account__copy:active { transform: scale(0.98); }

/* ============================================================== CLOSING == */
.closing { padding-top: 0; text-align: center; overflow: hidden; }
.closing__figure { position: relative; }
.closing__figure .pic { aspect-ratio: 4 / 5; max-height: 82svh; width: 100%; background: var(--c-night); }
.closing__figure::after { content: ""; position: absolute; inset: auto 0 0; height: 50%; background: linear-gradient(180deg, rgba(31, 27, 24, 0), var(--c-night)); }
.closing__body { position: relative; margin-top: -4.5rem; }
.closing .title { font-size: clamp(3rem, 15vw, 4.2rem); }
.closing__text { max-width: 26rem; margin: 1.75rem auto 1.5rem; line-height: 1.85; color: var(--c-on-night-soft); text-wrap: pretty; }
.closing__salam { margin-bottom: 3.25rem; font-family: var(--f-display); font-style: italic; font-size: 1.0625rem; color: var(--c-lantern); }
.closing__sign .eyebrow { margin-bottom: 0.9rem; }
.closing__names { font-family: var(--f-display); font-weight: 300; font-variation-settings: "opsz" 144; font-size: clamp(2.4rem, 11vw, 3rem); line-height: 1.05; color: var(--c-on-night); }
.closing__families { display: grid; gap: 1.25rem; margin-top: 2.75rem; font-size: 0.875rem; line-height: 1.7; white-space: pre-line; color: var(--c-on-night-soft); }
.colophon {
  display: grid; justify-items: center; gap: 0.8rem;
  margin-top: clamp(4.5rem, 16vw, 6rem);
  padding: 2.75rem var(--gutter) calc(7rem + var(--safe-b));
  border-top: 1px solid var(--c-hair-night); color: var(--c-lantern);
}
.colophon__mark { width: 44px; height: 18px; stroke-width: 1.1; }
.colophon__mono { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: 0.06em; color: var(--c-on-night); }
.colophon__mono .amp { margin: 0 0.25em; font-size: 0.9em; }
.colophon__date { font: 500 0.625rem/1 var(--f-sans); letter-spacing: 0.42em; color: var(--c-on-night-soft); }

/* =========================================================== FLOATING UI == */
.dock {
  position: fixed; z-index: 30; left: 50%; bottom: calc(0.75rem + var(--safe-b));
  display: flex; gap: 0.125rem; padding: 0.375rem;
  background: rgba(250, 246, 239, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--c-hair-gold); border-radius: 18px;
  box-shadow: 0 16px 40px -18px rgba(43, 38, 34, 0.35);
  transform: translate(-50%, 160%); opacity: 0; pointer-events: none;
  transition: transform 0.7s var(--ease-out), opacity 0.4s var(--ease-out);
}
.is-open .dock { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; transition-delay: 0.5s; }
.is-open.is-typing .dock, .is-open.is-lightbox .dock { transform: translate(-50%, 160%); opacity: 0; pointer-events: none; transition-delay: 0s; }
.dock__link {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  width: 3.65rem; min-height: 3.3rem; border-radius: 13px;
  color: var(--c-ink-soft); text-decoration: none;
  transition: color 0.3s, background-color 0.3s, transform 0.2s;
}
.dock__link:active { transform: scale(0.95); }
.dock__link svg { width: 20px; height: 20px; stroke-width: 1.25; }
.dock__link span { font: 500 0.59rem/1 var(--f-sans); letter-spacing: 0.08em; text-transform: uppercase; }
.dock__link:hover { color: var(--c-ink); }
.dock__link.is-active { color: var(--c-clay); background: var(--c-champagne); }

.music {
  position: fixed; z-index: 31; right: calc(1rem + var(--safe-r)); bottom: calc(5.5rem + var(--safe-b));
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--c-hair-gold); border-radius: 50%;
  background: rgba(250, 246, 239, 0.9); color: var(--c-clay);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -14px rgba(43, 38, 34, 0.35);
  transition: transform 0.3s var(--ease-out), opacity 0.4s, border-color 0.3s;
  animation: fade-in 0.6s var(--ease-out) 0.6s both;
}
.music:hover { border-color: var(--c-clay); }
.music:active { transform: scale(0.94); }
.music__icon { width: 19px; height: 19px; stroke-width: 1.3; }
.music__bars { display: none; align-items: flex-end; gap: 2.5px; height: 15px; }
.music__bars i { display: block; width: 2px; height: 100%; background: currentColor; transform-origin: 50% 100%; animation: eq 1.1s ease-in-out infinite; }
.music__bars i:nth-child(2) { animation-duration: 0.9s; animation-delay: -0.4s; }
.music__bars i:nth-child(3) { animation-duration: 1.25s; animation-delay: -0.2s; }
.music__bars i:nth-child(4) { animation-duration: 0.95s; animation-delay: -0.6s; }
.music[data-state="playing"] .music__bars { display: flex; }
.music[data-state="playing"] .music__icon { display: none; }
.music.is-buffering .music__bars i { animation-play-state: paused; }
.music[data-state="loading"] .music__icon { animation: pulse 1s ease-in-out infinite; }
.music[data-state="blocked"]::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--c-brass);
  animation: ring 1.8s var(--ease-out) 3;
}
.music[data-state="unavailable"] { opacity: 0.5; cursor: not-allowed; }
.music[data-state="unavailable"]::after { content: ""; position: absolute; width: 22px; height: 1px; background: currentColor; transform: rotate(-45deg); }
@keyframes eq { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }
@keyframes pulse { 50% { opacity: 0.4; } }
@keyframes ring { from { transform: scale(0.9); opacity: 0.9; } to { transform: scale(1.35); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(6.25rem + var(--safe-b));
  max-width: calc(100vw - 2rem); padding: 0.85rem 1.25rem;
  background: var(--c-ink); color: var(--c-ivory);
  font-size: 0.8125rem; line-height: 1.4; text-align: center;
  box-shadow: 0 12px 32px rgba(23, 19, 15, 0.25);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================= LIGHTBOX == */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: rgba(17, 14, 11, 0.97); color: var(--c-on-night);
}
.lightbox::backdrop { background: rgba(17, 14, 11, 0.92); }
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; animation: fade-in 0.35s var(--ease-out); }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: calc(4rem + var(--safe-t)) 0.75rem 0.5rem; touch-action: pan-y pinch-zoom; }
.lightbox__pic { width: 100%; height: 100%; background: transparent; }
.lightbox__pic img { object-fit: contain; animation: fade-in 0.4s var(--ease-out); }
.lightbox__bar { display: grid; padding: 0.75rem var(--gutter) calc(1.25rem + var(--safe-b)); text-align: center; }
.lightbox__count { font: 500 0.6875rem/1 var(--f-sans); letter-spacing: 0.3em; color: var(--c-lantern); }
.lightbox__close, .lightbox__nav {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--c-hair-night); border-radius: 50%;
  background: rgba(23, 19, 15, 0.55); color: var(--c-on-night);
  transition: background-color 0.3s, border-color 0.3s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(216, 188, 138, 0.18); border-color: var(--c-lantern); }
.lightbox__close { top: calc(0.75rem + var(--safe-t)); right: calc(0.75rem + var(--safe-r)); }
.lightbox__close svg, .lightbox__nav svg { width: 20px; height: 20px; stroke-width: 1.3; }
.lightbox__nav { top: 50%; margin-top: -23px; }
.lightbox__nav--prev { left: calc(0.6rem + var(--safe-l)); }
.lightbox__nav--next { right: calc(0.6rem + var(--safe-r)); }
.lightbox__nav--next svg { transform: rotate(180deg); }

/* ========================================================== SCROLL REVEAL == */
/* A small, consistent vocabulary: fade-up for text, a soft unveil for photos,
   and short staggers for grouped items ([data-stagger] sets --reveal-delay). */
.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity var(--reveal-dur) var(--ease-soft), transform calc(var(--reveal-dur) + 0.15s) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

.js [data-reveal="image"] { transform: none; transition: opacity 1s var(--ease-soft); transition-delay: var(--reveal-delay, 0ms); }
.js [data-reveal="image"] .pic { clip-path: inset(10% 0 0 0); transition: clip-path 1.5s var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
.js [data-reveal="image"] .pic img { transform: scale(1.07); transition: opacity 0.9s var(--ease-out), transform 2s var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
.js [data-reveal="image"].is-visible .pic { clip-path: inset(0 0 0 0); }
.js [data-reveal="image"].is-visible .pic img { transform: none; }

.noscript { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99; margin: 0; padding: 0.75rem 1rem; background: var(--c-ink); color: var(--c-ivory); text-align: center; font-size: 0.875rem; }
