/* Werkbank — Slate & Mustard. Light only. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1c2838;
  --steel: #55627a;
  --paper: #e7eaee;
  --sheet: #f6f7f9;
  --rule: #c3cad4;
  --mustard: #c98f1e;
  --mustard-text: #8a5e09;

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: normal;
}

[hidden] { display: none !important; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; }

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

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- type helpers ---------- */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--steel);
}
.display {
  font-weight: 800;
  font-stretch: 68%;
  text-transform: uppercase;
  letter-spacing: -.005em;
  line-height: .95;
}
.h-section { font-size: clamp(34px, 5vw, 56px); }
.lede { font-size: 19px; color: var(--steel); max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 12px 20px;
  border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--mustard); border-color: var(--mustard); color: var(--ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link {
  font-weight: 600; text-decoration: none;
  border-bottom: 1.5px solid var(--mustard);
  padding-bottom: 1px;
}
.link:hover { color: var(--mustard-text); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand span { font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 18px; letter-spacing: .01em; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { display: flex; gap: 24px; list-style: none; }
.nav a:not(.btn) {
  font-size: 15px; text-decoration: none; color: var(--steel);
  padding-block: 6px; border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--mustard); }
.nav .btn { padding: 9px 16px; font-size: 14px; }

.lang {
  display: inline-flex; border: 1.5px solid var(--ink);
  font-family: var(--mono); font-size: 12px;
}
.lang button {
  font: inherit; border: 0; background: transparent; color: var(--ink);
  padding: 6px 9px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.menu-toggle {
  display: none;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  background: transparent; border: 1.5px solid var(--ink); color: var(--ink);
  padding: 8px 12px; cursor: pointer;
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 20px var(--gutter) 28px;
    background: var(--paper); border-bottom: 1px solid var(--rule);
  }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 4px; }
  .nav a:not(.btn) { display: block; font-size: 20px; padding-block: 8px; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { border-bottom-color: var(--mustard); }
  .nav .btn { justify-content: center; padding: 12px 18px; font-size: 15px; }
  .lang { align-self: flex-start; }
}

/* ---------- sections ---------- */
main { display: block; }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }

.page-head { padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--rule); }
.page-head .wrap { display: grid; gap: 18px; }
.page-head h1 { font-size: clamp(48px, 9vw, 104px); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--rule); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: end;
}
.hero-text { display: grid; gap: 22px; align-content: end; }
.hero h1 { font-size: clamp(64px, 12vw, 152px); }
.hero .role { font-family: var(--mono); font-size: 14px; color: var(--steel); letter-spacing: .02em; }
.hero .lede { color: var(--ink); }

.portrait { border: 1.5px solid var(--ink); background: var(--sheet); }
.portrait-img { aspect-ratio: 4 / 4.2; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; padding-top: 24px; border-bottom: 1.5px solid var(--ink); }
.portrait-img img { width: 78%; }

/* title block, like the corner box on a technical drawing */
.titleblock { display: grid; grid-template-columns: 1fr 1fr; font-size: 14px; }
.titleblock div { padding: 10px 14px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; gap: 2px; min-width: 0; }
.titleblock div:nth-child(2n) { border-right: 0; }
.titleblock div:nth-last-child(-n+2) { border-bottom: 0; }
.titleblock dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.titleblock dd { margin: 0; font-weight: 600; }
.status-dot { display: inline-block; width: 8px; height: 8px; background: var(--mustard); margin-right: 6px; vertical-align: 1px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-text { display: grid; gap: 18px; }
.about-text .profession { font-family: var(--mono); font-size: 14px; color: var(--steel); }
.about-text p:not(.profession) { font-size: 19px; max-width: 52ch; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border: 1.5px solid var(--ink); background: var(--sheet); }
.stat { padding: 22px 20px; border-right: 1px solid var(--rule); display: grid; gap: 4px; }
.stat:last-child { border-right: 0; }
.stat b { font-size: clamp(40px, 5vw, 56px); font-weight: 800; font-stretch: 68%; line-height: 1; color: var(--mustard-text); font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: var(--steel); }

/* ---------- cards (services overview, contact methods) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card {
  background: var(--sheet); border: 1.5px solid var(--ink);
  padding: 26px; display: flex; flex-direction: column; gap: 14px;
}
.card h3 { font-size: 26px; font-weight: 800; font-stretch: 75%; text-transform: uppercase; line-height: 1.05; }
.card p { color: var(--steel); font-size: 16px; }
.card .link { margin-top: auto; align-self: flex-start; }
.card-icon { width: 40px; height: 40px; display: grid; place-items: center; background: var(--ink); color: var(--paper); }
.card-icon svg { width: 22px; height: 22px; }

/* ---------- tech chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chip { font-family: var(--mono); font-size: 13px; padding: 5px 11px; border: 1px solid var(--rule); background: var(--sheet); }
.chips-lg .chip { font-size: 15px; padding: 10px 16px; border: 1.5px solid var(--ink); }

/* ---------- featured projects (home) ---------- */
.projects-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.pmini { background: var(--sheet); border: 1.5px solid var(--ink); display: flex; flex-direction: column; text-decoration: none; }
.pmini img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top; width: 100%; border-bottom: 1.5px solid var(--ink); }
.pmini-body { padding: 20px 22px 22px; display: grid; gap: 8px; }
.pmini h3 { font-size: 22px; font-weight: 700; line-height: 1.2; }
.pmini p { color: var(--steel); font-size: 15px; }
.pmini:hover h3 { text-decoration: underline; text-decoration-color: var(--mustard); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--paper); padding-block: clamp(64px, 9vw, 104px); }
.cta-band .wrap { display: grid; gap: 22px; justify-items: start; }
.cta-band h2 { font-size: clamp(40px, 7vw, 84px); max-width: 16ch; }
.cta-band p { color: #b9c2cf; font-size: 19px; max-width: 56ch; }
.cta-band .btn { border-color: var(--paper); color: var(--paper); }
.cta-band .btn:hover { background: var(--paper); color: var(--ink); }
.cta-band .btn-primary { border-color: var(--mustard); color: var(--ink); }
.cta-band .btn-primary:hover { background: var(--paper); border-color: var(--paper); }

/* ---------- services page ---------- */
.service { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.service.reverse .service-media { order: 2; }
.service-media { border: 1.5px solid var(--ink); background: var(--sheet); }
.service-media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.service-body { display: grid; gap: 22px; }
.service-body h2 { font-size: clamp(32px, 4.4vw, 50px); }
.service-list { list-style: none; border-top: 1.5px solid var(--ink); }
.service-list li { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.service-list b { font-size: 18px; }
.service-list span { color: var(--steel); font-size: 15px; }
.features { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 20px; }
.features li { font-size: 15px; display: flex; gap: 10px; align-items: baseline; }
.features li::before { content: ""; width: 8px; height: 8px; background: var(--mustard); flex: none; transform: translateY(-1px); }

.process { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--ink); background: var(--sheet); counter-reset: step; }
.process li { padding: 24px 22px 28px; border-right: 1px solid var(--rule); display: grid; gap: 8px; align-content: start; counter-increment: step; }
.process li:last-child { border-right: 0; }
.process li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--mustard-text); font-weight: 500; }
.process b { font-size: 24px; font-weight: 800; font-stretch: 75%; text-transform: uppercase; }
.process span { color: var(--steel); font-size: 15px; }

