/* ═══════════════════════════════════════════════════════════════
   iqbalnfarina.space — premium wedding invitation
   Design system: warm ink + antique gold on ivory. Editorial serif
   (Cormorant Garamond) for display, Manrope for body/UI.
   Mobile-first. Reduced-motion respected at the end of this file.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ink: #171310;
  --ink-2: #241d13;
  --paper: #f7f2e9;
  --paper-2: #efe7d6;
  --gold: #b08d57;
  --gold-2: #c9a96a;
  --gold-ink: #8a6d3f;
  --text: #2a231b;
  --muted: #7d7161;
  --line: rgba(42, 35, 27, 0.14);
  --gold-line: rgba(176, 141, 87, 0.38);
  --font-d: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-b: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.77, 0, 0.18, 1);
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ═══════════════════ COVER ═══════════════════ */

.cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(120% 90% at 50% 18%, #261f14 0%, var(--ink) 58%, #0e0b08 100%);
  transition: transform 1.05s var(--ease);
  will-change: transform;
}

.cover--open { transform: translateY(-101%); }

.cover__frame {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(201, 169, 106, 0.22);
  pointer-events: none;
}

.cover__grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.cover__dust {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(233, 205, 148, 0.95), rgba(233, 205, 148, 0));
  opacity: 0;
  animation: float 9s ease-in-out infinite;
}
.cover__dust--2 { width: 5px; height: 5px; top: 22%; left: 16%; animation-delay: -2s; }
.cover__dust--3 { width: 9px; height: 9px; top: 64%; left: 12%; animation-delay: -4.5s; }
.cover__dust--4 { width: 5px; height: 5px; top: 30%; right: 14%; animation-delay: -1.2s; }
.cover__dust--5 { width: 8px; height: 8px; top: 68%; right: 18%; animation-delay: -6s; }
.cover__dust--6 { width: 4px; height: 4px; top: 50%; left: 8%; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.22; }
  50% { transform: translate3d(0, -20px, 0); opacity: 0.65; }
}

.cover__inner {
  position: relative;
  padding: 2rem 1.75rem;
  max-width: 540px;
  animation: coverIn 1.15s var(--ease) both;
}

@keyframes coverIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.cover__kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font: 600 0.7rem/1 var(--font-b);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.cover__kicker::before,
.cover__kicker::after {
  content: "";
  height: 1px;
  width: 42px;
  background: var(--gold-line);
}

.cover__names {
  margin-top: 1.5rem;
  font-family: var(--font-d);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.cover__name {
  display: block;
  font-size: clamp(3.1rem, 15.5vw, 5.4rem);
  line-height: 0.98;
}

.cover__amp {
  display: block;
  font-style: italic;
  color: var(--gold-2);
  font-size: clamp(2.1rem, 9.5vw, 3.1rem);
  line-height: 1.15;
}

.cover__subtitle {
  margin-top: 1.25rem;
  font: 600 0.68rem/1 var(--font-b);
  letter-spacing: 0.52em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.85;
  padding-left: 0.52em; /* optical centering for letterspacing */
}

.cover__meta {
  margin-top: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  font-family: var(--font-d);
  font-size: 1.08rem;
  letter-spacing: 0.16em;
  color: var(--gold-2);
}

.cover__diamond {
  width: 5px;
  height: 5px;
  background: var(--gold-2);
  transform: rotate(45deg);
  display: inline-block;
  opacity: 0.9;
}

.cover__venue {
  margin-top: 0.4rem;
  font: 400 0.72rem/1.4 var(--font-b);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.62;
}

.btn {
  font-family: var(--font-b);
  border: 0;
  cursor: pointer;
  background: none;
}

.btn--open {
  margin-top: 2.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.05rem 2.3rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold-2);
  font: 600 0.74rem/1 var(--font-b);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: transparent;
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
.btn--open:hover,
.btn--open:focus-visible {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 14px 34px -14px rgba(176, 141, 87, 0.55);
}
.btn--open .btn__arrow { transition: transform 0.35s ease; }
.btn--open:hover .btn__arrow { transform: translateX(5px); }

/* ═══════════════════ INVITE BODY ═══════════════════ */

.invite {
  background: var(--paper);
  color: var(--text);
  min-height: 100vh;
}

.sec {
  padding: 4.75rem 1.5rem;
  max-width: 660px;
  margin: 0 auto;
  scroll-margin-top: 24px;
}

.sec__eyebrow {
  font: 600 0.66rem/1 var(--font-b);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-ink);
  text-align: center;
}

