/* EigenSim website — styled to the EigenSim brand book 1.0
   Archivo for words, JetBrains Mono for numbers and labels.
   Eigen Navy and Signal Cyan, the contour scale, and one hot point per view. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-latin.woff2) format('woff2-variations');
}

:root {
  /* brand palette */
  --es-navy: #0B1B2B;
  --es-abyss: #081220;
  --es-depth: #14395E;
  --es-cyan: #2BD9E8;
  --es-teal: #0E7C8C;
  --es-hotspot: #FF5B4A;
  --es-paper: #FAFBFC;
  --es-cloud: #F2F5F8;
  --es-white: #FFFFFF;
  --es-graphite: #3D4A58;
  --es-steel: #5A6774;
  --es-slate: #7A8794;
  --es-fog: #AAB6C2;
  --es-mist: #DDE3EA;
  --es-line-dark: #1F3550;
  --es-surface-dark: #10263B;
  --contour-v: linear-gradient(0deg, #0B1B2B 0%, #102A44 12.5%, #14395E 25%, #145A75 37.5%, #0E7C8C 50%, #1CA9B9 62.5%, #2BD9E8 75%, #9BEBF3 87.5%, #E3FCFE 100%);

  /* roles */
  --ink: var(--es-navy);
  --ink-2: var(--es-graphite);
  --ink-3: var(--es-steel);
  --paper: var(--es-paper);
  --plate: var(--es-white);
  --cloud: var(--es-cloud);
  --rule: var(--es-mist);
  --accent-text: var(--es-teal);
  --dark: var(--es-navy);
  --darker: var(--es-abyss);
  --on-dark: var(--es-white);
  --on-dark-2: var(--es-fog);
  --on-dark-3: var(--es-slate);
  --rule-dark: var(--es-line-dark);
  --focus: var(--es-teal);

  --font: 'Archivo', 'Commissioner', Arial, sans-serif;
  --mono: 'JetBrains Mono', Consolas, Menlo, monospace;
  --pad: clamp(20px, 4.2vw, 56px);
  --max: 1280px;
  --section: clamp(72px, 8.5vw, 128px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html[lang="ja"] { --font: 'Noto Sans JP', 'Archivo', sans-serif; }
html[lang="ja"] h1 { word-break: keep-all; overflow-wrap: anywhere; }
html[lang="ar"] { --font: 'Noto Sans Arabic', 'Archivo', sans-serif; --font-head: 'Noto Kufi Arabic', 'Noto Sans Arabic', sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html[lang="ja"] body { line-height: 1.85; }
html[lang="ar"] body { line-height: 1.8; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--es-cyan); color: var(--es-navy); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.theme-dark :focus-visible, .site-header :focus-visible, .mobile-menu :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--es-cyan); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--es-cyan); color: var(--es-navy); padding: 10px 14px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.icon { width: 24px; height: 24px; flex: 0 0 auto; }

/* ---------- type scale (brand book 04) ---------- */
h1, h2, .display {
  font-family: var(--font-head, var(--font));
  font-stretch: 112.5%;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-wrap: balance;
}
.display { font-stretch: 125%; letter-spacing: -0.02em; line-height: 1.02; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] .display,
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] .display { font-stretch: 100%; letter-spacing: 0; line-height: 1.3; }
h1 { font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.75rem); }
h3 { font-size: 1.3125rem; line-height: 1.3; font-weight: 600; }
html[lang="ja"] h3, html[lang="ar"] h3 { line-height: 1.45; }
.lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.5; max-width: 52ch; }
html[lang="ja"] .lead { max-width: 34em; }
.small { font-size: .875rem; line-height: 1.5; }
.label, .eyebrow {
  font-family: var(--mono); font-weight: 500; font-size: .75rem; line-height: 1.4;
  letter-spacing: .14em; text-transform: uppercase;
}
html[lang="ar"] .label, html[lang="ar"] .eyebrow { letter-spacing: 0; font-family: var(--font); font-weight: 600; }
.data { font-family: var(--mono); font-weight: 400; font-size: .875rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--accent-text); margin-bottom: 18px; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.theme-dark .eyebrow, .hero .eyebrow { color: var(--es-cyan); }
html[dir="rtl"] .eyebrow::before { order: 0; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: 0;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn .icon { width: 18px; height: 18px; }
html[dir="rtl"] .btn .icon, html[dir="rtl"] .industry-count .icon { transform: scaleX(-1); }
.btn-primary { background: var(--es-cyan); color: var(--es-navy); }
.btn-primary:hover { background: #5FE3EE; }
.btn-dark { background: var(--es-navy); color: #fff; }
.btn-dark:hover { background: var(--es-depth); }
.btn-ghost { border-color: var(--es-fog); color: var(--on-dark); background: transparent; }
.btn-ghost:hover { border-color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.text-link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em; color: var(--accent-text); }
.text-link:hover { text-decoration-thickness: 2px; }
.theme-dark .text-link, .hero .text-link { color: var(--es-cyan); }

/* ---------- dark blocks ---------- */
.theme-dark { background: var(--dark); color: var(--on-dark); }
.theme-dark ::selection { background: var(--es-cyan); color: var(--es-navy); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--es-navy); color: var(--on-dark);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule-dark); }
.header-row { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; padding-block: 12px; }
.brand svg { width: 150px; height: auto; }
.primary-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.primary-nav a {
  position: relative; text-decoration: none; color: var(--on-dark-2); font-size: .9375rem; font-weight: 500;
  padding: 8px 12px; transition: color .15s;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: #fff; }
.primary-nav a[aria-current="page"]::after { content: ''; position: absolute; inset-inline: 12px; bottom: 0; height: 2px; background: var(--es-cyan); }
.header-tools { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; align-items: center; gap: 2px; }
.lang-switch a {
  font-family: var(--mono); font-weight: 500; font-size: .75rem; letter-spacing: .08em; line-height: 1;
  text-decoration: none; color: var(--on-dark-3); padding: 7px 7px;
}
.lang-switch a:hover { color: #fff; }
.lang-switch a[aria-current="true"] { color: var(--es-navy); background: var(--es-cyan); }
.menu-toggle { display: none; background: none; border: 1px solid var(--es-fog); color: #fff; min-height: 40px; padding: 6px 12px; font-weight: 600; font-size: .9375rem; cursor: pointer; align-items: center; gap: 8px; }
.menu-toggle .icon { width: 20px; height: 20px; }
.mobile-menu { display: none; }

@media (max-width: 1080px) {
  .primary-nav, .header-tools .lang-switch, .header-tools .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-tools { margin-inline-start: auto; }
  .mobile-menu {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    background: var(--es-navy); color: var(--on-dark);
    padding: 24px var(--pad) 40px; overflow-y: auto; flex-direction: column; gap: 0;
  }
  .mobile-menu.is-open { display: flex; }
  .mobile-menu > a:not(.btn) { font-size: 1.5rem; font-stretch: 112.5%; font-weight: 600; text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--rule-dark); }
  .mobile-menu .btn { margin-top: 28px; align-self: flex-start; }
  .mobile-menu .lang-row { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; }
  .mobile-menu .lang-row a { color: var(--on-dark-2); text-decoration: none; font-size: 1rem; padding: 4px 0; }
  .mobile-menu .lang-row a[aria-current="true"] { color: #fff; box-shadow: inset 0 -2px 0 var(--es-cyan); }
  body.menu-open { overflow: hidden; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  background: var(--es-abyss) url(../brand/resolution-field-tonal-dark.svg) center / cover no-repeat;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px);
  align-items: center; padding-block: clamp(56px, 7vw, 104px) clamp(40px, 5vw, 72px);
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; position: relative; z-index: 2; container-type: inline-size; }
.hero-copy h1 { font-size: clamp(2.25rem, 11.4cqi, 4rem); }
html[lang="de"] .hero-copy h1 { font-size: clamp(2rem, 10cqi, 3.5rem); }
html[lang="ja"] .hero-copy h1 { font-size: clamp(1.9rem, 9cqi, 3.1rem); }
html[lang="ar"] .hero-copy h1 { font-size: clamp(2.1rem, 11cqi, 3.75rem); }
.hero-copy .eyebrow { margin-bottom: 0; }
.hero-copy .lead { color: var(--on-dark-2); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 8px; }

/* result viewport: mesh, field, legend, one marker */
.viewport {
  position: relative; aspect-ratio: 7 / 5.2; width: 100%;
  border: 1px solid var(--rule-dark); background: var(--es-abyss); overflow: hidden;
}
.viewport canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.vp-caption { position: absolute; inset-inline-start: 18px; top: 16px; display: flex; flex-direction: column; gap: 4px; max-width: 58%; z-index: 2; }
.vp-title { font-family: var(--mono); font-weight: 500; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--es-cyan); display: flex; align-items: center; gap: 8px; }
html[lang="ar"] .vp-title { font-family: var(--font); letter-spacing: 0; font-weight: 600; }
.vp-model { font-family: var(--mono); font-size: .75rem; color: var(--on-dark-2); line-height: 1.5; }
.vp-legend { position: absolute; inset-inline-end: 18px; top: 16px; height: min(44%, 220px); display: grid; grid-template-columns: auto 10px; grid-template-rows: auto 1fr; column-gap: 8px; row-gap: 8px; z-index: 2; }
.vp-legend-title { grid-column: 1 / -1; font-family: var(--mono); font-size: .6875rem; color: var(--on-dark-2); text-align: end; max-width: 14ch; justify-self: end; line-height: 1.35; }
.vp-legend-bar { grid-column: 2; grid-row: 2; position: relative; background: var(--contour-v); border: 1px solid var(--rule-dark); }
.vp-legend-bar::before { content: ''; position: absolute; inset: -1px -1px auto -1px; height: 9%; background: var(--es-hotspot); }
.vp-legend-ticks { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--mono); font-size: .6875rem; color: var(--on-dark-2); font-variant-numeric: tabular-nums; text-align: end; line-height: 1; }
.vp-modes { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; display: flex; align-items: stretch; border-top: 1px solid var(--rule-dark); background: rgba(8, 18, 32, .82); }
.vp-modes-unit { display: none; }
.vp-modes-label { display: flex; align-items: center; padding-inline: 16px; font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-3); line-height: 1.35; max-width: 132px; border-inline-end: 1px solid var(--rule-dark); }
html[lang="ar"] .vp-modes-label { font-family: var(--font); letter-spacing: 0; text-transform: none; }
.vp-mode {
  position: relative; flex: 1 1 0; min-width: 0; background: none; border: 0; cursor: pointer;
  padding: 12px 10px 13px; text-align: start; color: var(--on-dark-2);
  display: flex; flex-direction: column; gap: 3px; border-inline-end: 1px solid var(--rule-dark);
}
.vp-mode:last-child { border-inline-end: 0; }
.vp-mode .f { font-family: var(--mono); font-size: .9375rem; font-weight: 500; color: var(--on-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-mode .u { color: var(--on-dark-2); font-weight: 400; }
.vp-mode .mn { font-family: var(--mono); font-size: .6875rem; white-space: nowrap; color: var(--on-dark-3); }
.vp-mode:hover .f { color: #fff; }
.vp-mode[aria-checked="true"] { background: rgba(43, 217, 232, .08); }
.vp-mode[aria-checked="true"]::before { content: ''; position: absolute; inset-inline: 0; top: -1px; height: 2px; background: var(--es-cyan); }
.vp-mode[aria-checked="true"] .f { color: var(--es-cyan); }
.vp-mode:focus-visible { outline-offset: -3px; }
.vp-note { position: absolute; inset-inline-start: 18px; bottom: calc(var(--bar-h, 62px) + 14px); font-family: var(--mono); font-size: .6875rem; color: var(--on-dark-3); max-width: 46ch; z-index: 2; line-height: 1.45; }

.hero-facts { position: relative; z-index: 2; }
.hero-facts dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--plate); color: var(--ink); border: 1px solid var(--rule); }
.hero-facts .fact { padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 6px; }
.hero-facts .fact + .fact { border-inline-start: 1px solid var(--rule); }
.hero-facts dt { font-family: var(--font-head, var(--font)); font-stretch: 112.5%; font-weight: 600; font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); letter-spacing: -0.015em; line-height: 1.05; font-variant-numeric: tabular-nums; }
html[lang="ja"] .hero-facts dt, html[lang="ar"] .hero-facts dt { font-stretch: 100%; letter-spacing: 0; }
.hero-facts dd { font-size: .9375rem; color: var(--ink-2); line-height: 1.45; max-width: 30ch; }
.hero-facts-wrap { padding-bottom: clamp(40px, 5vw, 72px); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .viewport { aspect-ratio: 4 / 3.4; }
  .hero-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-facts .fact:nth-child(3) { border-inline-start: 0; }
  .hero-facts .fact:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 620px) {
  .viewport { aspect-ratio: auto; height: 470px; }
  .vp-caption { max-width: 64%; }
  .vp-legend { height: 150px; inset-inline-end: 12px; }
  .vp-modes { flex-wrap: wrap; }
  .vp-modes-label { flex: 1 0 100%; max-width: none; padding: 8px 14px; border-inline-end: 0; border-bottom: 1px solid var(--rule-dark); display: block; }
  .vp-modes-unit { display: inline; }
  .vp-mode { padding: 10px 6px; align-items: center; text-align: center; }
  .vp-mode .mn, .vp-mode .u { display: none; }
  .vp-mode .f { font-size: .875rem; }
  .vp-note { inset-inline-end: 70px; }
  .hero-facts dl { grid-template-columns: 1fr; }
  .hero-facts .fact, .hero-facts .fact + .fact { padding: 18px 20px; border-inline-start: 0; }
  .hero-facts .fact + .fact { border-top: 1px solid var(--rule); }
}

/* ---------- sections ---------- */
.section { padding-block: var(--section); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px clamp(28px, 4vw, 64px); align-items: end; margin-bottom: clamp(36px, 4.5vw, 64px); }
.section-head p { color: var(--ink-2); max-width: 54ch; }
.theme-dark .section-head p { color: var(--on-dark-2); }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* services */
.services { background: var(--paper); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px clamp(32px, 5vw, 88px); align-items: start; }
.split-aside { position: sticky; top: calc(var(--header-h) + 32px); display: flex; flex-direction: column; gap: 18px; }
.split-aside p { color: var(--ink-2); max-width: 40ch; }
.service-list { border-top: 1px solid var(--ink); }
.service { display: grid; grid-template-columns: 40px minmax(0, 4fr) minmax(0, 7fr); gap: 12px 28px; padding: 30px 0 34px; border-bottom: 1px solid var(--rule); }
.service .icon { width: 28px; height: 28px; color: var(--accent-text); margin-top: 2px; }
.service h3 { font-size: 1.3125rem; }
.service-body { display: flex; flex-direction: column; gap: 14px; }
.service-body p { color: var(--ink-2); max-width: 62ch; }
.service-get { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .9375rem; color: var(--ink) !important; }
.service-get span { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); line-height: 1.8; }
html[lang="ar"] .service-get span { font-family: var(--font); letter-spacing: 0; font-weight: 600; }
@media (max-width: 920px) {
  .split { grid-template-columns: 1fr; }
  .split-aside { position: static; }
  .service { grid-template-columns: 40px minmax(0, 1fr); }
  .service-body { grid-column: 2; }
}