/* ---------- portfolio page ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filters button {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  padding: 9px 14px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.project-list { display: grid; gap: 28px; }
.project {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--sheet); border: 1.5px solid var(--ink);
}
.project-media { border-right: 1.5px solid var(--ink); background: var(--paper); display: grid; }
.project-media > img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; object-position: top; }
.project-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px; background: var(--ink); }
.project-gallery img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.project-body { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.project-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.project h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; font-stretch: 75%; text-transform: uppercase; line-height: 1.05; }
.project .summary { font-size: 17px; }
.project .detail { color: var(--steel); font-size: 15px; }
.project dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 15px; }
.project dt { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); padding-top: 3px; }
.project dd { margin: 0; }
.project .btn-row { margin-top: auto; padding-top: 6px; }

.impact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--ink); background: var(--sheet); }

/* ---------- contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.methods { display: grid; gap: 16px; }
.method {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center;
  background: var(--sheet); border: 1.5px solid var(--ink); padding: 18px 20px;
  text-decoration: none;
}
.method:hover { background: var(--ink); color: var(--paper); }
.method:hover .method-sub { color: #b9c2cf; }
.method .card-icon { width: 44px; height: 44px; }
.method:hover .card-icon { background: var(--mustard); color: var(--ink); }
.method b { font-size: 19px; display: block; }
.method-sub { color: var(--steel); font-size: 15px; overflow-wrap: anywhere; }
.method .arrow { font-family: var(--mono); }
.facts { border: 1.5px solid var(--ink); background: var(--sheet); }
.facts div { padding: 18px 20px; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.facts dd { margin: 0; font-size: 18px; font-weight: 600; }

/* ---------- legal pages ---------- */
.legal { max-width: 72ch; display: grid; gap: 34px; }
.legal section { display: grid; gap: 10px; }
.legal h2 { font-size: 20px; font-weight: 700; }
.legal p, .legal li { color: #3a465a; }
.legal ul { padding-left: 20px; display: grid; gap: 4px; }
.legal a { text-decoration-color: var(--mustard); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1.5px solid var(--ink); padding-block: 56px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid h2 { font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); margin-bottom: 14px; }
.footer-grid p { color: var(--steel); font-size: 15px; max-width: 40ch; }
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-links { list-style: none; display: grid; gap: 8px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-decoration-color: var(--mustard); text-underline-offset: 4px; }
.social { display: flex; gap: 8px; margin-top: 16px; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--ink); }
.social a:hover { background: var(--ink); color: var(--paper); }
.social svg { width: 18px; height: 18px; }
.footer-bottom {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 12px; color: var(--steel);
}
.footer-bottom nav { display: flex; gap: 18px; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .about, .service, .contact-grid, .project { grid-template-columns: minmax(0, 1fr); }
  .service.reverse .service-media { order: 0; }
  .portrait { max-width: 420px; }
  .project-media { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .project-media > img, .project-gallery img { min-height: 0; aspect-ratio: 16 / 10; }
  .process, .impact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process li:nth-child(2n), .impact .stat:nth-child(2n) { border-right: 0; }
  .process li:nth-child(-n+2), .impact .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .lede, .about-text p:not(.profession) { font-size: 17px; }
  .process { grid-template-columns: minmax(0, 1fr); }
  .process li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .process li:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 auto; justify-content: center; }
  .project dl { grid-template-columns: 1fr; gap: 2px; }
  .project dd + dt { margin-top: 8px; }
}
