/* ==========================================================================
   Long Meridian — Obsidian design system
   Dark-first. Ivory is reserved for project evidence (selected work).
   ========================================================================== */

:root {
  /* Obsidian palette */
  --obsidian: #101113;
  --graphite: #1B1D20;
  --ivory: #F0EEE9;
  --ash: #92969E;
  --rule: #35373B;
  --brass: #B4AA97;

  /* Derived — used only where the core palette fails contrast */
  --raised: #26282C;          /* surfaces inside graphite plates */
  --rule-strong: #4A4D53;     /* hover rules, diagram limbs */
  --ink-2: #5B5E65;           /* secondary text on ivory (5.7:1) */
  --rule-ivory: #D3CFC6;      /* dividers on ivory */
  --brass-ink: #6E6553;       /* accent text on ivory (4.8:1) */

  /* Context tokens — dark by default, flipped by .section--ivory */
  --bg: var(--obsidian);
  --fg: var(--ivory);
  --fg-2: var(--ash);
  --line: var(--rule);
  --accent: var(--brass);
  --btn-bg: var(--ivory);
  --btn-fg: var(--obsidian);
  --btn-hover: #FFFFFF;

  /* Type */
  --font-sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", "SF Mono", Menlo, monospace;

  /* Layout */
  --max-width: 1360px;
  --text-max: 680px;
  --gutter: 40px;
  --col-gap: 40px;
  --section-gap: 136px;
  --header-h: 72px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --t-fast: 200ms;
  --t-slow: 700ms;
}

@media (max-width: 900px) {
  :root { --gutter: 20px; --col-gap: 24px; --section-gap: 80px; --header-h: 64px; }
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--obsidian); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01";
}

::selection { background: var(--ivory); color: var(--obsidian); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; border-radius: 2px; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

ul { margin: 0; padding: 0; list-style: none; }

/* --------------------------------------------------------------------------
   Typography scale
   -------------------------------------------------------------------------- */

.h-hero {
  font-size: clamp(46px, 7.4vw, 116px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.h-page {
  font-size: clamp(40px, 5.6vw, 84px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.h-section {
  font-size: clamp(32px, 3.7vw, 54px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.h-card  { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; letter-spacing: -0.025em; }
.h-small { font-size: 20px; line-height: 1.3; }

.lead { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; color: var(--fg-2); letter-spacing: -0.01em; }
.small { font-size: 14px; }
.muted { color: var(--fg-2); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.mono-label--blue { color: var(--accent); }

.text-block { max-width: var(--text-max); }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

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

.section { padding: var(--section-gap) 0; }
/* Consecutive plain sections share one gap; banded sections keep their own. */
.section:not(.section--ivory):not(.dark-section) + .section:not(.section--ivory):not(.dark-section) { padding-top: 0; }

/* Ivory band — selected work / project evidence */
.section--ivory {
  --bg: var(--ivory);
  --fg: var(--obsidian);
  --fg-2: var(--ink-2);
  --line: var(--rule-ivory);
  --accent: var(--brass-ink);
  --btn-bg: var(--obsidian);
  --btn-fg: var(--ivory);
  --btn-hover: #000000;
  background: var(--bg);
  color: var(--fg);
}
.section--ivory ::selection { background: var(--obsidian); color: var(--ivory); }

/* Section head — Swiss two-column: label left, statement right */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  column-gap: var(--col-gap);
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-bottom: 80px;
}
.section-head > * { grid-column: 2; }
.section-head > .mono-label { grid-column: 1; grid-row: 1 / span 4; padding-top: 4px; }
.section-head h2 { margin-bottom: 0; max-width: 15em; }
.section-head .lead { max-width: var(--text-max); margin-top: 24px; }
.section-head .text-link { justify-self: start; margin-top: 36px; }
.section-head:last-child { margin-bottom: 0; }

.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; margin-bottom: 48px; padding-top: 20px; }
  .section-head > * { grid-column: 1; }
  .section-head > .mono-label { grid-row: auto; padding-top: 0; margin-bottom: 20px; }
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.btn--primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }

/* Secondary actions are understated — a quiet bordered control */
.btn--secondary { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--secondary:hover { border-color: var(--fg-2); }

.btn--on-dark { background: var(--ivory); color: var(--obsidian); border-color: var(--ivory); }
.btn--on-dark:hover { background: #FFFFFF; }

.btn-row { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  transition: border-color var(--t-fast) var(--ease);
}
.text-link::after { content: "→"; transition: transform var(--t-fast) var(--ease); }
.text-link:hover { text-decoration: none; border-color: var(--fg); }
.text-link:hover::after { transform: translateX(3px); }

.text-link--back::after { content: none; }
.text-link--back::before { content: "←"; transition: transform var(--t-fast) var(--ease); }
.text-link--back:hover::before { transform: translateX(-3px); }

.email-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-2);
  transition: color var(--t-fast) var(--ease);
}
.email-link:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.site-header.is-scrolled {
  background: rgba(16, 17, 19, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  border-bottom-color: var(--rule);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ivory);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo__mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav a {
  position: relative;
  color: var(--ash);
  font-size: 14.5px;
  transition: color var(--t-fast) var(--ease);
}
.site-nav a:hover { color: var(--ivory); text-decoration: none; }
.site-nav a.is-active { color: var(--ivory); }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--ivory);
}

.lang-switch {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--rule-strong);
  padding-left: 28px;
  border-left: 1px solid var(--rule);
}
.lang-opt {
  font: inherit;
  letter-spacing: inherit;
  color: var(--ash);
  background: none;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}
.lang-opt:hover { color: var(--ivory); }
.lang-switch .active { color: var(--ivory); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px 8px;
  margin-right: -8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ivory);
  margin: 6px 0;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--obsidian);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 28px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--ivory);
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }
  .site-nav a.is-active::after { display: none; }
  .site-nav a.is-active { color: var(--brass); }
  .lang-switch { border-left: 0; padding: 20px 0 0; }
  body.nav-open .site-header { background: var(--obsidian); border-bottom-color: var(--rule); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(calc(100svh - var(--header-h)), 960px);
  padding-top: clamp(64px, 11vh, 136px);
  overflow: hidden;
}
.hero > .container { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; width: 100%; }