.sec__title {
  margin-top: 0.8rem;
  font-family: var(--font-d);
  font-weight: 500;
  font-size: clamp(1.7rem, 6vw, 2.15rem);
  text-align: center;
  line-height: 1.25;
}

.sec__eyebrow--dark { color: var(--gold-2); }
.sec__title--dark { color: var(--paper); }

/* ── greeting ── */

.sec--greeting {
  text-align: center;
  padding-top: 5.25rem;
}

.bismillah {
  font-family: var(--font-d);
  font-size: 1.55rem;
  color: var(--gold-ink);
}

.salam {
  margin-top: 1.1rem;
  font: 600 0.68rem/1 var(--font-b);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.greet-text {
  margin-top: 1.4rem;
  font-size: 1.02rem;
  line-height: 2;
  color: var(--text);
  opacity: 0.92;
}

.greet-names {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: 1.22rem;
  color: var(--gold-ink);
  letter-spacing: 0.02em;
}

/* ── couple ── */

.arch {
  width: min(292px, 76vw);
  aspect-ratio: 3 / 4;
  margin: 0 auto 2.1rem;
  border-radius: 999px 999px 26px 26px / 46% 46% 26px 26px;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  background: linear-gradient(180deg, #f0e6d2 0%, #e3d5b8 100%);
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 30px 60px -34px rgba(42, 35, 27, 0.45);
}

.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arch__mono {
  font-family: var(--font-d);
  font-style: italic;
  font-size: 2.7rem;
  color: var(--gold-ink);
  letter-spacing: 0.04em;
}
.arch__mono i { font-style: normal; }

.arch__hint {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  font: 600 0.56rem/1 var(--font-b);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-ink);
  opacity: 0.72;
}

.couple__names {
  text-align: center;
  font-family: var(--font-d);
  font-weight: 500;
  font-size: clamp(2.1rem, 8vw, 2.9rem);
  letter-spacing: 0.03em;
  line-height: 1.15;
}
.couple__names i { color: var(--gold-ink); font-style: italic; }

.couple__fullnames {
  margin-top: 1.05rem;
  text-align: center;
  font-family: var(--font-d);
  font-size: clamp(1.12rem, 4.5vw, 1.45rem);
  line-height: 1.55;
  color: var(--text);
  opacity: 0.92;
}

.couple__full { display: block; }

.couple__fullamp {
  display: block;
  font-style: italic;
  color: var(--gold-ink);
  font-size: 0.92em;
  line-height: 1.5;
}

.couple__parents {
  margin-top: 1.7rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

.couple__side {
  display: block;
  font: 600 0.6rem/1 var(--font-b);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.couple__side--2 { margin-top: 1.15rem; }

.couple__parents-names { display: block; margin-top: 0.55rem; }

.pname { display: block; color: var(--text); font-weight: 500; }

.psep {
  display: block;
  font-family: var(--font-d);
  font-style: italic;
  color: var(--gold-ink);
  line-height: 1.4;
  font-size: 0.95em;
}

.couple__wish {
  margin: 2.3rem auto 0;
  max-width: 34em;
  text-align: center;
  font-family: var(--font-d);
  font-style: italic;
  font-size: 1.14rem;
  line-height: 1.85;
  color: var(--text);
  opacity: 0.9;
}

.couple__ref {
  margin-top: 0.7rem;
  text-align: center;
  font: 600 0.62rem/1 var(--font-b);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

/* ── events ── */

.events {
  margin-top: 2.2rem;
  display: grid;
  gap: 1.1rem;
}

.events.events--single { grid-template-columns: 1fr; }

.event {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem;
  text-align: center;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.event:hover {
  border-color: var(--gold-line);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -26px rgba(42, 35, 27, 0.35);
}

.event::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 1px;
  background: var(--gold-line);
}

.event__label {
  font: 600 0.64rem/1 var(--font-b);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.event__date {
  margin-top: 0.85rem;
  font-family: var(--font-d);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
}

.event__time {
  margin-top: 0.3rem;
  font: 600 0.78rem/1 var(--font-b);
  letter-spacing: 0.14em;
  color: var(--gold-ink);
}

.event__venue {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.98rem;
}

.event__addr {
  margin-top: 0.3rem;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ── countdown ── */

.sec--countdown {
  max-width: none;
  padding: 5rem 1.5rem;
  text-align: center;
  color: var(--paper);
  background:
    radial-gradient(120% 100% at 50% 0%, var(--ink-2) 0%, var(--ink) 62%, #0e0b08 100%);
}

.count {
  margin: 2rem auto 0;
  max-width: 430px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}

.count__cell {
  border: 1px solid rgba(201, 169, 106, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 1rem 0.2rem 0.95rem;
}

.count__num {
  display: block;
  font-family: var(--font-d);
  font-weight: 500;
  font-size: clamp(1.9rem, 9vw, 2.6rem);
  line-height: 1;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}

.count__lab {
  display: block;
  margin-top: 0.55rem;
  font: 600 0.56rem/1 var(--font-b);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(247, 242, 233, 0.62);
}

.count__note {
  margin-top: 1.4rem;
  font-family: var(--font-d);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(247, 242, 233, 0.78);
}

/* ── photo band ── */

.band {
  height: 44vh;
  min-height: 300px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 19, 16, 0.28), rgba(23, 19, 16, 0.28)),
    linear-gradient(180deg, #eadfca 0%, #d9c9a8 100%);
}

.band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.band__mono {
  font-family: var(--font-d);
  font-style: italic;
  font-size: 2.4rem;
  color: rgba(138, 109, 63, 0.85);
  letter-spacing: 0.05em;
}
.band__mono i { font-style: normal; }

.band__hint {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  font: 600 0.56rem/1 var(--font-b);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(138, 109, 63, 0.8);
}

/* ── actions ── */

.sec--actions { padding-bottom: 6rem; }

.actions {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.5rem 0.9rem 1.35rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.action:hover,
.action:focus-visible {
  border-color: var(--gold-line);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -24px rgba(42, 35, 27, 0.4);
}

.action__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  border: 1px solid var(--gold-line);
  color: var(--gold-ink);
}
.action__icon svg { width: 22px; height: 22px; }

.action__label {
  font: 600 0.7rem/1 var(--font-b);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.action__note {
  font-size: 0.66rem;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.action--primary {
  grid-column: 1 / -1;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  padding: 1.7rem 1rem 1.55rem;
}
.action--primary .action__icon {
  background: rgba(201, 169, 106, 0.14);
  border-color: var(--gold-line);
  color: var(--gold-2);
}
.action--primary .action__label { color: var(--gold-2); }
.action--primary .action__note { color: rgba(247, 242, 233, 0.6); }
.action--primary:hover,
.action--primary:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 20px 44px -22px rgba(23, 19, 16, 0.55);
}

.action--soon { opacity: 0.62; cursor: default; }
.action--soon:hover,
.action--soon:focus-visible {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

/* ── closing ── */

.close {
  text-align: center;
  color: var(--paper);
  padding: 5.5rem 1.5rem calc(6.5rem + env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 100% at 50% 0%, var(--ink-2) 0%, var(--ink) 60%, #0e0b08 100%);
}

.close__thanks {
  font-family: var(--font-d);
  font-weight: 500;
  font-size: clamp(2rem, 8vw, 2.6rem);
  color: var(--gold-2);
}

.close__line {
  margin-top: 1rem;
  font-size: 0.92rem;
  line-height: 2;
  color: rgba(247, 242, 233, 0.75);
}

.close__names {
  margin-top: 2.2rem;
  font-family: var(--font-d);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}
.close__names i { color: var(--gold-2); font-style: italic; }

.close__ornament {
  margin-top: 1.6rem;
  color: var(--gold);
  font-size: 0.95rem;
}

.close__domain {
  margin-top: 1.2rem;
  font: 600 0.58rem/1 var(--font-b);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(247, 242, 233, 0.45);
}

/* ═══════════════════ FLOATING NAV ═══════════════════ */

.nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%);
  z-index: 80;
  display: flex;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(23, 19, 16, 0.84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(201, 169, 106, 0.28);
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.55);
  transition: transform 0.65s var(--ease);
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

body.is-open .nav { transform: translate(-50%, 0); }

.nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  border: 0;
  background: none;
  border-radius: 999px;
  color: rgba(247, 242, 233, 0.72);
  font: 600 0.54rem/1 var(--font-b);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.nav__item svg { width: 19px; height: 19px; }
.nav__item:hover { color: var(--gold-2); }
.nav__item.is-active { color: var(--gold-2); }

/* ═══════════════════ MUSIC TOGGLE ═══════════════════ */

.music {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(201, 169, 106, 0.35);
  background: rgba(23, 19, 16, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--gold-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.3s ease, box-shadow 0.3s ease;
}
.music svg { width: 20px; height: 20px; }
.music:hover { color: var(--gold); }
.music.is-playing {
  color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201, 169, 106, 0.5), 0 0 22px -4px rgba(201, 169, 106, 0.6);
}

/* ═══════════════════ REVEAL ON SCROLL ═══════════════════ */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
[data-reveal].in-view { opacity: 1; transform: none; }

/* ═══════════════════ TABLET+ ═══════════════════ */

@media (min-width: 640px) {
  .cover__frame { inset: 18px; }
  .sec { padding: 6rem 2rem; }
  .sec--greeting { padding-top: 6.5rem; }
  .events { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
  .actions { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
  .action--primary { grid-column: 1 / -1; }
  .nav { bottom: calc(20px + env(safe-area-inset-bottom)); }
  .nav__item { flex-direction: row; gap: 7px; padding: 11px 16px; }
  .band { height: 52vh; }
}

@media (min-width: 1024px) {
  .cover__frame { inset: 22px; }
  .sec { padding: 7rem 2rem; }
  .sec--greeting { padding-top: 7.5rem; }
  .actions { max-width: 820px; margin-left: auto; margin-right: auto; }
  .band { height: 58vh; }
}

/* ═══════════════════ REDUCED MOTION ═══════════════════ */

@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;
  }
  .cover--open { transform: translateY(-101%); }
  .cover__dust { display: none; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   NATIVE RSVP / UCAPAN MODALS — same design system (ink/ivory/gold)
   ═══════════════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 9, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: modalFade 0.35s var(--ease) both;
}
.modal__panel {
  position: relative;
  width: min(440px, 100%);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  color: var(--text);
  border-radius: 22px;
  border: 1px solid rgba(176, 141, 87, 0.35);
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.55);
  animation: modalIn 0.4s var(--ease) both;
}
.modal__x {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s, background 0.3s;
}
.modal__x:hover { color: var(--text); background: var(--paper-2); }
.modal__x svg { width: 20px; height: 20px; }
.modal__body { padding: 2.2rem 1.6rem 1.8rem; text-align: center; }
.modal__eyebrow {
  font: 600 0.62rem/1 var(--font-b);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.modal__title {
  margin: 0.7rem 0 0;
  font-family: var(--font-d);
  font-weight: 500;
  font-size: clamp(1.5rem, 5.6vw, 1.85rem);
  line-height: 1.22;
  color: var(--ink);
}
.modal__title span { color: var(--gold-ink); font-style: italic; }
.modal__sub {
  margin: 0.65rem 0 1.6rem;
  font-size: 0.74rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.modal__form { text-align: left; }
.field { border: 0; padding: 0; margin: 0 0 1.15rem; min-width: 0; }
.field__label {
  display: block;
  margin-bottom: 0.45rem;
  font: 600 0.66rem/1 var(--font-b);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.field__label i { color: var(--gold); font-style: normal; }
.field__opt { text-transform: none; letter-spacing: 0.04em; color: var(--muted); font-weight: 400; }
.field__input {
  width: 100%;
  padding: 0.85rem 0.9rem;
  font: 400 0.95rem/1.4 var(--font-b);
  color: var(--text);
  background: #fff;
  border: 1px solid rgba(42, 35, 27, 0.16);
  border-radius: 12px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field__input::placeholder { color: #b3a892; }
.field__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.18);
}
.field__area { resize: vertical; min-height: 3.4rem; }
.field__select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a6d3f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
}
.choice { display: grid; gap: 0.55rem; }
.choice__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(42, 35, 27, 0.16);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  font: 400 0.92rem/1.3 var(--font-b);
}
.choice__item:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.choice__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice__item span::before {
  content: "";
  display: inline-block;
  width: 17px;
  height: 17px;
  margin-right: 0.7rem;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  vertical-align: -3px;
  transition: background 0.25s, box-shadow 0.25s;
}
.choice__item:has(input:checked) span::before {
  background: var(--gold-2);
  box-shadow: inset 0 0 0 3.5px var(--ink);
}
.modal__err {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #8c3b2a;
  background: rgba(176, 87, 61, 0.1);
  border: 1px solid rgba(176, 87, 61, 0.3);
  border-radius: 12px;
}
.modal__fallback {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--gold-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.modal__fallback:hover { color: var(--ink); }
.modal__err[hidden] { display: none; }
.btn-modal {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: transparent;
  color: var(--gold-ink);
  font: 600 0.78rem/1 var(--font-b);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, opacity 0.3s;
}
.btn-modal:hover { background: var(--gold); color: var(--ink); }
.btn-modal--primary {
  margin-top: 0.4rem;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn-modal--primary:hover { background: var(--gold-ink); border-color: var(--gold-ink); color: var(--paper); }
.btn-modal:disabled { opacity: 0.55; cursor: wait; }
.modal__done { padding-top: 2.6rem; }
.modal__check {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold-ink);
}
.modal__check svg { width: 26px; height: 26px; }
.modal__done-title {
  font-family: var(--font-d);
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--ink);
}
.modal__done-msg {
  margin: 0.6rem auto 1.5rem;
  max-width: 30ch;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--muted);
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.modal--closing .modal__backdrop { animation: modalFade 0.25s var(--ease) reverse both; }
.modal--closing .modal__panel { animation: modalIn 0.25s var(--ease) reverse both; }

/* focus-visible for modal controls */
.modal :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* mobile: bottom-sheet behaviour, safe-area, keyboard-friendly */
@media (max-width: 480px) {
  .modal { padding: 0; align-items: end; }
  .modal__panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal__body { padding: 2rem 1.4rem calc(1.6rem + env(safe-area-inset-bottom)); }
  .field__input { font-size: 16px; } /* prevents iOS zoom on focus */
}
@media (min-width: 481px) {
  .modal { padding: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .modal__backdrop, .modal__panel { animation: none; }
}

/* scroll lock while a modal is open */
body.modal-open { overflow: hidden; }
