/* =========================================================
   CURVE APEX — Design system "Monumental Intelligence"
   Signature device: THE QUADRANT (the 90° compass sweep of the
   CURVE mark used as layout, corner and diagram language).
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Brand constants */
  --canary: #FECB00;          /* sampled from the original logo */
  --canary-ink: #15171A;
  --basalt: #121416;          /* deep architectural black */
  --charcoal: #1C1F22;
  --graphite: #2C3035;
  --steel: #8A9098;
  --plaster: #ECECE8;         /* architectural white, cool not cream */
  --chalk: #F7F7F4;

  /* Theme roles — dark (default) */
  --bg: var(--basalt);
  --bg-2: var(--charcoal);
  --bg-3: var(--graphite);
  --fg: #EDEDE9;
  --fg-2: #B3B6BA;
  --fg-3: #80858C;
  --rule: rgba(237,237,233,.14);
  --rule-strong: rgba(237,237,233,.32);
  --accent: var(--canary);
  --accent-fg: var(--canary-ink);
  --img-filter: grayscale(1) contrast(1.08) brightness(.82);
  --img-tint: rgba(18,20,22,.18);
  --hero-line: rgba(237,237,233,.55);
  color-scheme: dark;

  /* Type */
  --f-en: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-ar-d: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --f-ar-b: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --f-display: var(--f-en);
  --f-body: var(--f-en);
  --wdth-display: 116;

  /* Scale — 1.25 modular, 17px body */
  --t-xs: .8125rem;   /* 13 */
  --t-sm: .9375rem;   /* 15 */
  --t-md: 1.0625rem;  /* 17 */
  --t-lg: 1.3125rem;  /* 21 */
  --t-xl: 1.6875rem;  /* 27 */
  --t-2xl: clamp(1.75rem, 1.2rem + 1.8vw, 2.25rem);   /* 36 */
  --t-3xl: clamp(2.1rem, 1.3rem + 2.8vw, 3rem);       /* 48 */
  --t-4xl: clamp(2.5rem, 1.4rem + 4vw, 4rem);         /* 64 */
  --t-hero: clamp(2.75rem, 1rem + 6.6vw, 7.25rem);    /* ~116 */

  /* Space — 8pt */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem; --s10: 8rem;
  --gutter: clamp(1rem, .5rem + 2.4vw, 2.5rem);
  --maxw: 1440px;
  --measure: 62ch;

  /* The quarter corner — scaled per element size */
  --q-s: 14px; --q-m: 28px; --q-l: 96px;

  /* Motion */
  --ease-out: cubic-bezier(.22,.8,.24,1);
  --ease-draw: cubic-bezier(.65,0,.35,1);
  --d-fast: 160ms; --d-mid: 320ms; --d-slow: 700ms;
}

/* Light — refined, spacious, editorial (not an inversion) */
:root[data-theme="light"] {
  --bg: var(--plaster);
  --bg-2: var(--chalk);
  --bg-3: #DFDFDA;
  --fg: #15171A;
  --fg-2: #464B52;
  --fg-3: #6C7178;
  --rule: rgba(21,23,26,.13);
  --rule-strong: rgba(21,23,26,.35);
  --accent: var(--canary);
  --img-filter: grayscale(.85) sepia(.12) contrast(1.02) brightness(1.02);
  --img-tint: rgba(236,236,232,.06);
  --hero-line: rgba(21,23,26,.5);
  color-scheme: light;
}

/* Arabic type roles */
:root[lang="ar"] {
  --f-display: var(--f-ar-d);
  --f-body: var(--f-ar-b);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 var(--t-md)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color var(--d-mid), color var(--d-mid);
}
:root[lang="ar"] body { line-height: 1.85; font-size: 1.125rem; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--canary); color: var(--canary-ink); }
:focus-visible { outline: 2px solid var(--canary); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; inset-inline-start: var(--s4); top: -100px; z-index: 100; background: var(--canary); color: var(--canary-ink); padding: var(--s3) var(--s4); }
.skip:focus { top: var(--s4); }

h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
:root[lang="en"] h1, :root[lang="en"] h2 { font-variation-settings: "wdth" var(--wdth-display); }
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3 { letter-spacing: 0; font-weight: 800; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); }

/* ---------- Type styles ---------- */
.t-hero { font-size: var(--t-hero); line-height: .98; letter-spacing: -.03em; white-space: pre-line; }
:root[lang="ar"] .t-hero { line-height: 1.22; letter-spacing: 0; font-size: calc(var(--t-hero) * .86); }
.t-4xl { font-size: var(--t-4xl); line-height: 1.02; }
.t-3xl { font-size: var(--t-3xl); line-height: 1.06; }
.t-2xl { font-size: var(--t-2xl); line-height: 1.15; }
.t-xl { font-size: var(--t-xl); line-height: 1.25; }
.t-lg { font-size: var(--t-lg); line-height: 1.5; }
:root[lang="ar"] .t-4xl, :root[lang="ar"] .t-3xl, :root[lang="ar"] .t-2xl { line-height: 1.35; }
.lede { font-size: var(--t-lg); line-height: 1.55; color: var(--fg-2); max-width: 46ch; }
:root[lang="ar"] .lede { line-height: 1.9; }
.muted { color: var(--fg-2); }
.quiet { color: var(--fg-3); font-size: var(--t-sm); }
.measure { max-width: var(--measure); }
.kicker { font-size: var(--t-sm); color: var(--fg-3); font-weight: 500; }

/* ---------- Brand lockup ---------- */
.lockup { white-space: nowrap; display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; }
.lockup img { width: 40px; height: 40px; flex: none; }
.lockup .wm { display: grid; line-height: 1; }
.lockup .wm b { font-family: var(--f-en); font-weight: 700; font-size: 1.0625rem; letter-spacing: .14em; font-variation-settings: "wdth" 125; }
.lockup .wm b i { font-style: normal; font-weight: 400; color: var(--fg-2); }
.lockup .wm span { font-family: var(--f-ar-d); font-size: .78rem; font-weight: 600; color: var(--fg-3); margin-top: 5px; letter-spacing: 0; }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--rule); }
.hdr .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 72px; }
.nav { display: flex; gap: var(--s1); margin-inline-start: auto; }
.nav a { text-decoration: none; padding: var(--s2) var(--s3); font-size: var(--t-sm); color: var(--fg-2); position: relative; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: var(--s3); bottom: 2px; height: 2px; background: var(--canary); }
.hdr-tools { display: flex; align-items: center; gap: var(--s2); }
.tool { min-width: 44px; height: 44px; display: inline-grid; place-items: center; background: none; border: 1px solid var(--rule); cursor: pointer; padding: 0 var(--s3); font-size: var(--t-sm); }
.tool:hover { border-color: var(--rule-strong); }
.tool svg { width: 18px; height: 18px; }
.lang-btn { font-weight: 600; }
:root[lang="en"] .lang-btn { font-family: var(--f-ar-d); }
.menu-btn { gap: var(--s2); display: inline-flex; align-items: center; }
@media (max-width: 1080px) { .nav { display: none; } .hdr-tools { margin-inline-start: auto; } .hdr .btn { display: none; } }
@media (max-width: 420px) { .lockup .wm span { display: none; } .menu-btn .lbl { display: none; } }

/* Full menu panel */
.menu { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: grid; grid-template-rows: auto 1fr; visibility: hidden; clip-path: circle(0% at var(--ox, 100%) 0%); transition: clip-path var(--d-slow) var(--ease-draw), visibility 0s linear var(--d-slow); overflow-y: auto; }
:root[dir="rtl"] .menu { --ox: 0%; }
.menu.open { visibility: visible; clip-path: circle(150% at var(--ox, 100%) 0%); transition: clip-path var(--d-slow) var(--ease-draw); }
.menu-top { display: flex; align-items: center; min-height: 72px; border-bottom: 1px solid var(--rule); }
.menu-top .tool { margin-inline-start: auto; }
.menu-body { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s7) var(--gutter); padding-block: var(--s7) var(--s8); align-content: start; }
.menu-body h3 { font-size: var(--t-sm); color: var(--fg-3); font-weight: 500; margin-bottom: var(--s4); font-family: var(--f-body); letter-spacing: 0; }
.menu-primary a { display: block; text-decoration: none; font-family: var(--f-display); font-size: var(--t-3xl); font-weight: 700; line-height: 1.2; padding-block: .1em; }
:root[lang="en"] .menu-primary a { font-variation-settings: "wdth" 112; letter-spacing: -.02em; }
.menu-primary a:hover, .menu-list a:hover { color: var(--canary); }
.menu-list a { display: block; text-decoration: none; font-size: var(--t-lg); padding-block: var(--s2); border-bottom: 1px solid var(--rule); }
.journeys { display: flex; flex-wrap: wrap; gap: var(--s2); }
@media (max-width: 860px) { .menu-body { grid-template-columns: 1fr; gap: var(--s6); } }

