:root {
  --green-950: #06110c;
  --green-900: #0b1f16;
  --green-800: #123526;
  --green-700: #1a4732;
  --gold: #d4af5a;
  --gold-soft: #e9d5a1;
  --gold-deep: #a37f34;
  --cream: #f6efdd;
  --ink: #1c1a16;
  --muted: #b9c7be;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Tajawal", system-ui, sans-serif;
  background: var(--green-950);
  color: var(--cream);
  line-height: 1.8;
}

/* ===== غلاف الافتتاح ===== */
.envelope {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212,175,90,.18), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(212,175,90,.10), transparent 55%),
    var(--green-950);
  cursor: pointer;
  transition: opacity .7s ease, visibility .7s;
}
.envelope.opened { opacity: 0; visibility: hidden; pointer-events: none; }

.env-card {
  text-align: center;
  padding: 3rem 2rem;
  border: 1px solid rgba(212,175,90,.45);
  border-radius: 18px;
  background: linear-gradient(160deg, var(--green-900), var(--green-800));
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 60px rgba(212,175,90,.06);
  max-width: 340px;
  width: calc(100% - 3rem);
  animation: envFloat 3.5s ease-in-out infinite;
}
@keyframes envFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }

.env-ornament { color: var(--gold); font-size: 2rem; opacity: .8; }
.env-bism { font-family: "Amiri", serif; color: var(--gold-soft); font-size: 1.05rem; margin-top: .5rem; }
.env-title {
  font-family: "Aref Ruqaa", serif;
  font-size: 4rem;
  color: var(--gold);
  margin: .75rem 0 .25rem;
  text-shadow: 0 2px 20px rgba(212,175,90,.35);
}
.env-sub { color: var(--muted); font-size: .95rem; }
.env-open {
  display: inline-block;
  margin-top: 1.5rem;
  padding: .6rem 1.6rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-weight: 500;
  font-size: .95rem;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(212,175,90,.35) } 50% { box-shadow: 0 0 0 12px rgba(212,175,90,0) } }

/* ===== الصفحة ===== */
.hidden { display: none !important; }

.invite {
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: 2rem;
  background:
    radial-gradient(ellipse at 50% -5%, rgba(212,175,90,.14), transparent 55%),
    var(--green-950);
  animation: fadeUp .9s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px) } to { opacity: 1; transform: none } }

.demo-ribbon {
  background: var(--gold);
  color: var(--green-950);
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  padding: .35rem .5rem;
  letter-spacing: .02em;
}

.hero {
  text-align: center;
  padding: 2.75rem 1.5rem 2.25rem;
  border-bottom: 1px solid rgba(212,175,90,.22);
}
.bism { font-family: "Amiri", serif; color: var(--gold-soft); font-size: 1.15rem; }
.verse {
  font-family: "Amiri", serif;
  color: var(--gold-soft);
  opacity: .85;
  font-size: 1rem;
  margin: .9rem auto 0;
  max-width: 30ch;
}
.names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .9rem;
  margin: 1.75rem 0 .5rem;
}
.name {
  font-family: "Aref Ruqaa", serif;
  font-size: 3.1rem;
  color: var(--gold);
  text-shadow: 0 2px 24px rgba(212,175,90,.3);
}
.amp { color: var(--gold-deep); font-size: 2rem; font-family: "Amiri", serif; }
.invite-line { color: var(--cream); opacity: .9; font-size: 1.02rem; max-width: 34ch; margin: 0 auto; }

.hero-facts {
  display: grid;
  gap: .75rem;
  margin-top: 1.75rem;
}
.hf {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(212,175,90,.35);
  border-radius: 14px;
  background: rgba(212,175,90,.06);
}
.hf-label { color: var(--gold); font-size: .8rem; font-weight: 700; }
.hf-value { font-size: 1.05rem; font-weight: 500; }

.music-btn {
  margin-top: 1.5rem;
  background: none;
  border: 1px solid rgba(212,175,90,.5);
  color: var(--gold-soft);
  border-radius: 999px;
  padding: .5rem 1.3rem;
  font-family: inherit;
  font-size: .9rem;
  cursor: pointer;
}
.music-btn[aria-pressed="true"] { background: rgba(212,175,90,.15); border-color: var(--gold); }

