/* ──────────────────────────────────────────────────────────
   PINNACLE CAPITAL — Production stylesheet (Step B · brand)
   Tokens from the Design System: navy + sky + coral
   Type: Cormorant Garamond (display) · Inter (body) · Year of the Camel (Arabic)
   ────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Year of the Camel';
  src: url('./assets/fonts/YearOfTheCamel-Light.otf') format('opentype');
  font-weight: 300; font-display: swap;
}
@font-face {
  font-family: 'Year of the Camel';
  src: url('./assets/fonts/YearOfTheCamel-Regular.otf') format('opentype');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Year of the Camel';
  src: url('./assets/fonts/YearOfTheCamel-Medium.otf') format('opentype');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Year of the Camel';
  src: url('./assets/fonts/YearOfTheCamel-Bold.otf') format('opentype');
  font-weight: 700; font-display: swap;
}

/* ── Light theme overrides ──────────────────────────────── */
[data-theme="light"] {
  --ink: var(--navy);
  --ink-soft: var(--slate-600);
  --line: var(--rule-light);
}
[data-theme="light"] html,
[data-theme="light"] body { background: var(--white); color: var(--navy); }
[data-theme="light"] body { color: var(--navy); }
[data-theme="light"] .site-header { background: rgba(255,255,255,0.92); border-bottom-color: var(--rule-light); }
[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3, [data-theme="light"] h4 { color: var(--navy); }
[data-theme="light"] .lede { color: var(--slate-600); }
[data-theme="light"] .section-kicker { color: var(--navy); }
[data-theme="light"] .mono { color: var(--slate-500); }
[data-theme="light"] .pillar p,
[data-theme="light"] .frameless-card .sub,
[data-theme="light"] .news-row .arr,
[data-theme="light"] .news-row .meta { color: var(--slate-600); }
[data-theme="light"] .nav-main a { color: var(--navy); }
[data-theme="light"] .nav-main a[aria-current="page"] { color: var(--sky-700); }
[data-theme="light"] .nav-main a:hover { color: var(--navy); }
[data-theme="light"] .menu-button { border-color: var(--slate-500); }
[data-theme="light"] .menu-button span { background: var(--navy); }
[data-theme="light"] .lang-toggle,
[data-theme="light"] .contact-link,
[data-theme="light"] .theme-toggle { border-color: var(--slate-500); color: var(--slate-500); }
[data-theme="light"] .lang-toggle:hover,
[data-theme="light"] .contact-link:hover,
[data-theme="light"] .theme-toggle:hover { color: var(--navy); border-color: var(--navy); }
[data-theme="light"] .portal-link { border-color: var(--slate-500); color: var(--slate-500); background: transparent; }
[data-theme="light"] .portal-link:hover { background: var(--coral); border-color: var(--coral); color: var(--navy); }
[data-theme="light"] .menu-drawer { background: var(--paper); color: var(--navy); border-color: var(--rule-light); }
[data-theme="light"] .menu-drawer .top { border-bottom-color: var(--rule-light); }
[data-theme="light"] .menu-drawer .close { border-color: var(--rule-light); color: var(--navy); }
[data-theme="light"] .menu-list a { color: var(--navy); }
[data-theme="light"] .menu-list .menu-section-title { color: var(--slate-500); }
[data-theme="light"] .menu-drawer .foot { border-color: var(--rule-light); color: var(--slate-500); }
[data-theme="light"] .menu-drawer .foot h5 { color: var(--slate-500); }
[data-theme="light"] .stage { background: var(--white); }
[data-theme="light"] .stage-dot .dot { background: var(--slate-300); opacity: 1; }
[data-theme="light"] .stage-dot .label { background: var(--white); color: var(--navy); border-color: var(--rule-light); }
[data-theme="light"] .card,
[data-theme="light"] .board-card,
[data-theme="light"] .triage-card,
[data-theme="light"] .frameless-card,
[data-theme="light"] .port-card { background: var(--paper); border-color: var(--rule-light); }
[data-theme="light"] .port-card:hover { background: var(--white); border-color: var(--coral); }
[data-theme="light"] .frameless-card:hover { background: var(--white); border-color: var(--coral); color: var(--navy); }
[data-theme="light"] .frameless-card .name { color: var(--navy); }
[data-theme="light"] .frameless-card .sub { color: var(--slate-600); }
[data-theme="light"] .frameless-card .meta { color: var(--slate-500); border-top-color: var(--rule-light); }
[data-theme="light"] .frameless-card:hover .meta { color: var(--slate-600); }
[data-theme="light"] .person.boxed .back { background: var(--white); }
[data-theme="light"] .team-grid .person.boxed .back { background: var(--white); }
[data-theme="light"] .team-grid .person.boxed .back .name { color: var(--navy); }
[data-theme="light"] .team-grid .person.boxed .back .blurb { color: var(--slate-600); border-top-color: var(--rule-light); }
[data-theme="light"] .triage-card:hover { background: var(--coral); color: var(--navy); border-color: var(--coral); }
[data-theme="light"] .stat-row { border-color: var(--rule-light); }
[data-theme="light"] .stat-row .stat { border-color: var(--rule-light); }
[data-theme="light"] .stat .num { color: var(--navy); }
[data-theme="light"] .person .name,
[data-theme="light"] .board-card .name,
[data-theme="light"] .news-row .h,
[data-theme="light"] .port-info .name { color: var(--navy); }
[data-theme="light"] .stage-arrow { color: var(--coral); }
[data-theme="light"] .stage-arrow:hover:not(:disabled) { color: var(--navy); }
[data-theme="light"] .port-card .logo-wrap img { filter: none; opacity: 1; }
[data-theme="light"] .port-card:hover .logo-wrap img { opacity: 0; }
[data-theme="light"] .port-info { background: var(--white); }
[data-theme="light"] .port-info .desc { color: var(--slate-600); }
[data-theme="light"] .news-row { border-color: var(--rule-light); }
[data-theme="light"] .news-row .yr { color: var(--slate-500); }
[data-theme="light"] .triage-card .sub { color: var(--slate-600); }
[data-theme="light"] .triage-card .email-line { border-color: var(--rule-light); color: var(--slate-500); }
[data-theme="light"] .field input, [data-theme="light"] .field textarea { background: var(--white); border-color: var(--rule-light); color: var(--navy); }
[data-theme="light"] .site-footer { background: var(--paper); border-color: var(--rule-light); }
[data-theme="light"] .brand img { content: url("./assets/brand/logo-reversed.png"); }
[data-theme="light"] .pillar { border-color: var(--coral); }
[data-theme="light"] .person .portrait { background: var(--slate-100, #EEF1F3); }
[data-theme="light"] .person .portrait img { filter: grayscale(100%); }
[data-theme="light"] .person:hover .portrait img { filter: grayscale(0%); }

/* swap logo source in light theme — replace with on-white logo */
[data-theme="light"] .brand img { content: url("./assets/brand/logo-reversed.png"); }

:root {
  /* color · core */
  --navy:       #0F1921;
  --navy-deep:  #08111A;
  --navy-800:   #1A2530;
  --navy-700:   #2A3540;
  --sky:        #0AABC8;
  --sky-700:    #007D94;
  --sky-100:    #E1F4F8;
  --coral:      #FE6F5E;
  --coral-700:  #C84F40;
  --paper:      #F3F4F6;
  --white:      #FFFFFF;

  /* color · neutrals */
  --slate-600:  #3F4850;
  --slate-500:  #5E6770;
  --slate-400:  #A8B3BD;
  --slate-300:  #C8D0D7;

  --rule-dark:  rgba(255,255,255,0.10);
  --rule-light: #DCE1E5;

  /* type · families */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic:  'Year of the Camel', 'IBM Plex Sans Arabic', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* spacing · base 4 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --r-sm: 2px;
  --r-md: 4px;

  --gutter: 56px;
  --max-w: 1320px;
  --header-h: 100px;
  --footer-h: 64px;

  /* convenience aliases for components below */
  --ink: var(--paper);
  --ink-soft: var(--slate-400);
  --line: var(--rule-dark);

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--navy); }
/* Subtle coral scrollbar — keeps the brand cue, gets out of the way */
html { scrollbar-width: thin; scrollbar-color: rgba(254,111,94,0.55) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(254,111,94,0.45); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--coral); }
::-webkit-scrollbar-track { background: transparent; }
[data-theme="light"] html { scrollbar-color: rgba(254,111,94,0.45) transparent; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(254,111,94,0.4); }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--paper);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body[dir="rtl"] { font-family: var(--font-arabic); line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* ── Type ───────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.02;
  margin: 0;
  color: var(--paper);
}
body[dir="rtl"] h1, body[dir="rtl"] h2, body[dir="rtl"] h3, body[dir="rtl"] h4 {
  font-family: var(--font-arabic);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}
