/* ==========================================================================
   Abdulaziz & Noila — wedding invitation
   Ivory paper · antique gold · burgundy wax
   ========================================================================== */

:root {
  --outer: #e9dfcd;
  --paper: #f7f0e4;
  --cream: #fcf8f1;
  --soft: #f2e9db;
  --envelope: #efe5d4;

  --ink: #4a3628;
  --ink-soft: #6f5a49;
  --gold: #a37b2c;
  --gold-strong: #86601d;
  --gold-soft: #c6a35a;
  --gold-line: rgba(163, 123, 44, 0.32);
  --wine: #7b1e2b;
  --wine-deep: #55101b;
  --danger: #a3271c;

  --f-script: 'Great Vibes', 'Segoe Script', cursive;
  --f-serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --f-caps: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --f-arabic: 'Amiri', 'Traditional Arabic', serif;

  --column: 540px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.25, 1);

  --grain: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .27 0 0 0 0 .18 0 0 0 .075 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --deckle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M0 12V7l6-2 7 3 8-4 6 2 9-3 7 4 8-2 6 3 9-5 7 3 8-1 6 3 9-4 8 2 6-1 5 3 5-1v5z'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--outer);
}
html.is-locked, html.is-locked body { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  font: 500 1.1875rem/1.6 var(--f-serif);
  font-variant-numeric: lining-nums;
  color: var(--ink);
  background: radial-gradient(140% 90% at 50% 0%, #f2e9d9 0%, var(--outer) 60%, #e2d4bc 100%) fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
/* paper grain over everything (under the envelope and floating controls) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.55;
}

h1, h2, p, ol, ul, figure { margin: 0; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-strong); }
[tabindex='-1']:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.script { font-family: var(--f-script); font-weight: 400; }

.page {
  position: relative;
  max-width: var(--column);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(163, 123, 44, 0.08), 0 30px 80px -30px rgba(74, 54, 40, 0.45);
  overflow-x: clip;
}

/* ---------- floating controls ---------- */
.lang,
.music {
  position: fixed;
  z-index: 60;
  right: max(12px, calc(50vw - var(--column) / 2 + 12px), env(safe-area-inset-right));
}

.lang {
  top: max(12px, env(safe-area-inset-top));
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.8);
  border: 1px solid rgba(163, 123, 44, 0.3);
  box-shadow: 0 8px 22px -12px rgba(74, 54, 40, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease-out), opacity 0.35s;
}
.lang.is-tucked { transform: translateY(calc(-100% - 24px)); opacity: 0; }
.lang:focus-within { transform: none; opacity: 1; }
.lang__btn {
  min-width: 44px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: 500 0.78rem/1 var(--f-caps);
  letter-spacing: 0.12em;
  color: var(--gold-strong);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.lang__btn[aria-pressed='true'] {
  background: linear-gradient(135deg, #c9a24f, var(--gold) 60%, var(--gold-strong));
  color: #fffaf0;
  box-shadow: 0 4px 10px -4px rgba(134, 96, 29, 0.6);
}
.lang__btn:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }

.music {
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a93545, var(--wine) 55%, var(--wine-deep));
  color: #fdf1e3;
  box-shadow: 0 12px 24px -10px rgba(85, 16, 27, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  animation: fade-in 0.6s 1.2s both;
}
.music__icon { grid-area: 1 / 1; width: 22px; height: 22px; }
.music__icon--pause,
.music[aria-pressed='true'] .music__icon--play { display: none; }
.music[aria-pressed='true'] .music__icon--pause { display: block; }
.music[aria-pressed='true']::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px solid rgba(123, 30, 43, 0.45);
  animation: pulse 2.2s ease-out infinite;
}
.music:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ==========================================================================
   Envelope
   ========================================================================== */
.envelope { display: none; }

.js .envelope {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: radial-gradient(140% 90% at 50% 0%, #f2e9d9 0%, var(--outer) 60%, #e2d4bc 100%);
  touch-action: none;
  transition: background-color 0.6s, opacity 0.6s;
}
.envelope__stage {
  position: relative;
  width: min(100%, var(--column));
  height: 100%;
  margin: 0 auto;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 30px 80px -30px rgba(74, 54, 40, 0.45);
}

.flap {
  position: absolute;
  inset: 0;
  will-change: transform;
  transition: transform 1.15s var(--ease-in-out) 0.35s;
}
.flap__face {
  position: absolute;
  inset: 0;
  background-color: var(--envelope);
  background-image: var(--grain);
}
.flap--left .flap__face {
  clip-path: polygon(0 0, 54% 50%, 0 100%);
  background-image: var(--grain), linear-gradient(90deg, #f1e8d9 0%, #e9ddca 100%);
}
.flap--right .flap__face {
  clip-path: polygon(100% 0, 46% 50%, 100% 100%);
  background-image: var(--grain), linear-gradient(270deg, #f1e8d9 0%, #e9ddca 100%);
}
.flap--bottom { filter: drop-shadow(0 -2px 4px rgba(90, 62, 38, 0.14)); }
.flap--bottom .flap__face {
  clip-path: polygon(0 100%, 50% 47%, 100% 100%);
  background-image: var(--grain), linear-gradient(0deg, #f0e6d6 0%, #e7dac6 100%);
}
.flap--top { filter: drop-shadow(0 5px 7px rgba(90, 62, 38, 0.2)); }
.flap--top .flap__face {
  clip-path: polygon(0 0, 100% 0, 50% 54%);
  background-image: var(--grain), linear-gradient(180deg, #f5ede0 0%, #ede2d0 100%);
}

/* blind-embossed botanicals: paper-coloured line art lit from the top-left */
.emboss {
  position: absolute;
  color: #f6efe3;
  fill: currentColor;
  fill-opacity: 0.6;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(-0.7px -0.7px 0 rgba(255, 255, 255, 0.95)) drop-shadow(0.9px 1px 0.6px rgba(110, 78, 46, 0.3));
}
.emboss--vine { top: 19%; height: 62%; width: auto; aspect-ratio: 120 / 520; }
.flap--left .emboss--vine { left: 2.5%; }
.flap--right .emboss--vine { right: 2.5%; transform: scaleX(-1); }
.emboss--corner { width: 44%; height: auto; aspect-ratio: 1; }
.emboss--tl { top: 2%; left: 2%; }
.emboss--tr { top: 2%; right: 2%; transform: scaleX(-1); }
.emboss--bl { bottom: 2%; left: 2%; transform: scaleY(-1); }
.emboss--br { bottom: 2%; right: 2%; transform: scale(-1, -1); }

/* the seal */
.seal {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: clamp(132px, 40vw, 176px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 12px 14px rgba(60, 12, 20, 0.32)) drop-shadow(0 2px 2px rgba(60, 12, 20, 0.35));
  transition: transform 0.55s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.45s 0.1s;
}
.seal__svg { width: 100%; height: 100%; overflow: visible; animation: breathe 3.4s ease-in-out infinite; }
.seal__mono {
  font-family: 'Pinyon Script', var(--f-script);
  font-size: 51px;
  paint-order: stroke;
  stroke: rgba(48, 6, 12, 0.55);
  stroke-width: 1.4px;
}
.seal__amp { font-size: 36px; }
.seal:hover .seal__svg { animation-play-state: paused; }
.seal:focus-visible { outline: 2px solid var(--gold); outline-offset: 8px; }

.envelope__hint {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: calc(50% + clamp(66px, 20vw, 88px) + 34px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: 500 0.82rem/1.3 var(--f-serif);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #8f7a63;
  pointer-events: none;
  transition: opacity 0.3s;
}
.envelope__hint-icon {
  width: 22px;
  height: 22px;
  color: var(--gold-soft);
  transform: rotate(180deg);
  animation: float 2.2s ease-in-out infinite;
}

/* opening sequence */
.envelope.is-opening { background-color: transparent; background-image: none; pointer-events: none; }
.envelope.is-opening .envelope__stage { box-shadow: none; }
.is-opening .seal { transform: translate(-50%, -50%) scale(0.55) rotate(-14deg); opacity: 0; }
.is-opening .seal__svg { animation: none; }
.is-opening .envelope__hint { opacity: 0; }
.is-opening .flap--top { transform: translateY(-102%); }
.is-opening .flap--bottom { transform: translateY(102%); }
.is-opening .flap--left { transform: translateX(-102%); }
.is-opening .flap--right { transform: translateX(102%); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 96px 24px 80px;
  overflow: hidden;
  text-align: center;
  background: radial-gradient(120% 70% at 50% 40%, #fffaf2 0%, #f8f0e3 48%, #efe3cf 100%);
}
/* soft light along the old envelope folds */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 44%, rgba(255, 255, 255, 0.55) 50%, transparent 56%),
    linear-gradient(62deg, transparent 44%, rgba(255, 255, 255, 0.45) 50%, transparent 56%);
}
.hero__inner { position: relative; z-index: 1; }

.corner {
  position: absolute;
  width: min(48vw, 250px);
  height: auto;
  aspect-ratio: 1;
  color: var(--gold-soft);
  fill: currentColor;
  fill-opacity: 0.12;
  stroke: currentColor;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.corner--tl { top: -6px; left: -6px; }
.corner--br { bottom: -6px; right: -6px; transform: rotate(180deg); }
.closing .corner--tl { top: 0; left: 0; }
.closing .corner--br { bottom: 0; right: 0; }

.hero__kicker {
  font-size: clamp(2.3rem, 10vw, 2.8rem);
  line-height: 1.2;
  color: var(--gold);
}
.hero__date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 0.6rem;
  font: 400 clamp(1.25rem, 5.6vw, 1.5rem)/1.2 var(--f-caps);
  letter-spacing: 0.14em;
  color: var(--ink);
}
.hero__rule { width: 1px; height: 1.3em; background: var(--gold-soft); }
.hero__weekday {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.7rem 0 1.3rem;
  font: 400 clamp(3.7rem, 18vw, 5.4rem)/1.08 var(--f-script);
}
.hero__name {
  display: block;
  padding: 0 0.3em;
  color: var(--gold);
  background: linear-gradient(170deg, #c9a04a 10%, #a37b2c 45%, #7f5a1b 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__amp { font-size: 0.5em; line-height: 1; color: var(--gold-soft); margin: 0.05em 0; }

.divider {
  width: 190px;
  height: 22px;
  margin: 0 auto;
  color: var(--gold-soft);
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
}
.divider--sm { width: 150px; height: 18px; margin: 2rem auto; }

.hero__scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 2.2rem;
  padding: 6px 12px;
  font: italic 500 1.05rem/1.2 var(--f-serif);
  color: var(--ink-soft);
  text-decoration: none;
}
.hero__scroll svg { width: 22px; height: 22px; color: var(--gold); animation: float 2.2s ease-in-out infinite; }
.hero__scroll:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 8px; }

/* hero entrance as the flaps part */
.js .hero__inner > * { opacity: 0; transform: translateY(16px); }
.is-open .hero__inner > * { animation: rise 1s var(--ease-out) both; }
.is-open .hero__inner > :nth-child(1) { animation-delay: 0.75s; }
.is-open .hero__inner > :nth-child(2) { animation-delay: 0.87s; }
.is-open .hero__inner > :nth-child(3) { animation-delay: 0.97s; }
.is-open .hero__inner > :nth-child(4) { animation-delay: 1.1s; }
.is-open .hero__inner > :nth-child(5) { animation-delay: 1.3s; }
.is-open .hero__inner > :nth-child(6) { animation-delay: 1.45s; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  position: relative;
  padding: 76px 24px 80px;
  text-align: center;
}
.section--paper { background-color: var(--paper); }
.section--cream { background-color: var(--cream); }
.section--soft { background-color: var(--soft); }
/* deckled paper edge where one band meets the next */
.section::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -11px;
  height: 12px;
  background-color: inherit;
  -webkit-mask: var(--deckle) repeat-x 0 0 / 120px 12px;
  mask: var(--deckle) repeat-x 0 0 / 120px 12px;
}

.title {
  margin-bottom: 1.5rem;
  font-size: clamp(2.6rem, 11.5vw, 3.25rem);
  line-height: 1.15;
  color: var(--gold);
}
.title--sm { margin-bottom: 0.9rem; font-size: clamp(2.3rem, 10vw, 2.75rem); }

.lead {
  max-width: 32ch;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.6;
}
.note {
  max-width: 32ch;
  margin: 0.9rem auto 0;
  font-style: italic;
  color: var(--ink-soft);
}
.note:empty { display: none; }

/* invitation text */
.bismillah {
  margin-bottom: 1.6rem;
  font: 400 1.65rem/1.9 var(--f-arabic);
  color: var(--ink-soft);
}
.poem {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  margin-bottom: 1.8rem;
  font-size: clamp(1.95rem, 8.6vw, 2.35rem);
  line-height: 1.3;
  color: var(--gold);
}
.greeting {
  margin: 1.8rem auto 0.8rem;
  font: italic 600 1.35rem/1.4 var(--f-serif);
  color: var(--ink);
}

/* countdown */
.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(2px, 1.6vw, 10px);
}
.countdown__cell { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.countdown__num {
  font: 400 clamp(2.3rem, 11vw, 2.9rem)/1 var(--f-caps);
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.countdown__label {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.countdown__colon {
  font: 400 clamp(1.8rem, 8vw, 2.2rem)/1.15 var(--f-caps);
  color: var(--gold-soft);
}
.countdown__done { font-size: 2.3rem; line-height: 1.25; color: var(--wine); }

/* calendar */
.calendar { max-width: 330px; margin: 2.8rem auto 1.6rem; }
.calendar__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar__caption {
  padding-bottom: 0.7rem;
  font-size: 2.1rem;
  line-height: 1.2;
  color: var(--gold);
}
.calendar__table th {
  padding-bottom: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--gold-line);
}
.calendar__table abbr { text-decoration: none; }
.calendar__table tbody tr:first-child td { padding-top: 0.5rem; }
.calendar__table td {
  position: relative;
  height: 42px;
  text-align: center;
  font-size: 1.08rem;
  color: var(--ink);
}
.calendar__table td:nth-child(7) { color: var(--gold-strong); }
.calendar__table td.is-event { color: #fff8ef; font-weight: 600; }
.calendar__table td.is-event svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 38px;
  fill: var(--wine);
  filter: drop-shadow(0 4px 6px rgba(85, 16, 27, 0.35));
  transform: translate(-50%, -50%);
  animation: heartbeat 1.8s ease-in-out infinite;
}
.calendar__table td.is-event span { position: relative; }

/* buttons */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 340px;
  margin: 1.6rem auto 0;
}
.actions--row { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.actions--row .btn { flex: 1 1 150px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0.8rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 0.84rem/1.2 var(--f-serif);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background-color 0.2s, opacity 0.2s;
}
.btn svg { flex: none; width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.btn:disabled { cursor: progress; opacity: 0.85; transform: none; }
.btn--gold {
  color: #fffaf0;
  background: linear-gradient(135deg, #c9a24f 0%, var(--gold) 55%, var(--gold-strong) 100%);
  box-shadow: 0 10px 22px -10px rgba(134, 96, 29, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn--wine {
  color: #fff6ee;
  background: linear-gradient(135deg, #a3313f 0%, var(--wine) 55%, var(--wine-deep) 100%);
  box-shadow: 0 10px 22px -10px rgba(85, 16, 27, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn--outline {
  color: var(--gold-strong);
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--gold-soft);
}
.btn--sm { min-height: 46px; padding: 0.6rem 1.1rem; font-size: 0.74rem; letter-spacing: 0.14em; }
.btn--block { width: 100%; }

.btn__busy { display: none; align-items: center; gap: 0.6rem; }
.btn.is-busy .btn__label { display: none; }
.btn.is-busy .btn__busy { display: inline-flex; }
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* schedule */
.timeline {
  max-width: 380px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.timeline__item {
  display: grid;
  grid-template-columns: 5.4rem 26px 1fr;
  align-items: center;
  column-gap: 16px;
  min-height: 64px;
  text-align: left;
}
.timeline__time {
  justify-self: end;
  font: 400 1.3rem/1 var(--f-caps);
  letter-spacing: 0.04em;
  color: var(--gold);
}
.timeline__dot { position: relative; align-self: stretch; }
.timeline__dot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--gold-line);
}
.timeline__item:first-child .timeline__dot::before { top: 50%; }
.timeline__item:last-child .timeline__dot::before { bottom: 50%; }
.timeline__dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 1px solid var(--gold);
  background: var(--cream);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 0 4px var(--paper);
}
.timeline__item:first-child .timeline__dot::after { background: var(--gold); }
.timeline__title { font-size: 1.15rem; line-height: 1.35; padding: 0.55rem 0; }

/* venue */
.venue__icon { width: 34px; height: 34px; margin: 0 auto 0.9rem; color: var(--gold); }
.venue__name {
  font: 600 1.6rem/1.3 var(--f-serif);
  color: var(--ink);
}
.venue__address { margin-top: 0.4rem; font-size: 1.12rem; color: var(--ink-soft); }
#venue .divider--sm { margin: 1.6rem auto 0.4rem; }

/* gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.gallery__item:nth-child(3n + 1) { grid-column: span 2; }
.gallery__btn {
  display: block;
  width: 100%;
  padding: 5px;
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: 0 12px 24px -18px rgba(74, 54, 40, 0.6);
  cursor: zoom-in;
}
.gallery__btn img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: var(--soft); }
.gallery__item:nth-child(3n + 1) img { aspect-ratio: 3 / 2; }
.gallery__btn:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(28, 18, 12, 0.9); }
.lightbox__img { max-width: 94vw; max-height: 84vh; max-height: 84dvh; border-radius: 10px; object-fit: contain; }
.lightbox__btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}
.lightbox__btn svg { width: 24px; height: 24px; }
.lightbox__btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.lightbox__close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%) scaleX(-1); }

/* dress code & gift */
.detail .lead { max-width: 30ch; }
.swatches {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 1.2rem;
  padding: 0;
  list-style: none;
}
.swatches li {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #fffdf8;
  box-shadow: 0 0 0 1px var(--gold-line), 0 6px 12px -6px rgba(74, 54, 40, 0.5);
}

/* forms */
.card {
  max-width: 420px;
  margin: 1.9rem auto 0;
  padding: 28px 22px 24px;
  text-align: left;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(163, 123, 44, 0.24);
  border-radius: 22px;
  box-shadow: 0 24px 44px -30px rgba(74, 54, 40, 0.55);
}
.card--letter {
  background:
    linear-gradient(rgba(255, 253, 248, 0.9), rgba(255, 253, 248, 0.9)),
    var(--grain);
}

.field { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.field__label {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field__input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem;
  font: 500 1.12rem/1.4 var(--f-serif);
  color: var(--ink);
  background: #fffdf9;
  border: 1px solid #dccab0;
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field__input::placeholder { color: #a8968a; opacity: 1; }
.field__input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(163, 123, 44, 0.2); }
.field__input[aria-invalid='true'] { border-color: var(--danger); }
.field__input--area { min-height: 140px; resize: vertical; }
.field__error { font-size: 1rem; line-height: 1.35; color: var(--danger); }
.field__error:not(:empty) { margin-top: 0.4rem; }
.field__meta { display: flex; align-items: flex-start; gap: 1rem; }
.field__count { margin: 0.4rem 0 0 auto; font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; }

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 52px;
  margin-bottom: 10px;
  padding: 0.6rem 0.95rem;
  font-size: 1.12rem;
  line-height: 1.3;
  background: #fffdf9;
  border: 1px solid #e2d3bc;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice__box {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--gold-soft);
  border-radius: 50%;
}
.choice__box::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  transform: scale(0);
  transition: transform 0.2s var(--ease-out);
}
.choice input:checked + .choice__box { border-color: var(--gold); }
.choice input:checked + .choice__box::after { transform: scale(1); }
.choice:has(input:checked) { border-color: var(--gold); background: #fff7e8; }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--wine); outline-offset: 3px; }
.choice input[aria-invalid='true'] + .choice__box { border-color: var(--danger); }

.select { position: relative; }
.select select { padding-right: 2.8rem; cursor: pointer; }
.select svg {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--gold);
  transform: translateY(-50%);
  pointer-events: none;
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__status { text-align: center; font-size: 1.02rem; line-height: 1.4; }
.form__status:not(:empty) { margin-top: 0.9rem; }
.form__status.is-error { color: var(--danger); }

.done { padding: 12px 0 4px; text-align: center; }
.done__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 50%;
  color: #fff6ec;
  fill: currentColor;
  background: radial-gradient(circle at 35% 30%, #a93545, var(--wine) 55%, var(--wine-deep));
  box-shadow: 0 12px 24px -12px rgba(85, 16, 27, 0.75);
  animation: pop 0.6s var(--ease-out) both;
}
.done__text { margin: 1rem auto 0.6rem; max-width: 16em; font-size: 2rem; line-height: 1.25; color: var(--gold); }
.link-btn {
  min-height: 44px;
  padding: 0 0.6rem;
  border: 0;
  background: none;
  font-size: 1.05rem;
  color: var(--gold-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.link-btn:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; border-radius: 6px; }

/* closing */
.closing {
  position: relative;
  padding: 104px 24px calc(64px + env(safe-area-inset-bottom));
  text-align: center;
  background: radial-gradient(120% 80% at 50% 35%, #fffaf2 0%, #f6ecdc 60%, #efe2cd 100%);
}
.closing::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -11px;
  height: 12px;
  background-color: #fbf5ea;
  -webkit-mask: var(--deckle) repeat-x 0 0 / 120px 12px;
  mask: var(--deckle) repeat-x 0 0 / 120px 12px;
}
.closing__title {
  position: relative;
  max-width: 11em;
  margin: 0 auto 1.4rem;
  font-size: clamp(2.3rem, 10.5vw, 2.9rem);
  line-height: 1.2;
  color: var(--gold);
}
.closing__names {
  position: relative;
  margin-top: 1.2rem;
  font-size: clamp(2.4rem, 11vw, 3rem);
  line-height: 1.2;
  color: var(--ink);
}
.closing__amp { margin: 0 0.12em; color: var(--gold-soft); }
.closing__hosts { position: relative; margin-top: 0.8rem; font-style: italic; color: var(--ink-soft); }
.closing__meta {
  position: relative;
  margin-top: 2.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes heartbeat { 0%, 100% { scale: 1; } 15% { scale: 1.12; } 30% { scale: 1; } 45% { scale: 1.08; } }
@keyframes pulse { from { opacity: 0.9; transform: scale(0.92); } to { opacity: 0; transform: scale(1.3); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal, .js .hero__inner > * { opacity: 1; transform: none; }
}

/* ---------- wider screens ---------- */
@media (min-width: 600px) {
  .section { padding-left: 48px; padding-right: 48px; }
}
