/* Palette mirrors src/theme.ts — every hex is sampled from the Najd painting. */
:root {
  --espresso: #3d2d1f;
  --saddle: #6f5539;
  --saddle-dark: #56412b;
  --clay: #a67954;
  --clay-dark: #856143;
  --sand: #d1a87f;
  --sand-light: #e8d3bd;
  --sand-pale: #f4e9dc;
  --oat: #f3e9d9;
  --canvas: #f9f4ea;
  --stone: #dfd5cf;
  --line: #eae3de;
  --dim: #796c64;
  --paddock: #5f6b3a;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Fraunces", Georgia, serif;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(61, 45, 31, 0.04), 0 14px 34px -20px rgba(61, 45, 31, 0.3);
}
:root:lang(ar) {
  --font-body: "IBM Plex Sans Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-head: "El Messiri", "IBM Plex Sans Arabic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--espresso);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:lang(ar) body { line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
:lang(ar) :is(h1, h2, h3) { line-height: 1.4; }
h1 { font-size: clamp(2.3rem, 6vw, 4.1rem); letter-spacing: -0.015em; }
:lang(ar) h1 { letter-spacing: 0; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--saddle); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 40px); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 30; background: var(--espresso); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ─── Buttons & tiles ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  background: var(--saddle); color: #fff; font-weight: 600; text-decoration: none;
  border: 1.5px solid var(--saddle);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--saddle-dark); border-color: var(--saddle-dark); transform: translateY(-1px); }
.btn.sm { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }
.btn.ghost { background: rgba(249, 244, 234, 0.7); color: var(--espresso); border-color: rgba(61, 45, 31, 0.3); }
.btn.ghost:hover { background: #fff; border-color: var(--espresso); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.tile {
  display: inline-grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--oat); color: var(--saddle);
}
.tile.sm { width: 34px; height: 34px; border-radius: 10px; }
.tile.dark { background: var(--saddle); color: var(--oat); }

/* ─── Header ──────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(249, 244, 234, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(61, 45, 31, 0.08); }
.top-in { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo img { width: 84px; height: 56px; object-fit: contain; }
.nav { display: flex; gap: 26px; margin-inline-start: 12px; }
.nav a, .lang { text-decoration: none; font-weight: 500; font-size: 0.98rem; white-space: nowrap; }
.nav a:hover, .lang:hover { color: var(--saddle); }
.actions { display: flex; align-items: center; gap: 16px; margin-inline-start: auto; }
.lang { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgba(61, 45, 31, 0.22); border-radius: 999px; }
/* The switch names the OTHER language, so it wears that language's font. */
.lang:lang(ar), .foot a:lang(ar) { font-family: "IBM Plex Sans Arabic", system-ui, Tahoma, sans-serif; }
.lang:lang(en), .foot a:lang(en) { font-family: "Source Sans 3", system-ui, sans-serif; }
.burger { display: none; width: 42px; height: 42px; border: 0; background: none; cursor: pointer; padding: 0; }
.burger span, .burger span::before, .burger span::after { content: ""; display: block; width: 22px; height: 2px; background: var(--espresso); border-radius: 2px; margin-inline: auto; position: relative; }
.burger span::before { position: absolute; top: -7px; }
.burger span::after { position: absolute; top: 7px; }

/* ─── Hero: the Najd painting, text set in its sky ────────────────────── */
.hero {
  min-height: min(880px, 100svh - 68px);
  padding: clamp(48px, 9vh, 104px) 0 clamp(260px, 44vh, 440px);
  background:
    linear-gradient(to bottom, var(--canvas) 0%, rgba(249, 244, 234, 0.9) 28%, rgba(249, 244, 234, 0.45) 55%, rgba(249, 244, 234, 0) 74%),
    url("hero.webp") center bottom / cover no-repeat var(--oat);
}
.hero-in { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { max-width: 16ch; }
:lang(ar) .hero h1 { max-width: 18ch; }
.hero .cta-row { margin-top: 30px; justify-content: center; }
.eyebrow { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--saddle); margin-bottom: 14px; }
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 0.95rem; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: #5a4a3c; max-width: 58ch; margin-top: 20px; }

/* ─── Sections ────────────────────────────────────────────────────────── */
.sec { padding: clamp(64px, 9vw, 112px) 0; }
.tint { background: var(--oat); }
.sec-head { max-width: 680px; margin-bottom: 44px; }
.sec-head > h2 + p { margin-top: 14px; color: var(--dim); font-size: 1.1rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }

