/* Maati Studio · site styles
   A drawing sheet on logo navy: grid, frame, hairline cells. */

:root {
  --navy: #222A35;
  --navy-deep: #1B222C;
  --navy-lift: #2A3340;
  --paper: #F2F2F2;
  --muted: #A9AEB6;
  --accent: #8FB4DC;
  --brick: #95989F;
  --line: rgba(169, 174, 182, 0.12);
  --line-strong: rgba(169, 174, 182, 0.3);
  --grid: rgba(143, 180, 220, 0.09);
  --grid-minor: rgba(143, 180, 220, 0.035);
  --grid-major: rgba(143, 180, 220, 0.1);
  --grid-mid: rgba(143, 180, 220, 0.05);
  --grid-fine: rgba(143, 180, 220, 0.025);
  --ruler-tick: rgba(169, 174, 182, 0.45);
  --panel: rgba(27, 34, 44, 0.55);
  --nav-bg: rgba(34, 42, 53, 0.86);
  --ruler-ink: rgba(169, 174, 182, 0.5);
  --vignette: rgba(0, 0, 0, 0.3);
  --paper-hover: #fff;
  --placeholder: rgba(169, 174, 182, 0.55);
  --window-lit: #F2C66D;

  --f-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --pad-x: calc(var(--gutter) + 22px);
  --nav-h: 76px;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  background: var(--navy);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--navy);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  text-wrap: pretty;
}

[hidden] { display: none !important; }
p, h1, h2, h3, h4, figure, address, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--navy); }
a[href], a[href] *, button, button *, label[for], summary, .chip, .tab { cursor: pointer !important; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--paper); color: var(--navy);
}
.skip:focus { top: 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Drawing sheet backdrop ---------- */

/* Drawn behind the first screen only; it scrolls with the page and fades out */
.sheet {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: max(100svh, 720px);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
          mask-image: linear-gradient(#000 55%, transparent);
}

.sheet__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 640px at 72% 28%, rgba(143, 180, 220, 0.08), transparent 70%),
    radial-gradient(1200px 900px at 10% 110%, var(--vignette), transparent 60%);
}

/* Architectural chart paper. The grid starts at the inner corner of the rulers and shares
   their spacing: fine lines every 12px, medium every 60px, bold every 120px. Each bold
   square is one lettered column and one numbered row on the rulers. */
.sheet__frame {
  position: absolute;
  inset: calc(var(--nav-h) + 8px) 12px 12px 12px;
  border: 1px solid var(--line-strong);
}
.sheet__grid {
  position: absolute;
  top: 22px; left: 22px; right: 0; bottom: 0;
  background:
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px) 0 0 / 120px 100%,
    linear-gradient(var(--grid-major) 1px, transparent 1px) 0 0 / 100% 120px,
    linear-gradient(90deg, var(--grid-mid) 1px, transparent 1px) 0 0 / 60px 100%,
    linear-gradient(var(--grid-mid) 1px, transparent 1px) 0 0 / 100% 60px,
    linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px) 0 0 / 12px 100%,
    linear-gradient(var(--grid-fine) 1px, transparent 1px) 0 0 / 100% 12px;
}
.ruler {
  position: absolute;
  display: flex;
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ruler-ink);
}
.ruler span { flex: none; display: grid; place-items: center; }
.ruler--top {
  top: 0; left: 22px; right: 0; height: 22px;
  background:
    linear-gradient(90deg, var(--ruler-tick) 1px, transparent 1px) 0 0 / 120px 100% repeat-x,
    linear-gradient(90deg, var(--ruler-tick) 1px, transparent 1px) 0 100% / 60px 9px repeat-x,
    linear-gradient(90deg, var(--ruler-tick) 1px, transparent 1px) 0 100% / 12px 5px repeat-x;
}
.ruler--top span { width: 120px; height: 100%; padding-bottom: 6px; }
.ruler--left {
  top: 22px; left: 0; bottom: 0; width: 22px;
  flex-direction: column;
  background:
    linear-gradient(var(--ruler-tick) 1px, transparent 1px) 0 0 / 100% 120px repeat-y,
    linear-gradient(var(--ruler-tick) 1px, transparent 1px) 100% 0 / 9px 60px repeat-y,
    linear-gradient(var(--ruler-tick) 1px, transparent 1px) 100% 0 / 5px 12px repeat-y;
}
.ruler--left span { height: 120px; width: 100%; padding-right: 6px; }

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

