/* ==========================================================================
   Bintang & Bunga — editorial monochrome, mobile-first
   All raw values live in :root. Components only read tokens or expose their
   own custom properties (--title-gap, --block-pt, …) instead of being
   overridden from other selectors.
   ========================================================================== */

:root {
  /* colour */
  --paper: #f6f3ee;
  --paper-2: #efebe4;
  --paper-glass: rgba(246, 243, 238, .9);
  --ink: #161514;
  --ink-soft: #3c3935;
  --muted: #7a746d;
  --placeholder: #b0aaa2;
  --line: #d9d3ca;
  --blush: #c9a493;
  --blush-soft: #e6d3c6;
  --error: #a4493d;
  --white: #fff;
  --black: #000;
  --night: #0e0e0e;
  --line-light: rgba(255, 255, 255, .7);
  --scrim: rgba(10, 10, 10, .94);
  --shadow: rgba(0, 0, 0, .45);

  /* photography */
  --photo-filter: grayscale(1) contrast(1.05);
  --backdrop-img: url("https://images.unsplash.com/photo-1460978812857-470ed1c77af0?auto=format&fit=crop&w=1600&q=60");

  /* type families */
  --f-display: "Forum", "Cormorant Garamond", Georgia, serif;
  --f-script: "Pinyon Script", cursive;
  --f-body: "Montserrat", system-ui, sans-serif;

  /* type scale */
  --fs-micro: 9px;
  --fs-xs: 10px;
  --fs-sm: 11px;
  --fs-note: 12px;
  --fs-body: 13px;
  --fs-md: 15px;
  --fs-input: 16px; /* 16px stops iOS from zooming on focus */
  --fs-lg: 20px;
  --fs-xl: 22px;
  --fs-2xl: 26px;
  --fs-3xl: 30px;
  --fs-cal: 40px;
  --fs-title: clamp(30px, 9vw, 38px);
  --fs-display: clamp(32px, 10vw, 42px);
  --fs-cover: clamp(42px, 13vw, 54px);
  --fs-mega: clamp(88px, 30vw, 128px);

  /* tracking */
  --tr-tight: .12em;
  --tr-wide: .24em;
  --tr-wider: .36em;
  --tr-btn: .28em;
  --tr-link: .26em;
  --tr-widest: .5em;

  /* layout */
  --page-w: 440px;
  --gutter: 28px;
  --text-w: 320px;
  --block-space: 72px;

  /* layers */
  --z-page: 1;
  --z-music: 40;
  --z-cover: 50;
  --z-toast: 60;
  --z-lightbox: 70;

  /* motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: .4s;
}

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

html { -webkit-text-size-adjust: 100%; }
/* Native `hidden` must win over component display rules. */
[hidden] { display: none !important; }

body {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; height: 100dvh; }

/* Every photo on the page is black & white */
img { display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--photo-filter); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }

/* ---------- Desktop backdrop (column stays phone-width) ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(10, 10, 10, .72), rgba(10, 10, 10, .82)), var(--backdrop-img) center / cover;
  filter: grayscale(1) blur(6px);
  transform: scale(1.05);
}

.page {
  position: relative;
  z-index: var(--z-page);
  width: 100%;
  max-width: var(--page-w);
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 0 80px var(--shadow);
}

/* ==========================================================================
   Shared type
   ========================================================================== */
.title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--fs-title);
  line-height: 1.05;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: var(--title-gap, 22px);
}
.title--light { color: var(--white); }

.display {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 1;
}

/* Small uppercase tracked text — eyebrows, captions, meta.
   Tune per element with --label-size / --label-track. */
.label {
  display: block;
  font-size: var(--label-size, var(--fs-micro));
  letter-spacing: var(--label-track, var(--tr-wider));
  text-transform: uppercase;
}

.lead {
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  text-align: center;
  margin-bottom: 14px;
}

.body-text {
  text-align: center;
  color: var(--ink-soft);
  max-width: var(--text-w);
  margin: 0 auto 14px;
}
.body-text--small { font-size: var(--fs-note); color: var(--muted); margin-top: 26px; }

/* split-text helpers (created by JS) */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em 0 .12em; margin: -.08em 0 -.12em; }
.split-char,
.split-inner { display: inline-block; will-change: transform; }