h1 { font-size: clamp(40px, 5.4vw, 72px); }
h2 { font-size: clamp(30px, 3.6vw, 48px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); }
h4 { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.22; }

/* italic + sky accent on key words — core brand pattern */
h1 em, h2 em, h3 em, .lede em {
  font-style: italic;
  color: var(--sky);
  font-weight: 500;
}
body[dir="rtl"] h1 em, body[dir="rtl"] h2 em, body[dir="rtl"] h3 em {
  font-style: normal;
  color: var(--sky);
}

p { margin: 0; }
.lede {
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.65;
  color: var(--slate-400);
}
body[dir="rtl"] .lede { font-family: var(--font-arabic); font-weight: 400; }

/* eyebrow rule + caps */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--slate-400);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 40px; height: 1px;
  background: var(--coral);
}
body[dir="rtl"] .eyebrow { font-family: var(--font-mono); }
body[dir="rtl"] .eyebrow::before { content: none; }
body[dir="rtl"] .eyebrow::after {
  content: "";
  display: inline-block;
  width: 40px; height: 1px;
  background: var(--coral);
  margin-right: 6px;
}

/* section kicker — display font, larger eyebrow */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.01em;
  color: var(--paper);
  line-height: 1;
  margin-bottom: 18px;
}
.section-kicker em { font-style: italic; color: var(--sky); }
.section-kicker::before {
  content: ""; display: inline-block;
  width: 40px; height: 1px;
  background: var(--coral);
  flex-shrink: 0;
}
body[dir="rtl"] .section-kicker {
  font-family: var(--font-arabic);
  font-weight: 700;
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0;
  height: var(--header-h);
  background: rgba(15, 25, 33, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule-dark);
  z-index: 50;
}
.site-header .row {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px;
  position: relative;
  direction: ltr; /* logo always left, controls always right — in both languages */
}
.brand { flex-shrink: 0; display: inline-flex; align-items: center; height: 62px; }
.brand img { height: 62px; width: auto; display: block; }
.header-left { display: contents; }
.nav-main {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; gap: 6px; align-items: center;
}
body[dir="rtl"] .nav-main { direction: rtl; }
.nav-main a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--paper);
  position: relative;
  letter-spacing: -0.005em;
  line-height: 1;
  transition: color 200ms ease, background 200ms ease;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  height: 40px;
}
body[dir="rtl"] .nav-main a { font-family: var(--font-arabic); font-weight: 500; font-size: 24px; }
.nav-main a:hover { color: var(--paper); }
.nav-main a[aria-current="page"] {
  color: var(--paper);
  background: transparent;
  border-color: transparent;
  font-weight: 700;
}
.nav-main a[aria-current="page"]:hover { color: var(--paper); }
.nav-main a[aria-current="page"]::after {
  content: "";
  display: block;
  position: absolute;
  left: 14px; right: 14px;
  bottom: 0px;
  height: 1px;
  background: var(--coral);
}
[data-theme="light"] .nav-main a[aria-current="page"] { color: var(--sky-700); }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-toggle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  height: 34px;
  padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--slate-400);
  border-radius: var(--r-sm);
  color: var(--slate-400);
  transition: all 200ms;
  line-height: 1;
}
.lang-toggle:hover { color: var(--coral); border-color: var(--coral); }
.lang-toggle[hreflang="ar"] { font-family: var(--font-arabic); font-size: 16px; letter-spacing: 0; padding-bottom: 2px; }

