/* Nahw Foundation site (ruwaidportfolio.online/nahw-foundation/): night-blue colours from the app */
:root {
  --bg: #0b1022;
  --ink: #e9edf9;
  --muted: #8d97b8;
  --line: rgb(255 255 255 / .1);
  --card: rgb(255 255 255 / .045);
  --accent: #9aa8ff;
  --accent-ink: #0b1022;
  --gold: #ffcc66;
  --raf: #ff8a8a;
  --nasb: #6fd6a8;
  --jarr: #7cc4ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 16px/1.6 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img { display: block; }
code { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; color: var(--ink); }

/* Slowly drifting background light */
.glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glow span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 24s ease-in-out infinite alternate; }
.glow span:nth-child(1) { background: rgb(110 125 255 / .45); top: -25vmax; right: -15vmax; }
.glow span:nth-child(2) { background: rgb(255 190 90 / .16); bottom: -30vmax; left: -20vmax; animation-delay: -12s; }
.glow span:nth-child(3) { background: rgb(80 200 160 / .14); top: 40%; left: 35%; width: 40vmax; height: 40vmax; animation-delay: -6s; }
@keyframes drift { to { transform: translate(-8vmax, 6vmax) scale(1.12); } }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 14px 20px; padding-top: max(14px, env(safe-area-inset-top));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color .2s; }
.links a:hover { color: var(--ink); }
.pill { text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); transition: border-color .2s; }
.pill:hover { border-color: var(--accent); }

/* Hero */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 40px 20px 80px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; min-height: calc(100vh - 70px);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--gold); background: rgb(255 204 102 / .1); border: 1px solid rgb(255 204 102 / .25);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgb(255 204 102 / .6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgb(255 204 102 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 204 102 / 0); } }
.eyebrow { margin: 0 0 14px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
h1, h2 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(52px, 8vw, 96px); line-height: .95; }
h1 em { color: var(--accent); }
.arabic { font-family: Amiri, "Noto Naskh Arabic", serif; font-weight: 700; font-size: clamp(30px, 4vw, 42px); line-height: 1.8; color: var(--gold); margin: 8px 0 0; text-align: left; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 30em; margin: 10px 0 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px var(--accent); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px var(--accent); }
.btn.ghost { border-color: var(--line); background: var(--card); }
.btn.ghost:hover { border-color: var(--accent); }
.btn span { transition: transform .2s; }
.btn:hover span { transform: translateX(3px); }
.meta { margin: 22px 0 0; font-size: 13px; color: var(--muted); }