/* ---------- Buttons — quarter corner on the leading-top edge ---------- */
.btn { --b-bg: var(--canary); --b-fg: var(--canary-ink); display: inline-flex; align-items: center; justify-content: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s5); background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bg); border-start-end-radius: var(--q-s); text-decoration: none; font-weight: 600; font-size: var(--t-sm); cursor: pointer; transition: border-radius var(--d-mid) var(--ease-out), background-color var(--d-fast), color var(--d-fast); white-space: nowrap; }
.btn:hover { border-start-end-radius: var(--q-m); }
.btn:active { transform: translateY(1px); }
.btn.ghost { --b-bg: transparent; --b-fg: var(--fg); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--fg); }
.btn.ink { --b-bg: var(--fg); --b-fg: var(--bg); }
.btn.sm { min-height: 40px; padding: 0 var(--s4); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { color: var(--fg); text-decoration: underline; text-decoration-color: var(--canary); text-decoration-thickness: 2px; text-underline-offset: .3em; font-weight: 600; }
.link:hover { text-decoration-thickness: 3px; }
.ext::after { content: "↗"; display: inline-block; margin-inline-start: .3em; font-weight: 400; }
:root[dir="rtl"] .ext::after { transform: scaleX(-1); }

/* ---------- Status — the shape carries meaning ---------- */
.status { display: inline-flex; align-items: center; gap: .5em; font-size: var(--t-xs); font-weight: 600; color: var(--fg-2); white-space: nowrap; }
.status::before { content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor; flex: none; }
.status[data-s="operating"]::before, .status[data-s="delivered"]::before, .status[data-s="licensed"]::before { background: var(--canary); border-color: var(--canary); }
.status[data-s="development"]::before, .status[data-s="designed"]::before, .status[data-s="study"]::before { background: linear-gradient(135deg, currentColor 50%, transparent 50%); }
.status[data-s="planned"]::before { background: transparent; }
.status[data-s="proposal"]::before, .status[data-s="formation"]::before { border-style: dashed; border-radius: 0 10px 0 0; }

.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border: 1px solid var(--rule); background: none; font-size: var(--t-sm); cursor: pointer; text-decoration: none; color: var(--fg-2); }
.chip:hover { border-color: var(--rule-strong); color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Endorsement */
.endorse { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-xs); color: var(--fg-3); }
.endorse img { width: 16px; height: 16px; }
.endorse b { font-family: var(--f-en); font-weight: 600; letter-spacing: .12em; font-variation-settings: "wdth" 125; color: var(--fg-2); font-size: .72rem; }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(4rem, 3rem + 5vw, 9rem); position: relative; }
.sec + .sec { border-top: 1px solid var(--rule); }
.sec.tight { padding-block: clamp(3rem, 2rem + 3vw, 5rem); }
.sec.alt { background: var(--bg-2); }
.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); row-gap: var(--s5); margin-bottom: clamp(2.5rem, 2rem + 2vw, 4.5rem); align-items: end; }
.sec-head h2 { grid-column: 1 / span 7; }
.sec-head .side { grid-column: 9 / -1; color: var(--fg-2); }
@media (max-width: 900px) { .sec-head h2, .sec-head .side { grid-column: 1 / -1; } }

/* Quadrant marker — the section signature: a 90° sweep that draws when in view */
.qmark { width: 56px; height: 56px; margin-bottom: var(--s5); color: var(--fg-3); }
:root[dir="rtl"] .qmark { transform: scaleX(-1); }
.qmark path { fill: none; stroke: currentColor; stroke-width: 1.5; }
.qmark .arc { stroke: var(--canary); stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 1.1s var(--ease-draw); }
.in .qmark .arc, .qmark.in .arc { stroke-dashoffset: 0; }
.qmark circle { fill: var(--canary); }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: min(92vh, 980px); display: grid; align-items: end; padding-block: clamp(3rem, 6vw, 6rem) clamp(2.5rem, 4vw, 4rem); overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero .wrap { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); row-gap: var(--s6); align-items: end; }
.hero-copy { grid-column: 1 / span 7; }
.hero-copy .t-hero { margin-bottom: var(--s6); }
.hero-copy .lede { margin-bottom: var(--s6); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero-legend { grid-column: 9 / -1; align-self: end; }
.hero-legend h2 { font-family: var(--f-body); font-size: var(--t-sm); font-weight: 500; color: var(--fg-3); margin-bottom: var(--s3); letter-spacing: 0; font-variation-settings: normal; }
.radii { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.radii a { display: grid; grid-template-columns: 2.25rem 1fr auto; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); text-decoration: none; transition: padding var(--d-mid) var(--ease-out); }
.radii a:hover, .radii a.on { padding-inline-start: var(--s3); }
.radii .r { font-size: var(--t-xs); color: var(--fg-3); font-variant-numeric: tabular-nums; font-family: var(--f-en); }
.radii .n { font-weight: 600; }
.radii .status { font-weight: 500; }

/* The drawing sits behind, anchored to the trailing-bottom corner, origin = quadrant centre */
.quad { position: absolute; z-index: 1; inset-inline-end: 0; bottom: -1px; width: min(50vw, 820px); aspect-ratio: 1; pointer-events: none; }
.quad svg { width: 100%; height: 100%; overflow: visible; }
:root[dir="ltr"] .quad svg { transform: scaleX(-1); } /* origin sits at the trailing corner in both directions */
.quad .grid-l { stroke: var(--rule); stroke-width: 1; fill: none; }
.quad .ring { fill: none; stroke: var(--hero-line); stroke-width: 1.25; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.quad .ring.on { stroke: var(--canary); stroke-width: 3; }
.quad .compass { fill: none; stroke: var(--canary); stroke-width: 1.5; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.quad .node { fill: var(--canary); transform-box: fill-box; transform-origin: center; transform: scale(0); }
.quad .core { fill: var(--canary); transform-box: fill-box; transform-origin: 100% 100%; transform: scale(0); }
.quad .spoke { stroke: var(--hero-line); stroke-width: 1; stroke-dasharray: 4 6; opacity: 0; }
.drawn .quad .ring, .drawn .quad .compass { transition: stroke-dashoffset 1.4s var(--ease-draw), stroke var(--d-mid), stroke-width var(--d-mid); transition-delay: calc(var(--i) * 110ms + 200ms), 0s, 0s; stroke-dashoffset: 0; }
.drawn .quad .compass { transition-delay: 1.1s; transition-duration: 1.2s; }
.drawn .quad .node { transition: transform 420ms var(--ease-out) 2.1s; transform: scale(1); }
.drawn .quad .core { transition: transform 900ms var(--ease-out) 0s; transform: scale(1); }
.drawn .quad .spoke { transition: opacity 600ms 1.6s; opacity: 1; }
.hero-copy > * { opacity: 0; transform: translateY(14px); }
.drawn .hero-copy > * { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.drawn .hero-copy > :nth-child(2) { transition-delay: 120ms; }
.drawn .hero-copy > :nth-child(3) { transition-delay: 240ms; }
.drawn .hero-copy > :nth-child(4) { transition-delay: 360ms; }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--rule); font-size: var(--t-xs); color: var(--fg-3); }
@media (max-width: 1000px) {
  .hero { min-height: auto; display: block; padding-top: var(--s5); }
  .hero-copy, .hero-legend { grid-column: 1 / -1; }
  .quad { position: relative; inset: auto; width: min(100%, 520px); margin-inline-start: auto; margin-bottom: -14%; }
}

/* ---------- Page heads (inner pages) ---------- */
.phead { padding-block: clamp(3.5rem, 2.5rem + 5vw, 8rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; }
.phead .crumbs { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: var(--t-sm); color: var(--fg-3); margin-bottom: var(--s6); }
.phead .crumbs a { text-decoration: none; }
.phead .crumbs a:hover { color: var(--fg); }
.phead .crumbs span[aria-hidden] { opacity: .5; }
.phead h1 { font-size: var(--t-4xl); line-height: 1.02; max-width: 18ch; }
:root[lang="ar"] .phead h1 { line-height: 1.3; }
.phead .lede { margin-top: var(--s5); }
.phead .q-bg { position: absolute; inset-inline-end: -2px; bottom: -2px; width: clamp(160px, 28vw, 420px); aspect-ratio: 1; color: var(--rule-strong); pointer-events: none; }
:root[dir="ltr"] .phead .q-bg { transform: scaleX(-1); }
.phead .q-bg path { fill: none; stroke: currentColor; }
.phead .q-bg .y { stroke: var(--canary); stroke-width: 2; }
.phead-meta { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); margin-top: var(--s6); align-items: center; }

/* ---------- Positioning statement ---------- */
.statement { font-family: var(--f-display); font-size: var(--t-3xl); line-height: 1.18; font-weight: 600; max-width: 26ch; letter-spacing: -.01em; }
:root[lang="en"] .statement { font-variation-settings: "wdth" 100; }
:root[lang="ar"] .statement { line-height: 1.6; font-weight: 700; }
.statement .dim { color: var(--fg-3); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--gutter); margin-top: var(--s8); border-top: 1px solid var(--rule); }
.facts > div { padding-top: var(--s4); }
.facts dt { font-size: var(--t-sm); color: var(--fg-3); margin-bottom: var(--s2); }
.facts dd { margin: 0; font-weight: 600; }
@media (max-width: 800px) { .facts { grid-template-columns: 1fr 1fr; } }

/* ---------- Divisions — a stacked index, each row its own proportion ---------- */
.divs { border-top: 1px solid var(--rule-strong); }
.div-row { display: grid; grid-template-columns: 5rem minmax(0,4fr) minmax(0,5fr) auto; gap: var(--s5) var(--gutter); align-items: center; padding-block: var(--s6); border-bottom: 1px solid var(--rule); text-decoration: none; position: relative; transition: padding var(--d-mid) var(--ease-out); }
.div-row::before { content: ""; position: absolute; inset-inline-start: 0; top: -1px; height: 2px; width: 0; background: var(--dc, var(--canary)); transition: width 600ms var(--ease-draw); }
.div-row:hover::before, .div-row:focus-visible::before { width: 100%; }
.div-row .rad { width: 64px; height: 64px; color: var(--fg-3); }
:root[dir="rtl"] .div-row .rad { transform: scaleX(-1); }
.div-row .rad path { fill: none; stroke: currentColor; stroke-width: 1.25; }
.div-row .rad .me { stroke: var(--dc); stroke-width: 3; }
.div-row h3 { font-size: var(--t-2xl); line-height: 1.1; }
:root[lang="en"] .div-row h3 { font-variation-settings: "wdth" 108; }
.div-row .ln { color: var(--fg-2); font-size: var(--t-lg); line-height: 1.45; }
.div-row .go { display: grid; justify-items: end; gap: var(--s2); }
.arrow { width: 44px; height: 44px; border: 1px solid var(--rule-strong); display: grid; place-items: center; border-start-end-radius: var(--q-s); transition: background var(--d-fast), border-radius var(--d-mid); }
.arrow svg { width: 18px; height: 18px; }
:root[dir="rtl"] .arrow svg { transform: scaleX(-1); }
.div-row:hover .arrow { background: var(--canary); color: var(--canary-ink); border-color: var(--canary); border-start-end-radius: var(--q-m); }
@media (max-width: 900px) {
  .div-row { grid-template-columns: 3.5rem 1fr auto; }
  .div-row .rad { width: 48px; height: 48px; }
  .div-row .ln { grid-column: 2 / -1; grid-row: 2; font-size: var(--t-md); }
  .div-row .go .status { display: none; }
}

/* ---------- Products — each keeps its own identity ---------- */
.prods { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: var(--gutter); }
.prod { --ph: var(--canary); --pi: var(--canary-ink); position: relative; display: grid; grid-template-rows: auto 1fr auto; min-height: 420px; padding: var(--s6); background: var(--ph); color: var(--pi); text-decoration: none; overflow: hidden; border-start-end-radius: var(--q-l); transition: border-radius var(--d-slow) var(--ease-out); }
.prod:hover { border-start-end-radius: 50%; }
.prod:nth-child(1) { grid-column: span 7; }
.prod:nth-child(2) { grid-column: span 5; }
.prod:nth-child(3) { grid-column: span 5; }
.prod:nth-child(4) { grid-column: span 7; }
.prod .pname { font-family: var(--f-en); font-weight: 800; font-size: clamp(2.25rem, 1.5rem + 3vw, 4.25rem); line-height: .95; letter-spacing: -.02em; font-variation-settings: "wdth" 120; }
.prod[data-id="sanad"] .pname { font-family: var(--f-ar-d); font-weight: 900; letter-spacing: 0; }
.prod[data-id="fakkerni"] .pname { font-weight: 300; font-variation-settings: "wdth" 70; letter-spacing: .02em; }
.prod[data-id="raqeeb"] .pname { font-variation-settings: "wdth" 62; font-weight: 900; letter-spacing: .04em; }
.prod .pname small { display: block; font-family: var(--f-ar-d); font-size: .38em; font-weight: 700; letter-spacing: 0; margin-top: .4em; opacity: .75; font-variation-settings: normal; }
.prod .pline { font-size: var(--t-lg); line-height: 1.4; max-width: 28ch; align-self: end; margin-block: var(--s6) var(--s5); font-weight: 500; }
.prod .pfoot { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; padding-top: var(--s4); border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); font-size: var(--t-xs); }
.prod .pfoot .status, .prod .pfoot .endorse, .prod .pfoot .endorse b { color: inherit; }
.prod .pfoot .status[data-s]::before { border-color: currentColor; background: linear-gradient(135deg, currentColor 50%, transparent 50%); }
@media (max-width: 900px) { .prod { grid-column: 1 / -1 !important; min-height: 340px; padding: var(--s5); border-start-end-radius: var(--q-m) var(--q-l); } }

