/* Hādi landing page — brand palette and type from the app (lib/core/theme). */

@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("fonts/NotoSerif-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("fonts/NotoSerif-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("fonts/Amiri-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("fonts/Amiri-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "UthmanicHafs"; src: url("fonts/UthmanicHafs.ttf") format("truetype"); font-display: swap; }

:root {
  --night: #0B2E24;
  --night-2: #12392D;
  --emerald: #146B4E;
  --emerald-tint: #E7F1EC;
  --gold: #D4A845;
  --deep-gold: #8A6514;
  --sand: #FBF8F2;
  --parchment: #F3ECDD;
  --card: #FFFFFF;
  --ink: #17201C;
  --muted: #56615B;
  --line: #E4DCCB;
  --on-night: #F6F0E3;
  --on-night-muted: #B9C7BF;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Noto Serif", Georgia, serif;
  --arabic: "Amiri", "Geeza Pro", "Noto Naskh Arabic", serif;

  --gutter: clamp(16px, 5vw, 40px);
  --max: 1120px;
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
p { margin: 0; }

/* Arabic interface: Arabic type everywhere, mirrored layout. */
html[lang="ar"] body, html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-family: var(--arabic); letter-spacing: 0; }
html[lang="ar"] h1 { line-height: 1.45; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; inset-inline-start: 12px; top: -48px; background: var(--night); color: var(--on-night); padding: 8px 14px; border-radius: 10px; z-index: 50; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--sand) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 34px; height: 34px; flex: none; }
.brand__name { font: 700 22px/1 var(--serif); color: var(--night); }
.nav__end { display: flex; align-items: center; gap: 10px; }

