/* ══════════════════════════════════════════════════════
   TEMPLATE-11 — Nuit de Jasmin · Henné de Leila & Mehdi
   Palette : Or · Terracotta · Bordeaux · Crème
   ══════════════════════════════════════════════════════ */

/* ── 0. Reset & Tokens ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:   #c9a96e;
  --gold2:  #dfc28c;
  --gold3:  #f0dbb0;
  --gold4:  #faf3e0;
  --terra:  #c0693a;
  --terra2: #d4895a;
  --terra3: #edcbb2;
  --bord:   #7b2d42;
  --bord2:  #a0445c;
  --cream:  #fdf8f0;
  --dark:   #1e0e08;
  --dark2:  #3a1c10;
  --ink:    #2c1810;
  --ink2:   #4a2e20;
  --muted:  rgba(44,24,16,.55);
  --line:   rgba(201,169,110,.25);

  --shadow-sm: 0 4px 20px rgba(44,24,16,.08);
  --shadow-md: 0 12px 40px rgba(44,24,16,.13);
  --shadow-lg: 0 24px 70px rgba(44,24,16,.18);

  --serif: 'Cormorant Garamond', Georgia, serif;
  --script:'Great Vibes', cursive;
  --sans:  'Jost', system-ui, sans-serif;

  --r:  18px;
  --r2: 12px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a   { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── 1. Intro ── */
.intro {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: radial-gradient(ellipse at center, #3a1c10 0%, #1e0e08 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#arabesque-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.intro-dissolve {
  position: absolute;
  inset: 0;
  background: var(--cream);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}
.intro-dissolve.active { opacity: 1; }

.intro-content {
  position: relative;
  text-align: center;
  padding: 40px 32px;
  animation: fade-in-up .9s var(--ease) both;
}
.intro-ornament {
  font-size: 44px;
  margin-bottom: 16px;
  animation: pulse-gold 3s ease-in-out infinite;
}
.intro-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold2);
  margin-bottom: 14px;
  animation: fade-in-up .9s .1s var(--ease) both;
}
.intro-names {
  font-family: var(--script);
  font-size: clamp(52px, 12vw, 82px);
  color: var(--gold2);
  line-height: 1;
  margin-bottom: 6px;
  animation: fade-in-up .9s .18s var(--ease) both;
  text-shadow: 0 2px 20px rgba(201,169,110,.4);
}
.intro-sub {
  font-family: var(--serif);
  font-size: clamp(14px, 3vw, 18px);
  font-style: italic;
  color: rgba(253,243,224,.75);
  margin-bottom: 32px;
  animation: fade-in-up .9s .26s var(--ease) both;
}
.intro-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  animation: fade-in-up .9s .30s var(--ease) both;
}
.intro-divider::before,
.intro-divider::after {
  content: '';
  width: 48px;
  height: 1px;
  background: var(--gold);
  opacity: .5;
}
.intro-divider span { color: var(--gold); font-size: 14px; }

#reveal-btn {
  position: relative;
  padding: 14px 36px;
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 40px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold2);
  cursor: pointer;
  overflow: hidden;
  transition: color .3s;
  animation: fade-in-up .9s .38s var(--ease) both;
}
#reveal-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
  z-index: 0;
}
#reveal-btn span { position: relative; z-index: 1; }
#reveal-btn:hover::before { transform: scaleX(1); }
#reveal-btn:hover { color: var(--dark); }

/* ── 2. Main ── */
#main { min-height: 100vh; }

/* ── 3. Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .4s, box-shadow .4s, padding .3s;
}
.nav.scrolled {
  background: rgba(253,248,240,.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(44,24,16,.08);
  padding: 12px 28px;
}
.nav__logo {
  font-family: var(--script);
  font-size: 28px;
  color: var(--gold);
}
.nav__links { display: flex; gap: 32px; list-style: none; }
.nav__links a {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink2);
  transition: color .25s;
}
.nav__links a:hover { color: var(--terra); }
.nav__cta {
  padding: 9px 22px;
  background: var(--gold);
  border-radius: 30px;
  color: #1e0e08 !important;
  font-weight: 500;
  font-size: 12px !important;
}
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s, opacity .3s;
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: 0; right: -100%;
  width: min(340px, 90vw);
  height: 100%;
  background: var(--cream);
  z-index: 600;
  padding: 70px 36px 40px;
  transition: right .38s var(--ease);
  box-shadow: -8px 0 40px rgba(44,24,16,.15);
}
.nav-drawer.open { right: 0; }
.nav-drawer__close {
  position: absolute;
  top: 20px; right: 20px;
  background: none; border: none;
  font-size: 24px;
  color: var(--ink2);
  cursor: pointer;
}
.nav-drawer__links { list-style: none; }
.nav-drawer__links li { border-bottom: 1px solid var(--line); }
.nav-drawer__links a {
  display: block;
  padding: 16px 0;
  font-size: 16px;
  letter-spacing: .06em;
  color: var(--ink);
}
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,24,16,.4);
  z-index: 550;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.nav-overlay.visible { opacity: 1; pointer-events: auto; }

/* ── 4. Audio ── */
.audio-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--gold3);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: var(--gold);
  transition: box-shadow .2s, transform .2s;
}
.audio-btn:hover { box-shadow: var(--shadow-md); transform: scale(1.05); }