/* Android phone illustration */
.stage { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.phone {
  --w: 300px;
  position: relative; width: var(--w); aspect-ratio: 390 / 844; padding: 9px;
  border-radius: 44px;
  background: linear-gradient(150deg, #3a4160, #151a2c 35%, #0d1120 65%, #2c3350);
  box-shadow: 0 0 0 1.5px #070a14 inset, 0 0 0 1px rgb(255 255 255 / .08), 0 50px 90px -30px rgb(40 50 140 / .55), 0 20px 30px -20px rgb(0 0 0 / .5);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-12px) rotate(.6deg); } }
.key { position: absolute; right: -3px; width: 4px; border-radius: 2px; background: linear-gradient(270deg, #10131f, #4a5274); }
.key.vol { top: 18%; height: 12%; }
.key.pwr { top: 34%; height: 7%; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #0e1328; isolation: isolate; }
.statusbar {
  position: absolute; inset: 0 0 auto; z-index: 3; height: 34px; display: flex; align-items: center; justify-content: space-between;
  padding: 4px 22px 0; background: #262c4a; color: #e9edf9; font: 600 12px/1 Inter, system-ui, sans-serif;
}
.cam { position: absolute; left: 50%; top: 9px; transform: translateX(-50%); width: 13px; height: 13px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px #1b2038; }
.icons { display: flex; gap: 5px; align-items: center; }
.icons svg { height: 10px; width: auto; fill: currentColor; }
.slides { position: absolute; inset: 34px 0 0; }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.04); transition: opacity .8s ease, transform 1.2s ease; }
.slide.on { opacity: 1; transform: none; }
.navbar { position: absolute; z-index: 3; bottom: 7px; left: 50%; transform: translateX(-50%); width: 100px; height: 4px; border-radius: 4px; background: rgb(255 255 255 / .45); pointer-events: none; }

.dots { display: flex; gap: 8px; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 8px; background: var(--line); cursor: pointer; transition: width .3s, background .3s; }
.dots button[aria-selected="true"] { width: 24px; background: var(--accent); }

/* Features */
.features { max-width: 1120px; margin: 0 auto; padding: 0 20px 50px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; scroll-margin-top: 80px; }
.feature { display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); transition: transform .3s, border-color .3s; }
.feature:hover { transform: translateY(-4px); border-color: rgb(154 168 255 / .35); }
.feature .ico { font-size: 22px; color: var(--accent); margin-bottom: 10px; font-family: Amiri, "Instrument Serif", serif; font-weight: 700; }
.feature b { font-weight: 600; }
.feature span:last-child { color: var(--muted); font-size: 14px; }

/* Raf' / Nasb / Jarr strip */
.legend-strip { max-width: 760px; margin: 0 auto; padding: 10px 20px 90px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; text-align: center; }
.case { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; border: 1px solid currentColor; background: var(--card); }
.case b { font-family: Amiri, serif; font-size: 24px; line-height: 1; }
.case.raf { color: var(--raf); } .case.nasb { color: var(--nasb); } .case.jarr { color: var(--jarr); }
.legend-strip p { flex-basis: 100%; color: var(--muted); margin: 14px 0 0; }

/* Get the app */
.get { max-width: 800px; margin: 0 auto; padding: 20px 20px 90px; text-align: center; scroll-margin-top: 70px; }
.get h2, .prose h2, .coffee h2 { font-size: clamp(40px, 6vw, 60px); }
.sub { color: var(--muted); margin: 8px 0 32px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.card { padding: 28px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; }
.card .logo { width: 28px; height: 28px; color: var(--accent); }
.card h3 { margin: 14px 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.card p.small { font-size: 13.5px; flex: 1; margin-bottom: 22px; }
.card p b { color: var(--ink); font-weight: 600; }
.note { margin: 20px auto 0; font-size: 13px; color: var(--muted); max-width: 34em; }
.note b { color: var(--ink); }
.verify { margin: 18px auto 0; max-width: 40em; text-align: left; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px; background: var(--card); }
.verify summary { cursor: pointer; text-align: center; }
.verify p { margin: 10px 0; }

/* About, disclaimer, privacy */
.prose { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; display: grid; gap: 18px; scroll-margin-top: 70px; }
.block { padding: 32px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); scroll-margin-top: 80px; }
.block h2 { font-size: clamp(34px, 5vw, 46px); margin-bottom: 12px; }
.block h3 { font-size: 16px; margin: 22px 0 6px; }
.block p, .block li { color: #c3cae3; }
.block p { margin: 0 0 12px; }
.block ul { padding-left: 20px; margin: 0; }
.block li { margin-bottom: 8px; }
.block a { color: var(--accent); }
.block b { color: var(--ink); }
.block .small { font-size: 13px; color: var(--muted); }
.tag { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: rgb(255 204 102 / .08); border: 1px solid rgb(255 204 102 / .2); }

/* Buy me a coffee */
.coffee {
  max-width: 760px; margin: 0 auto 90px; padding: 28px 32px; display: flex; align-items: center; gap: 22px;
  border-radius: 28px; border: 1px solid rgb(255 204 102 / .25); background: linear-gradient(120deg, rgb(255 204 102 / .12), rgb(154 168 255 / .08));
}
.coffee .cup { font-size: 44px; }
.coffee div { flex: 1; }
.coffee h2 { font-size: clamp(30px, 4vw, 40px); }
.coffee p { margin: 4px 0 0; color: var(--muted); }
.coffee-btn { background: var(--gold); color: #2a1d05; }
.coffee-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px var(--gold); }

footer { text-align: center; padding: 30px 20px calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 10px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .small { font-size: 12px; opacity: .8; margin: 0; }

/* Entrance and scroll animations (only when JavaScript runs) */
.js .rise { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--d, 0) * 90ms + 100ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 24px; gap: 40px; min-height: 0; }
  .arabic { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .features { grid-template-columns: 1fr 1fr; }
  .links { display: none; }
}
@media (max-width: 560px) {
  .phone { --w: 260px; }
  .features, .cards { grid-template-columns: 1fr; }
  .block { padding: 24px; }
  .coffee { flex-direction: column; text-align: center; padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .glow span, .phone, .dot { animation: none; }
  .js .rise, .js .reveal { animation: none; transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
