/* ---- Design tokens: "cobalt on white", same system as the Taqreeb app ---- */
:root {
  --brand-50: #EFF2FD;
  --brand-100: #D2DBFA;
  --brand-300: #8AA0F0;
  --brand-500: #1B44C8;
  --brand-600: #1536A2;
  --brand-800: #0C2064;

  --ink: #0E1018;
  --canvas: #FFFFFF;
  --surface: #F5F6FA;
  --body-text: #434757;
  --muted: #787D8E;
  --hairline: #E2E4ED;
  --tint-border: var(--brand-100);

  --success: #157A4F;
  --warning: #A8730C;
  --error: #C0261C;

  --on-accent: #FFFFFF;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-arabic: "Noto Kufi Arabic", system-ui, sans-serif;

  --radius-control: 10px;
  --radius-card: 16px;
  --radius-pill: 999px;

  --max-width: 1160px;

  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F2F3F7;
    --canvas: #0E1018;
    --surface: #181B25;
    --body-text: #B4B8C4;
    --muted: #8B90A0;
    --hairline: #262A36;
    --tint-border: #262A36;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #F2F3F7;
  --canvas: #0E1018;
  --surface: #181B25;
  --body-text: #B4B8C4;
  --muted: #8B90A0;
  --hairline: #262A36;
  --tint-border: #262A36;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
}
.brand-ar {
  font-family: var(--font-arabic);
  font-size: 22px;
  color: var(--brand-500);
}
.brand-en {
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav {
  display: flex;
  gap: 32px;
  font-size: 15px;
  font-weight: 500;
}
.nav a {
  text-decoration: none;
  color: var(--body-text);
  transition: color 0.15s;
}
.nav a:hover { color: var(--brand-500); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-control);
  padding: 14px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--brand-500);
  color: var(--on-accent);
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--brand-500) 60%, transparent);
}
.btn-primary:hover { background: var(--brand-600); }
.btn-small { padding: 10px 18px; font-size: 14px; }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ---- Hero ---- */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--tint-border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 20px;
}
:root[data-theme="dark"] .eyebrow { color: var(--brand-300); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .eyebrow { color: var(--brand-300); }
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  text-wrap: balance;
  font-weight: 700;
}
.hero-sub {
  font-size: 17px;
  color: var(--body-text);
  max-width: 52ch;
  margin: 0 0 32px;
}
.waitlist-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
}
.waitlist-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius-control);
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
}
.waitlist-form input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.form-note {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
  min-height: 18px;
}
.form-note.is-success { color: var(--success); font-weight: 600; }
.form-note.is-error { color: var(--error); font-weight: 600; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.store-badge svg { flex-shrink: 0; }

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 480px;
}
.glow {
  position: absolute;
  inset: -40px -20px auto;
  height: 420px;
  background: radial-gradient(closest-side, var(--brand-100), transparent 70%);
  opacity: 0.6;
  filter: blur(10px);
  z-index: 0;
}
.phone-frame {
  position: relative;
  z-index: 1;
  width: 230px;
  border-radius: 34px;
  border: 8px solid var(--ink);
  background: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(14,16,24,0.35);
  overflow: hidden;
}
.phone-frame img { border-radius: 26px; }
.phone-1 { transform: translateY(-10px) rotate(-4deg); margin-right: -50px; }
.phone-2 { transform: translateY(30px) rotate(4deg); }

/* ---- Sections ---- */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  text-wrap: balance;
  font-weight: 700;
}
.section-sub {
  color: var(--body-text);
  font-size: 17px;
  max-width: 60ch;
  margin: 0 0 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px;
  background: var(--canvas);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
:root[data-theme="dark"] .feature-icon { color: var(--brand-300); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .feature-icon { color: var(--brand-300); }
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 10px;
  font-weight: 700;
}
.feature-card p {
  color: var(--body-text);
  font-size: 15px;
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 64px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-500);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 16px;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 700;
}
.step p { color: var(--body-text); font-size: 15px; margin: 0; }

.showcase {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.phone-flat {
  transform: none;
  margin: 0;
  width: 220px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.price-card {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  background: var(--canvas);
}
.price-card-featured {
  border-color: var(--brand-500);
  background: var(--brand-50);
}
:root[data-theme="dark"] .price-card-featured { background: color-mix(in srgb, var(--brand-500) 12%, var(--surface)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .price-card-featured { background: color-mix(in srgb, var(--brand-500) 12%, var(--surface)); }
}
.price-badge {
  position: absolute;
  top: -12px; left: 28px;
  background: var(--brand-500);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.price-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 700;
}
.price {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-600);
  margin: 0 0 20px;
}
:root[data-theme="dark"] .price { color: var(--brand-300); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .price { color: var(--brand-300); }
}
.price span { font-size: 14px; font-weight: 500; color: var(--muted); }
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.price-card li {
  font-size: 14px;
  color: var(--body-text);
  padding-left: 22px;
  position: relative;
}
.price-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--brand-100);
  box-shadow: inset 0 0 0 4px var(--brand-500);
}

.section-join { text-align: center; }
.join-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin: 0 0 12px;
  text-wrap: balance;
  font-weight: 700;
}
.join-inner p { color: var(--body-text); font-size: 17px; margin: 0 0 32px; }
.waitlist-form-center { margin: 0 auto; }

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.footer-inner p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { min-height: 380px; margin-top: 24px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
}

@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
  .waitlist-form { flex-direction: column; }
  .waitlist-form-center { max-width: 100%; }
  .phone-frame { width: 180px; }
  .phone-1 { margin-right: -70px; }
}