/* capabilities */
.caps { background: var(--es-navy); }
.cap-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule-dark); overflow-x: auto; scrollbar-width: none; margin-bottom: 36px; }
.cap-tabs::-webkit-scrollbar { display: none; }
.cap-tab {
  position: relative; flex: 0 0 auto; background: none; border: 0; cursor: pointer;
  padding: 14px 20px 16px; color: var(--on-dark-3); font-weight: 600; font-size: 1rem; transition: color .15s;
}
.cap-tab:first-child { padding-inline-start: 0; }
.cap-tab:hover { color: var(--on-dark); }
.cap-tab[aria-selected="true"] { color: #fff; }
.cap-tab[aria-selected="true"]::after { content: ''; position: absolute; inset-inline: 20px; bottom: -1px; height: 2px; background: var(--es-cyan); }
.cap-tab:first-child[aria-selected="true"]::after { inset-inline-start: 0; }
.cap-tab:focus-visible { outline-offset: -4px; }
.cap-panel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 4.5vw, 72px); align-items: start; }
.cap-panel[hidden] { display: none; }
.cap-figure { background: var(--plate); }
.cap-figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.cap-figure figcaption { background: var(--es-navy); color: var(--on-dark-3); font-family: var(--mono); font-size: .75rem; padding-top: 12px; line-height: 1.5; }
.cap-text { display: flex; flex-direction: column; gap: 18px; padding-top: 4px; }
.cap-text h3 { font-family: var(--font-head, var(--font)); font-size: clamp(1.5rem, 1.2rem + .9vw, 1.875rem); font-stretch: 112.5%; letter-spacing: -0.01em; display: flex; align-items: center; gap: 14px; }
html[lang="ja"] .cap-text h3, html[lang="ar"] .cap-text h3 { font-stretch: 100%; letter-spacing: 0; }
.cap-text h3 .icon { width: 32px; height: 32px; color: var(--es-cyan); }
.cap-text p { color: var(--on-dark-2); }
.cap-list { border-top: 1px solid var(--rule-dark); }
.cap-list li { padding: 11px 0; border-bottom: 1px solid var(--rule-dark); display: flex; gap: 12px; align-items: baseline; }
.cap-list li::before { content: ''; flex: 0 0 14px; height: 1px; transform: translateY(-5px); background: var(--es-cyan); }
@media (max-width: 920px) { .cap-panel { grid-template-columns: 1fr; } }