/* ── 5. Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#hero-bg {
  width: 100%;
  height: 115%;
  background: radial-gradient(ellipse at 30% 40%, #3a1c10 0%, #1e0e08 100%);
  position: relative;
}
/* Geometric Islamic pattern overlay */
#hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(201,169,110,.04) 0, rgba(201,169,110,.04) 1px, transparent 1px, transparent 50%),
    repeating-linear-gradient(-45deg, rgba(201,169,110,.04) 0, rgba(201,169,110,.04) 1px, transparent 1px, transparent 50%);
  background-size: 40px 40px;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(30,14,8,.1) 0%, rgba(30,14,8,.4) 100%);
}
/* Wave bottom */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 700px;
}
.hero-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold2);
  margin-bottom: 16px;
  opacity: .9;
}
.hero-names {
  font-family: var(--script);
  font-size: clamp(64px, 15vw, 110px);
  color: var(--gold2);
  line-height: 1.05;
  margin-bottom: 8px;
  text-shadow: 0 4px 30px rgba(201,169,110,.3);
}
.hero-event {
  font-family: var(--serif);
  font-size: clamp(16px, 3vw, 22px);
  font-style: italic;
  color: rgba(253,243,224,.85);
  margin-bottom: 28px;
}
.hero-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 28px;
}
.hero-divider::before,
.hero-divider::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: rgba(201,169,110,.4);
}
.hero-ornament { font-size: 22px; }
.hero-date {
  font-family: var(--serif);
  font-size: clamp(14px, 2.5vw, 18px);
  color: rgba(253,243,224,.85);
  letter-spacing: .08em;
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-date strong { color: var(--gold2); font-weight: 600; }

/* Countdown */
.countdown {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 44px;
}
.countdown__unit { text-align: center; }
.countdown__val {
  font-family: var(--serif);
  font-size: clamp(36px, 8vw, 52px);
  font-weight: 600;
  color: var(--gold2);
  line-height: 1;
  display: block;
}
.countdown__lbl {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(253,243,224,.5);
  margin-top: 4px;
}
.countdown__sep {
  font-family: var(--serif);
  font-size: 40px;
  color: var(--terra);
  align-self: flex-start;
  margin-top: 4px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 36px;
  background: var(--gold);
  border-radius: 40px;
  color: var(--dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: background .3s, transform .2s, box-shadow .2s;
  box-shadow: 0 8px 28px rgba(201,169,110,.4);
}
.hero-cta:hover {
  background: var(--gold2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201,169,110,.5);
}

/* Scroll hint */
.hero-scroll {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(253,243,224,.4);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-scroll__line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

/* ── 6. Sections ── */
section { padding: 80px 24px; }
.container { max-width: 820px; margin: 0 auto; }

.section-label {
  display: block;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(32px, 7vw, 52px);
  font-weight: 400;
  color: var(--dark2);
  line-height: 1.15;
  margin-bottom: 18px;
}
.section-title em { color: var(--terra); font-style: italic; }
.section-sub {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 520px;
}

/* ── 7. Invitation ── */
.invitation { background: var(--cream); text-align: center; }
.invitation__arabesque {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--gold);
}
.invitation__text {
  font-family: var(--serif);
  font-size: clamp(17px, 3.5vw, 23px);
  line-height: 1.9;
  color: var(--ink2);
  max-width: 620px;
  margin: 0 auto 32px;
}
.invitation__text em { color: var(--terra); font-style: italic; }
.invitation__text strong { color: var(--dark2); font-weight: 600; }
.invitation__bismi {
  font-family: var(--serif);
  font-size: clamp(22px, 5vw, 32px);
  font-style: italic;
  color: var(--gold);
  margin-bottom: 8px;
}
.invitation__bismi-sub {
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ── 8. Détails ── */
.details { background: var(--gold4); }
.details__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.detail-card {
  background: var(--cream);
  border-radius: var(--r);
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.detail-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.detail-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 18px;
  border: 1.5px solid var(--gold3);
}
.detail-card__label {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.detail-card__value {
  font-family: var(--serif);
  font-size: clamp(14px, 2.5vw, 17px);
  color: var(--dark2);
  line-height: 1.6;
}
.detail-card__value strong { font-weight: 600; display: block; font-size: 1.1em; }

/* ── 9. Ambiance ── */
.ambiance {
  background: var(--dark);
  color: rgba(253,243,224,.85);
  text-align: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}
.ambiance::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(60deg, rgba(201,169,110,.03) 0, rgba(201,169,110,.03) 1px, transparent 1px, transparent 60%),
    repeating-linear-gradient(-60deg, rgba(201,169,110,.03) 0, rgba(201,169,110,.03) 1px, transparent 1px, transparent 60%);
  background-size: 50px 50px;
}
.ambiance__inner { position: relative; max-width: 700px; margin: 0 auto; }
.ambiance__quote {
  font-family: var(--script);
  font-size: clamp(28px, 6vw, 46px);
  color: var(--gold2);
  margin-bottom: 16px;
  line-height: 1.4;
}
.ambiance__desc {
  font-family: var(--serif);
  font-size: clamp(15px, 3vw, 18px);
  font-style: italic;
  line-height: 1.9;
  opacity: .85;
  margin-bottom: 32px;
}
.ambiance__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.ambiance__tag {
  padding: 7px 18px;
  border: 1px solid rgba(201,169,110,.35);
  border-radius: 20px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--gold2);
}

/* ── 10. Programme ── */
.programme { background: var(--cream); }
.programme__steps {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.prog-step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 36px;
  position: relative;
}
.prog-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 46px;
  bottom: 0;
  width: 1px;
  background: var(--gold3);
}
.prog-step__dot {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold4);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}
.prog-step__body { padding-top: 8px; }
.prog-step__time {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 4px;
}
.prog-step__title {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--dark2);
  margin-bottom: 4px;
}
.prog-step__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── 11. Tenue ── */
.tenue {
  background: var(--gold4);
  text-align: center;
}
.tenue__card {
  display: inline-block;
  background: var(--cream);
  border-radius: var(--r);
  padding: 36px 48px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gold3);
  margin-top: 32px;
}
.tenue__icon { font-size: 40px; margin-bottom: 14px; }
.tenue__text {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink2);
  line-height: 1.7;
}
.tenue__text strong { color: var(--terra); }