.lang { display: inline-flex; padding: 3px; background: var(--parchment); border-radius: 999px; }
.lang button {
  border: 0; background: transparent; color: var(--muted);
  font: 700 13px/1 var(--sans); min-width: 36px; height: 30px; border-radius: 999px; cursor: pointer;
  transition: background .2s, color .2s;
}
.lang button[lang="ar"] { font-family: var(--arabic); font-size: 16px; }
.lang button[aria-pressed="true"] { background: var(--card); color: var(--emerald); box-shadow: 0 1px 4px rgba(11, 46, 36, .1); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font: 700 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:active { transform: scale(.98); }
.btn--gold { background: var(--gold); color: var(--night); box-shadow: 0 6px 18px rgba(212, 168, 69, .35); }
.btn--gold:hover { box-shadow: 0 8px 24px rgba(212, 168, 69, .45); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
@media (max-width: 380px) { .nav__cta { display: none; } }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.stores--center { justify-content: center; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  flex: 1 1 150px; max-width: 220px; min-width: 0; height: 54px; padding: 0 14px 0 12px;
  background: var(--night); color: var(--on-night);
  border-radius: 14px; text-decoration: none;
  transition: transform .15s ease, background .2s;
}
.store:hover { background: var(--night-2); }
.store:active { transform: scale(.98); }
.store svg { width: 24px; height: 24px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: 11px; color: var(--on-night-muted); }
.store b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.store small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store--light { background: var(--on-night); color: var(--night); }
.store--light small { color: var(--muted); }
.store--light:hover { background: #fff; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(40px, 7vw, 96px); }
.hero__in { display: grid; gap: clamp(36px, 6vw, 64px); align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--emerald-tint); color: var(--emerald);
  font-size: 13px; font-weight: 600;
}
.chip__dot { width: 8px; height: 8px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.hero h1 { margin-top: 18px; font-size: clamp(34px, 7.6vw, 60px); line-height: 1.08; max-width: 14ch; }
html[lang="ar"] .hero h1, html[lang="ha"] .hero h1 { max-width: 16ch; }
.lead { margin-top: 18px; font-size: clamp(16px, 2.1vw, 19px); color: var(--muted); max-width: 34rem; }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.ticks li { display: inline-flex; align-items: center; gap: 8px; }
.ticks li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--emerald-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3 7 10.6l4.5-5' fill='none' stroke='%23146B4E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

.hero__art { position: relative; display: grid; place-items: center; min-height: 460px; }
.arch {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(86%, 420px); aspect-ratio: 44 / 50;
  background: linear-gradient(180deg, var(--emerald) 0%, var(--night) 100%);
  border-radius: 999px 999px 28px 28px;
  box-shadow: inset 0 0 0 3px var(--gold);
  opacity: .96;
}
.arch::after {
  content: ""; position: absolute; left: 50%; top: 13%; width: 26px; height: 26px; transform: translateX(-50%);
  background: var(--gold);
  clip-path: polygon(50% 0, 64% 21%, 85% 15%, 79% 36%, 100% 50%, 79% 64%, 85% 85%, 64% 79%, 50% 100%, 36% 79%, 15% 85%, 21% 64%, 0 50%, 21% 36%, 15% 15%, 36% 21%);
}

.phone {
  position: relative; margin: 0;
  width: 100%; border-radius: 13% / 6%;
  padding: 3.2%;
  background: #0d1f19;
  box-shadow: 0 30px 60px -20px rgba(11, 46, 36, .45), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.phone img { width: 100%; border-radius: 10.4% / 4.8%; }
.phone--hero { width: min(62%, 280px); z-index: 2; margin-bottom: 18px; }
.phone--peek {
  position: absolute; width: min(44%, 200px); z-index: 1;
  inset-inline-end: 4%; bottom: 40px; transform: rotate(6deg);
  opacity: .95;
}
html[dir="rtl"] .phone--peek { transform: rotate(-6deg); }

/* ── Ayah band ───────────────────────────────────────────────────── */
.ayah { background: var(--night); color: var(--on-night); }
.ayah__in { padding-block: clamp(48px, 8vw, 88px); text-align: center; }
.ayah__ar { font: 400 clamp(32px, 7vw, 52px)/1.7 "UthmanicHafs", var(--arabic); color: var(--on-night); }
.ayah__tr { margin-top: 10px; font-size: clamp(15px, 2vw, 18px); color: var(--on-night-muted); }
.ayah__ref { margin-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--gold); text-transform: uppercase; }

/* ── Sections ────────────────────────────────────────────────────── */
.features, .screens { padding-block: clamp(56px, 9vw, 112px); }
.sec-head { text-align: center; max-width: 40rem; margin: 0 auto clamp(32px, 5vw, 56px); }
.sec-head h2 { font-size: clamp(26px, 4.6vw, 40px); line-height: 1.15; }
.sec-head p { margin-top: 12px; color: var(--muted); font-size: clamp(15px, 1.8vw, 17px); }

.grid { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 24px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(11, 46, 36, .35); }
.ico {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 14px; background: var(--emerald-tint); color: var(--emerald);
}
.ico svg { width: 22px; height: 22px; fill: currentColor; }
.card h3 { margin-top: 16px; font-size: 19px; line-height: 1.3; }
.card p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* Screens: a swipeable rail on phones, a row on wide screens. */
.screens { background: linear-gradient(180deg, var(--sand), var(--parchment)); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(64%, 240px);
  gap: 18px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 18px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.shot { margin: 0; scroll-snap-align: start; }
.shot figcaption { margin-top: 14px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }

/* ── CTA ─────────────────────────────────────────────────────────── */
.cta { background: var(--night); color: var(--on-night); }
.cta__in { padding-block: clamp(56px, 9vw, 104px); text-align: center; display: grid; justify-items: center; }
.mark--lg { width: 64px; height: 64px; }
.cta h2 { margin-top: 18px; color: var(--on-night); font-size: clamp(28px, 5vw, 44px); }
.cta p { margin-top: 10px; color: var(--on-night-muted); max-width: 30rem; }
.cta .stores { margin-top: 26px; }

/* ── Footer ──────────────────────────────────────────────────────── */
.foot { background: var(--night); color: var(--on-night-muted); border-top: 1px solid rgba(246, 240, 227, .08); }
.foot__in { display: grid; gap: 10px; justify-items: center; text-align: center; padding-block: 32px calc(32px + env(safe-area-inset-bottom)); font-size: 14px; }
.brand--foot .brand__name { color: var(--on-night); }
.foot a { color: var(--on-night); text-decoration: none; border-bottom: 1px solid rgba(212, 168, 69, .5); }
.foot a.brand { border: 0; }

/* Phones: compact feature cards, the icon beside the text. */
@media (max-width: 639px) {
  .card { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 18px; }
  .card .ico { grid-row: span 2; }
  .card h3 { margin-top: 0; font-size: 17px; }
  .card p { margin-top: 2px; font-size: 14.5px; }
}

/* ── Wider screens ───────────────────────────────────────────────── */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (min-width: 900px) {
  .hero__in { grid-template-columns: 1.05fr .95fr; }
  .hero__art { min-height: 560px; }
  .phone--hero { width: min(58%, 300px); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); max-width: var(--max); margin-inline: auto; overflow: visible; padding-bottom: 0; }
  .foot__in { grid-template-columns: auto 1fr auto auto; justify-items: start; align-items: center; gap: 24px; text-align: start; }
}

/* Appear as they scroll into view (not for readers who prefer less motion). */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .store { transition: none; }
}