/* case study */
.case { background: var(--plate); }
.case-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 20px clamp(28px, 4vw, 64px); align-items: end; margin-bottom: clamp(36px, 4.5vw, 64px); }
.case-head > p { color: var(--ink-2); max-width: 54ch; }
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 32px); }
.stage { display: grid; grid-template-columns: 1fr; gap: 14px; align-content: start; }
.stage-figure { position: relative; border: 1px solid var(--rule); background: var(--plate); }
.stage-figure img { width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; }
.stage-no {
  position: absolute; inset-inline-start: 0; top: 0; min-width: 36px; height: 30px; padding-inline: 10px;
  display: grid; place-items: center; background: var(--es-navy); color: #fff;
  font-family: var(--mono); font-weight: 500; font-size: .75rem; letter-spacing: .1em; font-variant-numeric: tabular-nums;
}
.stage h3 { font-size: 1.125rem; }
.stage p { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
.case-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; margin-top: clamp(36px, 4vw, 56px); padding-top: 26px; border-top: 1px solid var(--ink); }
.case-outcome { display: flex; gap: 16px; align-items: baseline; max-width: 76ch; }
.case-outcome strong { font-family: var(--mono); font-weight: 500; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); flex-shrink: 0; }
html[lang="ar"] .case-outcome strong { font-family: var(--font); letter-spacing: 0; font-weight: 600; }
@media (max-width: 980px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } .case-head { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .stages { grid-template-columns: 1fr; } .case-outcome { flex-direction: column; gap: 4px; } }

