/* Alkaautsar landing page. Values from brand/tokens.ts (style v0.1, motion v0.2): theme Nur on a night stage,
   gold as the brand thread, Outfit speaks, Lora quotes, Amiri for Arabic names. Nothing here is a new brand value. */
:root {
  --bg0: #000C05; --bg1: #01180C; --surface: #062E1D; --ink: #134B32; --signal: #42A878; --glowG: #A2DABB;
  --gold: #D3AB3A; --goldGlow: #EACF83; --text: #F4EEDC; --muted: #98AA9F; --noor: #FFF6D8;
  --paper: #F6F1E4; --em: #0B4733;
  --ease-enter: cubic-bezier(.16, 1, .3, 1); /* motion.ease.enter */
  --ease-move: cubic-bezier(.65, 0, .35, 1); /* motion.ease.move */
  --enter: 600ms; /* motion.enter.dur 18 f @ 30 fps */
  --voice: "Outfit", system-ui, sans-serif; --quote: "Lora", Georgia, serif; --arabic: "Amiri", serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg0); color: var(--text); font: 400 17px/1.65 var(--voice); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 48px); margin: 0 auto; }

/* Label = tokens.type.label: Outfit 600, upper, wide tracking */
.label { font-weight: 600; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.label.gold { color: var(--gold); }
h2 { font-weight: 800; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.08; letter-spacing: -.015em; margin-top: 14px; text-wrap: balance; }
h3 { font-weight: 700; font-size: 20px; line-height: 1.25; }
.lead { color: var(--muted); font-size: 18px; max-width: 34em; margin-top: 16px; }
.center { text-align: center; } .center .lead { margin-inline: auto; }
.sd { display: inline-block; vertical-align: middle; }
.sd svg { display: block; }

/* ── Top bar ── */
.top { position: fixed; inset: 0 0 auto; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px); transition: background .3s, box-shadow .3s; }
.top.solid { background: rgba(1, 24, 12, .86); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(211, 171, 58, .14); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; opacity: 0; transition: opacity .3s; }
.top.solid .brand { opacity: 1; }
.brand .wm { width: 112px; }
.top nav { display: flex; gap: clamp(14px, 3vw, 30px); align-items: center; }
.top nav a { text-decoration: none; font-weight: 600; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.top nav a:hover { color: var(--text); }
.top nav a.nav-cta { color: var(--bg0); background: var(--gold); padding: 8px 16px; border-radius: 999px; }
.top nav a.nav-cta:hover { background: var(--goldGlow); color: var(--bg0); }

/* ── Hero: the night stage (stageBackground: surface at center → bg1 → bg0) ── */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; text-align: center;
  background: radial-gradient(120% 80% at 50% 45%, var(--surface) 0%, var(--bg1) 45%, var(--bg0) 100%); padding: 110px 24px 90px; }
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* Three star layers, each larger than the hero so a slow drift never shows an edge. Near layers move further. */
.sky .layer { position: absolute; inset: -70px; will-change: transform; }
.sky .far { animation: driftA 70s ease-in-out infinite alternate; }
.sky .mid { animation: driftB 52s ease-in-out infinite alternate; }
.sky .near { animation: driftC 40s ease-in-out infinite alternate; }
.sky i { position: absolute; width: var(--z); height: var(--z); border-radius: 50%; background: #A2DABB; opacity: var(--a);
  animation: twinkle var(--d) ease-in-out var(--o) infinite; }
.sky i.gold { background: #EACF83; box-shadow: 0 0 4px rgba(234, 207, 131, .7); }
/* Glints: a few gold stars that swell and catch the light, with two soft rays */
.sky i.glint { animation-name: glint; box-shadow: 0 0 6px 1px rgba(234, 207, 131, .75), 0 0 14px rgba(211, 171, 58, .35); }
.sky i.glint::before, .sky i.glint::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 1px; translate: -50% -50%;
  background: linear-gradient(90deg, transparent, rgba(255, 246, 216, .85), transparent); }
.sky i.glint::after { rotate: 90deg; }
.hero-in { position: relative; display: flex; flex-direction: column; align-items: center; }
.halo { position: absolute; top: -60px; left: 50%; width: 520px; height: 520px; translate: -50% 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 246, 216, .20) 0%, rgba(234, 207, 131, .14) 30%, rgba(211, 171, 58, .07) 55%, transparent 72%);
  animation: breathe 6s ease-in-out infinite; } /* motion.hold.glowBreathe: ±3 %, 6 s */