.portal-link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  height: 34px;
  padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--slate-400);
  background: transparent;
  color: var(--slate-400);
  border-radius: var(--r-sm);
  transition: background 200ms, color 200ms, border-color 200ms;
  white-space: nowrap;
  line-height: 1;
  overflow: hidden;
}
.portal-link .portal-icon { width: 16px; height: 16px; max-width: 16px; display: block; flex-shrink: 0; overflow: hidden; transition: max-width 260ms cubic-bezier(0.65,0,0.2,1), opacity 180ms, margin 260ms; }
.portal-link .portal-label {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 0; opacity: 0; margin-left: 0;
  overflow: hidden;
  transition: max-width 300ms cubic-bezier(0.65,0,0.2,1), opacity 200ms, margin-left 300ms cubic-bezier(0.65,0,0.2,1);
}
.portal-link:hover, .portal-link:focus-visible { background: var(--coral); border-color: var(--coral); color: var(--navy); }
.portal-link:hover .portal-icon, .portal-link:focus-visible .portal-icon { max-width: 0; opacity: 0; margin: 0; }
.portal-link:hover .portal-label, .portal-link:focus-visible .portal-label { max-width: 260px; opacity: 1; margin-left: 0; }
.portal-link .arr { font-size: 12px; opacity: 0.9; }

.contact-link {
  background: transparent;
  border: 1px solid var(--slate-400);
  border-radius: var(--r-sm);
  height: 34px; width: 34px; padding: 0;
  color: var(--slate-400);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 200ms;
}
.contact-link:hover { color: var(--coral); border-color: var(--coral); }
.contact-link svg { width: 16px; height: 16px; display: block; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--slate-400);
  border-radius: var(--r-sm);
  height: 34px;
  width: 34px;
  padding: 0;
  color: var(--slate-400);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 0;
  transition: all 200ms;
}
.theme-toggle:hover { color: var(--coral); border-color: var(--coral); }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.menu-button {
  border: 1px solid var(--slate-400);
  border-radius: var(--r-sm);
  height: 34px;
  width: 34px;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  justify-content: center;
  transition: border-color 200ms;
}
.menu-button:hover { border-color: var(--coral); }
.menu-button:hover span { background: var(--coral); }
.menu-button span { display: block; width: 16px; height: 1.5px; background: var(--paper); }

/* ── Menu drawer ────────────────────────────────────────── */
.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  opacity: 0; pointer-events: none;
  transition: opacity 240ms ease;
}
.menu-overlay.is-open { opacity: 1; pointer-events: auto; }
.menu-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(400px, 88vw);
  background: var(--navy-deep);
  color: var(--paper);
  border-left: 1px solid var(--rule-dark);
  z-index: 100;
  display: flex; flex-direction: column;
  padding: 22px 32px 28px;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.65, 0, 0.2, 1);
  box-shadow: -16px 0 48px rgba(0,0,0,0.5);
}
body[dir="rtl"] .menu-drawer {
  /* Drawer stays docked on the right in both languages, matching the right-aligned menu button. */
  right: 0; left: auto;
  border-right: none; border-left: 1px solid var(--rule-dark);
  transform: translateX(100%);
}
body[dir="rtl"] .menu-drawer.is-open { transform: translateX(0); }
.menu-drawer.is-open { transform: translateX(0); }
.menu-drawer .top {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule-dark);
  margin-bottom: 22px;
}
.menu-drawer .top .brand { height: 32px; }
.menu-drawer .top .brand img { height: 30px; width: auto; border-radius: 5px; }
.menu-drawer .close {
  border: 1px solid var(--rule-dark);
  color: var(--paper);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  transition: all 200ms;
}
.menu-drawer .close:hover { background: var(--coral); border-color: var(--coral); color: var(--navy); }
.menu-list { display: flex; flex-direction: column; gap: 0; flex: 1; }
.menu-list a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--paper);
  padding: 7px 0;
  letter-spacing: -0.005em;
  transition: color 200ms;
  display: flex; align-items: center; justify-content: space-between;
  line-height: 1.2;
}
body[dir="rtl"] .menu-list a { font-family: var(--font-arabic); font-weight: 500; font-size: 20px; }
.menu-list a:hover { color: var(--sky); }
.menu-list a:hover .arr { color: var(--sky); }
.menu-list a .arr {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--slate-400);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 200ms;
}
.menu-list a:hover .arr { opacity: 1; transform: translateX(0); }
.menu-list .menu-section-title { display: none; }
.menu-list .portal-cta {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--coral) !important;
  color: var(--navy) !important;
  padding: 12px 16px !important;
  border-radius: var(--r-sm);
  font-family: var(--font-body) !important;
  font-weight: 600;
  font-size: 14px !important;
  letter-spacing: 0.02em;
  margin: 14px 0 0;
  transition: background 200ms;
  line-height: 1;
}
.menu-list .portal-cta:hover { background: var(--coral-700) !important; color: var(--paper) !important; }
.menu-list .portal-cta .arr { color: inherit !important; opacity: 0.9 !important; font-size: 13px !important; transform: none !important; }
.menu-drawer .foot {
  border-top: 1px solid var(--rule-dark);
  padding-top: 18px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--slate-400);
  line-height: 1.6;
}
.menu-drawer .foot h5 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin: 0 0 6px;
  font-weight: 500;
}
.menu-drawer .foot a:hover { color: var(--coral); }
.menu-drawer .foot p { margin: 0 0 10px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: all 200ms;
  font-family: var(--font-body);
  line-height: 1;
}
body[dir="rtl"] .btn { font-family: var(--font-arabic); font-weight: 700; }
.btn-primary {
  background: transparent;
  color: var(--coral);
  border-color: var(--coral);
}
.btn-primary:hover { background: var(--coral); border-color: var(--coral); color: var(--navy); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--slate-400);
}
.btn-ghost:hover { color: var(--paper); border-color: var(--paper); }
.btn .arr { font-size: 14px; line-height: 1; }