/* ==========================================================================
   Buttons & links
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-h, 48px);
  padding: 0 var(--btn-px, 34px);
  font-size: var(--btn-fs, var(--fs-sm));
  font-weight: 500;
  letter-spacing: var(--tr-btn);
  text-transform: uppercase;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn--sm { --btn-h: 40px; --btn-px: 22px; --btn-fs: var(--fs-xs); }

.btn--ghost-light { border: 1px solid var(--line-light); color: var(--white); }
.btn--ghost-light:hover,
.btn--ghost-light:focus-visible { background: var(--white); color: var(--ink); }

.btn--solid { width: 100%; background: var(--ink); color: var(--white); margin-top: 8px; }
.btn--solid:hover,
.btn--solid:focus-visible { background: var(--black); }
.btn--solid:disabled { opacity: .6; cursor: default; }

.link-line {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tr-link);
  text-transform: uppercase;
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.link-line:hover { background-size: 0 1px; background-position: 100% 100%; }

:focus-visible { outline: 1px solid var(--blush); outline-offset: 4px; }

/* ==========================================================================
   Cover
   ========================================================================== */
.cover {
  position: fixed;
  inset: 0;
  z-index: var(--z-cover);
  width: 100%;
  max-width: var(--page-w);
  margin: 0 auto;
  height: 100dvh;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(48px + env(safe-area-inset-top)) var(--gutter) calc(36px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--night);
}
.cover__media { position: absolute; inset: 0; }
.cover__media img { transform: scale(1.15); }
.cover__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .55) 72%, rgba(0, 0, 0, .85) 100%);
}
.cover__top,
.cover__bottom { position: relative; text-align: center; }

.cover__eyebrow { --label-size: var(--fs-xs); --label-track: var(--tr-widest); }
.cover__names {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--fs-cover);
  line-height: 1;
  margin-bottom: 14px;
}
.cover__date { --label-size: var(--fs-sm); --label-track: var(--tr-widest); margin-bottom: 22px; }
.cover__guest {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}
.cover__guest span { font-size: var(--fs-xs); letter-spacing: var(--tr-tight); opacity: .75; }
.cover__guest strong { font-family: var(--f-display); font-weight: 400; font-size: var(--fs-xl); }

/* ==========================================================================
   Music button
   ========================================================================== */
.music {
  position: fixed;
  z-index: var(--z-music);
  right: max(16px, calc(50% - var(--page-w) / 2 + 16px));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
}
.music__bars { display: flex; gap: 3px; align-items: flex-end; height: 14px; }
.music__bars i {
  width: 2px;
  height: 4px;
  background: var(--ink);
  transition: height .3s;
}
.music.is-playing .music__bars i { animation: bars 1s ease-in-out infinite; }
.music.is-playing .music__bars i:nth-child(2) { animation-delay: -.3s; }
.music.is-playing .music__bars i:nth-child(3) { animation-delay: -.6s; }
.music.is-playing .music__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes bars { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  color: var(--white);
}
.hero__media { position: absolute; inset: 0 0 -8%; }
.hero__media img { object-position: center top; }
.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .65) 100%);
}
.hero__text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  padding: 0 var(--gutter);
}
.hero__date { --label-size: var(--fs-xs); --label-track: .4em; margin-bottom: 10px; }
.hero__names {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 1;
}

/* ==========================================================================
   Blocks — sections tune their spacing via --block-pt / --block-pb
   ========================================================================== */
.block { padding: var(--block-pt, var(--block-space)) var(--gutter) var(--block-pb, var(--block-space)); }
.intro { --block-pt: 56px; --block-pb: 48px; }

/* ---------- Save the date calendar ---------- */
.std { --block-pt: 40px; text-align: center; }