.hero h1 { max-width: 11.6em; margin-bottom: 0; }

.hero__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 32px 64px;
  margin-top: clamp(40px, 6vh, 64px);
}
.hero__sub .lead { max-width: 30em; margin: 0; color: var(--ash); }

.hero__foot {
  margin-top: auto;
  padding: 72px 0 28px;
}
.hero__meta {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ash);
}

/* Meridian field — orthographic graticule behind the hero */
.hero__field {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(64%, 1000px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%);
  mask-image: linear-gradient(90deg, transparent 0, #000 34%);
}
.meridian { width: 100%; height: 100%; }
.meridian path, .meridian circle { stroke-width: 1; fill: none; }
.meridian__grid path { stroke: #232528; }
.meridian__equator { stroke: var(--rule); }
.meridian__limb { stroke: var(--rule-strong); }
.meridian__key { stroke: var(--brass); stroke-dasharray: 1; stroke-dashoffset: 0; }
.meridian__ticks path { stroke: var(--brass); }
.meridian__leader { stroke: #5E6168; }
.meridian__places circle { fill: var(--obsidian); stroke: var(--ivory); }
.meridian text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: var(--ash);
}
.meridian .meridian__place { fill: var(--ivory); }
.meridian .meridian__key-label { fill: var(--brass); }

/* Load sequence: grid settles, the key meridian is surveyed, then the places */
.meridian__grid, .meridian__equator, .meridian__limb { animation: fade-in 1.6s var(--ease) both; }
.meridian__key { animation: survey 2.2s cubic-bezier(0.6, 0, 0.2, 1) 0.4s both; }
.meridian__ticks, .meridian__labels, .meridian__places { animation: fade-in 1s var(--ease) 2s both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes survey { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (max-width: 900px) {
  .hero { min-height: 0; padding-top: 48px; }
  .hero h1 { max-width: none; }
  .hero__sub { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero__field {
    position: relative;
    order: 2;
    width: auto;
    height: 340px;
    margin-top: 8px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent);
    mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent);
  }
  /* Crop to the Zagreb–Rovinj survey area so labels stay legible on phones */
  .meridian {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 720px;
    height: 720px;
    max-width: none;
    transform: translate(-560px, -303px);
  }
  .hero__foot { order: 3; padding-top: 0; }
  .hero > .container { display: contents; }
  .hero > .container > * { padding-left: var(--gutter); padding-right: var(--gutter); }
}

/* --------------------------------------------------------------------------
   Trust bar
   -------------------------------------------------------------------------- */

.trust-bar { padding: 8px 0 112px; }
.trust-bar .container {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  column-gap: var(--col-gap);
  align-items: center;
}
.trust-bar__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 64px;
}
.client-logo {
  height: 24px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.82;   /* one-colour ivory variants in img/clients/mono */
}
.client-logo--tall { height: 38px; }
.client-logo--xl { height: 38px; }
.client-mark {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
}
.client-mark--more { color: var(--brass); }

@media (max-width: 900px) {
  .trust-bar .container { grid-template-columns: 1fr; row-gap: 28px; }
  .trust-bar__logos { gap: 24px 36px; }
  .client-logo { height: 20px; }
  .client-logo--tall,
  .client-logo--xl { height: 32px; }
}

/* --------------------------------------------------------------------------
   Intro statement
   -------------------------------------------------------------------------- */

.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: var(--col-gap);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.intro__grid .h-section { max-width: 14em; }
.intro__grid .lead { max-width: 36em; }
.intro-facts { border-top: 1px solid var(--line); margin-top: 8px; }
.intro-facts li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.intro-facts .mono-label { color: var(--fg-2); }

@media (max-width: 900px) {
  .intro__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* --------------------------------------------------------------------------
   Work / case rows
   -------------------------------------------------------------------------- */

.case-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--col-gap) 72px;
  align-items: start;
  padding: 56px 0 72px;
  border-top: 1px solid var(--line);
}
.case-row:last-child { padding-bottom: 0; }
.case-row--flip .case-row__text { order: 2; }
.case-row--flip .case-row__visual { order: 1; }

.case-row__text { display: flex; flex-direction: column; align-items: flex-start; }
.case-row__text .mono-label { display: block; margin-bottom: 24px; }
.case-row__text h3 { margin-bottom: 20px; max-width: 18em; }
.case-row__text p { color: var(--fg-2); margin-bottom: 28px; max-width: 34em; }
.case-row__text .text-link { margin-top: 8px; }

/* Scope as a ruled two-column schedule, not pills */
.scope-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
  width: 100%;
  max-width: 34em;
  margin-bottom: 36px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg);
}
.scope-list li { padding: 9px 0; border-top: 1px solid var(--line); }