/* ---------- Ventures — horizontal plates ---------- */
.ventures { display: grid; gap: 0; border-top: 1px solid var(--rule-strong); }
.vent { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,6fr) auto; gap: var(--s5) var(--gutter); padding-block: var(--s7); border-bottom: 1px solid var(--rule); align-items: start; text-decoration: none; }
.vent h3 { font-size: var(--t-2xl); line-height: 1.12; }
.vent .vstat { margin-top: var(--s4); }
.vent p { color: var(--fg-2); }
.vent ul { list-style: none; padding: 0; margin: var(--s4) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.vent li { font-size: var(--t-xs); border: 1px solid var(--rule); padding: .35em .7em; color: var(--fg-2); }
.vent:hover .arrow { background: var(--canary); color: var(--canary-ink); border-color: var(--canary); }
@media (max-width: 900px) { .vent { grid-template-columns: 1fr; } .vent .arrow { display: none; } }

/* ---------- Projects ---------- */
.proj-track { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: var(--s7) var(--gutter); }
.pcard { text-decoration: none; display: grid; gap: var(--s4); align-content: start; }
.pcard .ph { position: relative; overflow: hidden; background: var(--bg-3); aspect-ratio: 4/3; border-start-end-radius: var(--q-l); transition: border-radius var(--d-slow) var(--ease-out); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); transform: scale(1.02); transition: filter var(--d-slow) var(--ease-out), transform 1.2s var(--ease-out); }
.pcard:hover .ph img, .pcard:focus-visible .ph img { filter: none; transform: scale(1.06); }
.pcard:hover .ph { border-start-end-radius: 40%; }
.pcard h3 { font-size: var(--t-xl); line-height: 1.2; font-weight: 700; }
.pcard .pm { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; font-size: var(--t-sm); color: var(--fg-3); }
.proj-track .pcard:nth-child(6n+1) { grid-column: 1 / span 7; }
.proj-track .pcard:nth-child(6n+1) .ph { aspect-ratio: 16/10; }
.proj-track .pcard:nth-child(6n+2) { grid-column: 9 / span 4; margin-top: var(--s9); }
.proj-track .pcard:nth-child(6n+2) .ph { aspect-ratio: 4/5; }
.proj-track .pcard:nth-child(6n+3) { grid-column: 2 / span 4; }
.proj-track .pcard:nth-child(6n+4) { grid-column: 7 / span 6; margin-top: var(--s8); }
.proj-track .pcard:nth-child(6n+5) { grid-column: 1 / span 5; }
.proj-track .pcard:nth-child(6n+6) { grid-column: 7 / span 5; margin-top: var(--s7); }
@media (max-width: 900px) {
  .proj-track { gap: var(--s6) var(--gutter); }
  .proj-track .pcard { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .proj-track .pcard .ph { aspect-ratio: 4/3 !important; border-start-end-radius: var(--q-l); }
}
.attrib { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s5); border: 1px solid var(--rule); border-inline-start: 3px solid var(--canary); background: var(--bg-2); max-width: 72ch; font-size: var(--t-sm); color: var(--fg-2); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s7); }

/* ---------- Ecosystem (homepage teaser + page) ---------- */
.eco { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,5fr); gap: var(--s7) var(--gutter); align-items: start; }
.eco-fig { position: relative; aspect-ratio: 1; width: 100%; max-width: 760px; }
.eco-fig svg { width: 100%; height: 100%; overflow: visible; }
:root[dir="ltr"] .eco-fig svg { transform: scaleX(-1); } /* origin on the trailing-bottom corner */
.eco-fig .seg { cursor: pointer; stroke: var(--bg); stroke-width: 3; transition: fill var(--d-mid), opacity var(--d-mid); outline: none; }
.eco-fig .seg[data-rel="division"] { fill: var(--bg-3); }
.eco-fig .seg[data-rel="produced"] { fill: color-mix(in srgb, var(--canary) 30%, var(--bg-2)); }
.eco-fig .seg[data-rel="venture"] { fill: var(--bg-2); }
.eco-fig .seg[data-rel="independent"], .eco-fig .seg[data-rel="practice"] { fill: transparent; }
.eco-fig .seg[data-rel="founder"] { fill: transparent; }
.eco-fig .seg:hover, .eco-fig .seg:focus-visible { fill: color-mix(in srgb, var(--canary) 55%, var(--bg-2)); }
.eco-fig .seg.on { fill: var(--canary) !important; }
.eco-fig .dim { opacity: .28; }
.eco-fig .ring-line { fill: none; stroke: var(--rule-strong); stroke-width: 1; pointer-events: none; }
.eco-fig .ring-line.indep { stroke-dasharray: 2 6; stroke: var(--fg-3); stroke-width: 1.5; }
.eco-fig .ring-line.founder { stroke: var(--canary); stroke-dasharray: 14 6 2 6; stroke-width: 1.5; }
.eco-fig .core { fill: var(--canary); cursor: pointer; }
.eco-fig .lbl-wrap { position: absolute; inset: 0; pointer-events: none; }
.eco-panel { position: sticky; top: 96px; border-top: 2px solid var(--canary); padding-top: var(--s5); }
.eco-panel h3 { font-size: var(--t-2xl); margin-block: var(--s3) var(--s4); }
.eco-panel .rel { font-size: var(--t-sm); color: var(--fg-2); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--rule); }
.eco-panel .rel b { display: block; color: var(--fg-3); font-weight: 500; margin-bottom: var(--s1); }
.eco-legend { list-style: none; padding: 0; margin: var(--s6) 0 0; display: grid; gap: var(--s3); font-size: var(--t-sm); color: var(--fg-2); }
.eco-legend li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s3); align-items: center; }
.eco-legend svg { width: 44px; height: 14px; }
.eco-list { margin-top: var(--s6); display: grid; gap: var(--s5); }
.eco-list h4 { font-size: var(--t-sm); color: var(--fg-3); font-weight: 500; margin-bottom: var(--s2); font-family: var(--f-body); letter-spacing: 0; }
.eco-list .chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
@media (max-width: 960px) { .eco { grid-template-columns: 1fr; } .eco-panel { position: static; } }

