:root {
  --paper: #F6F2E9;
  --ink-deep: #34597A;     /* dusty blue */
  --ink: #4A7395;
  --muted: #6E6A5C;
  --gold: #7E9DB8;         /* soft blue lines (no gold) */
  --gold-text: #2F5578;    /* blue text on the card */
  --gold-soft: rgba(126, 157, 184, .5);
  --pale: #C8D6EA;
  --wash: 214, 226, 236;

  --script: "Great Vibes", "Snell Roundhand", cursive;
  --play: "Playfair Display", Georgia, serif;
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --ar-display: "Aref Ruqaa", "Amiri", serif;
  --ar: "Amiri", "Geeza Pro", serif;
  --sans: "Lato", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0; overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    radial-gradient(60vw 40vh at -5% 40%,  rgba(var(--wash), .8), transparent 70%),
    radial-gradient(55vw 35vh at 105% 15%, rgba(var(--wash), .6), transparent 70%),
    radial-gradient(50vw 35vh at 95% 95%,  rgba(var(--wash), .5), transparent 70%);
  color: var(--ink);
  font: 400 19px/1.5 var(--serif);
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }
[lang="ar"] { color: var(--ink); }

/* page chrome: thin double gold frame, like the Bhoomika & Dharma site */
.page { position: relative; min-height: 100vh; padding: clamp(28px, 7vw, 56px) 0 clamp(48px, 10vw, 72px); }
.page-frame { position: absolute; inset: clamp(10px, 3vw, 24px); border: 1px solid var(--gold); pointer-events: none; }
.page-frame::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--gold-soft); }
.content { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; padding: 0 clamp(26px, 7vw, 40px); text-align: center; }