.client-list { display: flex; flex-wrap: wrap; margin-bottom: 32px; font-size: 15px; }
.client-list li:not(:last-child)::after { content: "/"; margin: 0 12px; color: var(--fg-2); opacity: 0.6; }

@media (max-width: 900px) {
  .case-row { grid-template-columns: 1fr; gap: 36px; padding: 40px 0 56px; }
  .case-row--flip .case-row__text { order: 1; }
  .case-row--flip .case-row__visual { order: 2; }
}

/* --------------------------------------------------------------------------
   Figure plates (browser frames, diagram panels) — always graphite
   -------------------------------------------------------------------------- */

.browser-frame,
.diagram-panel {
  background: var(--graphite);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease);
}
.section--ivory .browser-frame,
.section--ivory .diagram-panel { border-color: var(--graphite); }
.case-row:hover .browser-frame,
.case-row:hover .diagram-panel { border-color: var(--rule-strong); }

.browser-frame__bar {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule);
}
.browser-frame__bar > span:not(.browser-frame__url) { display: none; }
.browser-frame__url {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-frame__url::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 12px;
  vertical-align: 1px;
  background: var(--brass);
}
.browser-frame__body svg,
.diagram-panel svg { width: 100%; height: auto; }
.diagram-panel { padding: 32px; }

/* The figure SVGs carry hard-coded presentation attributes from the previous
   palette. These rules remap them onto Obsidian so the drawings stay intact. */