/* ── Contact strip (address / phone / email line on contact pages) ────── */
.contact-strip {
  margin-top: 32px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--slate-400);
}
.contact-strip p { margin: 0; }
.contact-strip p + p { margin-top: 6px; }
.contact-strip a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  padding-bottom: 1px;
  transition: color 200ms, border-color 200ms;
}
.contact-strip a:hover { color: var(--coral); border-color: var(--coral); }
.contact-strip .sep { color: var(--slate-400); opacity: 0.5; padding: 0 6px; }
[data-theme="light"] .contact-strip { color: var(--slate-600); }
[data-theme="light"] .contact-strip a { color: var(--navy); border-bottom-color: var(--rule-light); }
[data-theme="light"] .contact-strip a:hover { color: var(--coral); border-color: var(--coral); }
[data-theme="light"] .contact-strip .sep { color: var(--slate-500); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule-dark);
  background: var(--navy-deep);
  padding: 22px 0;
  font-size: 11px;
  color: var(--slate-400);
}
.site-footer .row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-family: var(--font-mono); letter-spacing: 0.06em; }
.site-footer .footer-right { display: inline-flex; align-items: center; gap: 12px; }
.site-footer .footer-right .sep { color: var(--slate-400); opacity: 0.45; transition: color 200ms; }
.site-footer .footer-right span:not(.sep) { color: var(--slate-400); transition: color 200ms; }
.site-footer .footer-right span:not(.sep):hover { color: var(--coral); }
.site-footer .footer-right a {
  color: var(--slate-400);
  display: inline-flex; align-items: center;
  transition: color 200ms;
}
.site-footer .footer-right a:hover { color: var(--coral); }
.site-footer .footer-right .footer-loc { display: inline-flex; align-items: center; gap: 5px; }
.site-footer .footer-right .footer-loc .arr { font-size: 10px; opacity: 0.7; transition: transform 200ms; }
.site-footer .footer-right .footer-loc:hover .arr { transform: translate(2px,-2px); }
.site-footer .footer-right svg { width: 14px; height: 14px; display: block; }
.site-footer a {
  color: var(--slate-400);
  transition: color 200ms;
  display: inline-flex; align-items: center; gap: 6px;
}
.site-footer a:hover { color: var(--coral); }
.site-footer a svg { width: 12px; height: 12px; }

/* ── Slide stage (About + Team) ─────────────────────────── */
.stage {
  position: relative;
  height: calc(100vh - var(--header-h) - var(--footer-h));
  min-height: 540px;
  overflow: hidden;
  background: var(--navy);
  contain: strict;
}
.stage-track {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  transition: transform 720ms cubic-bezier(0.65, 0, 0.2, 1);
  will-change: transform;
  height: 100%;
}
.stage-slide {
  flex: 0 0 100%;
  height: 100%; width: 100%;
  position: relative;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 40px var(--gutter);
  overflow: hidden;
}

.stage-arrow {
  position: absolute;
  width: 28px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(254, 111, 94, 0.55);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  transition: transform 200ms, color 200ms;
  z-index: 4;
  background: none; border: none; padding: 0;
}
.stage-arrow:hover:not(:disabled) { color: var(--coral); }
.stage-arrow svg { width: 18px; height: 9px; }
.stage-arrow:disabled { opacity: 0.25; cursor: not-allowed; }
.stage-arrow.up { top: auto; bottom: calc(50% + 90px); left: auto; right: 18px; transform: none; }
.stage-arrow.up:hover:not(:disabled) { transform: translateY(-3px); color: var(--coral); }
.stage-arrow.down { bottom: calc(50% - 110px); left: auto; right: 18px; transform: none; }
.stage-arrow.down:hover:not(:disabled) { transform: translateY(3px); color: var(--coral); }
body[dir="rtl"] .stage-arrow.up,
body[dir="rtl"] .stage-arrow.down { right: auto; left: 18px; }

.stage-dots {
  position: absolute;
  top: 50%; right: 24px;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 3;
}
body[dir="rtl"] .stage-dots { right: auto; left: 24px; }
.stage-dot {
  display: inline-flex; align-items: center; justify-content: flex-end;
  background: transparent; border: none; padding: 2px 6px 2px 0;
  cursor: pointer; position: relative;
}
.stage-dot .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--slate-400);
  opacity: 0.4;
  border-radius: 2px;
  transition: all 300ms;
}
.stage-dot[aria-current="true"] .dot { height: 28px; background: var(--coral); opacity: 1; }
.stage-dot .label {
  position: absolute;
  right: 18px;
  top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms;
  background: var(--navy-800);
  padding: 5px 10px;
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-sm);
}
body[dir="rtl"] .stage-dot .label { right: auto; left: 18px; }
.stage-dot:hover .label, .stage-dot:focus-visible .label { opacity: 1; }