/* Feature cards, each with a small preview of the product */
.bentos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bento { background: #fff; border: 1px solid var(--stone); border-radius: var(--radius); padding: 26px 24px 24px; display: flex; flex-direction: column; }
.bento > p { color: var(--dim); font-size: 0.98rem; margin-top: 8px; }
.mini { margin-top: 20px; background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; flex: 1; align-content: center; min-height: 190px; }
.m-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.m-row div { flex: 1; display: grid; line-height: 1.35; }
.m-row b { font-weight: 600; font-size: 0.92rem; }
.m-row small { color: var(--dim); font-size: 0.8rem; }
.m-row em { font-style: normal; font-size: 0.75rem; font-weight: 600; background: var(--oat); color: var(--saddle-dark); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.m-row em.ok { background: #e9ecdc; color: var(--paddock); }
.m-row em.wait { background: var(--sand-light); }
.m-stat { display: grid; }
.m-stat b { font: 600 2rem/1.1 "Fraunces", Georgia, serif; }
.m-stat small { color: var(--dim); }
.spark { width: 100%; height: 80px; color: var(--sand); }
.mini:has(.m-day) { grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; }
.m-day { display: grid; justify-items: center; }
.m-day small { color: var(--clay-dark); font-weight: 600; }
.m-day b { font: 600 2.2rem/1 "Fraunces", Georgia, serif; }
.m-agenda { display: grid; gap: 8px; }
.m-agenda div { display: flex; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 0.86rem; font-weight: 500; border-inline-start: 3px solid var(--clay); background: var(--sand-pale); }
.m-agenda .a1 { background: #e9ecdc; border-color: var(--paddock); }
.m-agenda .a2 { background: var(--oat); border-color: var(--sand); }
.m-agenda span { color: var(--dim); }
.m-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m-boxes span { text-align: center; font: 600 0.72rem/1 "Source Sans 3", system-ui, sans-serif; padding: 12px 0; border-radius: 8px; background: var(--sand-light); color: var(--saddle-dark); }
.m-boxes .f { background: #e9ecdc; color: var(--paddock); }
.m-boxes .r { background: #fff; border: 1px dashed var(--clay); }
.m-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.78rem; color: var(--dim); }
.m-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--sand-light); margin-inline-end: 6px; }
.m-legend .f::before { background: #c9d0a8; }
.m-legend .r::before { background: #fff; outline: 1px dashed var(--clay); }
.m-chat { display: grid; gap: 10px; }
.m-chat p { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 0.88rem; line-height: 1.5; }
.m-chat .in { background: #fff; border: 1px solid var(--line); border-start-start-radius: 4px; justify-self: start; }
.m-chat .out { background: var(--saddle); color: #fff; border-end-end-radius: 4px; justify-self: end; }

.strip { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.strip li { display: grid; gap: 14px; align-content: start; padding-top: 22px; border-top: 1px solid var(--sand); }
.strip h3 { font-size: 1.08rem; }
.strip p { color: var(--dim); font-size: 0.95rem; margin-top: 6px; }

/* Website & app */
.points { display: grid; gap: 26px; align-content: center; }
.points li { display: flex; gap: 16px; align-items: flex-start; }
.points h3 { font-size: 1.1rem; }
.points p { color: #5a4a3c; font-size: 0.98rem; margin-top: 4px; }
.mock { background: var(--canvas); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px -28px rgba(61, 45, 31, 0.5); border: 1px solid var(--stone); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--sand); }
.mock-bar span { margin-inline: 10px; flex: 1; background: var(--canvas); border-radius: 999px; padding: 3px 12px; font: 500 0.8rem/1.6 "Source Sans 3", system-ui, sans-serif; color: var(--dim); text-align: left; }
.mock-bar b { font-size: 0.78rem; background: var(--espresso); color: #fff; padding: 4px 14px; border-radius: 999px; }
.mock-hero { height: 150px; background: linear-gradient(rgba(61, 45, 31, 0.1), rgba(61, 45, 31, 0.55)), url("hero-900.webp") center 70% / cover; display: flex; align-items: flex-end; padding: 18px 22px; color: #fff; }
.mock-hero strong { font: 600 1.5rem/1.3 var(--font-head); }
.mock-body { padding: 18px 22px 22px; display: grid; gap: 10px; }
.mock-body .btn { justify-self: start; margin-top: 4px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { border-top: 1px solid var(--sand); padding-top: 22px; }
.num { display: block; font: 600 2.4rem/1 "Fraunces", Georgia, serif; color: var(--clay); }
.steps h3 { margin: 14px 0 8px; }
.steps p { color: var(--dim); }

/* FAQ */
details { border-bottom: 1px solid rgba(61, 45, 31, 0.16); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-weight: 600; font-size: 1.1rem; }
summary::-webkit-details-marker { display: none; }
summary span { display: grid; place-items: center; flex: none; color: var(--saddle); transition: transform 0.2s; }
details[open] summary span { transform: rotate(45deg); }
details p { padding-bottom: 22px; color: #5a4a3c; max-width: 62ch; }

/* Closing & footer */
.final { text-align: center; }
.final .lead { margin-inline: auto; }
.final .cta-row { justify-content: center; margin-top: 30px; }
.nf { min-height: 60vh; display: grid; align-items: center; }
.foot { background: var(--espresso); color: #cdbdaa; padding: 48px 0 28px; font-size: 0.96rem; }
.foot-in { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.foot img { width: 84px; height: 84px; margin-bottom: 12px; }
.foot p { max-width: 34ch; }
.mail { display: inline-block; margin-top: 8px; color: #fff; font-family: "Source Sans 3", system-ui, sans-serif; }
.foot nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: #fff; }
.legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(243, 233, 217, 0.14); font-size: 0.88rem; }

/* ─── Small screens ───────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .split, .steps { grid-template-columns: 1fr; }
  .bentos, .strip { grid-template-columns: repeat(2, 1fr); }
  .burger { display: block; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 68px; margin: 0; flex-direction: column; gap: 0; background: var(--canvas); border-bottom: 1px solid var(--stone); padding: 8px 20px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(61, 45, 31, 0.08); font-size: 1.05rem; }
}
@media (max-width: 640px) {
  .top-in { gap: 10px; }
  .actions { gap: 8px; }
  .top .btn { padding: 0 14px; font-size: 0.88rem; }
  .lang { padding: 5px 10px; font-size: 0.9rem; }
  .logo img { width: 66px; height: 44px; }
  .bentos, .strip { grid-template-columns: 1fr; }
  .hero {
    background-image:
      linear-gradient(to bottom, var(--canvas) 0%, rgba(249, 244, 234, 0.92) 40%, rgba(249, 244, 234, 0) 78%),
      url("hero-900.webp");
    padding-bottom: 240px;
  }
  .hero .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