/* ---------- Method / philosophy — a real sequence, so numbered ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--gutter); counter-reset: s; }
.step { padding-top: var(--s5); border-top: 1px solid var(--rule-strong); position: relative; }
.step::before { counter-increment: s; content: counter(s); font-family: var(--f-en); font-weight: 300; font-size: var(--t-3xl); line-height: 1; display: block; margin-bottom: var(--s5); color: var(--fg-3); font-variation-settings: "wdth" 70; }
.step:hover::before { color: var(--canary); }
.step h3 { font-size: var(--t-lg); margin-bottom: var(--s3); font-weight: 700; }
.step p { color: var(--fg-2); font-size: var(--t-sm); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; row-gap: var(--s6); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Partnership band ---------- */
.band { background: var(--canary); color: var(--canary-ink); position: relative; overflow: hidden; }
.band .wrap { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: var(--s6) var(--gutter); align-items: end; }
.band h2 { grid-column: 1 / span 8; font-size: var(--t-4xl); line-height: 1.02; }
:root[lang="ar"] .band h2 { line-height: 1.3; }
.band .bside { grid-column: 9 / -1; display: grid; gap: var(--s5); }
.band .btn { --b-bg: var(--canary-ink); --b-fg: var(--canary); }
.band .btn.ghost { --b-bg: transparent; --b-fg: var(--canary-ink); border-color: rgba(21,23,26,.4); }
.band .ptypes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.band .ptypes a { text-decoration: none; border: 1px solid rgba(21,23,26,.3); padding: .5em .9em; font-size: var(--t-sm); font-weight: 500; }
.band .ptypes a:hover { background: var(--canary-ink); color: var(--canary); }
.band .bq { position: absolute; inset-inline-end: -1px; top: -1px; width: clamp(140px, 22vw, 320px); aspect-ratio: 1; }
:root[dir="rtl"] .band .bq { transform: scaleX(-1); }
.band .bq path { fill: none; stroke: rgba(21,23,26,.25); }
@media (max-width: 900px) { .band h2, .band .bside { grid-column: 1 / -1; } }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); gap: var(--s7) var(--gutter); align-items: center; }
.fmark { background: var(--charcoal); aspect-ratio: 4/5; display: grid; place-items: center; padding: 12%; border-start-end-radius: var(--q-l); position: relative; overflow: hidden; }
.fmark img { width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.fmark .cap { position: absolute; inset-inline-start: var(--s4); bottom: var(--s4); font-size: var(--t-xs); color: #80858C; }
.founder .founder-h { margin: 0 0 var(--s6); font-size: var(--t-2xl); line-height: 1.2; max-width: 22ch; }
:root[lang="ar"] .founder .founder-h { line-height: 1.55; }
@media (max-width: 860px) { .founder { grid-template-columns: 1fr; } .fmark { max-width: 420px; } }

/* ---------- Closing ---------- */
.closing { text-align: start; }
.closing .big { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.5rem, 1rem + 6vw, 6.5rem); line-height: 1; letter-spacing: -.03em; max-width: 14ch; }
:root[lang="en"] .closing .big { font-variation-settings: "wdth" 120; }
:root[lang="ar"] .closing .big { line-height: 1.3; letter-spacing: 0; }
.closing .big .y { color: var(--canary); }

/* ---------- Footer ---------- */
.ftr { border-top: 1px solid var(--rule-strong); padding-block: var(--s8) var(--s6); background: var(--bg); }
.ftr-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--s7) var(--gutter); }
.ftr h4 { font-size: var(--t-sm); color: var(--fg-3); font-weight: 500; margin-bottom: var(--s4); font-family: var(--f-body); letter-spacing: 0; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); font-size: var(--t-sm); }
.ftr ul a { text-decoration: none; color: var(--fg-2); }
.ftr ul a:hover { color: var(--fg); }
.ftr-legal { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); font-size: var(--t-xs); color: var(--fg-3); }
.ftr-legal p { max-width: 70ch; }
@media (max-width: 960px) { .ftr-top { grid-template-columns: 1fr 1fr; } .ftr-top > :first-child { grid-column: 1 / -1; } }

/* ---------- Detail layouts ---------- */
.split { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,4fr); gap: var(--s8) var(--gutter); align-items: start; }
.split aside { position: sticky; top: 96px; display: grid; gap: var(--s5); }
.split .prose > * + * { margin-top: var(--s5); }
.prose h2 { font-size: var(--t-2xl); margin-top: var(--s8) !important; }
.prose h2:first-child { margin-top: 0 !important; }
.prose p { color: var(--fg-2); max-width: var(--measure); }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } .split aside { position: static; } }
.panel { border: 1px solid var(--rule); padding: var(--s5); background: var(--bg-2); border-start-end-radius: var(--q-m); }
.panel h3 { font-size: var(--t-md); margin-bottom: var(--s3); font-family: var(--f-body); font-weight: 700; letter-spacing: 0; }
.kv { display: grid; gap: var(--s3); margin: 0; }
.kv > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: var(--s3); font-size: var(--t-sm); padding-bottom: var(--s3); border-bottom: 1px solid var(--rule); }
.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt { color: var(--fg-3); }
.kv dd { margin: 0; }
.caps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--rule); }
.caps li { padding: var(--s4) 0; border-bottom: 1px solid var(--rule); padding-inline-end: var(--s4); display: flex; gap: var(--s3); align-items: baseline; }
.caps li::before { content: ""; width: 8px; height: 8px; border-start-end-radius: 8px; background: var(--dc, var(--canary)); flex: none; transform: translateY(-2px); }
@media (max-width: 600px) { .caps { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: var(--gutter); margin-block: var(--s7); }
.gallery figure { margin: 0; background: var(--bg-3); overflow: hidden; }
.gallery figure:first-child { border-start-end-radius: var(--q-l); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.gallery figure:only-child { grid-column: 1 / -1; }
.gallery figure:only-child img { aspect-ratio: 16/9; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }
.note { font-size: var(--t-sm); color: var(--fg-3); border-inline-start: 2px solid var(--rule-strong); padding-inline-start: var(--s4); }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); border-top: 1px solid var(--rule); margin-top: var(--s8); }
.prev-next a { padding-block: var(--s5); text-decoration: none; display: grid; gap: var(--s2); }
.prev-next a:last-child { text-align: end; }
.prev-next span { font-size: var(--t-sm); color: var(--fg-3); }
.prev-next b { font-size: var(--t-lg); }

/* Product hero (detail) */
.ph-hero { background: var(--ph); color: var(--pi); padding-block: clamp(4rem, 3rem + 6vw, 9rem) var(--s7); position: relative; overflow: hidden; }
.ph-hero .crumbs { color: inherit; opacity: .7; }
.ph-hero .pname { font-family: var(--f-en); font-weight: 800; font-size: clamp(3rem, 1rem + 9vw, 9rem); line-height: .9; letter-spacing: -.03em; font-variation-settings: "wdth" 120; }
.ph-hero .pline { font-size: var(--t-xl); max-width: 30ch; margin-top: var(--s5); font-weight: 500; line-height: 1.35; }
.ph-hero .endorse, .ph-hero .endorse b, .ph-hero .status { color: inherit; }
.ph-hero .status::before { border-color: currentColor; background: linear-gradient(135deg, currentColor 50%, transparent 50%); }
.ph-hero .meta { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); font-size: var(--t-sm); align-items: center; }
.ph-hero a { color: inherit; }