/* ── Cards & primitives ─────────────────────────────────── */
.card {
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-md);
  background: var(--navy-800);
  padding: 24px;
  transition: all 200ms;
}
.card.feature { border-color: var(--sky); border-width: 1px; }

.tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--coral);
  border-radius: 999px;
  background: transparent;
  color: var(--coral);
}
.tag.sky { border-color: var(--sky); color: var(--sky); }

.pillar {
  border-left: 1px solid var(--coral);
  padding: 6px 0 6px 22px;
}
body[dir="rtl"] .pillar { border-left: none; border-right: 1px solid var(--coral); padding: 6px 22px 6px 0; }
.pillar .num {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 500;
  font-style: italic;
  color: var(--sky);
  line-height: 1;
}
.pillar h4 { margin-top: 14px; color: var(--sky); font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; }
.pillar p { margin-top: 10px; font-size: 16px; color: var(--slate-400); line-height: 1.55; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule-dark);
}
.stat-row .stat { padding: 26px; border-left: 1px solid var(--rule-dark); }
.stat-row .stat:first-child { border-left: none; }
body[dir="rtl"] .stat-row .stat { border-left: none; border-right: 1px solid var(--rule-dark); }
body[dir="rtl"] .stat-row .stat:first-child { border-right: none; }
.stat .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-top: 12px;
}

/* Section tabs (Team page) */
.section-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  background: var(--navy-800);
}
.section-tabs button {
  background: transparent;
  border: none;
  color: var(--slate-400);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms;
  line-height: 1;
}
.section-tabs button:hover { color: var(--paper); }
.section-tabs button.is-active {
  background: var(--sky);
  color: var(--paper);
  font-weight: 700;
}

/* ── Person card (Team) ─────────────────────────────────── */
.person { display: flex; flex-direction: column; position: relative; }
.person.boxed {
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  position: relative;
  overflow: visible;
  transition: border-color 240ms;
  border-radius: var(--r-md);
}
.person.boxed:hover { border-color: var(--coral); }
.person.boxed .face { display: flex; flex-direction: column; transition: opacity 260ms ease; }
.person.boxed .face .portrait { margin-bottom: 16px; }
.person.boxed .back {
  position: absolute;
  inset: 22px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.person.boxed:hover .face { opacity: 0; }
.person.boxed:hover .back { opacity: 1; pointer-events: auto; }
.person.boxed .back .name {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--paper);
}
.person.boxed .back .role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--coral);
  margin-top: 8px;
  text-transform: uppercase;
}
.person.boxed .back .blurb {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-dark);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--slate-400);
  flex: 1;
  overflow: auto;
}
.person .blurb-overlay { display: none; }
/* Unified card grid — 3 per row, centered — same dim as other pages */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 200px);
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}
.team-grid .person.boxed { padding: 0; width: 200px; display: flex; flex-direction: column; position: relative; }
.team-grid .person.boxed .face { display: flex; flex-direction: column; }
.team-grid .person.boxed .face .portrait {
  width: 200px;
  height: 200px;
  aspect-ratio: 1/1;
  background: var(--sky);
  margin-bottom: 10px;
  overflow: hidden;
  position: relative;
  padding-top: 26px;
  padding-bottom: 0;
  flex-shrink: 0;
}
.team-grid .person.boxed .face .portrait img {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  height: calc(100% - 26px);
  object-fit: cover;
  object-position: center bottom;
}
.team-grid .person.boxed .face .name,
.team-grid .person.boxed .back .name { font-size: 15px; }
.team-grid .person.boxed .face .role,
.team-grid .person.boxed .back .role { font-size: 9px; margin-top: 5px; }
.team-grid .person.boxed .back { inset: 0; background: var(--navy); padding: 16px; }
.team-grid .person.boxed .back .blurb { font-size: 11px; line-height: 1.5; margin-top: 10px; padding-top: 10px; }
body[dir="rtl"] .team-grid .person.boxed .face .name,
body[dir="rtl"] .team-grid .person.boxed .back .name { font-family: var(--font-arabic); font-weight: 700; }