/* industries */
.industries { background: var(--cloud); }
.industry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.industry-grid > li { display: flex; }
.industry-tile {
  display: flex; flex-direction: column; width: 100%; background: var(--plate); color: inherit; text-decoration: none;
  border-top: 2px solid var(--ink); transition: border-color .18s var(--ease);
}
.industry-tile img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--rule); }
.industry-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.industry-name { font-size: 1.1875rem; font-weight: 600; line-height: 1.25; }
.industry-text { color: var(--ink-2); font-size: .9375rem; line-height: 1.5; }
.industry-count { margin-top: auto; padding-top: 12px; font-family: var(--mono); font-size: .8125rem; color: var(--accent-text); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 8px; }
.industry-count .icon { width: 16px; height: 16px; }
.industry-tile:hover { border-top-color: var(--es-cyan); }
.industry-tile:hover .industry-count { text-decoration: underline; text-underline-offset: .25em; }
.industry-more { background: var(--es-navy); color: var(--on-dark); border-top-color: var(--es-navy); }
.industry-more .industry-body { justify-content: flex-end; padding: 24px; }
.industry-more .industry-name { font-size: 1.375rem; font-stretch: 112.5%; }
.industry-more .industry-text { color: var(--on-dark-2); }
.industry-more .industry-count { margin-top: 12px; display: inline-flex; align-self: flex-start; background: var(--es-cyan); color: var(--es-navy); padding: 10px 16px; font-family: var(--font); font-weight: 600; font-size: .9375rem; }
.industry-more:hover { border-top-color: var(--es-navy); }
.industry-more:hover .industry-count { text-decoration: none; background: #5FE3EE; }
@media (max-width: 1080px) { .industry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .industry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .industry-body { padding: 14px 14px 16px; } .industry-name { font-size: 1.0625rem; } }
@media (max-width: 440px) { .industry-grid { grid-template-columns: 1fr; } }

/* tools */
.tools { background: var(--plate); }
.tools-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 5vw, 88px); }
.software-list { border-top: 1px solid var(--ink); }
.software-list li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.software-list .sw-name { font-weight: 600; font-size: 1.0625rem; }
.software-list .sw-note { font-family: var(--mono); color: var(--ink-3); font-size: .8125rem; text-align: end; }
.tool-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; align-content: start; }
.tool-block { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--rule); }
.tool-block .icon { color: var(--accent-text); width: 28px; height: 28px; margin-bottom: 4px; }
.tool-block p { color: var(--ink-2); font-size: 1rem; }
.block-title { margin-bottom: 14px; }
@media (max-width: 920px) { .tools-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tool-blocks { grid-template-columns: 1fr; } }