.nobr { white-space: nowrap; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

main { position: relative; z-index: 1; }

.section { padding-block: clamp(64px, 9vw, 120px); }
.section + .section { border-top: 1px solid var(--line); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section__head > :only-child { grid-column: 1 / -1; }
.section__head .eyebrow { margin-bottom: 18px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.split--wide-media { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.split--top { align-items: start; }

.stack > * + * { margin-top: 18px; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; }
.brand img { width: 58px; height: auto; }
.brand span {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) {
  position: relative;
  padding-block: 6px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.25s;
}
.nav__links a:not(.btn):hover,
.nav__links a[aria-current="page"] { color: var(--paper); }
.nav__links a[aria-current="page"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 0 10px 12px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav__toggle i, .nav__toggle i::before {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--paper);
  transition: transform 0.3s var(--ease);
}
.nav__toggle i { position: relative; }
.nav__toggle i::before { content: ""; position: absolute; top: 6px; }
.nav__toggle i { transform: translateY(-3px); }
.nav[data-open] .nav__toggle i { transform: rotate(45deg); }
.nav[data-open] .nav__toggle i::before { transform: translateY(-6px) rotate(-90deg); }

/* ---------- Type ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; flex: none; width: 36px; height: 1px; background: currentColor; }

.display {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(3rem, 7.6vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.display--md { font-size: clamp(2.8rem, 6.2vw, 5.4rem); }

.h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 0.98;
  text-wrap: balance;
}
.h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.08;
}
.h4 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.ink { font-style: normal; color: var(--paper); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) and (-webkit-text-stroke: 1px currentColor) {
  .ink {
    color: transparent;
    -webkit-text-stroke: 1px var(--paper);
    background: linear-gradient(var(--paper), var(--paper)) left / 100% 100% no-repeat;
    -webkit-background-clip: text;
            background-clip: text;
  }
}

.lede { max-width: 56ch; color: var(--muted); font-size: 1.08rem; }
.body { max-width: 62ch; color: var(--muted); }
.body strong, .lede strong { color: var(--paper); font-weight: 500; }
.meta { color: var(--muted); }
.accent { color: var(--accent); }

.link {
  color: var(--paper);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 1px no-repeat;
  transition: background-size 0.35s var(--ease), color 0.25s;
}
.link:hover { color: var(--accent); }

.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.back:hover { color: var(--paper); }
.back svg { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 16px; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px 24px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn__label { display: flex; flex-direction: column; line-height: 1.15; }
.btn__label small {
  margin-top: 3px;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  opacity: 0.72;
}
.btn__icon { width: 20px; height: 20px; flex: none; transition: transform 0.3s var(--ease); }
.btn:hover .btn__icon--right { transform: translateX(3px); }

.btn--primary { background: var(--paper); color: var(--navy); }
.btn--primary:hover { background: var(--paper-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--paper); }
.btn--ghost:hover { border-color: var(--accent); background: rgba(143, 180, 220, 0.08); }
.btn--sm { min-height: 42px; padding: 8px 16px; font-size: 0.95rem; gap: 10px; }
.btn--sm .btn__icon { width: 16px; height: 16px; }

.btn::before, .btn::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border: 1.5px solid var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.btn::before { top: -8px; left: -8px; border-right: 0; border-bottom: 0; transform: translate(6px, 6px); }
.btn::after { bottom: -8px; right: -8px; border-left: 0; border-top: 0; transform: translate(-6px, -6px); }
.btn:hover::before, .btn:hover::after,
.btn:focus-visible::before, .btn:focus-visible::after { opacity: 1; transform: none; }

/* ---------- Figures ---------- */

.fig { position: relative; }
.fig__media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--navy-deep);
}
.fig__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.fig__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(34, 42, 53, 0) 55%, rgba(34, 42, 53, 0.35));
  pointer-events: none;
}
.fig::before, .fig::after {
  content: "+";
  position: absolute;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1;
  color: var(--accent);
  pointer-events: none;
}
.fig::before { top: -8px; left: -5px; }
.fig::after { right: -5px; top: -8px; }
.fig figcaption {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.fig figcaption b { color: var(--accent); font-weight: 500; }

.ar-16-9 { aspect-ratio: 16 / 9; }
.ar-16-10 { aspect-ratio: 16 / 10; }
.ar-4-3 { aspect-ratio: 4 / 3; }
.ar-3-2 { aspect-ratio: 3 / 2; }
.ar-16-7 { aspect-ratio: 16 / 7; }
.ar-21-9 { aspect-ratio: 21 / 9; }
.ar-1-1 { aspect-ratio: 1 / 1; }
.ar-4-5 { aspect-ratio: 4 / 5; }
.fig__media--contain img { object-fit: contain; background: #fff; }

a:hover .fig__media img, .fig:hover .fig__media img { transform: scale(1.04); }

/* Image slot: waiting for a photograph */
.slot {
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  padding: 16px;
  background:
    repeating-linear-gradient(135deg, rgba(149, 152, 159, 0.1) 0 1px, transparent 1px 12px),
    var(--navy-deep);
  color: var(--muted);
}
.slot::after { display: none; }
.slot__no { font-family: var(--f-display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--brick); }
.slot__text { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- Stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line-strong);
}
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 30px 24px 28px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 3.8vw, 3.3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat__num small { font-size: 0.45em; margin-left: 4px; color: var(--accent); font-weight: 600; }
.stat__label { margin-top: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat__note { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.substats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.substats p { padding: 18px 24px 20px; border-left: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.substats p:first-child { border-left: 0; padding-left: 0; }
.substats b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 1.4rem; color: var(--paper); line-height: 1.2; }

/* ---------- Cells (bordered grid) ---------- */

.cells {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  background: var(--panel);
}
.cell {
  position: relative;
  min-width: 0;
  padding: 24px 24px 28px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.cell--span-2 { grid-column: span 2; }
.cell--full { grid-column: 1 / -1; }
.cell__k {
  margin-bottom: 12px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.cell__v { font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; }
.cell__title { margin-bottom: 10px; }
.cell p + p { margin-top: 10px; }
.cell__foot {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin-top: 20px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.cell__big { font-family: var(--f-display); font-weight: 600; font-size: 1.9rem; line-height: 1; }
.cell--link { text-decoration: none; transition: background-color 0.3s; }
.cell--link:hover { background: rgba(143, 180, 220, 0.06); }
.cell__no { font-family: var(--f-display); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--brick); margin-bottom: 18px; }

/* ---------- Tags ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--paper);
  white-space: nowrap;
}
.tag--accent { border-color: rgba(143, 180, 220, 0.5); color: var(--accent); }

/* ---------- Lists ---------- */

.bullets li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
}
.bullets li + li { margin-top: 10px; }
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.62em;
  width: 7px; height: 7px;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
}
.bullets--paper li { color: var(--paper); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; border-top: 1px solid var(--line-strong); }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.table th {
  padding: 14px 16px 12px 0;
  text-align: left;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.table td:first-child { color: var(--paper); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 32px; }
.table .num:last-child { padding-right: 0; }
.table tbody tr { transition: background-color 0.2s; }
.table tbody tr:hover { background: rgba(143, 180, 220, 0.05); }

/* ---------- Tabs ---------- */

.tabs { display: inline-flex; border: 1px solid var(--line-strong); margin-bottom: 28px; }
.tab {
  padding: 10px 20px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background-color 0.25s, color 0.25s;
}
.tab + .tab { border-left: 1px solid var(--line-strong); }
.tab[aria-selected="true"] { background: var(--paper); color: var(--navy); }

/* ---------- Portfolio grid ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  padding: 8px 14px;
  background: none;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.chip:hover { color: var(--paper); border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--navy); }

.grid-status { margin-bottom: 28px; color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 36px 24px;
}
.card { display: block; text-decoration: none; }
.card__main { display: block; text-decoration: none; }
.card__cs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  transition: color 0.25s;
}
.card__cs svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.card__cs:hover { color: var(--paper); }
.card__cs:hover svg { transform: translateX(3px); }
.card .fig__media { aspect-ratio: 4 / 3; }
.card__body { padding-top: 14px; }
.card__label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.card__title { margin-top: 6px; font-family: var(--f-display); font-weight: 600; font-size: 1.45rem; line-height: 1.1; transition: color 0.25s; }
a.card:hover .card__title, .card__main:hover .card__title { color: var(--accent); }
.card__meta { margin-top: 4px; font-size: 14.5px; color: var(--muted); }
.card__stat { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--paper); }
.card__more { color: var(--accent); }
.cards--lg { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 56px 32px; }
.cards--lg .fig__media { aspect-ratio: 16 / 10; }
.cards--lg .card__title { font-size: clamp(1.8rem, 3vw, 2.4rem); }
/* Portfolio list: picture fills the card (photo, or a sector wireframe while the photo is missing);
   text sits at the bottom with the divider and one figures line in the same place on every card */
.cards--text { gap: 0; padding: 1px 0 0 1px; }
.cards--text .card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
  padding: 22px 24px 20px;
  margin: -1px 0 0 -1px;
  border: 1px solid var(--line-strong);
  background-color: var(--navy-deep);
}
.cards--text .fig { display: none; }
.cards--text .card__cs { display: none; }
.cards--text .card__main { display: flex; flex-direction: column; flex: 1; }
.cards--text .card__body { display: flex; flex-direction: column; justify-content: flex-end; flex: 1; padding-top: 0; }
.cards--text .card__title, .cards--text .card__meta, .cards--text .card__stat { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.cards--text .card__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards--text .card__stat {
  margin-top: 14px;
  padding-top: 12px;
  border-top-color: rgba(242, 242, 242, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Photo */
.cards--text .card--img .fig { display: block; position: absolute; inset: 0; z-index: -1; }
.cards--text .card--img .fig::before, .cards--text .card--img .fig::after { content: none; }
.cards--text .card--img .fig__media { height: 100%; aspect-ratio: auto; border: 0; }
.cards--text .card--img .fig__media img { opacity: 0.85; transition: transform 0.9s var(--ease), opacity 0.4s; }
.cards--text .card--img .fig__media::after {
  background: linear-gradient(180deg, rgba(27, 34, 44, 0.05) 0%, rgba(27, 34, 44, 0.15) 30%, rgba(27, 34, 44, 0.75) 58%, rgba(27, 34, 44, 0.95) 80%, rgba(27, 34, 44, 0.98) 100%);
}
.cards--text .card--img:hover .fig__media img { opacity: 1; transform: scale(1.04); }
.cards--text .card--img .card__meta { color: #D3D6DB; }

/* Wireframe for projects still waiting for a photo */
.cards--text .card:not(.card--img) {
  background-image:
    linear-gradient(rgba(169, 174, 182, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 174, 182, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
.cards--text .card:not(.card--img)::before {
  content: "";
  position: absolute;
  inset: 10px 16px 42%;
  z-index: -1;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: contain;
  opacity: 0.42;
  transition: opacity 0.4s, transform 0.9s var(--ease);
}
/* Fades the drawing out behind the text */
.cards--text .card:not(.card--img)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(27, 34, 44, 0) 0%, rgba(27, 34, 44, 0) 38%, rgba(27, 34, 44, 0.94) 54%, rgba(27, 34, 44, 0.96) 100%);
  pointer-events: none;
}
.cards--text .card:not(.card--img):hover::before { opacity: 0.6; transform: scale(1.04); }
.cards--text .card:not(.card--img)[data-category="highways"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cg stroke='%23A9AEB6' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 120h400' stroke-opacity='.5'/%3E%3Cpath d='M30 290L186 120M370 290L214 120'/%3E%3Cpath d='M200 290V120' stroke-dasharray='10 9' stroke-opacity='.7'/%3E%3Cpath d='M112 290L193 120M288 290L207 120' stroke-opacity='.35'/%3E%3Cpath d='M0 170h400M0 184h400'/%3E%3Cpath d='M70 184v50M84 184v50M316 184v50M330 184v50' stroke-opacity='.8'/%3E%3Cpath d='M0 162h400' stroke-opacity='.45'/%3E%3Cpath d='M20 162v8M60 162v8M100 162v8M140 162v8M260 162v8M300 162v8M340 162v8M380 162v8' stroke-opacity='.45'/%3E%3C/g%3E%3C/svg%3E"); }
.cards--text .card:not(.card--img)[data-category="urban"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cg stroke='%23A9AEB6' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M30 60h90v60H30zM140 60h60v60h-60zM220 60h150v60H220zM30 140h60v90H30zM110 140h70v40h-70zM110 190h70v40h-70zM260 140h110v90H260z'/%3E%3Ccircle cx='220' cy='185' r='26'/%3E%3Cpath d='M0 300L400 0' stroke-opacity='.45'/%3E%3Cpath d='M40 280h320M40 274v12M360 274v12' stroke-opacity='.5'/%3E%3C/g%3E%3C/svg%3E"); }
.cards--text .card:not(.card--img)[data-category="ropeways"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cg stroke='%23A9AEB6' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M60 250l14-150h12l14 150M300 250l14-190h12l14 190M52 250h56M292 250h56'/%3E%3Cpath d='M80 100C160 150 240 150 320 60M80 112C160 162 240 162 320 72'/%3E%3Cpath d='M196 138v18M180 156h32v26h-32z'/%3E%3Cpath d='M0 250h400' stroke-opacity='.5'/%3E%3C/g%3E%3C/svg%3E"); }
.cards--text .card:not(.card--img)[data-category="power"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cg stroke='%23A9AEB6' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M200 30l-50 250M200 30l50 250M170 130h60M160 180h80M150 230h100M172 130l68 50M228 130l-68 50M160 180l90 50M240 180l-90 50'/%3E%3Cpath d='M110 90h180M130 60h140M110 90l90-60 90 60'/%3E%3Cpath d='M110 90C60 130 30 140 0 145M290 90c50 40 80 50 110 55M130 60C70 90 30 100 0 104M270 60c60 30 100 40 130 44' stroke-opacity='.6'/%3E%3Cpath d='M0 280h400' stroke-opacity='.5'/%3E%3C/g%3E%3C/svg%3E"); }
.cards--text .card:not(.card--img)[data-category="industrial"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cg stroke='%23A9AEB6' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M30 260V150l60-40v40l60-40v40l60-40v40l60-40v150zM290 260V60h26v200M330 260V100h20v160'/%3E%3Cpath d='M60 200h30v60H60zM130 190h120v30H130z'/%3E%3Cpath d='M0 260h400' stroke-opacity='.5'/%3E%3Cpath d='M303 50c10-10 0-20 12-30' stroke-opacity='.6'/%3E%3C/g%3E%3C/svg%3E"); }
.cards--text .card:not(.card--img)[data-category="water"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cg stroke='%23A9AEB6' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 90c50-20 100 20 150 0s100-20 150 0 70 10 100 0M0 130c50-20 100 20 150 0s100-20 150 0 70 10 100 0M0 170c50-20 100 20 150 0s100-20 150 0 70 10 100 0' /%3E%3Cpath d='M120 280l30-80h100l30 80z'/%3E%3Cpath d='M150 200v80M250 200v80M200 200v80' stroke-opacity='.6'/%3E%3Cpath d='M0 280h400' stroke-opacity='.5'/%3E%3C/g%3E%3C/svg%3E"); }
.cards--text .card:not(.card--img)[data-category="buildings"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cg stroke='%23A9AEB6' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M140 280V40h120v240M60 280V140h80M260 280V110h90v170'/%3E%3Cpath d='M140 70h120M140 100h120M140 130h120M140 160h120M140 190h120M140 220h120M140 250h120M180 40v240M220 40v240' stroke-opacity='.55'/%3E%3Cpath d='M60 170h80M60 200h80M60 230h80M260 140h90M260 170h90M260 200h90M260 230h90' stroke-opacity='.55'/%3E%3Cpath d='M0 280h400' stroke-opacity='.5'/%3E%3C/g%3E%3C/svg%3E"); }
.cards--text .card:not(.card--img)[data-category="sports"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cg stroke='%23A9AEB6' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='60' y='60' width='280' height='180' rx='90'/%3E%3Crect x='85' y='80' width='230' height='140' rx='70' stroke-opacity='.6'/%3E%3Cpath d='M140 110h120v80H140zM200 110v80'/%3E%3Ccircle cx='200' cy='150' r='16'/%3E%3C/g%3E%3C/svg%3E"); }
.cards--text .card:not(.card--img)[data-category="residential"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cg stroke='%23A9AEB6' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M70 270V150l90-70 90 70v120M250 270V170h90v100M40 170l120-95 120 95'/%3E%3Cpath d='M140 270v-60h40v60M95 170h30v30H95zM195 170h30v30h-30zM275 195h40v30h-40z' stroke-opacity='.7'/%3E%3Cpath d='M0 270h400' stroke-opacity='.5'/%3E%3C/g%3E%3C/svg%3E"); }

.card__excerpt { margin-top: 10px; max-width: 52ch; font-size: 15px; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
.cell > .fig__media { margin-bottom: 22px; }
.cell .tags, .stack .tags { margin-top: 18px; }
.cell .h3 + .body, .cell .cell__k + .h3 { margin-top: 6px; }
.note { margin-top: 18px; max-width: 90ch; font-size: 14.5px; color: var(--muted); }

/* ---------- Sector sections (portfolio) ---------- */

.sector { padding-block: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line-strong); }
.sector__head { display: flex; align-items: baseline; gap: 20px; margin-bottom: clamp(32px, 5vw, 52px); }
.sector__no { font-family: var(--f-display); font-weight: 700; font-size: clamp(3rem, 6vw, 5rem); line-height: 0.8; color: transparent; -webkit-text-stroke: 1px var(--brick); }
.sector__block + .sector__block { margin-top: clamp(40px, 6vw, 72px); }
.sub-head { margin-bottom: 20px; }

/* ---------- Home hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  min-height: calc(100svh - var(--nav-h));
  padding-block: clamp(40px, 6vh, 72px) clamp(48px, 7vh, 88px);
}
.hero .eyebrow { margin-bottom: 22px; }
.hero .display { margin-bottom: 26px; font-size: clamp(2.9rem, 5.6vw, 5.4rem); }
.hero .lede { margin-bottom: 34px; }
.hero__note { margin-top: 26px; }

.mark { position: relative; }
.mark__art { position: relative; }
.mark svg { display: block; width: 100%; height: auto; overflow: visible; }
/* The logo sits inside the SVG viewBox (-90 -100 1450 780) at 0,0 1200x548 */
.mark__logo {
  position: absolute; left: 6.207%; top: 12.821%; width: 82.759%;
  aspect-ratio: 1200 / 550;
  --logo-shadow-a: rgba(0, 0, 0, 0.5);
  --logo-shadow-b: rgba(0, 0, 0, 0.35);
  filter: drop-shadow(0 14px 22px var(--logo-shadow-a)) drop-shadow(0 2px 3px var(--logo-shadow-b));
}
/* Both versions stay loaded and drawn; the theme only changes which one is visible,
   so switching themes never replays the reveal */
.mark__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mark__img--light { opacity: 0; }
:root[data-theme="light"] .mark__img--light { opacity: 1; }
:root[data-theme="light"] .mark__img--dark { opacity: 0; }
:root[data-theme="light"] .mark__logo { --logo-shadow-a: rgba(34, 42, 53, 0.28); --logo-shadow-b: rgba(34, 42, 53, 0.25); }
.mark__cl { opacity: 0.3; }
.mark figcaption {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

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

.page-hero { padding-block: clamp(56px, 9vw, 112px) clamp(40px, 6vw, 72px); }
.page-hero .eyebrow { margin-bottom: 22px; }
.page-hero .display { margin-bottom: 24px; }
.page-hero__meta { margin-top: 18px; }
.page-hero + .section--tight { padding-top: 0; }

/* ---------- Clients ---------- */

.clients .cell__v li { color: var(--paper); }
.clients .cell__v li + li { margin-top: 4px; }

/* ---------- CTA band ---------- */

.cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 32px;
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--line-strong);
  background: var(--panel);
}
.cta .h2 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.cta .body { margin-top: 16px; }

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

.form { display: grid; gap: 26px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.field input, .field textarea {
  width: 100%;
  padding: 10px 0 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--paper);
  font: inherit;
  font-size: 1.05rem;
  border-radius: 0;
  transition: border-color 0.25s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.form__note { font-size: 14px; color: var(--muted); }

.contact-line { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 12px; text-decoration: none; }
.contact-line svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.contact-line + .contact-line { margin-top: 8px; }

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

.footer { position: relative; z-index: 1; margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line-strong); background: var(--panel); }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: 56px 40px;
}
.footer__brand img { width: 84px; margin-bottom: 18px; }
.footer__brand p { max-width: 34ch; color: var(--muted); font-size: 15px; }
.footer h2 { margin-bottom: 14px; font-family: var(--f-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.footer li, .footer address { font-size: 14.5px; color: var(--muted); }
.footer li + li { margin-top: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--paper); }
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- Scroll progress & back to top ---------- */

.progress {
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  padding: 0;
  background: var(--navy-deep);
  border: 1px solid var(--line-strong);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s, border-color 0.25s, background-color 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); background: var(--navy-lift); }
.to-top svg { width: 20px; height: 20px; transition: transform 0.3s var(--ease); }
.to-top:hover svg { transform: translateY(-3px); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 110ms + 120ms); }

  .mark__img   { animation: wipe 1.8s var(--ease) 0.5s both; }
  .mark__logo  { animation: shadow-in 0.9s ease 2.1s both; }
  .mark__cl    { animation: fade-cl 1s ease 0.2s both; }
  .mark__dims  { animation: fade 0.9s ease 1.9s both; }
  .mark__dim-line { stroke-dasharray: 1; animation: draw 1.2s var(--ease) 1.8s both; }

  .ink { animation: ink 1.4s var(--ease) 1.2s both; }

  .js .in-view { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .in-view.is-visible { opacity: 1; transform: none; }
}

@keyframes rise    { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes draw    { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes wipe    { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
/* the shadow settles in once the mark is fully drawn */
@keyframes shadow-in { from { filter: drop-shadow(0 0 0 transparent) drop-shadow(0 0 0 transparent); } }
@keyframes fade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-cl { from { opacity: 0; } to { opacity: 0.3; } }
@keyframes ink     { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .stats, .substats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3), .substats p:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cells { --cols: 2 !important; }
  .cell--span-2 { grid-column: span 2; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__links { gap: 20px; }
}

@media (max-width: 1120px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad-x) 24px;
    background: var(--navy-deep);
    border-bottom: 1px solid var(--line-strong);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .nav[data-open] .nav__links { visibility: visible; opacity: 1; transform: none; }
  .nav__links a:not(.btn) { padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav__links a[aria-current="page"]::after { display: none; }
  .nav__links a[aria-current="page"] { color: var(--accent); }
  .nav__links .btn { margin-top: 18px; justify-content: center; }
  .nav__cta { display: none; }
}

@media (max-width: 860px) {
  .hero, .split, .split--wide-media, .section__head, .cta { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; }
  .hero__mark { order: -1; max-width: 460px; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .stats--3 { grid-template-columns: minmax(0, 1fr); }
  .stats--3 .stat { padding-inline: 0; border-left: 0; }
  .stats--3 .stat + .stat { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  :root { --nav-h: 64px; --pad-x: 24px; }
  .hero__mark { display: none; }
  .ruler { display: none; }
  /* rulers are hidden on phones, so the chart paper fills the whole frame */
  .sheet__grid { top: 0; left: 0; }
  /* theme switch sits right beside Menu */
  .nav__inner { gap: 6px; }
  /* long mono lines break between phrases, never after a separator dot */
  .hero .eyebrow, .hero__note { display: block; }
  .hero .eyebrow::before { content: none; }
  .hero .nobr { display: block; }
  .hero .sep { display: none; }
  .hero__note .nobr + .nobr { margin-top: 4px; }
  .hero { padding-block: 32px 8px; }
  .hero + .section { padding-top: 56px; }
  .sheet__frame { inset: calc(var(--nav-h) + 6px) 8px 8px 8px; }
  .brand img { width: 46px; }
  .brand span { font-size: 16px; letter-spacing: 0.16em; }
  .actions .btn { width: 100%; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat:nth-child(3) { padding-inline: 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .substats { grid-template-columns: minmax(0, 1fr); }
  .substats p, .substats p:nth-child(3) { padding-inline: 0; border-left: 0; }
  .substats p + p { border-top: 1px solid var(--line); }
  .cells { --cols: 1 !important; }
  .cell--span-2 { grid-column: auto; }
  .cell { padding: 20px 18px 22px; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer__bar { flex-direction: column; }
  .sector__head { flex-direction: column; gap: 10px; }
}

/* ---------- Light theme ----------
   Dark is the brand default; light follows the visitor's system setting
   or their choice from the switch in the nav. */

:root[data-theme="light"] {
  color-scheme: light;
  --navy: #F2F2F2;
  --navy-deep: #E7E8EA;
  --navy-lift: #FFFFFF;
  --paper: #222A35;
  --muted: #555D69;
  --accent: #3A6897;
  --brick: #7A7E86;
  --line: rgba(34, 42, 53, 0.12);
  --line-strong: rgba(34, 42, 53, 0.26);
  --grid: rgba(58, 104, 151, 0.24);
  --grid-minor: rgba(58, 104, 151, 0.1);
  --grid-major: rgba(58, 104, 151, 0.15);
  --grid-mid: rgba(58, 104, 151, 0.08);
  --grid-fine: rgba(58, 104, 151, 0.04);
  --ruler-tick: rgba(34, 42, 53, 0.42);
  --panel: rgba(255, 255, 255, 0.6);
  --nav-bg: rgba(242, 242, 242, 0.88);
  --ruler-ink: rgba(34, 42, 53, 0.55);
  --vignette: rgba(34, 42, 53, 0.06);
  --paper-hover: #11161D;
  --placeholder: rgba(85, 93, 105, 0.7);
}
:root[data-theme="light"] .cards--text {
  /* The project tiles sit on photographs and stay dark in both themes */
  --navy-deep: #1B222C; --navy-lift: #2A3340; --paper: #F2F2F2; --muted: #A9AEB6; --accent: #8FB4DC;
  --line: rgba(169, 174, 182, 0.12); --line-strong: rgba(169, 174, 182, 0.3);
  color: var(--paper);
}
/* Each theme has its own logo artwork */
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
:root[data-theme="light"] ::selection { color: #F2F2F2; }

/* ---------- Theme switch: a small building that lights up at dusk ---------- */

.theme-toggle {
  flex: none;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  margin-left: 6px;
  background: transparent;
  border: 0;
  color: var(--muted);
  transition: color 0.25s;
}
/* thin divider separating the text menu from the icon */
.theme-toggle::before {
  content: "";
  position: absolute; left: -10px; top: 50%;
  width: 1px; height: 22px;
  transform: translateY(-50%);
  background: var(--line-strong);
}
.theme-toggle:hover { color: var(--paper); }
.theme-toggle svg { width: 28px; height: 28px; overflow: visible; }
.theme-toggle .tt-ground, .theme-toggle .tt-block { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.theme-toggle .tt-win { fill: transparent; stroke: currentColor; stroke-width: 0.8; transition: fill 0.25s; }
.theme-toggle .tt-sun, .theme-toggle .tt-moon { transform-box: fill-box; transform-origin: center; transition: transform 0.6s var(--ease), opacity 0.4s; }
.theme-toggle .tt-sun { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; }
.theme-toggle .tt-moon { fill: var(--accent); }

/* Dark: the moon is up and the windows are lit, one after another */
:root:not([data-theme="light"]) .theme-toggle .tt-sun { transform: translateY(14px); opacity: 0; }
:root:not([data-theme="light"]) .theme-toggle .tt-win { fill: var(--window-lit); stroke: var(--window-lit); }
.theme-toggle .tt-win:nth-child(2) { transition-delay: 0.08s; }
.theme-toggle .tt-win:nth-child(3) { transition-delay: 0.16s; }
.theme-toggle .tt-win:nth-child(4) { transition-delay: 0.24s; }
.theme-toggle .tt-win:nth-child(5) { transition-delay: 0.32s; }
.theme-toggle .tt-win:nth-child(6) { transition-delay: 0.4s; }
/* Light: the sun rises over the roof and the moon sets */
:root[data-theme="light"] .theme-toggle .tt-moon { transform: translateY(14px); opacity: 0; }

/* Theme change: window blinds. Going dark, the blind is pulled down over the page;
   going light, it is pulled up and the lighter page shows underneath. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root.blind-down::view-transition-new(root) { animation: blind-close 1s cubic-bezier(0.7, 0, 0.25, 1) both; }
:root.blind-up::view-transition-old(root) { z-index: 2; animation: blind-open 1s cubic-bezier(0.7, 0, 0.25, 1) both; }
@keyframes blind-close { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes blind-open { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 100% 0); } }
.blind {
  position: fixed;
  left: 0; right: 0; top: 0;
  z-index: 200;
  height: 100vh;
  pointer-events: none;
  view-transition-name: blind;
  /* slats: a shadowed seam and a lit edge on every 22px */
  background: repeating-linear-gradient(180deg,
    rgba(143, 180, 220, 0.07) 0 1px,
    transparent 1px 19px,
    rgba(0, 0, 0, 0.32) 19px 21px,
    transparent 21px 22px);
}
/* bottom rail with the pull cord */
.blind::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 10px;
  background: linear-gradient(#3A4556, #1B222C);
  border-top: 1px solid rgba(143, 180, 220, 0.5);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
.blind::before {
  content: "";
  position: absolute; right: 14%; bottom: -58px;
  width: 9px; height: 58px;
  background: linear-gradient(#8FB4DC, #8FB4DC) center top / 1.5px 46px no-repeat;
  border-bottom: 9px solid #8FB4DC;
  border-radius: 0 0 5px 5px;
}
.blind--down { animation: blind-drop 1s cubic-bezier(0.7, 0, 0.25, 1) both; }
.blind--up { animation: blind-lift 1s cubic-bezier(0.7, 0, 0.25, 1) both; }
@keyframes blind-drop { from { height: 0; } to { height: 100vh; } }
@keyframes blind-lift { from { height: 100vh; } to { height: 0; } }
::view-transition-group(blind), ::view-transition-old(blind), ::view-transition-new(blind) { animation: none; }

/* Asked once, before the theme choice is saved on the device */
.consent {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 60;
  max-width: min(380px, calc(100vw - 32px));
  padding: 18px 20px;
  background: var(--navy-deep);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  color: var(--paper);
}
.consent p { font-size: 14.5px; color: var(--muted); }
.consent p b { color: var(--paper); font-weight: 500; }
.consent__actions { display: flex; gap: 10px; margin-top: 14px; }
.consent__actions button {
  font: 600 13px/1 var(--f-display);
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  background: transparent; color: var(--paper);
}
.consent__actions button:first-child { background: var(--paper); color: var(--navy); border-color: var(--paper); }
/* Analytics prompt sits above the theme prompt if both are open */
.consent--analytics .consent__actions { justify-content: flex-end; }
.consent--analytics .consent__actions button:first-child { background: transparent; color: var(--paper); border-color: var(--line-strong); }
.consent--analytics .consent__actions button[data-answer="granted"] { background: var(--paper); color: var(--navy); border-color: var(--paper); }
.consent--analytics { z-index: 61; }
.consent__actions button { cursor: pointer; }
.footer__settings { padding: 0; border: 0; background: none; color: inherit; opacity: 0.55; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; transition: opacity 0.25s; }
.footer__settings:hover, .footer__settings:focus-visible { opacity: 1; }

/* ---------- Socials ---------- */

.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color 0.25s, color 0.25s;
}
.social svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.social:hover { border-color: var(--accent); color: var(--accent); }
.social svg .fill { fill: currentColor; stroke: none; }
.socials--icons .social { padding: 0; width: 42px; height: 42px; justify-content: center; }
.socials--icons .social svg { width: 20px; height: 20px; }
.footer .socials { margin-top: 18px; gap: 8px; }
.footer .socials--icons .social { border-color: var(--line-strong); background: transparent; }
.footer .socials--icons .social:hover { background: rgba(143, 180, 220, 0.08); }

/* Contact page: socials read as plain lines, like email and phone — no box inside the cell */
.cell .socials { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.socials__sep { color: var(--muted); user-select: none; }
.cell .socials .social { padding: 0; border: 0; gap: 12px; font-family: inherit; font-size: 15.5px; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.cell .socials .social svg { color: var(--accent); }
.cell .socials .social:hover { color: var(--accent); }

@media (max-width: 1120px) {
  .theme-toggle { order: 2; margin-left: 0; }
  .theme-toggle::before { display: none; }
  .nav__toggle { order: 3; }
}

/* Logo shadow so the mark lifts off the sheet in both themes */
.brand img, .footer__brand img { filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45)); }
:root[data-theme="light"] .brand img, :root[data-theme="light"] .footer__brand img { filter: drop-shadow(0 3px 4px rgba(34, 42, 53, 0.25)); }
.fig__media--flat::after { content: none; }

/* ---------- Review round: layout fixes ---------- */

.stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.stats--1 { grid-template-columns: minmax(0, 1fr); }

/* Home: hero no taller than it needs to be, and less air before the next section */
.hero { min-height: min(calc(100svh - var(--nav-h)), 760px); }
.hero + .section { padding-top: clamp(40px, 6vw, 80px); }

/* Closing CTA sits closer to the content above it */
.section:has(> .wrap > .cta) { padding-top: 0; border-top: 0; }

/* Services: the nine boxes start right under the intro */
.page-hero:has(+ .services-list) { padding-bottom: clamp(28px, 4vw, 44px); }

/* Portfolio: sector detail blocks fold behind a button */
.sector__more {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: clamp(28px, 4vw, 40px);
  padding: 12px 18px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font: 600 13px/1 var(--f-display);
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: border-color 0.25s;
}
.sector__more:hover { border-color: var(--accent); }
.sector__more svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.sector__more[aria-expanded="true"] svg { transform: rotate(180deg); }

@media (max-width: 640px) {
  /* Headline figures two per row */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats--1 { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat:nth-child(3) { padding: 20px 14px 18px; border-left: 1px solid var(--line); }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat + .stat { border-top: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat__num { font-size: 1.9rem; }
  .stat__label { font-size: 10px; letter-spacing: 0.1em; }
  .stat__note { font-size: 13px; }
  .stats--3 .stat:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
  .stats--3 .stat:nth-child(2) { padding-left: 14px; border-left: 1px solid var(--line); border-top: 0; }

  /* Tables become stacked blocks, one per row */
  .table-wrap { overflow: visible; }
  .table { min-width: 0; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 14px 0; border-bottom: 1px solid var(--line-strong); }
  .table td { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-label); flex: none; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: left; padding-top: 3px; }
  .table td:first-child { display: block; text-align: left; font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; margin-bottom: 6px; }
  .table td:first-child::before { content: none; }
  .table .num { padding-right: 0; }

  /* Back-to-top: smaller, and only shown while scrolling back up */
  .to-top { width: 40px; height: 40px; right: 12px; bottom: 12px; }
  .to-top.is-visible:not(.is-up) { opacity: 0; visibility: hidden; transform: translateY(12px); }

  /* Portfolio filters: one row, swipe sideways */
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--pad-x) * -1); padding-inline: var(--pad-x); scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }

  /* Portfolio cards: two per row, shorter */
  .cards--text { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards--text .card { aspect-ratio: auto; min-height: 220px; padding: 12px 12px 12px; }
  .cards--text .card__label { font-size: 8.5px; letter-spacing: 0.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cards--text .card__title { font-size: 1.02rem; margin-top: 4px; }
  .cards--text .card__meta { font-size: 12px; }
  .cards--text .card__stat { font-size: 10px; letter-spacing: 0.02em; margin-top: 8px; padding-top: 8px; }

  /* Clients in two columns */
  .clients .cells { --cols: 2 !important; }
  .clients .cell { padding: 16px 12px 18px; }
  .clients .cell__v { font-size: 14px; }

  /* Contact: all details stay together, form follows below */
  .contact-grid { gap: 32px; }

  /* Footer: Contact and Explore side by side */
  .footer__grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px 16px; }
  .footer__grid a[href^="mailto:"] { font-size: 13px; white-space: nowrap; }
  .footer__brand, .footer__grid > div:nth-child(2) { grid-column: 1 / -1; }
}