/* ── 12. RSVP ── */
.rsvp { background: var(--cream); }
.rsvp__inner {
  max-width: 600px;
  margin: 0 auto;
  background: var(--gold4);
  border-radius: var(--r);
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--gold);
}
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gold3);
  border-radius: var(--r2);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
  outline: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Radio presence */
.presence-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.presence-opt { flex: 1; min-width: 140px; }
.presence-opt input { position: absolute; opacity: 0; pointer-events: none; }
.presence-opt__label {
  display: block;
  padding: 13px 18px;
  border: 1.5px solid var(--gold3);
  border-radius: var(--r2);
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  transition: border-color .25s, background .25s;
  color: var(--ink2);
  background: var(--cream);
}
.presence-opt input:checked + .presence-opt__label {
  border-color: var(--gold);
  background: var(--gold3);
  color: var(--dark);
  font-weight: 500;
}

/* Number input */
.number-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gold3);
  border-radius: var(--r2);
  overflow: hidden;
}
.number-input__btn {
  width: 44px;
  height: 48px;
  background: var(--gold3);
  border: none;
  font-size: 20px;
  color: var(--terra);
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.number-input__btn:hover { background: var(--gold2); }
.number-input input {
  flex: 1;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  height: 48px;
  outline: none;
  background: var(--cream);
}

/* Captcha */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.captcha-row .form-control { max-width: 80px; }
.captcha-question { font-size: 15px; color: var(--ink2); }
.captcha-question strong { color: var(--terra); font-weight: 600; }

/* Submit */
.btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 40px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s, transform .2s, box-shadow .2s;
  box-shadow: 0 8px 28px rgba(201,169,110,.4);
}
.btn-submit:hover:not(:disabled) {
  background: var(--terra);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(192,105,58,.35);
}
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.rsvp-feedback {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--r2);
  font-size: 14px;
  line-height: 1.6;
  display: none;
}
.rsvp-feedback.ok  { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; display: block; }
.rsvp-feedback.err { background: #fdecea; color: #c62828; border: 1px solid #f5c6c6; display: block; }

/* ── 13. Footer ── */
.footer {
  background: var(--dark2);
  color: rgba(253,243,224,.7);
  text-align: center;
  padding: 44px 24px;
}
.footer__names {
  font-family: var(--script);
  font-size: 38px;
  color: var(--gold2);
  margin-bottom: 8px;
}
.footer__event {
  font-size: 13px;
  letter-spacing: .12em;
  margin-bottom: 20px;
}
.footer__credit {
  font-size: 11px;
  opacity: .45;
  letter-spacing: .06em;
}
.footer__credit a { color: var(--gold2); }

/* ── 14. Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 15. Animations ── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-gold {
  0%, 100% { transform: scale(1); text-shadow: 0 0 20px rgba(201,169,110,.4); }
  50%       { transform: scale(1.08); text-shadow: 0 0 40px rgba(201,169,110,.7); }
}
@keyframes scroll-pulse {
  0%, 100% { opacity: .3; }
  50%       { opacity: 1; }
}

/* ── 16. Responsive ── */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .details__grid { grid-template-columns: 1fr; gap: 18px; }
  .rsvp__inner { padding: 32px 20px; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 60px 20px; }
  .tenue__card { padding: 28px 24px; }
}
@media (max-width: 480px) {
  .countdown { gap: 14px; }
  .countdown__sep { font-size: 28px; }
  .countdown__val { font-size: 32px; }
}