/* ---------- the invitation card (fixed design, scales as a whole) ---------- */
.card {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 767 / 1075;
  overflow: hidden;
  border-radius: 4px;
  background: #F2EDE1;
  box-shadow: 0 16px 44px rgba(52, 89, 122, .22), 0 2px 6px rgba(0, 0, 0, .08);
}
.card-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.card-text {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44cqw 19cqw 17cqw;
  justify-content: flex-start;
  text-align: center;
  color: var(--gold-text);
}
.bismillah, .event-ar, .names, .dua { color: #23476B; }
.bismillah { font: 700 5.6cqw/1.5 var(--ar-display); padding: 0 1cqw; }
.small { font: 400 2.55cqw/1.42 var(--play); color: var(--gold-text); }
.together { margin-top: 1.8cqw; }
.fathers { margin: .6cqw 0 .6cqw; font: 600 3.2cqw/1.4 var(--play); color: #1D3F63; white-space: nowrap; }
.fathers span { font-weight: 400; font-style: italic; }
.event { margin: .8cqw 0 0; font-weight: 400; }
.event-ar { display: block; font: 700 8cqw/1.35 var(--ar-display); }
.event-en { display: block; font: 400 2.6cqw/1.4 var(--play); color: var(--gold-text); }
.names { margin-top: 1.6cqw; font: 400 5.4cqw/1.25 "Pinyon Script", var(--script); padding: 0 1cqw; color: #163556 !important; -webkit-text-stroke: .14cqw #163556; paint-order: stroke fill; }
.names span { display: block; white-space: nowrap; }
.names .amp { font: 400 3.2cqw/1.3 var(--play); }
.when { margin-top: 1.6cqw; font: 500 2.8cqw/1.4 var(--play); color: var(--gold-text); white-space: nowrap; }
.where { font: 400 2.7cqw/1.45 var(--play); color: var(--gold-text); }
.rsvp-by { margin-top: 1.8cqw; font: italic 400 2.4cqw/1.4 var(--play); color: var(--gold-text); }
.card .dua { margin-top: .8cqw; font: 700 2.9cqw/1.6 var(--ar); }

.ornament { width: 62cqw; margin: 3cqw auto 2.6cqw; font-size: 3.2cqw; gap: 2.4cqw; }

.ornament { display: flex; align-items: center; gap: 12px; max-width: 300px; margin: 22px auto; color: var(--ink); font-size: 15px; }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: var(--ink); opacity: .7; }

.directions {
  display: inline-block; margin-top: 16px;
  font: 700 14px/1.4 var(--sans); color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--gold-soft);
}
.directions:hover { border-color: var(--gold); }

/* ---------- RSVP: a reply card matching the invitation ---------- */
.rsvp { margin-top: clamp(44px, 11vw, 64px); scroll-margin-top: 20px; }
.garland { display: block; width: min(300px, 82%); height: auto; margin: 4px auto 14px; }
.rsvp h2 { margin: 0; padding: 0 .12em; font: 400 clamp(44px, 12vw, 62px)/1.25 "Pinyon Script", var(--script); color: #1D3F63; }
.rsvp .sub { font: italic 400 clamp(15px, 4vw, 17px)/1.55 var(--play); color: #2F5578; }
.rsvp .sub strong { font-style: normal; font-weight: 600; color: #1D3F63; white-space: nowrap; }

form { max-width: 440px; margin: 22px auto 0; text-align: left; position: relative; z-index: 1; }
.field { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend {
  display: block; margin: 0 0 8px 2px; padding: 0;
  font: 500 12.5px/1.4 var(--play); letter-spacing: .14em; text-transform: uppercase; color: #1D3F63;
}
.optional { text-transform: none; letter-spacing: 0; font-weight: 400; font-style: italic; }
input[type="text"], input[type="number"], textarea {
  display: block; width: 100%;
  padding: 13px 15px;
  font: 400 16px/1.4 var(--sans); color: #1D3F63;
  background: #FBF8F1;
  border: 1px solid #A9BDD0; border-radius: 8px;
  outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type="number"] { max-width: 110px; }
textarea { resize: vertical; min-height: 90px; }
input::placeholder, textarea::placeholder { color: #8197AE; }
input:focus, textarea:focus { background: #fff; border-color: #34597A; box-shadow: 0 0 0 3px rgba(52, 89, 122, .15); }
[aria-invalid="true"] { border-color: #9A5B57 !important; }

.pills { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 520px) { .pills { flex-direction: row; } .pill { flex: 1; } }
.pill {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 12px 18px;
  border: 1.5px solid #A9BDD0; border-radius: 999px;
  background: #FBF8F1;
  font: italic 400 18px/1.2 var(--play); color: #1D3F63; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.pill:hover { border-color: #34597A; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pill.is-checked { background: #34597A; border-color: #34597A; color: #fff; }
.pill.is-focused { box-shadow: 0 0 0 3px rgba(52, 89, 122, .25); }

.error { display: none; margin: 8px 0 0 2px; font: 700 14px/1.4 var(--sans); color: #9A5B57; }
.error.is-visible { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice {
  display: none; margin-top: 20px; padding: 14px 16px;
  border: 1px solid #A9BDD0; border-radius: 8px; background: #FBF8F1;
  font: 400 15px/1.5 var(--sans); color: #1D3F63;
}
.notice.is-visible { display: block; }

.btn {
  display: block; width: 100%; margin: 26px 0 0; padding: 17px 24px; cursor: pointer;
  border: 0; border-radius: 999px;
  background: #34597A; color: #fff;
  font: 500 15px/1 var(--play); letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(52, 89, 122, .25);
  transition: background .15s, transform .15s;
}
.btn:hover { background: #1D3F63; transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(52, 89, 122, .4); outline-offset: 3px; }
.btn[disabled] { opacity: .7; cursor: default; transform: none; }

.confirm { max-width: 440px; margin: 22px auto 0; padding: 10px 0; outline: none; }
.confirm .ornament { display: none; }
.confirm h3 { margin: 0; font: 400 clamp(36px, 10vw, 48px)/1.2 "Pinyon Script", var(--script); color: #1D3F63; }
.confirm p { margin-top: 8px; font: italic 400 18px/1.5 var(--play); color: #2F5578; }
.rsvp .note { margin: 22px auto 0; max-width: 360px; font: italic 400 14px/1.5 var(--play); color: #5C7189; }

/* ---------- footer ---------- */
footer { margin-top: clamp(40px, 9vw, 56px); }
footer .garland { margin-bottom: 8px; }
.sign { white-space: nowrap; font: 400 clamp(26px, 7.2vw, 42px)/1.2 "Pinyon Script", var(--script); color: #163556; -webkit-text-stroke: .7px #163556; }
.footer-date { margin-top: 6px; font: 500 13px/1 var(--play); letter-spacing: .3em; color: #5C7189; }
