/* ============================================
   al-hajar.app · STRATUM
   Subsystem 01 — for engineers & operations
   ============================================ */

:root {
  /* palette — STRATUM only */
  --basalt:    #131820;
  --basalt-2:  #1a212c;
  --basalt-3:  #232c39;
  --line:      #2a3340;
  --line-2:    #3a4452;
  --sand:      #efece5;
  --sand-dim:  #c7c2b5;
  --mute:      #7a8290;
  --mute-2:    #5a6270;
  --brass:     #ad8f5c;
  --brass-hi:  #c9a878;
  --brass-dim: #6e5a3b;
  --rust:      #b3603a;
  --green:     #7ba87a;

  /* type */
  --ff-sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ff-arab: "Noto Kufi Arabic", "IBM Plex Sans Arabic", serif;

  /* radii / spacing */
  --r-0: 0px;
  --r-1: 2px;
  --r-2: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--basalt); color: var(--sand); font-family: var(--ff-sans); }
body { font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }

::selection { background: var(--brass); color: var(--basalt); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

/* ===== layout primitives ===== */
.page  { min-height: 100vh; display: flex; flex-direction: column; }
.wrap  { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.row   { display: flex; gap: 24px; }
.col   { display: flex; flex-direction: column; gap: 24px; }
.grid  { display: grid; gap: 24px; }

/* ===== monospace mini-system ===== */
.mono { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.mono-hi { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 8px; border: 1px solid var(--line); color: var(--mute);
}
.tag.brass { color: var(--brass); border-color: var(--brass-dim); }
.tag.green { color: var(--green); border-color: rgba(123,168,122,0.45); }
.tag.rust  { color: var(--rust);  border-color: rgba(179,96,58,0.45); }
.tag .dot { width: 6px; height: 6px; background: currentColor; }

/* ===== headings ===== */
.h-display { font-family: var(--ff-sans); font-weight: 600; font-size: clamp(56px, 9vw, 140px); line-height: 0.9; letter-spacing: -0.045em; color: var(--sand); }
.h-1 { font-family: var(--ff-sans); font-weight: 600; font-size: clamp(36px, 4vw, 56px); line-height: 1.02; letter-spacing: -0.025em; }
.h-2 { font-family: var(--ff-sans); font-weight: 600; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.h-3 { font-family: var(--ff-sans); font-weight: 600; font-size: 18px; line-height: 1.25; letter-spacing: -0.005em; }
.arabic { font-family: var(--ff-arab); font-weight: 500; direction: rtl; }

.lede { font-size: 19px; line-height: 1.55; color: var(--sand-dim); max-width: 60ch; }
.dim  { color: var(--mute); }

/* ===== header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19,24,32,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-top {
  background: var(--basalt);
  border-bottom: 1px solid var(--line);
  font-family: var(--ff-mono);
}
.header-top-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 32px; padding-top: 4px; padding-bottom: 4px;
}
.lang-select { position: relative; font-family: var(--ff-mono); }
.lang-current {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border: 1px solid var(--line);
  background: transparent; color: var(--sand-dim); cursor: pointer;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em;
  transition: border-color 0.15s, color 0.15s;
}
.lang-current:hover { border-color: var(--brass); color: var(--sand); }
.lang-globe { color: var(--brass); font-size: 11px; }
.lang-code { color: var(--brass); font-weight: 600; }
.lang-name { text-transform: none; letter-spacing: 0.04em; color: var(--mute); }
.lang-caret { color: var(--mute); font-size: 9px; transition: transform 0.15s; }
.lang-caret.up { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 0;
  min-width: 180px; z-index: 80;
  list-style: none; margin: 0; padding: 4px;
  background: var(--basalt-2); border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}
.lang-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; background: transparent; border: 0; cursor: pointer;
  color: var(--sand-dim); text-align: start;
  font-family: var(--ff-mono); font-size: 11px;
}
.lang-opt:hover { background: var(--basalt-3); color: var(--sand); }
.lang-opt.on { color: var(--brass); }
.lang-opt-code { width: 26px; color: var(--brass); font-size: 10px; letter-spacing: 0.08em; }
.lang-opt-name { flex: 1; text-transform: none; letter-spacing: 0.02em; }
.lang-opt-check { color: var(--brass); font-size: 11px; }

@media (max-width: 720px) {
  .lang-name { display: none; }
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: baseline; gap: 14px; }
.brand .ar  { font-family: var(--ff-arab); font-weight: 500; font-size: 22px; }
.brand .lat { font-family: var(--ff-sans); font-weight: 600; font-size: 14px; letter-spacing: -0.005em; }
.brand .domain { font-family: var(--ff-mono); font-size: 10px; color: var(--mute); letter-spacing: 0.08em; }

.nav { display: flex; gap: 4px; }
.nav a {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 12px; color: var(--mute); border: 1px solid transparent;
}
.nav a:hover { color: var(--sand); }
.nav a.active { color: var(--brass); border-color: var(--line); }

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sand);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.btn:hover { border-color: var(--brass); color: var(--brass); }
.btn.primary { background: var(--brass); color: var(--basalt); border-color: var(--brass); }
.btn.primary:hover { background: var(--brass-hi); border-color: var(--brass-hi); color: var(--basalt); }
.btn.ghost { border-color: var(--line); }
.btn .arrow { font-family: var(--ff-mono); font-size: 13px; }

/* ===== cards / surfaces ===== */
.surface {
  background: var(--basalt-2); border: 1px solid var(--line);
}
.surface-2 {
  background: var(--basalt); border: 1px solid var(--line);
}

/* ===== rule / dividers ===== */
.rule { height: 1px; background: var(--line); }
.rule-brass { height: 1px; background: linear-gradient(90deg, var(--brass) 0%, transparent 100%); }

/* ===== product card ===== */
.pcard {
  display: flex; flex-direction: column;
  background: var(--basalt-2); border: 1px solid var(--line);
  transition: border-color 0.18s, transform 0.18s;
}
.pcard:hover { border-color: var(--brass-dim); transform: translateY(-2px); }
.pcard .cover {
  aspect-ratio: 16 / 9; background: var(--basalt); overflow: hidden;
  border-bottom: 1px solid var(--line); position: relative;
}
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.pcard .meta { display: flex; gap: 8px; align-items: center; }
.pcard .title { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.pcard .tagline { color: var(--sand-dim); font-size: 14px; line-height: 1.45; }
.pcard .foot {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
}
.pcard .price { font-family: var(--ff-mono); color: var(--brass); font-size: 13px; }
.pcard .arrow { font-family: var(--ff-mono); font-size: 12px; color: var(--mute); }

/* ===== tier card ===== */
.tier {
  background: var(--basalt-2); border: 1px solid var(--line);
  padding: 28px 26px; display: flex; flex-direction: column; gap: 18px;
  position: relative;
}
.tier.featured { border-color: var(--brass); }
.tier .pin {
  position: absolute; top: -1px; right: -1px;
  background: var(--brass); color: var(--basalt);
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px;
}
.tier .name { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.tier .price { display: flex; align-items: baseline; gap: 6px; }
.tier .price .amount { font-family: var(--ff-sans); font-weight: 600; font-size: 46px; letter-spacing: -0.025em; color: var(--sand); }
.tier .price .cycle  { font-family: var(--ff-mono); font-size: 12px; color: var(--mute); }
.tier ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--sand-dim); }
.tier ul li { padding-left: 22px; position: relative; line-height: 1.45; }
.tier ul li::before { content: "→"; position: absolute; left: 0; color: var(--brass); font-family: var(--ff-mono); font-size: 12px; }

/* ===== specs table ===== */
.specs { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.specs .cell { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs .cell .label { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.specs .cell .value { font-size: 16px; color: var(--sand); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ===== docs / code ===== */
.code {
  background: #0c1117; border: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: 12.5px; line-height: 1.7;
  color: #c8d2e0; padding: 18px 20px;
  overflow-x: auto; white-space: pre;
}
.code .k  { color: #c9a878; }
.code .s  { color: #9ec8a2; }
.code .n  { color: #d0b07a; }
.code .c  { color: #5a6270; font-style: italic; }
.code .p  { color: #7a8290; }

/* ===== forms ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.field input, .field select {
  background: var(--basalt); border: 1px solid var(--line); color: var(--sand);
  padding: 12px 14px; font-size: 15px; outline: none;
}
.field input:focus { border-color: var(--brass); }

/* ===== arch diagram ===== */
.arch-grid { display: grid; grid-template-columns: 180px 1fr; gap: 0; border: 1px solid var(--line); }
.arch-row { display: contents; }
.arch-row .label {
  background: var(--basalt-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}
.arch-row .label .num { font-family: var(--ff-mono); font-size: 10px; color: var(--brass); letter-spacing: 0.08em; }
.arch-row .label .name { font-size: 17px; font-weight: 600; margin-top: 4px; }
.arch-row .cell {
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--sand-dim);
}
.arch-row:last-child .label, .arch-row:last-child .cell { border-bottom: 0; }

/* ===== hero background pattern ===== */
.hero-pattern {
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 80px, rgba(173,143,92,0.04) 80px, rgba(173,143,92,0.04) 81px),
    repeating-linear-gradient(90deg, transparent 0, transparent 80px, rgba(173,143,92,0.04) 80px, rgba(173,143,92,0.04) 81px);
}

/* ===== status pills ===== */
.status-stable     { color: var(--green); }
.status-beta       { color: var(--brass); }
.status-alpha      { color: var(--rust); }
.status-deprecated { color: var(--mute); text-decoration: line-through; }

/* ===== share / follow rows ===== */
.share-row, .follow-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-row-label { color: var(--mute); margin-inline-end: 4px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent; border: 1px solid var(--line); color: var(--sand-dim);
  cursor: pointer; position: relative;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.share-btn:hover { border-color: var(--brass); color: var(--brass); }
.copied-flag {
  position: absolute; top: -22px; inset-inline-end: 0;
  font-family: var(--ff-mono); font-size: 9px; color: var(--brass);
  letter-spacing: 0.1em;
}
.spacer-s { height: 32px; }
.spacer-m { height: 64px; }
.spacer-l { height: 120px; }

.text-right { text-align: right; }
.uppercase  { text-transform: uppercase; letter-spacing: 0.08em; }

/* ===== responsive layout classes (replace inline gridTemplateColumns) ===== */
.lay-2col       { display: grid; grid-template-columns: 1fr 1fr;     gap: 24px; }
.lay-aside      { display: grid; grid-template-columns: 1.3fr 1fr;   gap: 56px; align-items: start; }
.lay-hero       { display: grid; grid-template-columns: 1fr 1fr;     gap: 64px; align-items: end; }
.lay-split-l    { display: grid; grid-template-columns: 1.1fr 1fr;   gap: 56px; align-items: center; }
.lay-split-r    { display: grid; grid-template-columns: 1.4fr 1fr;   gap: 56px; align-items: start; }
.lay-mod        { display: grid; grid-template-columns: 1fr 1.4fr;   gap: 64px; align-items: start; }
.lay-schema     { display: grid; grid-template-columns: 1.2fr 1fr;   gap: 56px; align-items: start; }
.lay-mailflow   { display: grid; grid-template-columns: 1fr 60px 1fr; gap: 0;   align-items: stretch; }

.lay-strip-4    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.lay-strip-3    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }

.lay-cards-3    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lay-cards-4    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.lay-cards-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.lay-cards-auto-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.lay-tiers      { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lay-tiers.t2   { grid-template-columns: repeat(2, 1fr); }
.lay-tiers.t1   { grid-template-columns: 1fr; }

.foot-cols      { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); gap: 24px; }

@media (max-width: 1024px) {
  .lay-strip-4   { grid-template-columns: repeat(2, 1fr); }
  .lay-cards-4   { grid-template-columns: repeat(2, 1fr); }
  .lay-cards-3   { grid-template-columns: repeat(2, 1fr); }
  .lay-mod       { grid-template-columns: 1fr; gap: 40px; }
  .lay-schema    { grid-template-columns: 1fr; gap: 40px; }
  .lay-aside     { grid-template-columns: 1fr; gap: 40px; }
  .lay-split-l, .lay-split-r { grid-template-columns: 1fr; gap: 40px; }
  .lay-tiers     { grid-template-columns: repeat(2, 1fr); }
  .lay-tiers.t3  { grid-template-columns: repeat(2, 1fr); }
  .h-display     { font-size: clamp(48px, 11vw, 96px); }
}

@media (max-width: 720px) {
  .wrap          { padding: 0 18px; }
  .lay-2col,
  .lay-hero,
  .lay-mailflow,
  .lay-cards-3,
  .lay-cards-4,
  .lay-tiers,
  .lay-tiers.t2,
  .lay-tiers.t3,
  .foot-cols      { grid-template-columns: 1fr; gap: 24px; }
  .lay-strip-4   { grid-template-columns: repeat(2, 1fr); }
  .h-display     { font-size: clamp(40px, 14vw, 72px); }
  .h-1           { font-size: clamp(28px, 7vw, 40px); }
  .h-2           { font-size: 22px; }
  .lede          { font-size: 16px; }
  .header-inner  { height: 52px; }
  .nav           { gap: 0; }
  .nav a         { padding: 6px 8px; font-size: 10px; letter-spacing: 0.06em; }
  .pcard .body   { padding: 16px 18px 18px; }
  .pcard .title  { font-size: 18px; }
  .tier          { padding: 22px 20px; }
  .tier .price .amount { font-size: 36px; }
  .specs         { grid-template-columns: 1fr; }
  .arch-grid     { grid-template-columns: 120px 1fr; }
  .arch-row .label .name { font-size: 14px; }
}

@media (max-width: 480px) {
  .lay-strip-4   { grid-template-columns: 1fr; }
  .brand .lat    { display: none; }
  .brand .domain { display: none; }
  .nav a         { padding: 4px 6px; font-size: 9px; }
}

/* ===== RTL polish ===== */
:root[dir="rtl"] body { font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", "Inter Tight", sans-serif; }
:root[dir="rtl"] .h-display,
:root[dir="rtl"] .h-1,
:root[dir="rtl"] .h-2,
:root[dir="rtl"] .h-3 { font-family: "Noto Kufi Arabic", "Inter Tight", sans-serif; letter-spacing: -0.02em; }
:root[dir="rtl"] .mono,
:root[dir="rtl"] .mono-hi,
:root[dir="rtl"] .tag,
:root[dir="rtl"] .code { font-family: var(--ff-mono); } /* keep mono LTR-style */

/* arrow glyphs that should mirror visually in RTL */
:root[dir="rtl"] .btn .arrow,
:root[dir="rtl"] .pcard .arrow,
:root[dir="rtl"] .flow-arrow .glyph { transform: scaleX(-1); display: inline-block; }

/* pin / badge: always at the trailing edge (inline-end) */
.tier .pin {
  position: absolute; top: -1px;
  inset-inline-end: -1px; inset-inline-start: auto;
  background: var(--brass); color: var(--basalt);
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px;
}

/* fact strip cells: use logical border so the visual division still appears between cells in RTL */
.fact-cell:not([data-idx="0"]) { border-inline-start: 1px solid var(--line); }

@media (max-width: 720px) {
  .header-top-inner .mono:last-child { display: none; }
}
.flow-arrow { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; }
.flow-arrow .glyph { color: var(--brass); font-family: var(--ff-mono); font-size: 22px; }
.flow-arrow .t     { font-family: var(--ff-mono); font-size: 9px; color: var(--mute); letter-spacing: 0.1em; text-transform: uppercase; }

@media (max-width: 720px) {
  .flow-arrow { padding: 8px 0; }
  .flow-arrow .glyph { transform: rotate(90deg); }
  .sticky-aside { position: static !important; }
}

/* ============================================================ */
/* AR · public landing                                          */
/* ============================================================ */
.header-ar { background: var(--basalt); }
.header-ar .nav a { padding: 8px 14px; }

.ar-landing { font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", "Inter Tight", sans-serif; }

.ar-monument {
  position: relative;
  min-height: calc(100vh - 88px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(173,143,92,0.06), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0, transparent 96px, rgba(173,143,92,0.05) 96px, rgba(173,143,92,0.05) 97px),
    repeating-linear-gradient(90deg, transparent 0, transparent 96px, rgba(173,143,92,0.05) 96px, rgba(173,143,92,0.05) 97px),
    var(--basalt);
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px 0 56px;
}
.ar-monument-inner {
  position: relative;
  display: grid; grid-template-columns: 1fr; gap: 56px;
  align-items: center; justify-items: center;
  text-align: center;
}
.ar-corner {
  position: absolute; color: var(--mute); font-size: 10px;
  letter-spacing: 0.14em;
}
.ar-corner.tl { top: 0;    left: 0; }
.ar-corner.tr { top: 0;    right: 0; }
.ar-corner.bl { bottom: 0; left: 0; }
.ar-corner.br { bottom: 0; right: 0; }
.ar-corner.tl::before, .ar-corner.tr::before,
.ar-corner.bl::after,  .ar-corner.br::after { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--brass-dim); vertical-align: middle; margin: 0 10px; }

.ar-stage { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.ar-glyph {
  font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", serif;
  font-weight: 500;
  font-size: clamp(120px, 18vw, 260px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--sand);
  background: linear-gradient(180deg, var(--sand) 0%, var(--brass-hi) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(173,143,92,0.15);
}
.ar-rule {
  width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
.ar-latin {
  font-size: 11px; letter-spacing: 0.32em;
  color: var(--brass);
}

.ar-tagline p {
  font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", serif;
  font-weight: 500;
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--sand);
  max-width: 18ch;
}

.ar-h {
  font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", serif;
}
.ar-body {
  font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", serif;
  font-size: 17px;
  line-height: 1.85;
  color: var(--sand-dim);
  max-width: 60ch;
  display: flex; flex-direction: column; gap: 18px;
}

.ar-section { padding: 100px 0; border-bottom: 1px solid var(--line); }
.ar-section-alt { background: var(--basalt-2); }

/* subsystems */
.ar-subs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--line); background: var(--basalt);
}
.ar-sub {
  position: relative;
  display: flex; flex-direction: column; gap: 18px;
  padding: 32px 28px; min-height: 320px;
  border-inline-start: 1px solid var(--line);
  transition: background 0.15s, transform 0.15s;
}
.ar-sub:first-child { border-inline-start: 0; }
.ar-sub.is-primary { background: linear-gradient(180deg, rgba(173,143,92,0.06), transparent 70%); }
.ar-sub.is-dim    { opacity: 0.55; }
.ar-sub[href]:hover { background: var(--basalt-2); }
.ar-sub-top { display: flex; justify-content: space-between; align-items: center; }
.ar-sub-num { color: var(--brass); }
.ar-sub-status { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; display: inline-flex; align-items: center; gap: 6px; }
.ar-sub-status .dot { width: 6px; height: 6px; background: currentColor; display: inline-block; }
.ar-sub-status-live    { color: var(--green); }
.ar-sub-status-soon    { color: var(--brass); }
.ar-sub-status-planned { color: var(--mute); }

.ar-sub-name { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ar-sub-ar  { font-size: 40px; font-weight: 500; color: var(--sand); letter-spacing: -0.02em; }
.ar-sub-lat { color: var(--mute); font-size: 10px; letter-spacing: 0.24em; }
.ar-sub-title { font-size: 16px; color: var(--brass); font-weight: 500; }
.ar-sub-body  {
  font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", serif;
  font-size: 14px; line-height: 1.75; color: var(--sand-dim);
  flex: 1;
}
.ar-sub-foot  {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--brass);
  text-transform: uppercase;
}
.ar-sub.is-dim .ar-sub-foot { color: var(--mute); text-transform: none; letter-spacing: 0; font-family: "Noto Kufi Arabic", serif; }

/* imprint strip */
.ar-imprint { background: var(--basalt-2); border-top: 1px solid var(--line); padding: 64px 0; }
.ar-imprint .mono { margin-bottom: 24px; }
.ar-imprint-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.ar-imp-cell {
  padding: 18px 20px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.ar-imp-cell.wide { grid-column: span 4; }
.ar-imp-v {
  font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", serif;
  font-size: 14px; line-height: 1.6; color: var(--sand);
}

@media (max-width: 1024px) {
  .ar-subs { grid-template-columns: 1fr; }
  .ar-sub  { border-inline-start: 0; border-top: 1px solid var(--line); min-height: 0; }
  .ar-sub:first-child { border-top: 0; }
  .ar-imprint-grid { grid-template-columns: repeat(2, 1fr); }
  .ar-imp-cell.wide { grid-column: span 2; }
  .ar-monument { min-height: 0; padding: 80px 0 64px; }
  .ar-corner { display: none; }
}
@media (max-width: 600px) {
  .ar-imprint-grid { grid-template-columns: 1fr; }
  .ar-imp-cell.wide { grid-column: span 1; }
  .ar-tagline p { font-size: 26px; }
}

/* ============================================================ */
/* Gate                                                         */
/* ============================================================ */
.gate-facts { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 32px; }
.gate-facts li {
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--sand-dim); padding: 10px 14px;
  border: 1px solid var(--line); background: var(--basalt-2);
  display: flex; gap: 12px; align-items: center;
}
.gate-facts li .mono { color: var(--brass); }

.gate-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.gate-list li {
  position: relative; padding-left: 22px;
  font-size: 14px; line-height: 1.55; color: var(--sand-dim);
}
.gate-list li::before { content: "→"; position: absolute; left: 0; color: var(--brass); font-family: var(--ff-mono); font-size: 12px; }
.gate-list li b { color: var(--brass); font-family: var(--ff-mono); font-size: 12.5px; }

.gate-card { display: flex; flex-direction: column; max-width: 520px; }
.gate-tabs { display: flex; border-bottom: 1px solid var(--line); }
.gate-tab {
  flex: 1; padding: 14px 18px;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mute); cursor: pointer; background: transparent; border: 0;
  border-inline-end: 1px solid var(--line);
}
.gate-tab:last-child { border-inline-end: 0; }
.gate-tab:hover { color: var(--sand); }
.gate-tab.on    { color: var(--brass); background: var(--basalt); border-bottom: 2px solid var(--brass); margin-bottom: -1px; }

.gate-form { padding: 28px 26px; display: flex; flex-direction: column; gap: 16px; }
.gate-form .btn.primary { justify-content: center; }
.gate-form .btn[disabled] { opacity: 0.6; cursor: wait; }
.gate-form textarea:focus { border-color: var(--brass) !important; outline: none; }

.gate-meta { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; }
.gate-demo-emails { display: flex; flex-direction: column; gap: 4px; }
.gate-demo-btn {
  text-align: left; padding: 6px 10px; border: 1px solid var(--line);
  background: var(--basalt); color: var(--sand-dim);
  font-family: var(--ff-mono); font-size: 11px; cursor: pointer;
}
.gate-demo-btn:hover { border-color: var(--brass); color: var(--brass); }

.gate-success { padding: 8px 0 24px; border-bottom: 1px dashed var(--line); }
.gate-success-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.gate-demo-strip {
  margin-top: 22px; padding: 16px;
  border: 1px solid var(--brass-dim); background: rgba(173,143,92,0.05);
}

/* ============================================================ */
/* Header session state                                         */
/* ============================================================ */
.header-top-right { display: flex; align-items: center; gap: 18px; }
.header-session {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--sand-dim); font-size: 10px;
  padding: 2px 8px; border: 1px solid var(--line); background: var(--basalt-2);
}
.header-session .dot { width: 6px; height: 6px; background: var(--green); display: inline-block; }
.header-signout {
  background: none; border: 0; color: var(--mute); cursor: pointer;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.08em;
  padding: 0 0 0 8px; margin-inline-start: 4px; border-inline-start: 1px solid var(--line);
}
.header-signout:hover { color: var(--rust); }

@media (max-width: 720px) {
  .header-session { display: none; }
}

/* ============================================================ */
/* Demo-tweaks panel niceties                                   */
/* ============================================================ */
.demo-signin {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 10px; border: 1px solid var(--line); background: var(--basalt);
  text-align: left; cursor: pointer;
}
.demo-signin:hover { border-color: var(--brass); }
.demo-signin .mono { font-size: 9px; letter-spacing: 0.1em; }
.demo-signin span:last-child { font-family: var(--ff-mono); font-size: 11px; }
.demo-link {
  display: block; padding: 6px 10px; border: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: 11px; color: var(--sand-dim);
  background: var(--basalt);
}
.demo-link:hover { border-color: var(--brass); color: var(--brass); }

.subs-remove {
  background: none; border: 1px solid var(--line); color: var(--mute);
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.subs-remove:hover { border-color: var(--rust); color: var(--rust); }

/* ============================================================ */
/* Cookie consent banner                                        */
/* ============================================================ */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: rgba(19,24,32,0.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-2);
}
.cookie-inner {
  max-width: 1320px; margin: 0 auto; padding: 18px 32px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: space-between;
}
.cookie-text { flex: 1; min-width: 280px; }
.cookie-title { color: var(--brass); margin-bottom: 6px; }
.cookie-text p { font-size: 13.5px; color: var(--sand-dim); line-height: 1.55; max-width: 86ch; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .cookie-inner { padding: 16px 18px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