.browser-frame svg [fill="#FFFFFF"], .diagram-panel svg [fill="#FFFFFF"] { fill: var(--graphite); }
.browser-frame svg [fill="#FAFAF8"], .diagram-panel svg [fill="#FAFAF8"] { fill: #17181B; }
.browser-frame svg [fill="#EEF3FF"], .diagram-panel svg [fill="#EEF3FF"] { fill: var(--raised); }
.browser-frame svg [fill="#DDE3EA"], .diagram-panel svg [fill="#DDE3EA"] { fill: #3A3D42; }
.browser-frame svg [stroke="#DDE3EA"], .diagram-panel svg [stroke="#DDE3EA"] { stroke: var(--rule); }
.browser-frame svg [fill="#101828"], .diagram-panel svg [fill="#101828"] { fill: var(--ivory); }
.browser-frame svg [fill="#2257E6"], .diagram-panel svg [fill="#2257E6"] { fill: var(--ivory); }
.browser-frame svg [stroke="#2257E6"], .diagram-panel svg [stroke="#2257E6"] { stroke: var(--brass); stroke-width: 1; }
.browser-frame svg text[fill="#2257E6"], .diagram-panel svg text[fill="#2257E6"] { fill: var(--brass); }
.browser-frame svg [fill="#8FA8EF"], .diagram-panel svg [fill="#8FA8EF"] { fill: #6B6E75; }
.browser-frame svg [fill="#167C80"], .diagram-panel svg [fill="#167C80"] { fill: var(--brass); }
.browser-frame svg [stroke="#167C80"], .diagram-panel svg [stroke="#167C80"] { stroke: var(--brass); }
.browser-frame svg [fill="#667085"], .diagram-panel svg [fill="#667085"] { fill: var(--ash); }
.browser-frame svg [fill="#344054"], .diagram-panel svg [fill="#344054"] { fill: #C9C6BF; }
.browser-frame svg [rx], .diagram-panel svg [rx] { rx: 2px; }
.browser-frame svg, .diagram-panel svg { font-family: var(--font-mono); }
.browser-frame svg [font-family^="IBM Plex Sans"], .diagram-panel svg [font-family^="IBM Plex Sans"] { font-family: var(--font-sans); }
.browser-frame svg [font-family^="IBM Plex Mono"], .diagram-panel svg [font-family^="IBM Plex Mono"] { font-family: var(--font-mono); }

.diag-line { stroke: var(--rule-strong); fill: none; }

/* --------------------------------------------------------------------------
   Capabilities
   -------------------------------------------------------------------------- */

.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--col-gap);
}
.capability {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-content: start;
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
}
.capability > * { grid-column: 2; }
.capability__number {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--fg-2);
  padding-top: 8px;
}
.capability h3 { margin-bottom: 16px; }
.capability p { color: var(--fg-2); font-size: 16px; max-width: 30em; }

@media (max-width: 900px) {
  .capabilities-grid { grid-template-columns: 1fr; }
  .capability { grid-template-columns: 48px minmax(0, 1fr); padding: 24px 0 40px; }
}

/* --------------------------------------------------------------------------
   Sectors
   -------------------------------------------------------------------------- */

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--col-gap);
}
.sector { border-top: 1px solid var(--fg); padding-top: 24px; }
.sector h3 { font-size: 21px; margin-bottom: 14px; }
.sector p { color: var(--fg-2); font-size: 16px; }

@media (max-width: 900px) {
  .sectors-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* --------------------------------------------------------------------------
   Process — a real sequence, drawn as a surveyed line
   -------------------------------------------------------------------------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--col-gap);
  position: relative;
}
.process-grid::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.process-step { position: relative; padding-top: 36px; }
.process-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 7px; height: 7px;
  background: var(--fg);
}
.process-step:last-child::before { background: var(--brass); }
.process-step .mono-label { display: block; margin-bottom: 12px; }
.process-step h3 { font-size: 20px; margin-bottom: 10px; }
.process-step p { color: var(--fg-2); font-size: 16px; }

@media (max-width: 900px) {
  .process-grid { grid-template-columns: 1fr; gap: 36px; }
  .process-grid::before { top: 6px; bottom: 6px; left: 3px; right: auto; width: 1px; height: auto; }
  .process-step { padding-top: 0; padding-left: 36px; }
  .process-step::before { top: 6px; }
}

/* --------------------------------------------------------------------------
   Reliability — graphite band
   -------------------------------------------------------------------------- */

.dark-section {
  --line: var(--rule);
  background: var(--graphite);
  padding: var(--section-gap) 0;
}
.dark-section .section-head { border-top-color: var(--rule-strong); }

.reliability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--col-gap);
}
.reliability-item { border-top: 1px solid var(--rule-strong); padding-top: 24px; }
.reliability-item h3 { font-size: 19px; margin-bottom: 12px; }
.reliability-item p { color: var(--ash); font-size: 15.5px; }