/* Option 2: no-picture frameless card */
.frameless-grid {
  display: grid;
  grid-template-columns: repeat(3, 280px);
  gap: 22px;
  justify-content: center;
  margin-top: 24px;
}
.frameless-card {
  width: 280px;
  height: 280px;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 26px;
  transition: border-color 240ms, background 240ms;
  background: var(--navy-800);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.frameless-card:hover { border-color: var(--coral); background: var(--navy-deep); }
.frameless-card .name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin-top: 0;
}
body[dir="rtl"] .frameless-card .name { font-family: var(--font-arabic); font-weight: 700; }
body[dir="rtl"] .port-info .name,
body[dir="rtl"] .news-row .h,
body[dir="rtl"] .triage-card .h,
body[dir="rtl"] .board-card .name,
body[dir="rtl"] .person .name,
body[dir="rtl"] .stat .num,
body[dir="rtl"] .pillar .num { font-family: var(--font-arabic); font-weight: 700; font-style: normal; }
.frameless-card .role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral);
  margin-top: 8px;
}
.frameless-card .sub {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--slate-400);
  flex: 1;
}
.frameless-card .meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule-dark);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-400);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.frameless-card:hover .meta { color: var(--paper); }
.frameless-card .meta .arrow { font-size: 14px; transition: transform 200ms; }
.frameless-card:hover .meta .arrow { transform: translateX(4px); color: var(--coral); }
[data-theme="light"] .person.boxed { background: var(--paper); border-color: var(--rule-light); }
[data-theme="light"] .person.boxed:hover { background: var(--white); border-color: var(--coral); }
[data-theme="light"] .person.boxed .face .portrait { background: #E5E9ED; }
[data-theme="light"] .person.boxed .back .name { color: var(--navy); }
[data-theme="light"] .person.boxed .back .blurb { border-color: var(--rule-light); color: var(--slate-600); }
.col-5 { grid-template-columns: repeat(5, 1fr); }
.person .portrait {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--sky);
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
  padding-top: 28px;
}
.person .portrait img {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  height: calc(100% - 28px);
  object-fit: cover;
  object-position: center bottom;
  filter: grayscale(100%);
  transition: filter 300ms ease, transform 600ms ease;
}
.person:hover .portrait img { filter: grayscale(0%); transform: scale(1.03); }
.person .blurb-overlay {
  position: absolute;
  inset: 0;
  padding: 24px;
  background: rgba(8, 17, 26, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--paper);
  font-size: 13.5px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  opacity: 0;
  transition: opacity 300ms ease;
}
.person:hover .blurb-overlay { opacity: 1; }
.person .portrait.placeholder {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--rule-dark);
}
.person .portrait.placeholder .initials {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(36px, 4vw, 56px);
  color: var(--slate-400);
  opacity: 0.35;
  font-weight: 500;
}
.person .name {
  font-family: var(--font-display);
  font-size: clamp(22px, 1.8vw, 26px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.person .role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--coral);
  margin-top: 8px;
  text-transform: uppercase;
}
.person.compact .portrait { aspect-ratio: 4/5; }
.person.compact .name { font-size: 18px; }

.board-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  padding: 28px;
  align-items: start;
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-md);
  background: var(--navy-800);
  position: relative;
  overflow: hidden;
  transition: border-color 200ms;
  min-height: 220px;
}
.board-card:hover { border-color: var(--coral); }
.board-card .portrait { aspect-ratio: 1/1; margin: 0; overflow: hidden; position: relative; }
.board-card .portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: grayscale(100%);
  transition: filter 300ms;
}
.board-card:hover .portrait img { filter: grayscale(0%); }
.board-card .name { font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; color: var(--paper); }
.board-card .role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--coral); text-transform: uppercase; margin-top: 8px; }
.board-card .blurb {
  margin-top: 14px;
  font-size: 14px;
  color: var(--slate-400);
  line-height: 1.55;
  opacity: 0;
  max-height: 0;
  transition: opacity 300ms ease, max-height 300ms ease, margin 300ms ease;
}
.board-card:hover .blurb { opacity: 1; max-height: 240px; margin-top: 14px; }

/* ── Portfolio filter ───────────────────────────────────── */
.port-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  padding: 0;
  border: none;
  background: transparent;
  width: 100%;
  position: relative;
}
.port-filter-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--slate-400);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 200ms;
  line-height: 1;
}
.port-filter-btn:hover { color: var(--paper); border-color: var(--coral); background: var(--navy-deep); }
.port-filter-btn.is-active {
  color: var(--paper);
  border-color: var(--coral);
  background: var(--navy-deep);
  font-weight: 700;
}
.port-count { display: none; }
[data-theme="light"] .port-filter-btn { color: var(--slate-600); }
[data-theme="light"] .port-filter-btn:hover,
[data-theme="light"] .port-filter-btn.is-active { color: var(--navy); border-color: var(--coral); background: rgba(254,111,94,0.06); }

/* hide cards based on filter */
.port-grid[data-filter="vc"] .port-card:not(.vc),
.port-grid[data-filter="cat"] .port-card:not(.cat) { display: none; }

@media (max-width: 640px) {
  .port-filter { width: auto; flex-wrap: wrap; }
  .port-count { display: none; }
}

/* ── Portfolio cards ────────────────────────────────────── */
.port-grid {
  display: grid;
  grid-template-columns: repeat(3, 240px);
  gap: 18px;
  justify-content: center;
  margin-top: 18px;
}
.port-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 22px;
  width: 240px;
  height: 240px;
  aspect-ratio: auto;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--navy-800);
  overflow: hidden;
  transition: border-color 200ms, background 200ms;
  text-decoration: none;
}
.port-card:hover { border-color: var(--coral); background: var(--navy-deep); }
body[dir="rtl"] .port-card { padding: 26px; }
.port-card[data-co="carly"] .logo-wrap img,
.port-card[data-co="budget"] .logo-wrap img { max-height: 64px; max-width: 80%; }

.port-stamp {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(10, 171, 200, 0.12);
  color: var(--sky);
  border: 1px solid var(--sky);
  padding: 4px 9px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 200ms;
  writing-mode: horizontal-tb;
  text-orientation: initial;
  transform: none;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.port-card:hover .port-stamp { border-color: var(--coral); background: rgba(254, 111, 94, 0.12); color: var(--coral); }
body[dir="rtl"] .port-stamp { left: auto; right: 14px; transform: none; }

.port-card .logo-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 300ms, transform 300ms;
}
.port-card .logo-wrap img {
  max-height: 110px;
  max-width: 80%;
  width: auto; height: auto;
  object-fit: contain;
}
.port-card[data-co="carly"] .logo-wrap img,
.port-card[data-co="budget"] .logo-wrap img { max-height: 130px; max-width: 90%; }
.port-card:hover .logo-wrap { opacity: 0; transform: scale(0.96); }

