/* components. Square or 45°-cut corners only: no radius, shadow or gradient. */

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: var(--hair) solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); height: 64px; }
.nav-brand { display: block; flex: none; padding: 4px 0; }
.nav-brand img { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: var(--s4); }
.nav-links a {
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--primary); text-decoration: none; padding: var(--s1) 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { border-color: var(--line); }
.nav-links a[aria-current="page"] { border-color: var(--accent); }
.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: none; border: var(--hair) solid var(--line); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle svg { width: 16px; height: 16px; }
.nav-menu { display: none; }

@media (max-width: 760px) {
  .nav-menu {
    display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
    background: none; border: var(--hair) solid var(--line); cursor: pointer;
  }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: var(--hair) solid var(--line);
    padding: var(--s1) var(--gutter) var(--s2);
    display: none;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: var(--s2) 0; border-bottom: var(--hair) solid var(--line); }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent-text); }
  .nav-links .theme-toggle { margin-top: var(--s2); }
}

/* ---------- buttons ---------- */
.btn {
  --c: var(--cut);
  display: inline-flex; align-items: center; gap: var(--s1);
  min-height: 48px; padding: 0 var(--s3);
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer; border: 0;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: background-color .15s ease, color .15s ease;
}
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--primary); color: var(--surface); }
.btn-solid { background: var(--primary); color: var(--surface); }
.btn-solid:hover { background: var(--accent); color: var(--on-accent); }
.btn-line {
  background: transparent; color: var(--primary);
  outline: var(--hair) solid var(--line); outline-offset: -1.5px;
  clip-path: none;
}
.btn-line:hover { outline-color: var(--primary); color: var(--primary); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.btn { text-align: left; }
.stack > .btn { display: flex; width: fit-content; max-width: 100%; }

/* ---------- cut panel ---------- */
.cut {
  --c: 24px;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}

/* blueprint frame: slate panel with corner registration marks */
.frame { position: relative; background: var(--slate); color: var(--bone); }
.frame > .reg { position: absolute; width: 14px; height: 14px; border: 0 solid var(--bone-muted); pointer-events: none; }
.frame > .reg.tl { top: 12px; left: 12px; border-top-width: 1.5px; border-left-width: 1.5px; }
.frame > .reg.tr { top: 12px; right: 12px; border-top-width: 1.5px; border-right-width: 1.5px; }
.frame > .reg.bl { bottom: 72px; left: 12px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.frame > .reg.br { bottom: 72px; right: 12px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* title block (60px): code left, descriptor right */
.title-block {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  min-height: 60px; padding: 0 var(--s3);
  border-top: var(--hair) solid var(--slate-line);
}
.title-block .tb-code { display: flex; align-items: center; gap: var(--s2); font-size: 15px; font-weight: 700; letter-spacing: 0.12em; }
.title-block .tb-desc { font-size: 13px; color: var(--bone-muted); text-align: right; }

/* ---------- hero ---------- */
.hero { padding: var(--s5) 0 var(--s6); }
.hero .grid-2 { align-items: center; }
.hero-copy > * + * { margin-top: var(--s3); }
.hero-tight { padding-bottom: 0; }
/* landing: a two-sentence headline beside the viewer, one sentence per line where it fits */
.hero .grid-2.hero-lead { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.display-split { font-size: clamp(40px, 4.2vw, 52px); text-wrap: balance; }
@media (max-width: 860px) {
  .hero .grid-2.hero-lead { grid-template-columns: minmax(0, 1fr); }
  .display-split { font-size: clamp(40px, 9vw, 56px); }
}

/* ---------- landing hero animation ---------- */
.glyphs { width: 100%; aspect-ratio: 4 / 3.2; }
.glyphs .glyphs-stage { position: absolute; inset: 0 0 60px 0; display: grid; place-items: center; padding: var(--s4); }
.glyphs .glyphs-stage > svg { width: 100%; height: 100%; }
.glyphs > .title-block { position: absolute; left: 0; right: 0; bottom: 0; }
.glyphs-stage polygon { vector-effect: non-scaling-stroke; stroke-width: 1.5px; stroke-linejoin: miter; }
.glyphs-stage polygon.tool { stroke-dasharray: 4 4; }

/* ---------- jobs summary (landing) ---------- */
.jobs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.jobs-more { margin-top: var(--s4); font-weight: 600; }
@media (max-width: 1000px) { .jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .jobs { grid-template-columns: 1fr; } }

/* ---------- band: one big line ---------- */
.band { padding: var(--s5) 0; }
.band-line { font-size: clamp(26px, 3.6vw, 44px); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; max-width: 24ch; }

/* ---------- jobs / scrollytelling ---------- */
.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s5); align-items: start; }
.story-steps { display: grid; gap: 0; }
.story-step {
  min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: var(--s2);
  padding: var(--s4) 0 var(--s4) var(--s3);
  border-left: 3px solid var(--line);
  transition: border-color .3s ease;
}
.story-step.active { border-left-color: var(--accent); }
.story-sticky { position: sticky; top: 96px; }
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; }
  .story-sticky { top: 72px; z-index: 2; order: -1; }
  .story-sticky .viewer { aspect-ratio: 4 / 3; min-height: 0; }
  .story-step { min-height: 0; padding: var(--s4) 0 var(--s4) var(--s2); }
}
/* procedure steps inside a story step */
.phases { display: grid; gap: var(--s2); counter-reset: ph; }
.phases li { display: grid; grid-template-columns: 28px 1fr; gap: var(--s1); color: var(--muted); counter-increment: ph; }
.phases li::before { content: counter(ph, decimal-leading-zero); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent-text); padding-top: 3px; }
.phases b { color: var(--primary); font-weight: 600; }