.cal {
  position: relative;
  margin: 8px calc(var(--gutter) * -1) 34px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.cal__month {
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  letter-spacing: .08em;
  padding: 6px 0 4px;
  border-bottom: 1px solid var(--ink);
}
.cal__row { display: grid; grid-template-columns: repeat(3, 1fr); }
.cal__cell {
  position: relative;
  font-family: var(--f-display);
  font-size: var(--fs-cal);
  line-height: 1;
  padding: 14px 0 12px;
}
.cal__cell + .cal__cell { border-left: 1px solid var(--ink); }
.cal__cell span { position: relative; display: inline-block; }
.cal__heart {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: 86px;
  transform: translate(-50%, -52%);
  fill: none;
  stroke: var(--blush);
  stroke-width: 1.4;
  stroke-linecap: round;
  overflow: visible;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--text-w);
  margin: 0 auto 28px;
}
.countdown div { display: flex; flex-direction: column; align-items: center; }
.countdown div + div { border-left: 1px solid var(--line); }
.countdown b {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--fs-3xl);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.countdown .label { --label-track: var(--tr-wide); color: var(--muted); }

/* ---------- Film strip gallery ---------- */
.strip {
  background: var(--ink);
  padding: 14px 0;
  overflow: hidden;
}
.strip__track { display: flex; gap: 10px; width: max-content; padding: 0 14px; }
.strip__item {
  width: 58vw;
  max-width: 250px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: zoom-in;
  flex-shrink: 0;
}
.strip__item img { transform: scale(1.12); }

/* ---------- Couple (full-screen, pinned one by one) ---------- */
.couple__intro { --block-pb: 48px; }

.cp {
  --cp-focus: center;      /* horizontal focal point of the portrait */
  --shade-at: 50% 100%;    /* where the extra text-corner shade sits */
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}
.cp--groom { --cp-focus: 20%; --shade-at: 0% 100%; }
.cp--bride { --cp-focus: 80%; --shade-at: 100% 100%; }

.cp__media { position: absolute; inset: 0; }
.cp__media img { object-position: var(--cp-focus) top; transform-origin: var(--cp-focus) 20%; }
/* bottom fade + extra depth behind the text corner (both photos have bright bokeh down low) */
.cp__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 55% at var(--shade-at), rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .55) 75%, rgba(0, 0, 0, .8) 100%);
}
.cp__text {
  position: absolute;
  bottom: calc(40px + env(safe-area-inset-bottom));
  max-width: 78%;
}
.cp--groom .cp__text { left: var(--gutter); text-align: left; }
.cp--bride .cp__text { right: var(--gutter); text-align: right; }

.cp__role { --label-size: var(--fs-micro); --label-track: .4em; opacity: .8; margin-bottom: 10px; }
.cp__name { text-transform: uppercase; margin-bottom: 14px; }
.cp__meta { font-size: var(--fs-sm); line-height: 1.6; opacity: .85; margin-bottom: 12px; }

/* ---------- Akad (single ceremony, editorial time sheet) ---------- */
.akad { --title-gap: 0; --ico-space: 22px auto 30px; background: var(--paper-2); text-align: center; }
.akad__eyebrow { --label-track: var(--tr-widest); color: var(--muted); margin-bottom: 12px; }

.akad__sheet { margin: 0 calc(var(--gutter) * -1); }
.akad__rule { display: block; height: 1px; background: var(--ink); transform-origin: center; }
.akad__meta {
  --label-size: var(--fs-xs);
  --label-track: var(--tr-wider);
  display: flex;
  justify-content: space-between;
  padding: 10px var(--gutter);
}
.akad__time {
  font-family: var(--f-display);
  font-size: var(--fs-mega);
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  padding: 22px 0 4px;
}
.akad__zone { --label-size: var(--fs-xs); color: var(--ink-soft); padding-bottom: 22px; }

.akad__quote { max-width: var(--text-w); margin: 40px auto 0; }
.akad__quote p {
  font-family: var(--f-display);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink-soft);
}
.akad__quote cite { --label-size: var(--fs-micro); --label-track: var(--tr-wider); margin-top: 14px; font-style: normal; color: var(--muted); }