.port-info {
  position: absolute;
  inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  color: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  background: var(--navy-deep);
  overflow: hidden;
}
.port-card:hover .port-info { opacity: 1; pointer-events: auto; }
.port-info .name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--paper);
  margin-top: 22px;
}
.port-info .meta {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  margin-top: 4px;
}
.port-info .desc {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--slate-400);
  line-height: 1.45;
  flex: 1;
  overflow: hidden;
}
.port-info .visit {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-400);
  transition: color 200ms;
  width: 100%;
}
.port-card:hover .port-info .visit { color: var(--paper); }
.port-info .visit:hover { color: var(--coral); }
.port-info .visit .arr { font-size: 12px; transition: transform 200ms; }
.port-info .visit:hover .arr { transform: translateX(3px); color: var(--coral); }
.port-card:hover .port-info { opacity: 1; }

/* light theme: port-info reveal stays light to match the card */
[data-theme="light"] .port-info { background: var(--white); color: var(--navy); }
[data-theme="light"] .port-info .desc { color: var(--slate-600); }
[data-theme="light"] .port-card:hover .port-info .visit { color: var(--navy); }
[data-theme="light"] .port-info .visit { border-color: var(--rule-light); }

/* ── News list ──────────────────────────────────────────── */
.news-list { display: flex; flex-direction: column; margin-top: 4px; }
.news-row {
  display: grid;
  grid-template-columns: 80px 1fr 140px auto;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-dark);
  transition: padding 200ms;
  cursor: pointer;
}
.news-row:hover { padding-left: 8px; }
body[dir="rtl"] .news-row:hover { padding-left: 0; padding-right: 8px; }
.news-row:last-child { border-bottom: none; }
.news-row .yr { font-family: var(--font-mono); font-size: 12px; color: var(--slate-400); }
.news-row .h {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--paper);
}
body[dir="rtl"] .news-row .h { font-family: var(--font-arabic); font-weight: 700; }
.news-row .arr { font-size: 18px; color: var(--slate-400); transition: color 200ms; }
.news-row:hover .arr { color: var(--coral); }
/* Type tag: neutral, no coral */
.news-row .tag { border-color: var(--rule-dark); color: var(--slate-400); }
[data-theme="light"] .news-row .tag { border-color: var(--rule-light); color: var(--slate-500); }
/* Merged Read + arrow */
.news-row .news-meta-2 { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.news-row .read-label { font-family: var(--font-mono); font-size: 12px; color: var(--slate-400); letter-spacing: 0.02em; transition: color 200ms; }
.news-row:hover .read-label { color: var(--paper); }
[data-theme="light"] .news-row:hover .read-label { color: var(--navy); }

/* ── Triage cards (Contact) ─────────────────────────────── */
.triage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.triage-card {
  display: flex; flex-direction: column;
  padding: 24px;
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-md);
  min-height: 240px;
  background: var(--navy-800);
  transition: all 240ms;
  cursor: pointer; text-decoration: none; color: inherit;
}
.triage-card:hover {
  background: var(--coral); color: var(--navy);
  border-color: var(--coral);
  transform: translateY(-2px);
}
.triage-card:hover .num, .triage-card:hover .h, .triage-card:hover .sub, .triage-card:hover .email-line, .triage-card:hover .footer-row { color: inherit; }
.triage-card .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  color: var(--sky);
}
.triage-card:hover .num { color: var(--navy); }
.triage-card .h { font-family: var(--font-display); font-size: 26px; font-weight: 500; margin-top: 20px; line-height: 1.15; }
.triage-card .sub { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--slate-400); }
.triage-card:hover .sub { color: rgba(15,25,33,0.78); }
.triage-card .email-line {
  margin-top: auto;
  font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 1px solid var(--rule-dark); padding-top: 16px;
  color: var(--slate-400);
}
.triage-card:hover .email-line { border-color: rgba(15,25,33,0.2); color: rgba(15,25,33,0.8); }
.triage-card .footer-row { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.triage-card .footer-row .small { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate-400); }
.triage-card:hover .footer-row .small { color: rgba(15,25,33,0.6); }
.triage-card .footer-row .arrow { font-size: 18px; }
.triage-card.featured { background: rgba(254, 111, 94, 0.10); border-color: var(--coral); }
.triage-card.featured:hover { background: var(--coral); }

/* ── Form ───────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field input,
.field textarea {
  padding: 13px 14px;
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-sm);
  font: inherit;
  background: var(--navy-800);
  color: var(--paper);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--coral); }
.field textarea { resize: vertical; }

/* ── Page hero (inner pages) ────────────────────────────── */
.page-head { padding: 64px 0 32px; }
.page-head .section-kicker { margin-bottom: 0; }
.page-head h1 { margin-top: 18px; max-width: 1000px; text-wrap: balance; }
.page-head .lede { margin-top: 22px; max-width: 720px; }

/* Portfolio: kicker + filter row — filter pushed to right */
.page-head.with-filter { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; padding-bottom: 16px; }
.page-head.with-filter .section-kicker { margin-bottom: 0; }
.page-head.with-filter .port-filter { margin-top: 0; width: auto; justify-content: flex-end; flex-wrap: wrap; }