/* ---------- viewer ---------- */
.viewer { width: 100%; aspect-ratio: 4 / 3.2; min-height: 320px; }
.viewer-stage { position: absolute; inset: 0 0 60px 0; }
.viewer-stage canvas { width: 100% !important; height: 100% !important; touch-action: pan-y; }
.viewer > .title-block { position: absolute; left: 0; right: 0; bottom: 0; }
.viewer-status {
  position: absolute; left: 24px; top: 20px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone-muted);
  display: flex; align-items: center; gap: var(--s1);
}
.viewer-status::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.viewer-modes {
  position: absolute; left: 24px; right: 24px; bottom: 76px;
  display: flex; flex-wrap: wrap; gap: var(--s1);
}
.viewer-modes button {
  background: var(--slate); color: var(--bone); border: var(--hair) solid var(--slate-line);
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 10px; cursor: pointer;
}
.viewer-modes button:hover { border-color: var(--bone-muted); }
.viewer-modes button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.viewer-fallback { position: absolute; inset: 0 0 60px; display: grid; place-items: center; padding: var(--s4); color: var(--bone-muted); text-align: center; }

/* ---------- feature tiles ---------- */
.tile {
  display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s3); background: var(--surface-raised);
  outline: var(--hair) solid var(--line); outline-offset: -1.5px;
}
.tile .tile-icon { width: 48px; height: 48px; }
.tile .tile-icon .a { stroke: var(--accent); }
.tile .tile-icon .p { stroke: var(--primary); }
.fits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 1000px) { .fits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .fits { grid-template-columns: 1fr; } }

/* ---------- pilot ---------- */
.pilot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }
.pilot-list { display: grid; gap: var(--s2); }
.pilot-list li { display: grid; grid-template-columns: 32px 1fr; gap: var(--s2); align-items: baseline; }
.pilot-list li .n { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent-text); }
@media (max-width: 860px) { .pilot { grid-template-columns: 1fr; gap: var(--s4); } }

/* ---------- faq ---------- */
.faq { border-top: var(--hair) solid var(--line); }
.faq details { border-bottom: var(--hair) solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; gap: var(--s2); align-items: center;
  padding: var(--s3) 0; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--muted); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 var(--s3); max-width: 68ch; color: var(--muted); }
.grid-2.top { align-items: start; }

/* ---------- vision: the argument ---------- */
.argue > * + * { margin-top: var(--s4); }
.argue-copy { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5); align-items: end; }
.argue-tally > * + * { margin-top: var(--s2); }
.tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--hair) solid var(--line); border-bottom: var(--hair) solid var(--line); }
.tally li { display: grid; gap: 4px; padding: var(--s2) var(--s2) var(--s2) 0; }
.tally li + li { border-left: var(--hair) solid var(--line); padding-left: var(--s2); }
.tally span { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tally b { font-size: 32px; font-weight: 600; line-height: 1.1; }
.verdict { font-size: clamp(19px, 2vw, 22px); line-height: 1.4; }
.argue-panel { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s5); align-items: center; padding: var(--s4) var(--s5) calc(60px + var(--s4)); }
.argue-panel > .title-block { position: absolute; left: 0; right: 0; bottom: 0; }
.argue-figure { display: grid; place-items: center; height: 340px; }
.argue-figure svg { width: 100%; height: 100%; }
.argue-figure .humanoid { width: auto; height: 100%; }
.argue-figure polygon { vector-effect: non-scaling-stroke; stroke-width: 1.5px; stroke-linejoin: miter; }
.argue-figure polygon.tool { stroke-dasharray: 4 4; }
.argue-curve svg { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .argue-copy { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .argue-panel { grid-template-columns: minmax(0, 1fr); gap: var(--s3); padding: var(--s4) var(--s3) calc(60px + var(--s2)); }
  .argue-figure { height: 240px; }
}
@media (max-width: 480px) {
  .tally b { font-size: 24px; }
  .tally span { font-size: 11px; }
}

/* ---------- team ---------- */
.person { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.person-tile {
  --c: 28px;
  position: relative; aspect-ratio: 1; display: grid; place-items: center;
  background: var(--slate); color: var(--bone);
}
.person-initials { font-size: 96px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.person-bar { position: absolute; left: 50%; bottom: 64px; width: 96px; height: 10px; background: var(--accent); transform: translateX(-50%) skewX(-10.3deg); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chips li { padding: 6px 12px; font-size: 14px; font-weight: 500; outline: var(--hair) solid var(--line); outline-offset: -1.5px; }
@media (max-width: 760px) {
  .person { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .person-tile { width: 200px; }
  .person-initials { font-size: 72px; }
  .person-bar { bottom: 44px; width: 72px; }
}
/* ---------- footer ---------- */
.footer { padding: var(--s5) 0 var(--s4); border-top: var(--hair) solid var(--line); }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s5); align-items: end; }
.footer-grid img { height: 140px; width: auto; }
.footer-links { display: grid; gap: var(--s1); justify-items: start; }
.footer-links a { color: var(--primary); text-decoration: none; }
.footer-links a:hover { color: var(--accent-text); }
.footer-legal { margin-top: var(--s4); display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .footer-grid img { height: 100px; }
}

/* ---------- inline line art, follows the theme ---------- */
.k-line { stroke: var(--line); }
.k-muted { stroke: var(--muted); }
.k-ink { stroke: var(--primary); }
.k-acc { stroke: var(--accent); }
.k-fill-acc { fill: var(--accent); }