@media (max-width: 1100px) {
  .reliability-grid { grid-template-columns: 1fr 1fr; row-gap: 48px; }
}
@media (max-width: 640px) {
  .reliability-grid { grid-template-columns: 1fr; row-gap: 36px; }
}

/* --------------------------------------------------------------------------
   Company / team
   -------------------------------------------------------------------------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--col-gap);
  margin-top: 64px;
}
.team-member__photo {
  aspect-ratio: 4 / 5;
  background: var(--graphite);
  border: 1px solid var(--rule);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  filter: grayscale(1);
}
.team-member__photo span { font-family: var(--font-mono); font-size: 28px; color: var(--ash); }
.team-member h3 { font-size: 19px; margin-bottom: 2px; }
.team-member .role { font-size: 14px; color: var(--brass); margin-bottom: 10px; }
.team-member .bio { font-size: 15px; color: var(--ash); }

@media (max-width: 900px) {
  .team-grid { grid-template-columns: 1fr; gap: 32px; }
  .team-member__photo { aspect-ratio: 16 / 9; }
}

/* --------------------------------------------------------------------------
   Insights list
   -------------------------------------------------------------------------- */

.insight-item {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: var(--col-gap);
  padding: 32px 0 36px;
  border-top: 1px solid var(--line);
}
.insight-item:last-of-type { border-bottom: 1px solid var(--line); }
.insight-item .mono-label { padding-top: 6px; }
.insight-item h3 { font-size: clamp(21px, 1.9vw, 26px); letter-spacing: -0.025em; margin-bottom: 10px; max-width: 24em; }
.insight-item p { color: var(--fg-2); font-size: 16px; margin: 0; max-width: 40em; }

@media (max-width: 900px) {
  .insight-item { grid-template-columns: 1fr; gap: 12px; padding: 24px 0 28px; }
}

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */

.final-cta { padding: var(--section-gap) 0; }
.section + .final-cta { padding-top: 0; }
.final-cta .container > * { max-width: none; }
.final-cta .container {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  column-gap: var(--col-gap);
}
.final-cta .container > * { grid-column: 2; }
.final-cta .container::before {
  content: "";
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
  margin-bottom: 72px;
}
.final-cta h2 { font-size: clamp(36px, 4.6vw, 68px); letter-spacing: -0.04em; max-width: 12em; margin-bottom: 28px; }
.final-cta p { max-width: 32em; margin-bottom: 44px; }

@media (max-width: 900px) {
  .final-cta .container { grid-template-columns: 1fr; }
  .final-cta .container > * { grid-column: 1; }
  .final-cta .container::before { margin-bottom: 48px; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--obsidian);
  border-top: 1px solid var(--rule);
  padding: 72px 0 32px;
  font-size: 14.5px;
  color: var(--ivory);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: var(--col-gap);
  margin-bottom: 96px;
}
.site-footer__brand p { color: var(--ash); max-width: 300px; margin-top: 24px; }
.site-footer nav ul li,
.site-footer__meta li { margin-bottom: 10px; }
.site-footer nav a { color: var(--ivory); }
.site-footer__meta li { color: var(--ash); }
.site-footer__meta a { color: var(--ivory); }
.site-footer__legal {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
}

@media (max-width: 900px) {
  .site-footer { padding-top: 56px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; row-gap: 40px; margin-bottom: 56px; }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   Page hero (inner pages) & case hero
   -------------------------------------------------------------------------- */

.page-hero,
.case-hero { padding: clamp(56px, 10vh, 120px) 0 0; }
.page-hero .mono-label,
.case-hero .mono-label { display: block; margin-bottom: 28px; }
.page-hero h1 { max-width: 13em; margin-bottom: 32px; }

/* Breadcrumb — the way back home from every subpage */
.page-hero .breadcrumb,
.case-hero .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.case-hero .breadcrumb { margin-bottom: 56px; }
.breadcrumb a { color: var(--ivory); transition: color var(--t-fast) var(--ease); }
.breadcrumb a:hover { color: var(--brass); text-decoration: none; }
.breadcrumb a:first-child::before { content: "←"; margin-right: 8px; }
.breadcrumb span[aria-hidden] { color: var(--rule-strong); }
.case-hero h1 { max-width: 16em; margin-bottom: 32px; }
.page-hero .lead,
.case-hero .lead { max-width: var(--text-max); }
.page-hero:has(+ .section--ivory) { padding-bottom: var(--section-gap); }

.case-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--col-gap);
  margin-top: 72px;
}
.case-meta > div { border-top: 1px solid var(--line); padding-top: 18px; }
.case-meta .mono-label { margin-bottom: 10px; }
.case-meta div p { font-size: 16px; margin: 0; }