/* ── Hero (home only) ───────────────────────────────────── */
.hero {
  height: calc(100vh - var(--header-h) - var(--footer-h));
  min-height: 600px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.hero h1 { max-width: 1180px; text-wrap: balance; margin-top: 32px; }
.hero .lede { margin-top: 36px; max-width: 640px; }
.hero .cta-row { margin-top: 44px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .corner-meta {
  position: absolute;
  bottom: 32px; right: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-400);
  padding-right: var(--gutter);
}
body[dir="rtl"] .hero .corner-meta { right: auto; left: 0; padding: 0 0 0 var(--gutter); }
.hero .corner-meta::before {
  content: ""; display: inline-block;
  width: 24px; height: 1px;
  background: var(--coral);
  margin-right: 10px;
  vertical-align: middle;
}

.page-body {
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 32px 0 48px;
}
.page-body > .container { width: 100%; }
.page-head { padding: 0 0 20px; }

/* ── Grid helpers ───────────────────────────────────────── */
.grid { display: grid; }
.gap-16 { gap: 16px; } .gap-22 { gap: 22px; } .gap-28 { gap: 28px; } .gap-32 { gap: 32px; }
.col-2 { grid-template-columns: repeat(2, 1fr); }
.col-3 { grid-template-columns: repeat(3, 1fr); }
.col-4 { grid-template-columns: repeat(4, 1fr); }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --gutter: 20px; --header-h: 64px; }
  /* Mobile header: logo + AR + menu only */
  .nav-main { display: none; }
  .portal-link { display: none; }
  .contact-link { display: none; }
  .brand { height: 38px; }
  .brand img { height: 38px; }
  .menu-button { display: inline-flex; }

  /* Two-per-row collapse for content grids on mobile */
  .col-3, .col-4 { grid-template-columns: repeat(2, 1fr); }
  .team-grid, .frameless-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .team-grid .person.boxed,
  .frameless-grid .frameless-card { width: 100%; max-width: 100%; }
  .team-grid .person.boxed { height: auto; }
  .team-grid .person.boxed .face .portrait { width: 100%; height: auto; aspect-ratio: 1/1; }
  .frameless-card { height: auto; min-height: 200px; padding: 20px; }
  .frameless-card .name { font-size: 18px; }
  .frameless-card .sub { font-size: 12px; }
  .port-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .port-card { width: 100%; }
  .triage { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .triage-card:last-child { grid-column: 1 / -1; }

  /* About / Track record — 2 pillars per row */
  .grid.col-4 { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* Stat row stays 2 columns */
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-row .stat { border-left: none; border-top: 1px solid var(--rule-dark); }
  .stat-row .stat:nth-child(2n) { border-left: 1px solid var(--rule-dark); }
  body[dir="rtl"] .stat-row .stat:nth-child(2n) { border-left: none; border-right: 1px solid var(--rule-dark); }

  .news-row { grid-template-columns: 56px 1fr auto; }
  .news-row .news-meta-1, .news-row .read-label { display: none; }
  .board-card { grid-template-columns: 110px 1fr; gap: 18px; padding: 18px; }
  .board-card .blurb { display: block; opacity: 1; max-height: none; }
  .person .blurb-overlay { opacity: 1; transform: translateY(0); }
  .header-left { gap: 0; }

  /* Smaller h1/h2 to fit narrow viewports */
  h1 { font-size: clamp(32px, 7vw, 48px); }
  h2 { font-size: clamp(24px, 5vw, 36px); }

  /* Slide stage arrows tighter to edge */
  .stage-arrow.up,
  .stage-arrow.down { right: 8px; }
  body[dir="rtl"] .stage-arrow.up,
  body[dir="rtl"] .stage-arrow.down { right: auto; left: 8px; }

  /* Stage: drop the carousel on mobile — let slides flow vertically so the page scrolls naturally */
  .stage { height: auto; contain: none; overflow: visible; }
  .stage-track {
    position: static; inset: auto;
    flex-direction: column;
    transform: none !important;
    height: auto;
  }
  .stage-slide {
    flex: 0 0 auto;
    height: auto; width: 100%;
    justify-content: flex-start;
    padding: 28px var(--gutter) 36px;
    overflow: visible;
  }
  .stage-slide + .stage-slide { border-top: 1px solid var(--rule-dark); }
  .stage-arrow, .stage-dots { display: none; }

  /* Home hero: must fit one viewport on phones — no scroll */
  .hero {
    height: auto;
    min-height: 0;
    padding: 18px 0 14px;
  }
  .hero h1 { margin-top: 14px; line-height: 1.05; }
  .hero .lede { margin-top: 16px; font-size: 14.5px; line-height: 1.55; }
  .hero .cta-row { margin-top: 22px; gap: 10px; }
  .hero .btn { padding: 11px 18px; font-size: 13px; }
  .section-kicker { font-size: 18px; gap: 10px; margin-bottom: 12px; }
  .section-kicker::before { width: 24px; }

  /* Portfolio: filter chips stay top-right next to title, not under */
  .page-head.with-filter { padding-top: 4px; padding-bottom: 8px; gap: 12px; }
  .port-filter { width: auto; gap: 4px; }
  .port-filter-btn { padding: 6px 10px; font-size: 10px; letter-spacing: 0.1em; }
  /* Larger port-info name room on smaller cards */
  .port-info { padding: 18px; }
  .port-info .name { font-size: 22px; margin-top: 18px; }

  /* Footer: single line on mobile — hide secondary side */
  .site-footer { padding: 16px 0; }
  .site-footer .row { flex-direction: row; align-items: center; justify-content: center; gap: 8px; text-align: center; }
  .site-footer .footer-right { display: none; }
  .site-footer > .container > span:first-child { font-size: 10px; }
@media (max-width: 640px) {
  .col-2 { grid-template-columns: 1fr; }
  .team-grid, .frameless-grid, .port-grid, .triage, .grid.col-4 { grid-template-columns: 1fr; }
  .triage-card:last-child { grid-column: auto; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-row .stat { border-left: none !important; border-top: 1px solid var(--rule-dark); }
  .stat-row .stat:first-child { border-top: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
