/* ══════════════════════════════════════════════
   ayman.alomair.online — premium Saudi invitation
   Ivory · black ink · muted gold. Typography-led.
   ══════════════════════════════════════════════ */

:root {
  --ivory: #faf7ef;
  --ivory-deep: #f2ecdd;
  --gold: #a8842f;
  --gold-soft: #c8ab66;
  --ink: #26221a;
  --ink-mid: #453e2e;
  --ink-soft: #6b6250;
  --serif: "Aref Ruqaa", "Amiri", serif;
  --sans: "Noto Kufi Arabic", Tahoma, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--ink);
  line-height: 2;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* barely-there ambient warmth */
.ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(ellipse 55% 35% at 78% 8%, rgba(200,171,102,.06), transparent 70%),
    radial-gradient(ellipse 45% 30% at 18% 88%, rgba(168,132,47,.04), transparent 70%);
}

.page { max-width: 30rem; margin: 0 auto; padding: 0 1.4rem; }

/* ── First screen: the whole invitation ── */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 3rem 0 2.5rem;
}
.hero-inner { width: 100%; }

.bismillah {
  color: var(--gold); font-weight: 500;
  font-size: clamp(.95rem, 4vw, 1.05rem); margin-bottom: 1.6rem;
}

.hosts { margin-bottom: 1.5rem; }
.host-name {
  font-family: var(--serif); font-size: clamp(1.25rem, 6vw, 1.6rem);
  line-height: 1.9; color: var(--ink);
}
.host-amp { color: var(--gold); font-size: 1.1rem; line-height: 1.4; margin: .1rem 0; }
.invite-line {
  margin-top: .9rem; color: var(--ink-mid);
  font-size: clamp(.95rem, 4vw, 1.08rem);
}

/* THE dominant element */
.groom-hero {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(4.6rem, 24vw, 7rem);
  line-height: 1.3; color: var(--ink);
}
.groom-line2 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 6vw, 1.7rem);
  color: var(--ink-mid); margin-top: -.4rem;
}
.on-line { color: var(--ink-soft); font-size: 1rem; margin: .8rem 0 .2rem; }
.bride-name {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 7vw, 1.95rem);
  line-height: 1.85; color: var(--ink);
}

.rule { display: flex; justify-content: center; margin: 1.75rem auto 0; max-width: 12rem; }
.rule span { display: block; width: 100%; height: 1px; background: linear-gradient(to left, transparent, var(--gold-soft), transparent); }

.date-hero { font-size: clamp(1.15rem, 5.2vw, 1.4rem); font-weight: 600; margin-top: 1.7rem; }
.hijri-hero { font-size: clamp(.98rem, 4.2vw, 1.12rem); color: var(--ink-mid); margin-top: .1rem; }

.arch-foot { width: min(52vw, 190px); height: auto; margin-top: 2.2rem; opacity: .8; }

/* ── Details group: icon + text rows, hairline separators ── */
.details {
  max-width: 30rem; margin: 0 auto; padding: 2.4rem 1.4rem 1.6rem;
  border-top: 1px solid rgba(168,132,47,.28);
  text-align: right;
}
.fact {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.05rem 0;
}
.fact + .fact { border-top: 1px solid rgba(168,132,47,.16); }
.ic {
  width: 1.45rem; height: 1.45rem; flex-shrink: 0;
  color: var(--gold); margin-top: .45rem;
}
.fact-body { flex: 1; }
.fact-label {
  font-size: .82rem; letter-spacing: .18em; color: var(--gold);
  font-weight: 500; margin-bottom: .1rem;
}
.fact-value { font-size: clamp(1.02rem, 4.5vw, 1.2rem); font-weight: 600; line-height: 1.9; color: var(--ink); }
.fact-sub { font-weight: 400; color: var(--ink-soft); font-size: .92em; }

/* actions */
.actions { display: flex; gap: .7rem; justify-content: center; margin-top: 1.6rem; flex-wrap: wrap; }
.actions.secondary { margin-top: .8rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 2.1rem; border-radius: 2.2rem;
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid var(--gold);
  -webkit-tap-highlight-color: rgba(168,132,47,.18);
  touch-action: manipulation; width: 100%; max-width: 19rem;
  transition: background 150ms var(--ease), color 150ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(.97); background: var(--gold) !important; color: #fff !important; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn.solid { background: var(--gold); color: #fff; }
.btn.solid:hover { background: #8f6f26; border-color: #8f6f26; }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: rgba(168,132,47,.09); }
.btn.small { padding: .6rem 1.4rem; font-size: .88rem; font-weight: 500; width: auto; }

/* countdown: one quiet RTL line */
.countdown-wrap { text-align: center; margin-top: 1.9rem; }
.countdown { font-size: .95rem; color: var(--ink-soft); letter-spacing: .01em; }

/* portrait: restrained editorial block between details and closing */
.portrait {
  max-width: 30rem; margin: 1rem auto 0; padding: 1.5rem 1.4rem 2.5rem;
  border-top: 1px solid rgba(168,132,47,.22);
  text-align: center;
}
.portrait img {
  width: 76%; height: auto; display: block; margin: 0 auto;
  filter: saturate(.96);
}

/* ── Finale ── */
.finale { text-align: center; padding: 2.75rem 1.4rem calc(2rem + env(safe-area-inset-bottom, 0px) + 1.25rem); border-top: 1px solid rgba(168,132,47,.22); max-width: 30rem; margin: 0 auto; }
.duaa { font-family: var(--serif); font-size: clamp(1.12rem, 4.6vw, 1.32rem); line-height: 2.4; }
.welcome {
  font-family: var(--serif); font-size: clamp(1.75rem, 7.5vw, 2.2rem);
  color: var(--gold); font-weight: 700; margin-top: 1.3rem;
}

.site-footer { text-align: center; padding: 1.25rem 1rem 2.5rem; color: var(--ink-mid); font-size: .9rem; font-weight: 500; }

/* ── Reveal: opt-in enhancement only; content visible by default ── */
.js-io .reveal-pending { opacity: 0; transform: translateY(14px); }
.js-io .reveal-pending.in-view { opacity: 1; transform: none; transition: opacity 650ms var(--ease), transform 650ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .js-io .reveal-pending, .js-io .reveal-pending.in-view { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* larger phones / small tablets keep proportions */
@media (min-width: 26rem) {
  .page { max-width: 32rem; }
}
