/* ============================================================
   أنس — قالب زيتوني / ذهبي / كتّان
   ============================================================ */

:root {
  --olive-950: #1c2414;
  --olive-900: #24301a;
  --olive-800: #2f3b1f;
  --olive-700: #3d4d28;
  --gold-600: #b48f3a;
  --gold-500: #c9a44a;
  --gold-300: #e0c77a;
  --gold-100: #f3e7c2;
  --linen-50: #fbf8f1;
  --linen-100: #f4efe4;
  --linen-200: #e8dfce;
  --ink: #2a2a22;
  --ink-soft: #5c5a4e;
  --font-display: 'Amiri', serif;
  --font-body: 'Tajawal', system-ui, sans-serif;
  --font-en: 'Cormorant Garamond', Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--linen-100);
  line-height: 1.7;
}
body.is-locked { overflow: hidden; height: 100dvh; }
[hidden] { display: none !important; }
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

.en {
  font-family: var(--font-en);
  direction: ltr;
  unicode-bidi: isolate;
  letter-spacing: .06em;
}

/* Gate */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background:
    url("../assets/tatreez-tile-gold.svg") center / 96px repeat,
    radial-gradient(120% 90% at 50% 10%, var(--olive-700), var(--olive-950));
  color: var(--linen-50);
  transition: opacity .8s var(--ease), visibility .8s;
}
.gate.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.gate__inner { text-align: center; width: min(100%, 420px); }
.gate__kicker {
  color: var(--gold-300);
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: .85rem;
  margin-bottom: 8px;
}
.gate__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  margin-bottom: 28px;
}
.gate__envelope {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  width: 100%;
  display: grid;
  gap: 16px;
  justify-items: center;
  transition: transform .35s var(--ease), opacity .7s var(--ease);
}
.gate__envelope-img {
  width: min(100%, 340px);
  height: auto;
  filter: drop-shadow(0 22px 40px rgba(0,0,0,.45));
  display: block;
}
.gate__envelope span {
  padding: 10px 22px;
  border: 1px solid var(--gold-500);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  font-weight: 700;
  animation: pulse 2.4s ease-in-out infinite;
}
.gate__envelope:hover { transform: translateY(-4px) scale(1.02); }
.gate__envelope.is-opening { transform: scale(1.05); opacity: .85; }
.gate__envelope:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 8px; border-radius: 12px; }
@keyframes pulse { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

/* Site */
.site {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  min-height: 100dvh;
}
.site.is-visible { opacity: 1; transform: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 12px 18px;
  background: rgba(251,248,241,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linen-200);
}
.topbar__place {
  text-align: center;
  font-size: .92rem;
  font-weight: 600;
  color: var(--olive-800);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.topbar__olive { width: 40px; height: 28px; color: var(--gold-500); justify-self: end; }
.topbar__olive svg { width: 100%; height: 100%; }
.olive-mark { width: 64px; height: 40px; margin: 0 auto 12px; color: var(--gold-500); }
.olive-mark use, .topbar__olive use { pointer-events: none; }
.topbar__menu {
  width: 40px; height: 40px;
  border: 0; background: transparent;
  display: grid; gap: 5px; align-content: center; justify-items: center;
  cursor: pointer; padding: 8px;
}
.topbar__menu span {
  display: block; width: 20px; height: 1.5px; background: var(--olive-800);
  transition: transform .25s ease, opacity .25s ease;
}
.topbar__menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.topbar__menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.topbar__menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-drawer {
  position: sticky; top: 57px; z-index: 39;
  display: grid; gap: 4px;
  padding: 12px 18px 16px;
  background: var(--linen-50);
  border-bottom: 1px solid var(--linen-200);
  box-shadow: 0 12px 30px -20px rgba(0,0,0,.25);
}
.nav-drawer a {
  padding: 12px 14px; border-radius: 10px;
  font-weight: 700; color: var(--olive-800);
}
.nav-drawer a:hover { background: var(--gold-100); }

/* Marhaba */
.marhaba {
  background: var(--olive-800);
  color: var(--linen-50);
  text-align: center;
  padding: 42px 20px;
}
.marhaba__ar {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: var(--gold-300);
  margin-bottom: 10px;
}
.marhaba__en {
  margin-top: 10px;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-100);
}

.diamond-rule {
  width: 120px; height: 14px; margin: 0 auto;
  background:
    linear-gradient(var(--gold-500), var(--gold-500)) center / 70% 1px no-repeat,
    radial-gradient(circle, var(--gold-500) 0 3px, transparent 4px) left center / 10px 10px no-repeat,
    radial-gradient(circle, var(--gold-500) 0 3px, transparent 4px) right center / 10px 10px no-repeat,
    conic-gradient(from 45deg, var(--gold-500) 0 25%, transparent 0) center / 8px 8px no-repeat;
}

/* Couple */
.couple {
  text-align: center;
  padding: 48px 20px 52px;
  background:
    url("../assets/tatreez-tile-olive.svg") center / 96px repeat,
    var(--linen-50);
}
.bismillah {
  font-family: var(--font-display);
  color: var(--gold-600);
  font-size: clamp(1.15rem, 4vw, 1.4rem);
  margin-bottom: 18px;
}
.couple__families {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  color: var(--olive-800);
  margin-bottom: 14px;
}
.couple__hosts {
  color: var(--olive-800);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4vw, 1.45rem);
  font-weight: 700;
  margin-bottom: 10px;
}
.couple__hosts span { color: var(--gold-500); margin: 0 10px; font-size: .7em; font-weight: 400; }
.couple__invite { color: var(--ink-soft); margin-bottom: 22px; }
.couple__label {
  font-family: var(--font-display);
  letter-spacing: .2em;
  color: var(--olive-700);
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.couple__names {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 12vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--gold-600);
  display: flex; flex-wrap: wrap; gap: .35em;
  justify-content: center; align-items: baseline;
  margin-bottom: 14px;
}
.couple__names i {
  font-style: italic; font-weight: 500;
  font-size: .45em; color: var(--olive-700);
}
.couple__date {
  color: var(--olive-700);
  font-size: 1.2rem;
  margin-bottom: 28px;
}