/* Innovation grid — uneven, because the topics are not equal */
.inno { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border-top: 1px solid var(--rule-strong); }
.inno article { padding: var(--s6) var(--s5) var(--s6) 0; border-bottom: 1px solid var(--rule); display: grid; gap: var(--s3); align-content: start; padding-inline-end: var(--gutter); }
.inno h3 { font-size: var(--t-xl); }
.inno p { color: var(--fg-2); font-size: var(--t-sm); }
.inno .v { color: var(--fg); font-weight: 600; font-size: var(--t-sm); padding-top: var(--s3); border-top: 1px dashed var(--rule-strong); }
.inno .v b { color: var(--fg-3); font-weight: 500; display: block; }
@media (max-width: 900px) { .inno { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .inno { grid-template-columns: 1fr; } }

/* Insights */
.ins-list { border-top: 1px solid var(--rule-strong); }
.ins { display: grid; grid-template-columns: 10rem minmax(0,1fr) 9rem; gap: var(--s4) var(--gutter); padding-block: var(--s6); border-bottom: 1px solid var(--rule); text-decoration: none; align-items: baseline; }
.ins h3 { font-size: var(--t-xl); line-height: 1.25; margin-bottom: var(--s2); }
.ins p { color: var(--fg-2); }
.ins time, .ins .rt { font-size: var(--t-sm); color: var(--fg-3); }
.ins .rt { text-align: end; }
.ins:hover h3 { text-decoration: underline; text-decoration-color: var(--canary); text-underline-offset: .2em; }
@media (max-width: 760px) { .ins { grid-template-columns: 1fr; } .ins .rt { text-align: start; } }
.article { max-width: 68ch; }
.article p { font-size: var(--t-lg); line-height: 1.7; color: var(--fg); }
:root[lang="ar"] .article p { line-height: 2; }
.article p + p { margin-top: var(--s5); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s5); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: var(--s2); }
.field label { font-size: var(--t-sm); font-weight: 600; }
.field label .opt { color: var(--fg-3); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: var(--s3) var(--s4); background: var(--bg-2); border: 1px solid var(--rule-strong); border-radius: 0; font-size: 1rem; transition: border-color var(--d-fast), box-shadow var(--d-fast); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--canary); box-shadow: 0 0 0 1px var(--canary); }
.field .hint { font-size: var(--t-xs); color: var(--fg-3); }
.field .err { font-size: var(--t-xs); color: #FF8A73; display: none; }
:root[data-theme="light"] .field .err { color: #B3361C; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: #FF8A73; }
:root[data-theme="light"] .field.bad input, :root[data-theme="light"] .field.bad textarea, :root[data-theme="light"] .field.bad select { border-color: #B3361C; }
.field.bad .err { display: block; }
.seg-ctl { display: flex; flex-wrap: wrap; gap: var(--s2); position: relative; }
.seg-ctl input { position: absolute; inset-inline-start: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.seg-ctl label { border: 1px solid var(--rule-strong); padding: .55em 1em; cursor: pointer; font-weight: 500; font-size: var(--t-sm); }
.seg-ctl input:checked + label { background: var(--canary); color: var(--canary-ink); border-color: var(--canary); }
.seg-ctl input:focus-visible + label { outline: 2px solid var(--canary); outline-offset: 2px; }
.consent { display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--t-sm); color: var(--fg-2); }
.consent input { width: 20px; height: 20px; accent-color: var(--canary); margin-top: 3px; flex: none; }

/* States: loading, success, error, empty */
.state { border: 1px solid var(--rule); padding: var(--s7) var(--s6); display: grid; gap: var(--s4); justify-items: start; border-start-end-radius: var(--q-l); }
.state.ok { border-color: var(--canary); }
.state.bad { border-color: #FF8A73; }
.state .qmark { margin: 0; }
.state h3 { font-size: var(--t-2xl); }
.state p { color: var(--fg-2); max-width: 52ch; }
.spinner { width: 20px; height: 20px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Loader (signature logo reveal: the original mark is unveiled, never altered) ---------- */
.loader { position: fixed; inset: 0; z-index: 90; background: var(--basalt); display: grid; place-items: center; transition: clip-path 800ms var(--ease-draw), visibility 0s 800ms; clip-path: circle(150% at 100% 100%); }
:root[dir="rtl"] .loader { clip-path: circle(150% at 0% 100%); }
.loader.done { clip-path: circle(0% at 100% 100%); visibility: hidden; }
:root[dir="rtl"] .loader.done { clip-path: circle(0% at 0% 100%); }
.loader .mk { width: 96px; height: 96px; clip-path: inset(100% 0 0 0); animation: unveil 900ms var(--ease-draw) 100ms forwards; }
.loader .mk img { width: 100%; height: 100%; }
@keyframes unveil { to { clip-path: inset(0 0 0 0); } }

/* ---------- Route transition ---------- */
main { min-height: 60vh; }
.page-enter { animation: pageIn 420ms var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Design system page ---------- */
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--gutter); }
.sw { display: grid; gap: var(--s2); font-size: var(--t-sm); }
.sw i { display: block; aspect-ratio: 3/2; border: 1px solid var(--rule); border-start-end-radius: var(--q-m); }
.sw code { color: var(--fg-3); font-size: var(--t-xs); }
.type-row { display: grid; grid-template-columns: 8rem 1fr; gap: var(--gutter); padding-block: var(--s5); border-bottom: 1px solid var(--rule); align-items: baseline; }
.type-row > span { font-size: var(--t-xs); color: var(--fg-3); }
.demo-row { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; padding-block: var(--s5); border-bottom: 1px solid var(--rule); }
.spec { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.spec th, .spec td { text-align: start; padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.spec th { color: var(--fg-3); font-weight: 500; }
.tbl-wrap { overflow-x: auto; }

/* Light mode — the band and loader keep their identity; images get warmer duotone */
:root[data-theme="light"] .fmark { background: var(--charcoal); }
:root[data-theme="light"] .prod[data-id="curve-platform"] { box-shadow: inset 0 0 0 1px rgba(21,23,26,.08); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .hero-copy > * { opacity: 1; transform: none; }
}

/* Ecosystem labels (HTML overlay so text never mirrors) */
.eco-lbl { position: absolute; transform: translate(50%, -50%); font-size: .75rem; font-weight: 600; line-height: 1.2; color: var(--fg); text-align: center; max-width: 12ch; pointer-events: none; }
:root[dir="rtl"] .eco-lbl { transform: translate(-50%, -50%); }
.eco-lbl.core-l { color: var(--canary-ink); font-family: var(--f-en); letter-spacing: .1em; font-size: .7rem; }
.eco-rts { position: relative; height: 2.5rem; border-top: 1px solid var(--rule-strong); max-width: 760px; }
.eco-rt { position: absolute; top: .6rem; transform: translateX(50%); font-size: var(--t-xs); color: var(--fg-3); white-space: nowrap; }
:root[dir="rtl"] .eco-rt { transform: translateX(-50%); }
@media (max-width: 640px) { .eco-lbl { font-size: .62rem; } .eco-lbl.short { display: none; } .eco-rt { font-size: .62rem; } }

/* Review fixes */
:root[lang="en"] .t-hero { font-size: clamp(2.6rem, 1rem + 4.9vw, 6.25rem); }
.hero-copy { grid-column: 1 / span 8; }
@media (max-width: 1000px) { .hero-copy { grid-column: 1 / -1; } }
.eco-list.compact { display: none; }
@media (max-width: 640px) {
  .eco-lbl, .eco-rts { display: none; }
  .eco-list.compact { display: grid; }
}
@media (max-width: 480px) {
  .hdr .wrap { gap: var(--s3); }
  .hdr-tools { gap: var(--s1); }
  .lockup { gap: var(--s2); min-width: 0; }
  .lockup img { width: 34px; height: 34px; }
  .lockup .wm b { font-size: .9rem; letter-spacing: .08em; }
  .lockup .wm span { display: none; }
  .tool { min-width: 44px; padding: 0 var(--s2); }
  .menu-btn .lbl { display: none; }
}
:root[lang="en"] .t-hero { font-size: clamp(2.1rem, .6rem + 5.6vw, 6.25rem); }
@media (min-width: 1000px) { :root[lang="en"] .t-hero { font-size: clamp(2.6rem, 1rem + 4.9vw, 6.25rem); } }
.ph-hero .pname { font-size: clamp(2.4rem, .4rem + 9vw, 9rem); overflow-wrap: anywhere; }
.type-row { grid-template-columns: 8rem minmax(0, 1fr); }
.type-row p { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .type-row { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .demo-row > div { max-width: 100%; }
  .lockup-demo, .demo-row > div[style*="padding"] { padding: var(--s4) !important; }
}
h1, h2, h3, h4, p, dd, li { overflow-wrap: break-word; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .div-row { grid-template-columns: 3.5rem minmax(0, 1fr) auto; } }
.kv > div { grid-template-columns: minmax(6rem, 8.5rem) minmax(0, 1fr); }
@media (max-width: 380px) { .div-row h3 { font-size: var(--t-xl); } .kv > div { grid-template-columns: minmax(0, 1fr); gap: var(--s1); } }
.split aside { grid-template-columns: minmax(0, 1fr); }
.panel .btn { white-space: normal; text-align: center; width: 100%; padding-block: .6em; line-height: 1.3; }
@media (max-width: 600px) { .phead .q-bg { opacity: .35; width: 140px; } }

/* =========================================================
   v2 — CURVE APEX brand guide v1.0 + cinematic direction
   ========================================================= */
:root {
  --canary: #FECB00;
  --canary-ink: #111111;
  --basalt: #111111;      /* Architectural Black */
  --charcoal: #1C1C1E;    /* Deep Charcoal */
  --graphite: #2C2C2E;
  --plaster: #F2F0EB;     /* Warm White */
  --chalk: #FAF9F6;
  --neutral: #A8A49C; --cool: #8E9196; --stone: #5E5A55; --hairline: #D8D4CE;
  --bg: var(--basalt); --bg-2: var(--charcoal); --bg-3: var(--graphite);
  --fg: #F2F0EB; --fg-2: #BDB9B1; --fg-3: #8E8A82;
  --rule: rgba(242,240,235,.12); --rule-strong: rgba(242,240,235,.28);
  --f-en: "Manrope", "Segoe UI", Arial, sans-serif;
  --f-mont: "Montserrat", "Manrope", Arial, sans-serif;
  --f-ar-d: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --f-ar-b: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --f-display: var(--f-mont);
  --f-body: var(--f-en);
}
:root[data-theme="light"] {
  --bg: var(--plaster); --bg-2: var(--chalk); --bg-3: #E7E4DD;
  --fg: #111111; --fg-2: #4A4743; --fg-3: #6E6A64;
  --rule: rgba(17,17,17,.12); --rule-strong: rgba(17,17,17,.3);
}
:root[lang="ar"] { --f-display: var(--f-ar-d); --f-body: var(--f-ar-b); }
:root[lang="ar"] body { font-size: 1.0625rem; line-height: 1.9; }
:root[lang="en"] h1, :root[lang="en"] h2, :root[lang="en"] h3 { letter-spacing: -.02em; }

/* Lockup (official parent symbol from the brand pack) */
.lk { display: inline-flex; align-items: center; gap: .7em; color: var(--fg); text-decoration: none; }
.lk .sym { height: 2.4em; width: auto; flex: none; }
.lk-t { display: grid; line-height: 1; }
.lk-t b { font-family: var(--f-mont); font-weight: 700; letter-spacing: .02em; font-size: 1em; white-space: nowrap; }
.lk-t span { font-family: var(--f-ar-d); font-weight: 500; font-size: .62em; color: var(--fg-2); margin-top: .45em; text-align: end; }
.lk-sm { font-size: 18px; }
.lk-lg { font-size: clamp(28px, 2rem + 1.4vw, 46px); }
.lk.on-dark { color: #F2F0EB; }
.lk.on-dark .lk-t span { color: #C9C6BF; }
.lockup { display: inline-flex; }
@media (max-width: 480px) { .lk-sm { font-size: 15px; } .lk-sm .lk-t span { display: none; } }

/* Buttons, slightly rounder per the reference */
.btn { border-radius: 10px; border-start-end-radius: 10px; font-family: var(--f-body); font-weight: 700; }
.btn:hover { border-start-end-radius: 10px; transform: translateY(-1px); }
.btn.lg { min-height: 56px; padding: 0 var(--s6); font-size: var(--t-md); }
.arrow-i { display: inline-grid; width: 18px; height: 18px; }
.arrow-i svg { width: 18px; height: 18px; }
:root[dir="rtl"] .arrow-i svg { transform: scaleX(-1); }
.eyebrow-y { color: var(--canary); font-weight: 700; font-size: var(--t-sm); margin-bottom: var(--s3); }
.sec-center { text-align: center; max-width: 720px; margin: 0 auto clamp(2.5rem, 2rem + 2vw, 4rem); display: grid; gap: var(--s3); justify-items: center; }
.sec-center .t-3xl { position: relative; }

/* ---------- HERO v2: cinematic ---------- */
.hero2 { position: relative; isolation: isolate; background: #111111; color: #F2F0EB; min-height: min(calc(100svh - 72px), 900px); display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
.h2-img { position: absolute; inset: 0 0 0 auto; width: 66%; margin: 0; z-index: -2; }
.h2-img img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.h2-img figcaption { position: absolute; right: var(--s5); bottom: 128px; font-size: var(--t-xs); color: rgba(242,240,235,.6); background: rgba(17,17,17,.45); padding: .3em .7em; border-radius: 6px; }
.hero2::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, #111111 0%, #111111 32%, rgba(17,17,17,.82) 44%, rgba(17,17,17,.2) 66%, rgba(17,17,17,0) 80%),
  linear-gradient(0deg, #111111 0%, rgba(17,17,17,.0) 34%); }
.h2-in { display: flex; align-items: center; padding-block: clamp(3rem, 6vw, 6rem) var(--s6); }
.h2-copy { max-width: 600px; margin-right: auto; margin-left: 0; display: grid; gap: var(--s5); justify-items: start; }
:root[dir="rtl"] .h2-copy { justify-items: start; text-align: right; }
.h2-copy .lk { margin-bottom: var(--s2); }
.h2-disc { font-family: var(--f-mont); font-size: var(--t-xs); letter-spacing: .32em; color: #C9C6BF; font-weight: 500; }
:root[lang="ar"] .h2-disc { letter-spacing: .04em; font-family: var(--f-ar-d); }
.h2-title { font-size: clamp(2.6rem, 1.4rem + 4.2vw, 5.4rem); line-height: 1.05; font-weight: 800; color: #F2F0EB; }
:root[lang="ar"] .h2-title { line-height: 1.3; font-weight: 900; }
.h2-title::after { content: ""; display: block; width: 72px; height: 4px; background: var(--canary); margin-top: var(--s5); border-radius: 2px; }
.h2-lede { font-size: var(--t-lg); line-height: 1.7; color: #D3D0C9; max-width: 50ch; }
.hero2 .btn.ghost { --b-fg: #F2F0EB; border-color: rgba(242,240,235,.4); }
.hero2 .btn.ghost:hover { border-color: #F2F0EB; }
.h2-barwrap { padding-bottom: var(--s6); }
.h2-bar { list-style: none; margin: 0; padding: var(--s5) var(--s4); display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); background: rgba(28,28,30,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(242,240,235,.12); border-radius: 16px; }
.h2-bar li { display: flex; gap: var(--s4); align-items: center; padding-inline: var(--s5); }
.h2-bar li + li { border-inline-start: 1px solid rgba(242,240,235,.14); }
.h2-bar .ic { width: 40px; height: 40px; color: var(--canary); flex: none; }
.h2-bar .ic svg { width: 40px; height: 40px; }
.h2-bar b { display: block; font-size: var(--t-md); color: #F2F0EB; }
.h2-bar small { display: block; color: #A8A49C; font-size: var(--t-sm); }
.hero2 .h2-copy > * { animation: rise 900ms var(--ease-out) both; }
.hero2 .h2-copy > :nth-child(2) { animation-delay: 120ms; } .hero2 .h2-copy > :nth-child(3) { animation-delay: 220ms; }
.hero2 .h2-copy > :nth-child(4) { animation-delay: 320ms; } .hero2 .h2-copy > :nth-child(5) { animation-delay: 420ms; }
.h2-img img { animation: settle 2.4s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.08); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 1000px) {
  .hero2 { min-height: auto; }
  .h2-img { position: relative; inset: auto; width: 100%; height: 56vw; max-height: 460px; grid-row: 1; }
  .h2-img figcaption { bottom: var(--s4); }
  .hero2::before { background: linear-gradient(180deg, rgba(17,17,17,0) 0%, rgba(17,17,17,0) 30%, #111111 min(56vw, 460px)); }
  .h2-in { grid-row: 2; padding-top: 0; margin-top: -64px; position: relative; }
  .h2-copy { max-width: none; margin: 0; }
  .h2-barwrap { grid-row: 3; }
  .h2-bar { grid-template-columns: 1fr 1fr; row-gap: var(--s5); }
  .h2-bar li:nth-child(3) { border-inline-start: 0; }
}
@media (max-width: 560px) {
  .h2-bar { grid-template-columns: 1fr; padding: var(--s3) var(--s4); }
  .h2-bar li { padding: var(--s3) 0; border-inline-start: 0 !important; }
  .h2-bar li + li { border-top: 1px solid rgba(242,240,235,.12); }
  .hero2 .hero-ctas .btn { flex: 1 1 100%; }
}

/* ---------- Division cards ---------- */
.dcards { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: var(--s4); }
.dcard { position: relative; overflow: hidden; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: var(--s3); padding: var(--s6) var(--s5) var(--s5); min-height: 360px; background: var(--bg-2); border: 1px solid var(--rule); border-radius: 18px; text-decoration: none; transition: transform var(--d-mid) var(--ease-out), border-color var(--d-mid); }
.dcard::after { content: ""; position: absolute; inset-inline-end: -60px; top: -60px; width: 160px; height: 160px; border: 2px solid var(--canary); border-radius: 50%; opacity: 0; transform: scale(.6); transition: opacity var(--d-mid), transform 600ms var(--ease-out); pointer-events: none; }
.dcard:hover, .dcard:focus-visible { transform: translateY(-4px); border-color: rgba(254,203,0,.6); }
.dcard:hover::after, .dcard:focus-visible::after { opacity: .5; transform: scale(1); }
.dc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.dc-ic { width: 48px; height: 48px; color: var(--canary); }
.dc-ic svg { width: 48px; height: 48px; }
.dc-name { font-family: var(--f-mont); font-size: 1.05rem; margin-top: var(--s4); text-align: start; }
:root[dir="rtl"] .dc-name { text-align: right; }
.dc-name b { font-weight: 700; color: var(--fg); }
.dc-name i { font-style: normal; font-weight: 600; color: var(--canary); }
.dcard h3 { font-size: var(--t-xl); line-height: 1.25; }
.dcard p { color: var(--fg-2); font-size: var(--t-sm); line-height: 1.7; }
.dc-go { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); border: 1px solid rgba(254,203,0,.55); color: var(--fg); border-radius: 999px; padding: .65em 1.1em; font-weight: 700; font-size: var(--t-sm); transition: background var(--d-fast), color var(--d-fast); }
.dcard:hover .dc-go { background: var(--canary); color: #111111; border-color: var(--canary); }
@media (max-width: 1200px) { .dcards { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px) { .dcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .dcards { grid-template-columns: 1fr; } .dcard { min-height: 0; } }

/* ---------- Mobile Hub feature ---------- */
.hubf { background: var(--bg-2); }
.hubf-in { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,5fr); gap: var(--s7) var(--gutter); align-items: center; }
.hubf-img { margin: 0; position: relative; border-radius: 22px; overflow: hidden; }
.hubf-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.hubf-img figcaption, .hub-strip figcaption { position: absolute; inset-inline-start: var(--s4); bottom: var(--s4); font-size: var(--t-xs); color: #E9E6DF; background: rgba(17,17,17,.6); padding: .3em .7em; border-radius: 6px; max-width: calc(100% - 2rem); }
.hubf-copy { display: grid; gap: var(--s4); justify-items: start; }
.hubf-tag { font-family: var(--f-display); font-size: var(--t-xl); font-weight: 700; color: var(--canary); }
.hubf-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s5); width: 100%; }
.hubf-list li { display: flex; gap: var(--s2); align-items: baseline; font-size: var(--t-sm); font-weight: 600; }
.hubf-list li::before { content: ""; width: 8px; height: 8px; background: var(--canary); border-radius: 2px; flex: none; transform: translateY(-1px); }
.hubf-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; padding-block: var(--s3); border-block: 1px solid var(--rule); width: 100%; }
@media (max-width: 960px) { .hubf-in { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .hubf-list { grid-template-columns: 1fr; } }

/* Hub page */
.hub-hero { position: relative; isolation: isolate; background: #111111; color: #F2F0EB; min-height: 560px; display: grid; align-items: end; overflow: hidden; }
.hub-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hub-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #111111 8%, rgba(17,17,17,.55) 45%, rgba(17,17,17,.15) 100%); }
.hub-hero-in { padding-block: var(--s9) var(--s7); display: grid; gap: var(--s4); }
.hub-hero .crumbs { display: flex; gap: var(--s2); flex-wrap: wrap; font-size: var(--t-sm); color: #C9C6BF; }
.hub-hero .crumbs a { text-decoration: none; }
.svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s4); }
.svc { background: var(--bg); border: 1px solid var(--rule); border-radius: 16px; padding: var(--s5); display: grid; gap: var(--s2); align-content: start; }
.svc-n { width: 36px; height: 36px; display: grid; place-items: center; background: var(--canary); color: #111111; font-weight: 800; border-radius: 8px; font-family: var(--f-mont); font-size: var(--t-sm); margin-bottom: var(--s2); }
.svc h3 { font-size: var(--t-lg); }
.svc p { color: var(--fg-2); font-size: var(--t-sm); }
@media (max-width: 1000px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .svc-grid { grid-template-columns: 1fr; } }
.hub-strip { margin: 0; position: relative; border-radius: 20px; overflow: hidden; }
.hub-strip img { width: 100%; }
.hub-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-top: var(--s7); }
@media (max-width: 800px) { .hub-two { grid-template-columns: 1fr; } }
.nolist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); font-size: var(--t-sm); }
.nolist li { display: flex; gap: var(--s3); }
.nolist li::before { content: "×"; color: #E0613F; font-weight: 800; }
.chips-row { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ---------- Founder v2 (photo-led, calligraphic mark small) ---------- */
.founder2 { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); gap: var(--s8) var(--gutter); align-items: center; }
.f2-photo { margin: 0; position: relative; border-radius: 22px; overflow: hidden; background: #1C1C1E; }
.f2-photo > img:first-child { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 20%; }
.f2-photo::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: var(--canary); }
.f2-mark { position: absolute; inset-inline-end: var(--s4); bottom: var(--s5); width: 72px; height: auto; background: rgba(17,17,17,.7); padding: 8px; border-radius: 10px; }
.f2-copy { display: grid; justify-items: start; }
.f2-facts { margin: var(--s6) 0 0; display: grid; gap: 0; border-top: 1px solid var(--rule); width: 100%; }
.f2-facts > div { display: grid; grid-template-columns: 10rem minmax(0,1fr); gap: var(--s4); padding-block: var(--s3); border-bottom: 1px solid var(--rule); font-size: var(--t-sm); }
.f2-facts dt { color: var(--fg-3); }
.f2-facts dd { margin: 0; font-weight: 600; }
@media (max-width: 860px) { .founder2 { grid-template-columns: 1fr; } .f2-photo { max-width: 460px; } }
@media (max-width: 420px) { .f2-facts > div { grid-template-columns: 1fr; gap: var(--s1); } }

/* Light theme keeps the cinematic hero dark */
:root[data-theme="light"] .hero2 .btn:not(.ghost) { --b-bg: var(--canary); --b-fg: #111111; }
@media (max-width: 1000px) { .h2-copy .lk { display: none; } .h2-in { margin-top: -40px; } }
.founder2 .founder-h { margin-bottom: var(--s6); }
@media (max-width: 560px) { .hubf-img figcaption, .hub-strip figcaption { font-size: .66rem; } }
@media (max-width: 1000px) { .h2-in { margin-top: 0; padding-top: var(--s5); } .h2-img figcaption { bottom: auto; top: var(--s3); } }
.hub-strip figcaption { position: static; display: block; background: none; color: var(--fg-3); padding: var(--s3) 0 0; max-width: none; }
.hub-hero::before { background: linear-gradient(0deg, #111111 12%, rgba(17,17,17,.75) 50%, rgba(17,17,17,.35) 100%); }

/* Products v2 — refined dark cards, product colour as an accent only */
.prods2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s4); }
.prod2 { position: relative; overflow: hidden; display: grid; gap: var(--s2); align-content: start; padding: var(--s6); min-height: 300px; background: var(--bg); border: 1px solid var(--rule); border-radius: 20px; text-decoration: none; transition: transform var(--d-mid) var(--ease-out), border-color var(--d-mid); }
.prod2::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--ph); }
.prod2::after { content: ""; position: absolute; inset-inline-end: -90px; bottom: -90px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid var(--ph); opacity: .35; transition: transform 700ms var(--ease-out), opacity var(--d-mid); }
.prod2:hover, .prod2:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--ph) 60%, transparent); }
.prod2:hover::after { transform: scale(1.25); opacity: .6; }
.p2-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s5); }
.p2-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ph); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ph) 22%, transparent); }
.p2-name { font-family: var(--f-mont); font-weight: 800; font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1; letter-spacing: -.01em; color: var(--fg); direction: ltr; text-align: start; }
:root[dir="rtl"] .p2-name { text-align: right; }
.p2-ar { font-family: var(--f-ar-d); font-weight: 700; color: var(--fg-2); font-size: var(--t-lg); }
.p2-line { color: var(--fg-2); max-width: 40ch; margin-top: var(--s3); }
.p2-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-top: auto; padding-top: var(--s5); border-top: 1px solid var(--rule); font-size: var(--t-xs); color: var(--fg-3); position: relative; z-index: 1; }
.prod2 { grid-template-rows: auto auto auto 1fr auto; }
@media (max-width: 760px) { .prods2 { grid-template-columns: 1fr; } .prod2 { min-height: 0; padding: var(--s5); } }

/* ---------- Portfolio v3 — ten projects, grouped, image-led cards ---------- */
.pf { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: var(--s4); }
.pf-group { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); padding-top: var(--s5); margin-top: var(--s3); border-top: 1px solid var(--rule); }
.pf-group:first-child { margin-top: 0; }
.pf-gt { font-family: var(--f-display); font-weight: 800; font-size: var(--t-lg); color: var(--fg); }
.pf-gt::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--canary); border-radius: 2px; margin-inline-end: .6em; }
.pf-gd { color: var(--fg-3); font-size: var(--t-sm); }
.pf-card { grid-column: span 2; display: grid; grid-template-rows: auto 1fr; overflow: hidden; background: var(--bg-2); border: 1px solid var(--rule); border-radius: 18px; text-decoration: none; transition: transform var(--d-mid) var(--ease-out), border-color var(--d-mid), box-shadow var(--d-mid); }
.pf-card.g-civic { grid-column: span 3; }
.g-portfolio:nth-last-child(-n+2) { grid-column: span 3; }
.pf-card:hover, .pf-card:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--acc) 65%, transparent); box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--acc) 60%, transparent); }
.pf-media { position: relative; aspect-ratio: 16/9; overflow: hidden; display: grid; place-items: center; color: color-mix(in srgb, var(--acc) 55%, transparent); }
.g-civic .pf-media, .g-portfolio:nth-last-child(-n+2) .pf-media { aspect-ratio: 16/7.5; }
.pf-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.pf-card:hover .pf-photo { transform: scale(1.05); }
.pf-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,10,10,.75) 0%, rgba(10,10,10,0) 55%); pointer-events: none; }
.pf-pat { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.pf-logo { position: relative; z-index: 1; width: auto; height: 42%; max-width: 46%; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
.pf-logo.tile { border-radius: 18%; height: 38%; }
.pf-logo.screen { position: absolute; inset-inline-end: 6%; top: 50%; transform: translateY(-50%); height: 56%; mix-blend-mode: screen; filter: none; }
.pf-wm { position: relative; z-index: 1; font-family: var(--f-mont); font-weight: 300; font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.8rem); letter-spacing: .08em; color: #EDE8FF; }
.pf-num { position: absolute; z-index: 2; inset-inline-start: var(--s4); top: var(--s4); font-family: var(--f-mont); font-weight: 800; font-size: var(--t-sm); color: #111; background: var(--acc); border-radius: 8px; padding: .2em .55em; }
.pf-stat { position: absolute; z-index: 2; inset-inline-end: var(--s4); bottom: var(--s3); background: rgba(10,10,10,.6); backdrop-filter: blur(6px); border-radius: 999px; padding: .3em .8em; }
.pf-stat .status { color: #F2F0EB; }
.pf-body { display: grid; gap: var(--s2); align-content: start; padding: var(--s5); }
.pf-type { font-size: var(--t-xs); font-weight: 700; color: var(--acc); }
.pf-en { font-family: var(--f-mont); font-weight: 800; font-size: var(--t-xl); line-height: 1.1; color: var(--fg); direction: ltr; text-align: start; }
:root[dir="rtl"] .pf-en { text-align: right; }
.pf-ar { font-family: var(--f-ar-d); font-size: var(--t-lg); font-weight: 700; color: var(--fg-2); letter-spacing: 0; }
.pf-line { color: var(--fg-2); font-size: var(--t-sm); line-height: 1.7; }
.pf-mods { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pf-mods span { font-family: var(--f-mont); font-size: .7rem; font-weight: 600; border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent); color: var(--fg); border-radius: 999px; padding: .25em .7em; }
.pf-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--rule); font-size: var(--t-xs); }
.pf-rel { color: var(--fg-3); }
.pf-go { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 700; color: var(--fg); border: 1px solid color-mix(in srgb, var(--acc) 55%, transparent); border-radius: 999px; padding: .45em .9em; transition: background var(--d-fast), color var(--d-fast); }
.pf-card:hover .pf-go { background: var(--acc); color: #111; }
@media (max-width: 1100px) { .pf { grid-template-columns: repeat(2, minmax(0,1fr)); } .pf-card, .pf-card.g-civic, .g-portfolio:nth-last-child(-n+2) { grid-column: span 1; } .pf-media, .g-civic .pf-media, .g-portfolio:nth-last-child(-n+2) .pf-media { aspect-ratio: 16/9; } }
@media (max-width: 640px) { .pf { grid-template-columns: 1fr; } }

/* Production v4 */
.h2-img { width: 100%; }
.h2-img img { object-position: 100% 50%; }
.hero2::before { background:
  linear-gradient(90deg, #111111 0%, rgba(17,17,17,.94) 28%, rgba(17,17,17,.6) 46%, rgba(17,17,17,.08) 70%, rgba(17,17,17,0) 100%),
  linear-gradient(0deg, #111111 0%, rgba(17,17,17,0) 36%); }
@media (max-width: 1000px) { .h2-img img { object-position: 85% 50%; } }
.form-error { color: #FF8A73; font-size: var(--t-sm); }
:root[data-theme="light"] .form-error { color: #B3361C; }
.h2-img img { object-position: 56% 50%; }
@media (max-width: 1000px) { .h2-img img { object-position: 70% 50%; } }

/* Owner-supplied logos */
.pf-logo.lockup { height: 78%; max-width: 60%; }
.f2-mark { inset-inline-start: var(--s5); inset-inline-end: auto; top: var(--s5); bottom: auto; width: clamp(72px, 7vw, 104px); background: none; padding: 0; border-radius: 0; mix-blend-mode: lighten; filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }
.ph-logo { width: clamp(140px, 16vw, 220px); height: auto; margin-bottom: var(--s4); }
.pf-logo.lockup { height: 70%; transform: translateY(-6%); z-index: 3; }
.pf-logo.lockup { height: 64%; transform: translateY(-8%); }
.pf-logo.lockup { position: absolute; top: 50%; left: 50%; height: 74%; width: auto; max-width: 70%; transform: translate(-50%, -50%); }

/* ---------- v5: Mobile Center gallery ---------- */
.hub-seq { margin: 0 0 var(--s5); }
.hub-seq img { width: 100%; border-radius: 20px; display: block; }
.hub-seq figcaption, .hub-gal figcaption { font-size: var(--t-sm); color: var(--fg-3); padding-top: var(--s2); }
.hub-gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5) var(--s4); }
.hub-gal figure { margin: 0; }
.hub-gal img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.hub-gal figure { overflow: visible; }
@media (hover: hover) { .hub-gal figure:hover img { transform: scale(1.015); } }
@media (max-width: 900px) { .hub-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .hub-gal { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .hub-gal img { transition: none; } }

/* ---------- v6: headline accent, closing, partnership band ---------- */
.h2-title .y { color: var(--canary); }
.h2-disc { font-size: var(--t-sm); letter-spacing: .02em; color: var(--canary); font-weight: 700; }
:root[lang="en"] .h2-disc { letter-spacing: .12em; text-transform: uppercase; font-size: var(--t-xs); }
.closing .big { font-size: clamp(2.4rem, 1rem + 5vw, 5.5rem); max-width: none; }
.closing-sub { color: var(--fg-2); font-size: var(--t-lg); max-width: 52ch; margin-top: var(--s5); line-height: 1.7; }
.closing .hero-ctas { margin-top: var(--s6); }

.band { background: var(--canary); color: var(--canary-ink); padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.band .wrap.band-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s5) var(--s7); align-items: center; }
.band h2 { font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem); line-height: 1.25; max-width: 24ch; grid-column: auto; }
.band-copy p { margin-top: var(--s3); font-size: var(--t-md); opacity: .8; }
.band-act { display: flex; flex-wrap: wrap; gap: var(--s3); }
.band .ptypes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: 0; padding-top: var(--s5); border-top: 1px solid rgba(21,23,26,.18); }
.band .ptypes a { border: 1px solid rgba(21,23,26,.28); border-radius: 999px; padding: .45em 1em; font-size: var(--t-sm); font-weight: 600; transition: background .2s, color .2s; }
@media (max-width: 800px) { .band .wrap.band-in { grid-template-columns: minmax(0, 1fr); } }

/* ---------- v6: project page — cover, brief, value, action ---------- */
.pc { position: relative; overflow: hidden; color: #F2F0EB; min-height: clamp(520px, 74vh, 780px); display: flex; align-items: flex-end; isolation: isolate; }
.pc-bg { position: absolute; inset: 0; z-index: -2; }
.pc-bg img { width: 100%; height: 100%; object-fit: cover; }
.pc.pc-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10,10,10,.92) 0%, rgba(10,10,10,.55) 45%, rgba(10,10,10,.25) 100%); }
.pc-in { width: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s7); align-items: center; padding-block: calc(var(--s8) + 40px) var(--s8); }
.pc .crumbs { color: rgba(242,240,235,.7); margin-bottom: var(--s6); }
.pc .crumbs a { color: inherit; }
.pc-stat .status { color: #F2F0EB; }
.pc-name { font-family: var(--f-ar-d); font-weight: 800; font-size: clamp(2.6rem, 1.2rem + 5vw, 5.2rem); line-height: 1.15; margin-top: var(--s4); }
.pc-en { font-family: var(--f-mont); font-weight: 700; letter-spacing: .04em; font-size: var(--t-lg); color: var(--acc); margin-top: var(--s2); }
.pc-line { font-size: var(--t-xl); line-height: 1.5; max-width: 30ch; margin-top: var(--s4); font-weight: 500; }
.pc-note { font-size: var(--t-sm); color: rgba(242,240,235,.72); margin-top: var(--s3); }
.pc .hero-ctas { margin-top: var(--s6); }
.pc-vis { display: grid; place-items: center; }
.pc-logo { max-width: min(100%, 420px); max-height: 300px; width: auto; height: auto; filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); }
.pc-logo.tile { width: clamp(160px, 22vw, 260px); border-radius: 28px; }
.pc-logo.screen { mix-blend-mode: screen; border-radius: 20px; max-width: min(100%, 300px); }
.pc.pc-photo .pc-vis { align-self: end; }
.pc-brief .wrap { max-width: 980px; }
.pc-text { font-size: clamp(1.25rem, 1rem + .8vw, 1.7rem); line-height: 1.75; color: var(--fg); margin-top: var(--s3); }
.pc-vals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s4); margin-top: var(--s6); }
.pc-val { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: var(--s5); display: grid; gap: var(--s4); align-content: start; border-top: 3px solid var(--canary); }
.pc-val span { font-family: var(--f-mont); font-weight: 800; color: var(--canary); font-size: var(--t-lg); }
.pc-val p { font-size: var(--t-lg); font-weight: 600; line-height: 1.5; color: var(--fg); }
.pc-cta-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); padding: var(--s7); border-radius: 24px; background: #151515; color: #F2F0EB; margin-bottom: var(--s7); }
.pc-cta-in h2 { font-size: var(--t-2xl); }
@media (max-width: 860px) {
  .pc-in { grid-template-columns: minmax(0, 1fr); }
  .pc-vis { order: -1; justify-items: start; }
  .pc-logo { max-height: 150px; max-width: 70%; }
  .pc.pc-photo .pc-vis { display: none; }
}
.pc .crumbs { display: flex; flex-wrap: wrap; gap: .5em; font-size: var(--t-sm); }
.pc-logo:not(.lockup):not(.tile):not(.screen) { width: clamp(150px, 20vw, 260px); }
.pc-cta { padding-top: var(--s6); }
@media (max-width: 860px) { .pc-logo:not(.lockup):not(.tile):not(.screen) { width: 110px; } }
:root[lang="en"] .pc-name { font-family: var(--f-mont); letter-spacing: -.02em; line-height: 1.05; }
:root[lang="en"] .pc-en { font-family: var(--f-ar-d); letter-spacing: 0; }