@media (max-width: 900px) {
  .case-meta { grid-template-columns: 1fr; gap: 20px; margin-top: 48px; }
}

/* --------------------------------------------------------------------------
   Case & capability sections — label column + content column
   -------------------------------------------------------------------------- */

.case-section { padding-top: 104px; }
.case-section:last-of-type { padding-bottom: var(--section-gap); }
.case-section > .container {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  column-gap: var(--col-gap);
  align-items: start;
}
.case-section > .container::before {
  content: "";
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
  margin-bottom: 24px;
}
.case-section > .container > * { grid-column: 2; }
.case-section > .container > h2:not([class]),
.case-section > .container > .capability__number { grid-column: 1; grid-row: 2 / span 8; }
.case-section h2:not([class]) { font-size: 20px; letter-spacing: -0.015em; padding-right: 24px; }
.case-section .h-section { font-size: clamp(28px, 2.9vw, 42px); margin-bottom: 28px; }
.case-section .text-block p { color: #CFCCC5; }
.case-section .text-block p:first-child { color: var(--ivory); }
.case-section .capability__number { padding-top: 14px; }

@media (max-width: 900px) {
  .case-section { padding-top: 64px; }
  .case-section > .container { grid-template-columns: 1fr; }
  .case-section > .container > *,
  .case-section > .container > h2:not([class]),
  .case-section > .container > .capability__number { grid-column: 1; grid-row: auto; }
  .case-section h2:not([class]) { margin-bottom: 20px; }
  .case-section .capability__number { padding-top: 0; margin-bottom: 16px; }
}

/* Capability sections with an illustration plate in the left column */
.case-section--figure > .container {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(40px, 6vw, 96px);
}
.case-section--figure > .container > .cap-figure { grid-column: 1; grid-row: 2 / span 8; }

.cap-figure {
  position: relative;
  margin: 8px 0 0;
  aspect-ratio: 6 / 5;
  background-color: var(--graphite);
  background-image:
    linear-gradient(#202226 1px, transparent 1px),
    linear-gradient(90deg, #202226 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
.cap-figure svg { width: 100%; height: 100%; }
.cap-figure__index {
  position: absolute;
  top: 16px;
  left: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--brass);
}

/* Drawing vocabulary — thin monochrome lines, one brass accent per figure */
.cap-figure svg * { vector-effect: non-scaling-stroke; }
.cf-sheet { fill: var(--graphite); stroke: var(--rule-strong); }
.cf-sheet--front { stroke: #6B6E75; }
.cf-text { stroke: #3A3D42; stroke-width: 3; stroke-linecap: round; }
.cf-text--ink { stroke: #6B6E75; }
.cf-cell { fill: none; stroke: var(--rule-strong); }
.cf-fill { fill: var(--ivory); }
.cf-accent-fill { fill: var(--brass); }
.cf-card { fill: var(--graphite); stroke: var(--ivory); }
.cf-card--muted { stroke: var(--rule-strong); }
.cf-card--accent { stroke: var(--brass); }
.cf-chip { stroke: var(--brass); }
.cf-pill { fill: var(--graphite); stroke: var(--ivory); }
.cf-bus { fill: var(--raised); stroke: var(--ivory); }
.cf-hub { fill: var(--raised); stroke: var(--ivory); }
.cf-ring { stroke: var(--rule); stroke-dasharray: 2 5; }
.cf-joint { fill: var(--graphite); stroke: var(--ivory); }
.cf-node { fill: var(--ivory); }
.cf-link { stroke: #6B6E75; }
.cf-link--accent { stroke: var(--brass); }
.cf-faint { stroke: var(--rule); }
.cf-tick { stroke: var(--rule-strong); }
.cf-target { stroke: var(--brass); stroke-dasharray: 4 5; }
.cf-trend { stroke: var(--ivory); stroke-width: 1.25; stroke-linejoin: round; }
.cf-dot { fill: #8E9198; }
.cf-dot--open { fill: none; stroke: var(--rule-strong); }
.cf-dot--flag { fill: var(--brass); }
.cf-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: var(--ash);
}
.cf-label--ink { fill: var(--ivory); }
.cf-label--accent { fill: var(--brass); }

/* Flow lines: dashes travel along the connector, showing direction of data */
.cf-flow { stroke: #6B6E75; stroke-dasharray: 3 5; animation: cf-flow 1.6s linear infinite; }
.cf-flow--accent { stroke: var(--brass); }
@keyframes cf-flow { to { stroke-dashoffset: -16; } }

@media (prefers-reduced-motion: reduce) {
  .cf-flow { animation: none; }
}

@media (max-width: 900px) {
  .case-section--figure > .container { grid-template-columns: 1fr; }
  .case-section--figure > .container > .cap-figure { grid-column: 1; grid-row: auto; margin: 0 0 32px; }
}

.deliverable-list { max-width: var(--text-max); border-top: 1px solid var(--line); }
.deliverable-list li {
  position: relative;
  padding: 16px 0 16px 36px;
  border-bottom: 1px solid var(--line);
  font-size: 16.5px;
}
.deliverable-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 29px;
  width: 14px;
  height: 1px;
  background: var(--brass);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 var(--col-gap);
  max-width: 920px;
}
.tech-item { border-top: 1px solid var(--line); padding: 20px 0 32px; }
.tech-item .mono-label { display: block; margin-bottom: 10px; color: var(--brass); }
.tech-item p { font-size: 16px; color: var(--ash); margin: 0; }

@media (max-width: 900px) {
  .tech-grid { grid-template-columns: 1fr; }
}

/* Prev / next case navigation */
.case-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding: 40px 0 0;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 96px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.contact-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 10px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ivory);
  background: var(--graphite);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 28px;
  transition: border-color var(--t-fast) var(--ease);
}
.contact-form input:hover,
.contact-form textarea:hover { border-color: var(--rule-strong); }
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--ivory);
}
.contact-form textarea { min-height: 180px; resize: vertical; }
.contact-form .btn { margin-top: 8px; }

.contact-aside .mono-label { display: block; margin-bottom: 12px; }
.contact-aside__block { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.contact-aside__block:last-child { border-bottom: 0; }
.contact-aside__block p { font-size: 16px; margin-bottom: 4px; }
.contact-aside__block a { border-bottom: 1px solid var(--line); }
.contact-aside__block a:hover { text-decoration: none; border-color: var(--ivory); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .meridian__grid, .meridian__equator, .meridian__limb,
  .meridian__key, .meridian__ticks, .meridian__labels, .meridian__places { animation: none; }
  .diag-line--draw { animation: none; stroke-dashoffset: 0; }
}

/* --------------------------------------------------------------------------
   Diagram SVG shared styles
   -------------------------------------------------------------------------- */

.diag-line--draw {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: draw-line 1.4s var(--ease) forwards;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }

/* --------------------------------------------------------------------------
   Legal pages (privacy policy)
   -------------------------------------------------------------------------- */

.legal__updated { display: block; margin-top: 8px; }

.legal {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: var(--col-gap);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.legal__toc { position: sticky; top: calc(var(--header-h) + 32px); }
.legal__toc .mono-label { display: block; margin-bottom: 16px; }
.legal__toc ol { margin: 0; padding: 0; list-style: none; }
.legal__toc li { margin-bottom: 8px; font-size: 14px; line-height: 1.4; }
.legal__toc a { color: var(--ash); text-decoration: none; transition: color var(--t-fast) var(--ease); }
.legal__toc a:hover { color: var(--ivory); }

.legal__body { max-width: var(--text-max); }
.legal__body section { padding-top: 56px; scroll-margin-top: calc(var(--header-h) + 24px); }
.legal__body section:first-child { padding-top: 0; }
.legal__body h2 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 18px; }
.legal__body h3 { font-size: 17px; margin: 28px 0 10px; }
.legal__body p { color: #CFCCC5; }
.legal__body ul { margin: 0 0 1.2em; }
.legal__body li {
  position: relative;
  padding: 6px 0 6px 28px;
  color: #CFCCC5;
}
.legal__body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 12px;
  height: 1px;
  background: var(--brass);
}
.legal__body a { color: var(--ivory); border-bottom: 1px solid var(--rule-strong); }
.legal__body a:hover { text-decoration: none; border-color: var(--ivory); }
.legal__email a { font-weight: 500; }

@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; gap: 40px; }
  .legal__toc { position: static; }
}