.countdown {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.countdown__item {
  min-width: 68px;
  padding: 12px 8px 10px;
  border: 1px solid var(--gold-300);
  background: #fff;
  border-radius: 12px;
  display: grid; gap: 2px;
}
.countdown__item span {
  font-family: var(--font-en);
  font-size: 1.7rem; font-weight: 600;
  color: var(--olive-800); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__item small { font-size: .75rem; color: var(--ink-soft); }
.countdown__done {
  margin-top: 16px;
  font-family: var(--font-display);
  color: var(--gold-600);
  font-size: 1.25rem;
}

/* Grove / verse */
.grove {
  min-height: 340px;
  display: grid; place-items: center;
  padding: 56px 24px;
  text-align: center;
  color: var(--linen-50);
  background:
    linear-gradient(180deg, rgba(36, 48, 26, .58), rgba(28, 36, 20, .68)),
    url("../assets/olive-grove.jpg") center / cover;
}
.grove__content { max-width: 560px; }
.grove__ar {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  color: var(--gold-300);
  margin-bottom: 16px;
}
.grove blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.8vw, 1.3rem);
  line-height: 2;
}
.grove cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--gold-300);
}

/* Framed sections */
.frame {
  display: grid;
  grid-template-columns: 22px 1fr 22px;
  max-width: 900px;
  margin: 0 auto;
}
.frame__rail {
  background: url("../assets/tatreez-band-olive.svg") center top / 56px auto repeat-y;
  opacity: .5;
}
.frame__rail:first-child { transform: rotate(180deg); }
.frame__main {
  padding: 48px 18px 56px;
  background:
    url("../assets/tatreez-tile-olive.svg") center / 110px repeat,
    var(--linen-50);
}
.rsvp .frame__main {
  background:
    url("../assets/tatreez-tile-olive.svg") center / 110px repeat,
    linear-gradient(180deg, #fff, var(--linen-100));
}

.eyebrow {
  text-align: center;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-size: .95rem;
  margin-bottom: 6px;
}
.section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 700;
  color: var(--olive-800);
  margin-bottom: 8px;
}
.section-lead {
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.venue {
  text-align: center;
  background: #fff;
  border: 1px solid var(--linen-200);
  border-radius: 18px;
  padding: 28px 20px;
  box-shadow: 0 18px 40px -28px rgba(36,48,26,.4);
  position: relative;
}
.venue::before {
  content: "";
  position: absolute; inset: 8px;
  border: 1px solid rgba(201,164,74,.35);
  border-radius: 12px; pointer-events: none;
}
.venue__icon {
  width: 68px; height: 68px; margin: 0 auto 12px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold-300);
  background: linear-gradient(145deg, var(--olive-700), var(--olive-950));
  box-shadow: 0 10px 22px -10px rgba(36,48,26,.55);
}
.venue__icon svg { width: 34px; height: 34px; }
.venue__kicker {
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-size: .85rem;
  margin-bottom: 4px;
}
.venue h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--olive-800);
  margin-bottom: 18px;
}

.meta-icons {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
  text-align: start;
}
.meta-icons li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--linen-50);
  border: 1px solid var(--linen-200);
}
.meta-icons__ico {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold-500);
  background: #fff;
  border: 1px solid var(--gold-300);
}
.meta-icons__ico svg { width: 24px; height: 24px; }
.meta-icons strong {
  display: block;
  color: var(--olive-800);
  font-size: .98rem;
}
.meta-icons span {
  display: block;
  color: var(--ink-soft);
  font-size: .9rem;
}

