
/* Layout concept: Noah's own window, as a page. A narrow icon rail that opens on
   hover, a thin top bar, and glass panels on a charcoal ground — the app's
   tokens, its RB face, ink and grey only (decision 074). The hero card is dark
   in both looks, as it is in the app (decision 095). */
@font-face { font-family: "RB"; src: url("/assets/fonts/rb-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "RB"; src: url(/assets/fonts/rb-bold.ttf) format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --page: #e8edf3;
  --ink: #1d1d1f;
  --ink-soft: #3a3a3c;
  --ink-mark: #3c3c43;
  --ink-mute: #6e6e73;
  --surface: rgba(255, 255, 255, 0.58);
  --surface-strong: rgba(255, 255, 255, 0.78);
  --line: rgba(255, 255, 255, 0.62);
  --hairline: rgba(60, 60, 67, 0.12);
  --veil: 255, 255, 255;
  --veil-ink: 60, 60, 67;
  --glow: rgba(60, 60, 67, 0.14);
  --shadow: 0 20px 50px rgba(31, 38, 58, 0.12);
  --hero-from: rgba(24, 24, 24, 0.96);
  --hero-to: rgba(18, 18, 18, 0.96);
  --frame: #161616;
  --amber-ink: #a3670a;
  --font: "RB", "Segoe UI Variable", "Segoe UI", Tahoma, Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", "SFMono-Regular", monospace;
  --sweep: .3s cubic-bezier(.4, 0, .2, 1);
  --rail: 76px;
  --rail-sx: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #141414;
    --ink: #ececec;
    --ink-soft: #c8c8c8;
    --ink-mark: #c8c8c8;
    --ink-mute: #a6a6a6;
    --surface: rgba(38, 38, 38, 0.62);
    --surface-strong: rgba(44, 44, 44, 0.9);
    --line: rgba(255, 255, 255, 0.10);
    --hairline: rgba(255, 255, 255, 0.10);
    --veil: 58, 58, 58;
    --veil-ink: 255, 255, 255;
    --glow: rgba(255, 255, 255, 0.16);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --amber-ink: #e6a849;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #141414;
  --ink: #ececec;
  --ink-soft: #c8c8c8;
  --ink-mark: #c8c8c8;
  --ink-mute: #a6a6a6;
  --surface: rgba(38, 38, 38, 0.62);
  --surface-strong: rgba(44, 44, 44, 0.9);
  --line: rgba(255, 255, 255, 0.10);
  --hairline: rgba(255, 255, 255, 0.10);
  --veil: 58, 58, 58;
  --veil-ink: 255, 255, 255;
  --glow: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --amber-ink: #e6a849;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  padding-inline: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 88% -10%, var(--glow), transparent 60%),
    radial-gradient(900px 640px at -10% 20%, var(--glow), transparent 55%),
    radial-gradient(760px 520px at 55% 115%, rgba(var(--veil-ink), 0.08), transparent 60%);
}
a { color: inherit; }
img, video { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(var(--veil-ink), 0.4); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- the rail ---- */
.rail {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 30;
  width: var(--rail);
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 16px;
  background: rgba(var(--veil), 0.66);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-inline-end: 1px solid var(--hairline);
  overflow: hidden;
  transition: width var(--sweep), box-shadow var(--sweep);
}
.rail:hover, .rail:focus-within { width: 236px; box-shadow: var(--rail-sx) 0 50px rgba(0, 0, 0, 0.18); transition-delay: .12s, .12s; }
.rail-mark {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(var(--veil-ink), 0.18); border-radius: 50%;
  background: rgba(var(--veil), 0.65); color: var(--ink);
  margin-bottom: 12px;
}
.rail-mark svg { width: 22px; height: 24px; }
.rail a.item {
  display: flex; align-items: center; gap: 14px;
  height: 44px; margin-inline: 0; padding-inline-start: 0;
  border-radius: 999px; text-decoration: none; color: var(--ink-mute);
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.rail a.item .ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.rail a.item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail a.item .lb { font-size: 13px; opacity: 0; transition: opacity .2s; padding-inline-end: 14px; }
.rail:hover a.item .lb, .rail:focus-within a.item .lb { opacity: 1; transition-delay: .14s; }
.rail a.item:hover { color: var(--ink); background: rgba(var(--veil-ink), 0.07); }
.rail a.item[aria-current="true"] { color: var(--ink); background: rgba(var(--veil-ink), 0.12); box-shadow: inset 0 0 0 1px rgba(var(--veil-ink), 0.2); }
.rail .grow { flex: 1; }

/* ---- shell and top bar ---- */
.shell { margin-inline-start: var(--rail); min-width: 0; }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: 28px;
  background: rgba(var(--veil), 0.42);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
}
.top-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.top-title strong { font-size: 15px; font-weight: 700; white-space: nowrap; }
.top-title .path { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding-inline: 16px;
  border: 1px solid rgba(var(--veil-ink), 0.32); border-radius: 999px;
  background: rgba(var(--veil-ink), 0.12); color: var(--ink);
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background .16s, border-color .16s;
}
.pill:hover { background: rgba(var(--veil-ink), 0.2); }
.pill.quiet { background: transparent; border-color: var(--hairline); font-weight: 400; color: var(--ink-mute); }
.pill.quiet:hover { color: var(--ink); background: rgba(var(--veil-ink), 0.07); }
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chips { display: none; gap: 8px; padding: 10px 16px; overflow-x: auto; border-bottom: 1px solid var(--hairline); background: rgba(var(--veil), 0.3); }
.chips a { flex: none; padding: 5px 13px; border: 1px solid var(--hairline); border-radius: 999px; font-size: 12px; text-decoration: none; color: var(--ink-mute); }
.chips a[aria-current="true"] { color: var(--ink); background: rgba(var(--veil-ink), 0.12); }

main { padding: 28px; display: grid; gap: 22px; max-width: 1280px; margin-inline: auto; }

/* ---- panels ---- */
.panel {
  min-width: 0;
  border: 1px solid var(--line); border-radius: 26px;
  background: var(--surface);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  padding: 32px;
}
.panel > header { margin-bottom: 22px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 12px; color: var(--ink-mute); letter-spacing: .02em; }
.eyebrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.25; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; line-height: 1.4; }
.lede { margin: 12px 0 0; max-width: 66ch; color: var(--ink-soft); font-size: 16px; }
p { margin: 0; }
.mute { color: var(--ink-mute); }

/* ---- hero: dark in both looks ---- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 460px; border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #ececec;
  display: grid; align-content: space-between;
}
.sea {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: 68%; height: 100%; z-index: -1;
  object-fit: cover; object-position: 60% 50%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.85) 34%, #000 55%);
  mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.85) 34%, #000 55%);
}
.hero-text { padding: 40px 40px 8px; max-width: 640px; }
.hero .eyebrow { color: #a6a6a6; }
.hero h1 { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.12; font-weight: 700; }
.hero .lede { color: #c8c8c8; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero .pill { height: 42px; padding-inline: 20px; border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.12); color: #f2f2f2; }
.hero .pill:hover { background: rgba(255,255,255,.2); }
.hero .pill.quiet { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.18); color: #d6d6d6; font-weight: 400; }
.hero-meta { margin-top: 16px; font-family: var(--mono); font-size: 11px; color: #a6a6a6; }
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.stat { display: flex; align-items: center; gap: 12px; padding: 18px 28px; min-width: 0; }
.stat + .stat { border-inline-start: 1px solid rgba(255,255,255,.08); }
.stat i { width: 2px; align-self: stretch; background: rgba(255,255,255,.4); border-radius: 2px; }
.stat b { font-size: 26px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: #a6a6a6; line-height: 1.35; }

/* ---- figures ---- */
figure { margin: 0; min-width: 0; }
.frame {
  border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden;
  background: var(--frame); box-shadow: var(--shadow);
}
.frame img { display: block; width: 100%; height: auto; }
figcaption { margin-top: 10px; font-size: 12px; color: var(--ink-mute); line-height: 1.5; }

/* ---- grids ---- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; }
.split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { min-width: 0; padding: 20px; border: 1px solid var(--hairline); border-radius: 20px; background: rgba(var(--veil), 0.34); }
.card h3 { margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.card p { color: var(--ink-soft); font-size: 14px; }
.card .ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1px solid var(--hairline); border-radius: 50%; color: var(--ink-mark); }
.card .ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.facts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.facts li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: var(--ink-soft); font-size: 14px; }
.facts li::before { content: ""; width: 7px; height: 7px; margin-top: 9px; margin-inline-start: 5px; border-radius: 50%; background: var(--ink-mark); }
.facts b { color: var(--ink); }

.modes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.modes span { padding: 5px 13px; border: 1px solid var(--hairline); border-radius: 999px; font-size: 12px; color: var(--ink-soft); background: rgba(var(--veil), 0.3); }
.modes span.warn { color: var(--amber-ink); }

.tile-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { padding: 20px; border: 1px solid var(--hairline); border-radius: 20px; background: rgba(var(--veil), 0.34); min-width: 0; }
.tile b { display: block; font-size: 34px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile span { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.tile small { display: block; margin-top: 8px; font-size: 11px; color: var(--ink-mute); line-height: 1.45; }

.plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan li { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: 18px; background: rgba(var(--veil), 0.3); }
.plan .tag { flex: none; margin-top: 2px; padding: 2px 10px; border: 1px solid var(--hairline); border-radius: 999px; font-size: 11px; color: var(--ink-mute); }
.plan b { display: block; font-size: 14px; }
.plan span { display: block; font-size: 13px; color: var(--ink-soft); }
.note { margin-top: 18px; font-size: 13px; color: var(--ink-mute); max-width: 70ch; }

.ask { counter-reset: none; }
.ask .card h3 { align-items: flex-start; }
.closing { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.closing p { max-width: 62ch; color: var(--ink-soft); }

.ar { font-weight: 700; }
a.mail { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline); }
a.mail:hover { text-decoration-color: var(--ink); }
footer { padding: 6px 28px 40px; max-width: 1280px; margin-inline: auto; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: 12px; color: var(--ink-mute); }
footer p { max-width: 70ch; }


/* ---- Arabic: the same page, turned round ---- */
:root[dir="rtl"] { --rail-sx: -18px; }
:root[dir="rtl"] .sea {
  -webkit-mask-image: linear-gradient(to left, transparent 0, rgba(0,0,0,.85) 34%, #000 55%);
  mask-image: linear-gradient(to left, transparent 0, rgba(0,0,0,.85) 34%, #000 55%);
}
:root[dir="rtl"] .eyebrow { letter-spacing: 0; }
:root[dir="rtl"] .hero h1 { line-height: 1.32; }
:root[dir="rtl"] h2 { line-height: 1.4; }
:root[dir="rtl"] .hero-meta { font-family: var(--font); }
:root[dir="rtl"] body { line-height: 1.75; }
.top-title .path { direction: ltr; unicode-bidi: isolate; }
.pill.lang { font-weight: 700; color: var(--ink); }
.pill.contact { font-family: var(--mono); font-size: 12px; }
.pill.icon { width: 36px; padding: 0; color: var(--ink); }
.pill.icon svg { width: 16px; height: 16px; }

/* ---- narrow ---- */
@media (max-width: 1100px) { .pill.contact { display: none; } }
@media (max-width: 1000px) {
  .split, .split.flip, .two { grid-template-columns: minmax(0, 1fr); }
  .tile-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  .rail { display: none; }
  .chips { display: flex; }
  .top { padding-inline: 16px; }
  .top-title .path { display: none; }
  .top-actions .quiet:not(.keep) { display: none; }
  main { padding: 16px; gap: 16px; }
  .panel { padding: 22px; border-radius: 22px; }
  .hero-text { padding: 26px 22px 8px; }
  .sea, :root[dir="rtl"] .sea { width: 100%; opacity: .4; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 70%); mask-image: linear-gradient(to bottom, transparent 0, #000 70%); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 14px 18px; }
  .stat + .stat { border-inline-start: 0; }
  .stat:nth-child(even) { border-inline-start: 1px solid rgba(255,255,255,.08); }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.08); }
  footer { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail, .rail a.item .lb { transition: none; }
}

/* ---- pages inside the site ---- */
.page-title { font-size: clamp(26px, 3.6vw, 42px); line-height: 1.18; font-weight: 700; }
:root[dir="rtl"] .page-title { line-height: 1.35; }
.frame video { display: block; width: 100%; height: auto; background: #000; }
.frame.portrait { max-width: 300px; margin-inline: auto; }
.frame.portrait video { aspect-ratio: 9 / 16; object-fit: contain; }
.vid { justify-self: center; width: 100%; }
.vid figcaption { text-align: center; }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.vcard { display: grid; gap: 12px; align-content: start; }
.vcard h3 { margin: 4px 0 0; }
.more { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill.go { font-weight: 700; color: var(--ink); }
.pill.go::after { content: "\2192"; margin-inline-start: 4px; }
:root[dir="rtl"] .pill.go::after { content: "\2190"; }
.rail { overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
