/* DahabOS website. Brand guide: docs/design/brand/brand-guide.html
   Layout: full-width bands alternating night and paper; content on a 12-column grid, max 1200px.
   Mobile first; logical properties only (RTL and LTR share every rule). */
@font-face { font-family: Jost; src: url("../fonts/jost.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Kufi Arabic"; src: url("../fonts/noto-kufi-arabic.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --ink: #151412; --paper: #f5f3ee; --night: #0e0d0b; --stone: #6d685e; --line: #dedad0; --line-night: #2a2824;
  --gold: #a47b25; --gold-d: #dcb96c; --card: #fbfaf7;
  --f-en: Jost, "Noto Kufi Arabic", system-ui, sans-serif;
  --f-ar: "Noto Kufi Arabic", Jost, system-ui, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-e: max(20px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, 0, 0, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--f-en); }
html[lang="ar"] body { font-family: var(--f-ar); font-size: 16.5px; line-height: 1.9; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.in { max-width: 1200px; margin-inline: auto; padding-inline-start: var(--gutter); padding-inline-end: var(--gutter-e); }
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--stone); margin: 0 0 14px; font-weight: 500; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; }
h1, h2, h3 { font-weight: 300; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(42px, 7.4vw, 92px); line-height: 1.02; letter-spacing: -.015em; }
h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.08; letter-spacing: -.01em; }
h3 { font-size: 22px; font-weight: 400; line-height: 1.3; }
html[lang="ar"] h1 { font-size: clamp(36px, 6.4vw, 78px); line-height: 1.35; letter-spacing: 0; }
html[lang="ar"] h2 { font-size: clamp(28px, 4.2vw, 50px); line-height: 1.4; letter-spacing: 0; }
p { margin: 0 0 16px; max-width: 60ch; }
.lead { font-size: clamp(18px, 2vw, 21px); font-weight: 300; color: #3b3833; }
.night .lead { color: #c9c3b8; }

/* Bands */
.band { padding-block: clamp(72px, 11vw, 150px); }
.night { background: var(--night); color: #f1ede5; }
.night .eyebrow { color: #8e887c; }
.paper { background: var(--paper); }
.white { background: #fbfaf7; }

/* The beam: a hairline divider resting on the gold fulcrum (the brand's one motif). */
.beam { position: relative; height: 1px; background: currentColor; opacity: .9; margin-block: 0; }
.beam::after { content: ""; position: absolute; inset-inline-start: calc(50% - 7px); top: 1px; border-inline: 7px solid transparent; border-bottom: 12px solid var(--gold); }
.night .beam::after { border-bottom-color: var(--gold-d); }

/* Header */
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in oklab, var(--night) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-night); color: #f1ede5; }
.hdr .in { display: flex; align-items: center; gap: 24px; height: 68px; }
.hdr .logo { display: flex; align-items: center; }
.hdr .logo svg, .hdr .logo img { height: 40px; width: auto; display: block; }
.hdr nav { display: none; gap: 26px; margin-inline-start: auto; font-size: 15px; }
.hdr nav a { text-decoration: none; color: #c9c3b8; }
.hdr nav a:hover { color: #fff; }
.hdr .lang { margin-inline-start: auto; font-size: 14px; color: #c9c3b8; text-decoration: none; }
.hdr .btn { display: none; }
@media (min-width: 900px) { .hdr nav { display: flex; } .hdr .lang { margin-inline-start: 0; } .hdr .btn { display: inline-flex; } }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--night); }

/* Buttons (same component as the app; see the brand guide) */
.btn { --b-bg: var(--ink); --b-fg: var(--paper); --b-line: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px;
  font: 500 15px/1 var(--f-en); letter-spacing: .04em; color: var(--b-fg); background: var(--b-bg);
  border: 1px solid var(--b-line); border-radius: 2px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .16s var(--ease), color .16s, border-color .16s, transform .16s; }
html[lang="ar"] .btn { font-family: var(--f-ar); letter-spacing: 0; }
.btn:hover { --b-bg: #2b2925; --b-line: #2b2925; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.btn.secondary { --b-bg: transparent; --b-fg: var(--ink); --b-line: var(--ink); }
.btn.secondary:hover { --b-bg: var(--ink); --b-fg: var(--paper); }
.btn.lg { height: 56px; padding: 0 30px; font-size: 16px; }
.btn .tri { width: 12px; height: 11px; fill: var(--gold-d); flex: none; }
.night .btn { --b-bg: var(--paper); --b-fg: var(--ink); --b-line: var(--paper); }
.night .btn:hover { --b-bg: #dcd7cc; --b-line: #dcd7cc; }
.night .btn.secondary { --b-bg: transparent; --b-fg: var(--paper); --b-line: #5c574f; }
.night .btn.secondary:hover { --b-line: var(--paper); }
.night .btn .tri { fill: var(--gold); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 9vw, 120px) 0; }
.hero .grid { display: grid; gap: 40px; align-items: end; }
.hero .copy { padding-bottom: clamp(24px, 6vw, 80px); }
.hero .wordmark svg { display: block; height: clamp(70px, 11vw, 120px); width: auto; margin-bottom: clamp(28px, 5vw, 56px); }
.hero .media { aspect-ratio: 4 / 3; background: radial-gradient(80% 70% at 60% 40%, #2a241a, var(--night) 70%); position: relative; }
.hero .media img { width: 100%; height: 100%; object-fit: cover; object-position: 33% 62%; }
@media (min-width: 960px) { .hero .grid { grid-template-columns: 1.05fr 1fr; } .hero .media { aspect-ratio: 4 / 5; margin-inline-end: calc(-1 * var(--gutter-e)); } }

/* Pillars */
.pillars { display: grid; gap: 0; margin-top: 56px; border-top: 1px solid var(--line); }
.pillar { padding: 32px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.pillar svg.ic { width: 28px; height: 28px; stroke: var(--ink); fill: none; stroke-width: 1.4; }
.pillar p { color: #4a4640; margin: 0; }
@media (min-width: 860px) { .pillars { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .pillar { padding: 36px 32px 40px; border-bottom: 0; border-inline-start: 1px solid var(--line); }
  .pillar:first-child { border-inline-start: 0; padding-inline-start: 0; } }

/* Split sections (text + photo) */
.split { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split .ph { aspect-ratio: 4 / 3; background: radial-gradient(80% 70% at 50% 40%, #2a241a, var(--night) 75%); overflow: hidden; }
.split .ph img { width: 100%; height: 100%; object-fit: cover; }
.paper .split .ph, .white .split .ph { background: linear-gradient(160deg, #ece8df, #e2ddd2); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.flip .text { order: 2; } }
.list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.list li { display: grid; grid-template-columns: 14px 1fr; gap: 14px; align-items: baseline; max-width: 56ch; }
.list li::before { content: ""; border-inline: 6px solid transparent; border-bottom: 10px solid var(--gold); transform: translateY(-1px); }
.night .list li::before { border-bottom-color: var(--gold-d); }
.list b { font-weight: 500; }

/* Product showcase */
.showcase { margin-top: 56px; display: grid; gap: 20px; }
.device { background: #1c1b18; border-radius: 22px; padding: 14px; box-shadow: 0 40px 80px -40px rgb(0 0 0 / .55); }
.device .screen { background: #fff; border-radius: 10px; overflow: hidden; color: #151412; font-family: var(--f-en); }
html[lang="ar"] .device .screen { font-family: var(--f-ar); }
.pos-grid { display: grid; grid-template-columns: 1fr; }
.pos-grid > div { min-width: 0; }
@media (min-width: 720px) { .pos-grid { grid-template-columns: 1.5fr 1fr; } }
.cap { font-size: 13px; color: var(--stone); margin-top: 12px; }
.night .cap { color: #8e887c; }

/* Stats row (true statements, not invented figures) */
.facts { display: grid; gap: 0; margin-top: 56px; border-top: 1px solid var(--line-night); }
.fact { padding: 26px 0; border-bottom: 1px solid var(--line-night); }
.fact b { display: block; font-weight: 300; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; color: #fff; }
.fact span { color: #a19b8f; font-size: 15px; }
@media (min-width: 860px) { .facts { grid-template-columns: repeat(4, 1fr); } .fact { padding: 30px 24px 34px; border-inline-start: 1px solid var(--line-night); } .fact:first-child { border-inline-start: 0; padding-inline-start: 0; } }

/* Demo form */
.form { display: grid; gap: 14px; margin-top: 32px; max-width: 560px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--stone); }
.form input, .form select { height: 50px; padding: 0 14px; border: 1px solid #c9c3b8; border-radius: 2px; background: #fff; font: inherit; color: var(--ink); }
.form .row2 { display: grid; gap: 14px; }
@media (min-width: 640px) { .form .row2 { grid-template-columns: 1fr 1fr; } }
.form .note { font-size: 13px; color: var(--stone); }

.form .hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .status { min-height: 24px; margin: 0; font-size: 15px; }
.form .status.ok { color: #2e6b4a; }
.form .status.err { color: #a5332b; }
.form .note a { color: inherit; }
.btn .tri.settle { transform-origin: 50% 100%; animation: settle 1.1s cubic-bezier(.4, 0, .2, 1) infinite alternate; }
@keyframes settle { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }

.doc { max-width: 760px; }
.doc h1, html[lang="ar"] .doc h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 28px; }
.doc h2, html[lang="ar"] .doc h2 { font-size: 22px; line-height: 1.5; font-weight: 400; margin: 34px 0 10px; }
.doc p { color: #3b3833; }
.doc a { color: var(--ink); }

/* Footer */
.ftr { background: var(--night); color: #a19b8f; padding-block: 64px calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.ftr .in { display: grid; gap: 28px; }
.ftr .logo { display: inline-flex; }
.ftr .logo svg, .ftr .logo img { height: 64px; width: auto; display: block; }
.ftr nav { display: flex; gap: 22px; flex-wrap: wrap; }
.ftr a { text-decoration: none; color: #c9c3b8; }
@media (min-width: 860px) { .ftr .in { grid-template-columns: 1fr auto; align-items: end; } }

/* Content is always visible: no reveal-on-scroll. Anchored sections stop below the fixed header. */
[id] { scroll-margin-top: calc(84px + env(safe-area-inset-top, 0px)); }