/* ---------- v6b: menu at the start edge, closing strip, compact ecosystem ---------- */
.menu-btn { order: -1; }
.hdr .wrap > .nav { margin-inline-start: auto; }
.hdr-tools { margin-inline-start: auto; }
.menu { --ox: 0%; }
:root[dir="rtl"] .menu { --ox: 100%; }

.closing { padding-block: clamp(3rem, 2rem + 3vw, 5rem); border-top: 1px solid var(--rule); }
.closing-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6) var(--s8); align-items: center; }
.closing .big { font-size: clamp(2.2rem, 1rem + 3.4vw, 4.2rem); }
.closing-sub { margin-top: 0; font-size: var(--t-md); }
.closing-act .hero-ctas { margin-top: var(--s5); }
@media (max-width: 860px) { .closing-in { grid-template-columns: minmax(0, 1fr); } }

.eco { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: var(--s6) var(--s7); align-items: center; }
.eco-fig, .eco-rts { max-width: 600px; }
.eco-panel { position: static; }
.eco-legend { margin-top: var(--s4); gap: var(--s2); }
@media (max-width: 960px) { .eco { grid-template-columns: minmax(0, 1fr); } .eco-fig, .eco-rts { margin-inline: auto; } }

/* ---------- v7: problem / solution / vision ---------- */
.pc-psv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.psv { padding: var(--s6) var(--s5); border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: var(--s3); align-content: start; }
.psv span { font-weight: 800; font-size: var(--t-sm); color: var(--fg-3); }
.psv p { font-size: var(--t-lg); line-height: 1.65; font-weight: 600; color: var(--fg); }
.psv-solution { border-color: color-mix(in srgb, var(--canary) 45%, transparent); }
.psv-vision { background: var(--canary); border-color: var(--canary); }
.psv-vision span, .psv-vision p { color: var(--canary-ink); }
@media (max-width: 860px) { .pc-psv { grid-template-columns: minmax(0, 1fr); } }
.pf-logo.mark, .pc-logo.mark { width: clamp(120px, 14vw, 200px); height: auto; }
.pf-logo.mark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34%; }
.hub-gal:has(> figure:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 520px) { .hub-gal:has(> figure:nth-child(4):last-child) { grid-template-columns: minmax(0, 1fr); } }

.status[data-s="approved"]::before { background: var(--canary); border-color: var(--canary); border-radius: 50%; }
/* core group now has four projects: two per row */
@media (min-width: 1101px) { .pf-card.g-core { grid-column: span 3; } .g-core .pf-media { aspect-ratio: 16/8; } }