.ico {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico--lg { width: 44px; height: 44px; display: block; margin: var(--ico-space, 18px auto 26px); }

/* ---------- Location ---------- */
.location {
  position: relative;
  min-height: 620px;
  color: var(--white);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.location__media { position: absolute; inset: -10% 0; }
.location__shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.location__content {
  position: relative;
  width: 100%;
  padding: 80px var(--gutter);
  text-align: center;
}
.venue { margin-bottom: 24px; }
.venue__label { --label-track: .32em; opacity: .7; margin-bottom: 6px; }
.venue p { font-size: var(--fs-body); line-height: 1.6; }
.location .btn { margin-top: 10px; }

/* ---------- Details / gift ---------- */
.details { background: var(--paper-2); text-align: center; }
.bank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.bank:last-of-type { border-bottom: 1px solid var(--line); }
.bank__name { --label-size: var(--fs-micro); --label-track: var(--tr-wider); color: var(--muted); }
.bank__no {
  font-family: var(--f-display);
  font-size: var(--fs-2xl);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.bank__holder { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 10px; }

/* ---------- RSVP ---------- */
.rsvp { text-align: center; }
.rsvp__deadline { font-family: var(--f-display); font-size: var(--fs-lg); margin-bottom: 30px; }

.form { text-align: left; }
.field { display: block; border: 0; margin-bottom: 20px; }
.field > span,
.field legend {
  display: block;
  font-family: var(--f-display);
  font-size: var(--fs-body);
  margin-bottom: var(--field-label-gap, 8px);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: var(--fs-input);
  color: var(--ink);
  background-color: var(--white);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 12px 14px;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .3s, box-shadow .3s;
}
/* chevron drawn with gradients so it follows --ink */
.field select {
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 19px center, right 14px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--placeholder); }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--blush-soft); }
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--error); }

.field--radio { --field-label-gap: 10px; }
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-note);
  color: var(--ink-soft);
  min-height: 34px;
  cursor: pointer;
}
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio i {
  width: 16px;
  height: 16px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.radio i::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform .3s var(--ease);
}
.radio input:checked + i::after { transform: scale(1); }
.radio input:focus-visible + i { outline: 1px solid var(--blush); outline-offset: 3px; }

.form__error { min-height: 18px; font-size: var(--fs-sm); color: var(--error); text-align: center; }

.wishes { margin-top: 56px; }
.wishes__title { font-family: var(--f-display); font-weight: 400; font-size: var(--fs-xl); margin-bottom: 16px; }
.wishes__list {
  list-style: none;
  text-align: left;
  max-height: 360px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  overscroll-behavior: contain;
}
.wishes__list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.wish__head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.wish__name { font-family: var(--f-display); font-size: var(--fs-input); }
.wish__tag { font-size: var(--fs-micro); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.wish__msg { font-size: var(--fs-note); color: var(--ink-soft); overflow-wrap: anywhere; }
.wishes__empty { padding: 20px 0; font-size: var(--fs-note); color: var(--muted); text-align: center; }

/* ---------- Closing ---------- */
.closing { text-align: center; padding-bottom: 40px; }
.closing__photo { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--black); }
/* Taller than the frame so the scroll parallax never exposes an edge */
.closing__photo img { position: absolute; inset: -12% 0 auto; height: 124%; }
.closing__photo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(closest-side, rgba(0, 0, 0, .35), transparent); pointer-events: none; }
.closing__logo { position: absolute; z-index: 1; inset: 0; width: var(--logo-w, 38%); height: auto; margin: auto; overflow: visible; color: var(--white); }
.closing__text {
  font-family: var(--f-display);
  font-size: var(--fs-md);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.6;
  padding: 44px var(--gutter) 40px;
}
.std-sign {
  display: flex;
  font-family: var(--f-display);
  font-size: var(--fs-display);
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 48px;
}
.std-sign__script {
  font-family: var(--f-script);
  text-transform: none;
  color: var(--blush);
  font-size: 1.15em;
  letter-spacing: 0;
  margin: 0 2px;
  transform: translateY(.08em);
  display: inline-block;
}
.footer { --label-size: var(--fs-micro); --label-track: var(--tr-wide); color: var(--muted); }

/* ==========================================================================
   Toast & lightbox
   ========================================================================== */
.toast {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-sm);
  letter-spacing: var(--tr-tight);
  padding: 12px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: var(--scrim);
  display: grid;
  place-items: center;
  padding: 60px 16px;
  opacity: 0;
  visibility: hidden;
}
.lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1);
}
.lightbox__close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  padding: 12px;
  color: var(--white);
  font-size: var(--fs-xs);
  letter-spacing: var(--tr-btn);
  text-transform: uppercase;
}