/* The lamp: a warmer core over the halo that flickers slightly and slowly, like a lamp flame. Uneven steps over 9.4 s
   (not a multiple of the 6 s breath, so the two never repeat in step); every change takes ≥ 0.8 s: no strobing. */
.halo::before { content: ""; position: absolute; inset: -30%; border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 207, 131, .10) 0%, rgba(211, 171, 58, .05) 40%, transparent 68%);
  animation: wash 6s ease-in-out infinite; }
.halo::after { content: ""; position: absolute; inset: 14%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 216, .22) 0%, rgba(234, 207, 131, .12) 38%, transparent 70%);
  animation: flicker 9.4s ease-in-out infinite; }
.mark { width: clamp(170px, 24vw, 250px); filter: drop-shadow(0 0 8px rgba(234, 207, 131, .35)) drop-shadow(0 0 24px rgba(234, 207, 131, .18)); }
/* The mark breathes after it has risen (motion.hold.breathe: ±1.2 %, 4.5 s), its glow with it. */
.hero .mark.rise { animation: rise var(--enter) var(--ease-enter) .1s forwards, markBreathe 4.5s ease-in-out .7s infinite; }
.hero h1 { margin-top: 26px; }
.hero h1 img { width: clamp(230px, 34vw, 400px); }
.tag { font: italic 500 clamp(19px, 2.3vw, 25px)/1.4 var(--quote); color: var(--text); max-width: 26em; margin-top: 22px; text-wrap: balance; }
.hero .label { margin-top: 18px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.ctas { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  transition: transform .25s var(--ease-enter), background .2s, box-shadow .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.gold { background: var(--gold); color: var(--bg0); box-shadow: 0 0 24px rgba(211, 171, 58, .28); }
.btn.gold:hover { background: var(--goldGlow); box-shadow: 0 0 34px rgba(234, 207, 131, .4); }
.btn.ghost { border: 1.5px solid rgba(211, 171, 58, .5); color: var(--text); }
.btn.ghost:hover { border-color: var(--gold); }
.scroll { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 1.5px solid rgba(152, 170, 159, .5); border-radius: 14px; }
.scroll span { position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: drip 2.4s var(--ease-move) infinite; }

/* ── About ── */
section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.about { background: var(--bg1); }
.two { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 6vw, 90px); align-items: start; }
.about p:not(.label) { font-size: 19px; color: #DCD6C4; }
.about p + p { margin-top: 18px; }
.about em { font-family: var(--quote); color: var(--goldGlow); }

/* ── Programs ── */
.programs { background: radial-gradient(90% 60% at 50% 0%, var(--surface) 0%, var(--bg1) 50%, var(--bg0) 100%); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 54px; }
.prog { --c: var(--signal); position: relative; padding: 26px 24px 26px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, var(--s, #062E1D) 0%, var(--b, #01180C) 70%); border: 1px solid rgba(244, 238, 220, .07);
  transition: transform .35s var(--ease-enter), border-color .3s; }
.prog:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.prog::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--gold), var(--c)); }
.prog .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.prog .code { font-weight: 700; font-size: 12px; letter-spacing: .24em; color: var(--c); }
.prog .ar { font: 700 26px/1.2 var(--arabic); color: var(--gold); direction: rtl; }
.prog h3 { margin-top: 14px; }
.prog .sub { font: italic 400 15px/1.4 var(--quote); color: var(--muted); margin-top: 2px; }
.prog p.d { font-size: 15.5px; line-height: 1.55; color: #D2CCBA; margin-top: 12px; }
.prog .chip { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); padding: 4px 10px; border-radius: 999px; }
.prog.qirtas { --s: #F9F9F4; --b: #EDE6D3; --c: #0B4733; border-color: transparent; color: var(--em); }
.prog.qirtas .ar { color: #8A6000; } .prog.qirtas .sub { color: #5E6F66; } .prog.qirtas p.d { color: #2D4A3C; }
.prog.qirtas::before { background: linear-gradient(90deg, #D3AB3A, #0B4733); }

/* ── Sources ── */
.sources { background: var(--bg1); }
.rules { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 48px; margin-top: 54px; }
.rules li { display: flex; gap: 18px; padding: 26px 0; border-top: 1px solid rgba(211, 171, 58, .2); }
.rules .sd { margin-top: 4px; flex: none; }
.rules p { color: #CFC9B7; margin-top: 8px; }
.ref { font-family: var(--quote); font-style: italic; color: var(--goldGlow); white-space: nowrap; }

/* ── Follow ── */
.follow { background: radial-gradient(100% 80% at 50% 100%, var(--surface) 0%, var(--bg1) 50%, var(--bg0) 100%); overflow: hidden; }
.lattice { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .045; } /* Seal Pattern 3–5% (brand/05) */
.follow .wrap { position: relative; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 50px; }
.card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px 28px; border-radius: 18px; text-decoration: none;
  background: rgba(6, 46, 29, .55); border: 1px solid rgba(211, 171, 58, .22);
  transition: transform .35s var(--ease-enter), border-color .25s, background .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); border-color: var(--gold); background: rgba(6, 46, 29, .85); box-shadow: 0 0 30px rgba(211, 171, 58, .14); }
.card svg { width: 38px; height: 38px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.card svg .f { fill: var(--gold); stroke: none; }
.card .pf { font-weight: 600; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.card .hd { font-weight: 700; font-size: 19px; }

/* ── Footer ── */
.foot { background: var(--bg0); border-top: 1px solid rgba(211, 171, 58, .14); padding: 40px 0; }
.foot .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot p { color: var(--muted); font-size: 14px; flex: 1; min-width: 240px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; }
.foot nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.foot nav a:hover { color: var(--gold); }

/* ── Motion: fade + rise with the enter ease (brand/10). ── */
.rise { opacity: 0; transform: translateY(24px); animation: rise var(--enter) var(--ease-enter) forwards; }
.hero-in .rise:nth-child(2) { animation-delay: .1s; }
.hero-in .rise:nth-child(3) { animation-delay: .3s; }
.hero-in .rise:nth-child(4) { animation-delay: .5s; }
.hero-in .rise:nth-child(5) { animation-delay: .7s; }
.hero-in .rise:nth-child(6) { animation-delay: .9s; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--enter) var(--ease-enter), transform var(--enter) var(--ease-enter); }
.reveal.in { opacity: 1; transform: none; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { scale: 1; opacity: .82; } 50% { scale: 1.03; opacity: 1; } }
@keyframes wash { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes flicker {
  0%, 100% { opacity: .78; scale: 1; }
  11% { opacity: .95; scale: 1.015; }
  20% { opacity: .7; }
  34% { opacity: 1; scale: 1.025; }
  45% { opacity: .82; scale: 1.005; }
  53% { opacity: .9; }
  66% { opacity: .62; scale: .99; }
  78% { opacity: .97; scale: 1.02; }
  89% { opacity: .74; }
}
@keyframes markBreathe {
  0%, 100% { scale: 1; filter: drop-shadow(0 0 8px rgba(234, 207, 131, .30)) drop-shadow(0 0 24px rgba(234, 207, 131, .14)); }
  50% { scale: 1.012; filter: drop-shadow(0 0 10px rgba(234, 207, 131, .46)) drop-shadow(0 0 30px rgba(234, 207, 131, .26)); }
}
@keyframes drip { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes twinkle { 0%, 100% { opacity: var(--a); } 45% { opacity: calc(var(--a) * .2); } 70% { opacity: calc(var(--a) * .75); } }
@keyframes glint { 0%, 100% { opacity: .15; scale: .5; } 40% { opacity: 1; scale: 1.15; } 55% { opacity: .85; scale: 1; } 80% { opacity: .3; scale: .7; } }
@keyframes driftA { from { translate: -14px 8px; } to { translate: 16px -10px; } }
@keyframes driftB { from { translate: 22px 12px; } to { translate: -24px -14px; } }
@keyframes driftC { from { translate: -34px -16px; } to { translate: 36px 18px; } }



@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .two, .rules { grid-template-columns: 1fr; }
  .rules { gap: 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .top nav a:not(.nav-cta) { display: none; }
  .halo { width: 380px; height: 380px; top: -40px; }
}
.hon { font-family: var(--arabic); font-size: 1.2em; line-height: 1; font-weight: 400; }
@media (max-width: 600px) { .hero .label .sd { display: none; } .hero .label { gap: 4px 12px; } }
.nw { white-space: nowrap; }