.actions { display: flex; justify-content: center; margin-top: 20px; }
.notice {
  margin: 24px auto 0;
  max-width: 520px;
  text-align: center;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--gold-100);
  border: 1px dashed var(--gold-500);
  color: var(--olive-800);
  font-size: .95rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px;
  border-radius: 4px; border: 1.5px solid transparent;
  font-weight: 700; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s ease;
}
.btn__ico { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 3px; }
.btn--gold {
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500) 55%, var(--gold-600));
  color: var(--olive-950);
  box-shadow: 0 12px 28px -14px rgba(180,143,58,.7);
}
.btn--olive {
  background: var(--olive-800);
  color: var(--linen-50);
  box-shadow: 0 12px 28px -14px rgba(36,48,26,.55);
}
.btn--outline {
  background: #fff;
  border-color: var(--olive-700);
  color: var(--olive-800);
}
.btn--text {
  background: none; border: 0;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 500; min-height: auto; padding: 8px;
}
.btn--block { width: 100%; }
.btn__spinner {
  display: none; width: 18px; height: 18px; margin-inline-start: 8px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite;
}
.btn.is-loading .btn__text { opacity: .65; }
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* RSVP */
.rsvp-form, .rsvp-success {
  max-width: 520px; margin: 0 auto;
  background: #fff;
  border: 1px solid var(--linen-200);
  border-radius: 16px;
  padding: 26px 22px;
  box-shadow: 0 18px 40px -28px rgba(36,48,26,.35);
}
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label, .field legend { font-weight: 700; color: var(--olive-800); font-size: .95rem; }
.field .optional { font-weight: 400; color: var(--ink-soft); font-size: .85rem; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="number"],
.field textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--linen-200);
  border-radius: 8px; background: var(--linen-50);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(201,164,74,.18);
}
.field textarea { resize: vertical; min-height: 90px; }
.field__error { display: none; color: #a4382b; font-size: .85rem; }
.field.has-error input { border-color: #c75341; }
.field.has-error .field__error { display: block; }
fieldset.field { border: 0; padding: 0; margin-inline: 0; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .choice { grid-template-columns: 1fr; } }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 12px 10px;
  border: 1.5px solid var(--linen-200); border-radius: 8px;
  background: var(--linen-50); cursor: pointer; font-weight: 500;
}
.choice input:checked + label {
  border-color: var(--olive-700);
  background: rgba(47,59,31,.08);
  color: var(--olive-900); font-weight: 700;
}
.stepper {
  direction: ltr;
  display: inline-grid;
  grid-template-columns: 48px 80px 48px;
  border: 1.5px solid var(--linen-200);
  border-radius: 8px; overflow: hidden; background: var(--linen-50);
}
.stepper__btn { border: 0; background: transparent; font-size: 1.35rem; color: var(--olive-800); cursor: pointer; }
.stepper__btn:hover { background: var(--gold-100); }
.stepper input {
  text-align: center; border: 0 !important;
  background: transparent !important; box-shadow: none !important; font-weight: 700;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#guestsField.is-hidden { display: none; }
.rsvp-form__error { margin-top: 10px; color: #a4382b; text-align: center; font-size: .92rem; }

.rsvp-success {
  text-align: center;
  display: grid; justify-items: center; gap: 10px;
}
.rsvp-success__icon {
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-600));
}
.rsvp-success__icon svg {
  width: 30px; height: 30px;
  fill: none; stroke: var(--olive-950); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.rsvp-success h3 {
  font-family: var(--font-display);
  font-size: 1.7rem; color: var(--olive-800);
}
.rsvp-success p { color: var(--ink-soft); max-width: 34ch; }

/* Location footer */
.location {
  text-align: center;
  padding: 48px 20px 64px;
  background:
    url("../assets/tatreez-tile-gold.svg") center / 96px repeat,
    linear-gradient(180deg, var(--olive-800), var(--olive-950));
  color: var(--linen-50);
}
.location__map {
  width: min(100%, 320px);
  margin: 0 auto 22px;
  border: 1px solid rgba(201,164,74,.45);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px -20px rgba(0,0,0,.5);
}
.location__meta {
  display: grid; gap: 12px; justify-items: center;
  margin-bottom: 22px;
}
.location__meta li {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold-100); font-weight: 500;
}
.location__meta svg {
  width: 22px; height: 22px;
  color: var(--gold-500);
  flex: none;
}
.location .btn { margin-bottom: 28px; }
.location__closing {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.5vw, 1.55rem);
  color: var(--gold-100);
  margin-bottom: 10px;
}
.location__families { color: var(--gold-300); font-weight: 700; }
.location__families span { margin: 0 10px; font-size: .75em; }

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

@media (min-width: 768px) {
  .frame { grid-template-columns: 36px 1fr 36px; }
  .frame__main { padding: 64px 48px 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