/* contact */
.contact { background: var(--es-navy); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 5vw, 88px); align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: 20px; }
.contact-copy p { color: var(--on-dark-2); max-width: 44ch; }
.contact-direct { margin-top: 10px; display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--rule-dark); }
.contact-direct a, .contact-direct span { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: .9375rem; text-decoration: none; color: #fff; }
.contact-direct span { color: var(--on-dark-2); }
.contact-direct .icon { width: 20px; height: 20px; color: var(--es-cyan); }
.contact-direct a:hover { text-decoration: underline; text-underline-offset: .25em; }
.form { background: var(--es-surface-dark); border: 1px solid var(--rule-dark); padding: clamp(22px, 3vw, 40px); display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: .875rem; font-weight: 600; color: var(--on-dark); }
.field label .opt { font-weight: 400; color: var(--on-dark-3); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; background: var(--es-abyss); border: 1px solid #2C4560; color: #fff; border-radius: 0;
  padding: 12px 14px; font-size: 1rem; line-height: 1.4; transition: border-color .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; background-image: linear-gradient(45deg, transparent 50%, #AAB6C2 50%), linear-gradient(135deg, #AAB6C2 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
html[dir="rtl"] .field select { background-position: 14px 52%, 20px 52%; }
.field select option { color: var(--ink); background: #fff; }
.field input::placeholder, .field textarea::placeholder { color: #7A8794; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #3E5B7A; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--es-cyan); box-shadow: 0 0 0 1px var(--es-cyan); }
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-error { color: #FF9C8A; font-size: .9375rem; }
.form-error:empty { display: none; }
.hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.form-done { background: var(--es-surface-dark); border: 1px solid var(--rule-dark); padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.form-done[hidden], .form[hidden] { display: none; }
.form-done h3 { font-size: 1.5rem; font-stretch: 112.5%; display: flex; align-items: center; gap: 12px; }
.form-done h3 .icon { color: var(--es-cyan); }
.form-done p { color: var(--on-dark-2); }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* footer */
.site-footer { background: var(--es-abyss); color: var(--on-dark-2); border-top: 1px solid var(--rule-dark); }
.footer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 40px; padding-block: 40px 40px; align-items: start; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand img { width: 220px; height: auto; }
.footer-brand p { font-family: var(--font-head, var(--font)); font-stretch: 112.5%; font-weight: 600; font-size: 1.25rem; color: #fff; letter-spacing: -0.01em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end; }
.footer-nav a { text-decoration: none; font-size: .9375rem; color: var(--on-dark-2); }
.footer-nav a:hover { color: #fff; }
.footer-bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; padding-top: 22px; border-top: 1px solid var(--rule-dark); font-family: var(--mono); font-size: .75rem; color: var(--on-dark-3); }
.footer-bottom .lang-switch a { color: var(--on-dark-3); font-family: var(--font); font-size: .875rem; letter-spacing: 0; }
.footer-bottom .lang-switch a[aria-current="true"] { color: #fff; background: none; box-shadow: inset 0 -2px 0 var(--es-cyan); }
.footer-bottom a.mail { color: var(--on-dark-2); text-decoration: none; }
.footer-bottom a.mail:hover { color: #fff; }
@media (max-width: 720px) { .footer-row { grid-template-columns: 1fr; } .footer-nav { justify-content: flex-start; } }

/* ---------- projects page ---------- */
.page-hero { padding-block: clamp(56px, 7vw, 96px) 0; background: var(--es-navy) url(../brand/lambda-mesh-white.svg) center top / 192px 192px repeat; position: relative; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: rgba(11, 27, 43, .9); pointer-events: none; }
.page-hero > .wrap { position: relative; }
.page-hero-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px clamp(28px, 4vw, 64px); align-items: end; padding-bottom: clamp(36px, 4vw, 56px); }
.page-hero-head p { color: var(--on-dark-2); max-width: 58ch; }
.filters { display: flex; flex-wrap: nowrap; gap: 0; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--rule-dark); }
.filters::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .filters { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 899px) { .filters { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); padding-inline-end: 48px; } html[dir="rtl"] .filters { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); } }
.filter {
  position: relative; flex: 0 0 auto; background: none; border: 0; cursor: pointer; color: var(--on-dark-3);
  font-weight: 600; font-size: .9375rem; padding: 16px 18px 18px; display: inline-flex; align-items: baseline; gap: 8px;
}
.filter:first-child { padding-inline-start: 0; }
.filter .n { font-family: var(--mono); font-weight: 400; font-size: .75rem; color: var(--on-dark-3); font-variant-numeric: tabular-nums; }
.filter:hover { color: var(--on-dark); }
.filter[aria-pressed="true"] { color: #fff; }
.filter[aria-pressed="true"] .n { color: var(--es-cyan); }
.filter[aria-pressed="true"]::after { content: ''; position: absolute; inset-inline: 18px; top: -1px; height: 2px; background: var(--es-cyan); }
.filter:first-child[aria-pressed="true"]::after { inset-inline-start: 0; }
.filter:focus-visible { outline-offset: -4px; }
@media (max-width: 860px) { .page-hero-head { grid-template-columns: 1fr; } }

.project-group { padding-block: clamp(48px, 6vw, 84px) 0; }
.project-group[hidden] { display: none; }
.project-groups { padding-bottom: var(--section); }
.group-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 12px clamp(28px, 4vw, 64px); align-items: end; padding-bottom: 22px; margin-bottom: 28px; border-bottom: 1px solid var(--ink); }
.group-head h2 { font-size: clamp(1.625rem, 1.2rem + 1.3vw, 2.25rem); display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.group-head h2 .n { font-family: var(--mono); font-size: .8125rem; font-weight: 400; font-stretch: 100%; letter-spacing: 0; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.group-head p { color: var(--ink-2); max-width: 56ch; }
@media (max-width: 860px) { .group-head { grid-template-columns: 1fr; } }

.subgroup { margin-bottom: 44px; padding: 24px; background: var(--cloud); border: 1px solid var(--rule); }
.subgroup-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 22px; }
.subgroup-head h3 { font-size: 1.3125rem; }
.subgroup-head p { color: var(--ink-2); font-size: 1rem; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1040px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; } .subgroup { padding: 16px; margin-inline: calc(-1 * min(var(--pad), 16px)); } }

.project-card { background: var(--plate); display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--rule); }
.pc-visual { position: relative; border-bottom: 1px solid var(--rule); background: #fff; }
.pc-visual img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.pc-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pc-step { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); font-variant-numeric: tabular-nums; margin-bottom: -2px; }
html[lang="ar"] .pc-step { font-family: var(--font); letter-spacing: 0; font-weight: 600; }
.pc-title { font-size: 1.125rem; }
.pc-summary { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
.pc-result { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; padding-inline-start: 12px; border-inline-start: 2px solid var(--es-cyan); font-size: .9375rem; font-weight: 600; line-height: 1.4; }
.pc-result span { font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
html[lang="ar"] .pc-result span { font-family: var(--font); letter-spacing: 0; }
.pc-tags { margin-top: auto; padding-top: 12px; font-family: var(--mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); line-height: 1.6; }
html[lang="ar"] .pc-tags, html[lang="ja"] .pc-tags { font-family: var(--font); letter-spacing: 0; text-transform: none; font-size: .8125rem; }

.cta-band { padding-block: clamp(64px, 8vw, 112px); background: var(--es-abyss) url(../brand/resolution-field-tonal-dark.svg) center / cover no-repeat; }
.cta-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px 64px; align-items: end; }
.cta-row p { color: var(--on-dark-2); max-width: 48ch; margin-bottom: 22px; }
@media (max-width: 860px) { .cta-row { grid-template-columns: 1fr; } }

/* 404 */
.nf { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; }
.nf .wrap { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; padding-block: 96px; }
.nf p { color: var(--on-dark-2); }

@media print {
  .site-header, .mobile-menu, .viewport, .form, .filters { display: none !important; }
  .theme-dark, .hero, .caps, .contact, .cta-band, .page-hero { background: #fff !important; color: #000 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