/* ===== الأقسام ===== */
.section { padding: 2.25rem 1.5rem; border-bottom: 1px solid rgba(212,175,90,.14); text-align: center; }
.sec-title {
  font-family: "Aref Ruqaa", serif;
  color: var(--gold);
  font-size: 1.7rem;
  margin-bottom: 1.25rem;
}
.muted { color: var(--muted); font-size: .95rem; max-width: 40ch; margin: 0 auto 1.25rem; }
.tiny-note { color: var(--muted); opacity: .75; font-size: .78rem; margin-top: 1rem; }

/* العداد */
.countdown {
  display: flex;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
}
.cd {
  min-width: 70px;
  padding: .8rem .4rem;
  border: 1px solid rgba(212,175,90,.35);
  border-radius: 12px;
  background: rgba(212,175,90,.05);
  display: flex;
  flex-direction: column;
}
.cd-num { font-size: 1.6rem; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.cd-label { font-size: .75rem; color: var(--muted); }

/* البرنامج */
.timeline { list-style: none; max-width: 340px; margin: 0 auto; text-align: start; }
.timeline li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem .25rem;
  border-bottom: 1px dashed rgba(212,175,90,.25);
}
.timeline li:last-child { border-bottom: none; }
.t-time { color: var(--gold); font-weight: 800; min-width: 64px; font-variant-numeric: tabular-nums; }
.t-what { font-size: 1rem; }

/* الأزرار */
.btn {
  display: inline-block;
  background: linear-gradient(160deg, var(--gold), var(--gold-deep));
  color: var(--green-950);
  font-weight: 800;
  font-size: 1rem;
  padding: .85rem 2rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  box-shadow: 0 8px 24px rgba(212,175,90,.25);
  transition: transform .15s ease;
}
.btn:active { transform: scale(.97); }
.btn.ghost {
  background: none;
  color: var(--gold);
  border: 1px solid var(--gold);
  box-shadow: none;
}
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* النماذج */
.form { display: grid; gap: 1rem; max-width: 360px; margin: 0 auto; text-align: start; }
.fld { display: grid; gap: .35rem; }
.fld span { font-size: .88rem; color: var(--gold-soft); font-weight: 500; }
.fld input, .fld select, .fld textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: .75rem .9rem;
  border-radius: 10px;
  border: 1px solid rgba(212,175,90,.4);
  background: rgba(255,255,255,.05);
  color: var(--cream);
}
.fld input::placeholder, .fld textarea::placeholder { color: rgba(246,239,221,.35); }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.fld select option { color: var(--ink); }

.choice-row { display: flex; gap: .6rem; }
.choice { flex: 1; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block;
  text-align: center;
  padding: .7rem .5rem;
  border: 1px solid rgba(212,175,90,.4);
  border-radius: 10px;
  cursor: pointer;
  font-size: .95rem;
  transition: all .15s;
}
.choice input:checked + span { background: rgba(212,175,90,.18); border-color: var(--gold); color: var(--gold); font-weight: 700; }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 1px; }

.done {
  max-width: 360px;
  margin: 0 auto;
  padding: 1.25rem;
  border: 1px solid var(--gold);
  border-radius: 14px;
  background: rgba(212,175,90,.08);
  display: grid;
  gap: .9rem;
}

/* دفتر التهاني */
.gb-list { list-style: none; display: grid; gap: .75rem; max-width: 400px; margin: 1.5rem auto 0; text-align: start; }
.gb-list li {
  padding: .85rem 1rem;
  border: 1px solid rgba(212,175,90,.25);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}
.gb-name { color: var(--gold); font-weight: 700; font-size: .9rem; display: block; }
.gb-msg { font-size: .95rem; }

/* الطلب */
.order { background: linear-gradient(180deg, rgba(212,175,90,.07), transparent); }
.steps { text-align: start; max-width: 400px; margin: 0 auto 1.5rem; padding-inline-start: 1.4rem; display: grid; gap: .5rem; color: var(--cream); }
.steps li::marker { color: var(--gold); font-weight: 800; }

.footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  color: var(--muted);
  font-size: .85rem;
}
.sig { font-family: "Aref Ruqaa", serif; color: var(--gold); font-size: 1.1rem; margin-top: .35rem; }

@media (min-width: 480px) {
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .name { font-size: 3.6rem; }
}
