/* TurboaSOX — Marcus the Minimalist
   Near-monochrome, aggressive whitespace, hairlines not cards, one gold accent.
   The UI stays quiet; the installation photography carries the colour. */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.12; letter-spacing: -0.012em; }
strong { font-weight: 600; color: var(--ink); }

/* ---- layout primitives ---- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.narrow { max-width: var(--wrap-narrow); }
.section { padding-block: var(--section-y); }
.section + .section { border-top: 1px solid var(--line); }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--alt { background: var(--colour-surface); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.section--dark .eyebrow { color: #b69b54; }
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--body); max-width: 62ch; }
.section--dark .lead { color: var(--on-dark); }
.measure { max-width: 64ch; }
.rule-gold { width: 64px; height: 3px; background: var(--gold-bright); border: 0; margin: 0 0 1.6rem; }

/* ---- links + buttons ---- */
.tlink {
  color: var(--link); font-weight: 500;
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: border-color .18s ease;
}
.tlink:hover, .tlink:focus-visible { border-bottom-color: var(--link); }
.tlink::after { content: " \2192"; font-family: var(--font-mono); }

.btn {
  display: inline-block; font-weight: 500; font-size: 0.98rem;
  padding: 0.72rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--ink); transition: background .18s ease, color .18s ease;
}
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover, .btn-solid:focus-visible { background: #000; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--ink); color: #fff; }
.section--dark .btn-ghost { border-color: #fff; color: #fff; }
.section--dark .btn-ghost:hover { background: #fff; color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---- header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; }
.brand img { width: auto; height: 40px; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav a:not(.btn) {
  color: var(--ink); font-weight: 500; font-size: 0.96rem;
  border-bottom: 2px solid transparent; padding-block: 4px;
  white-space: nowrap;
}
.nav a:not(.btn):hover, .nav a:not(.btn):focus-visible, .nav a[aria-current="page"] { border-bottom-color: var(--gold-bright); }
.nav .btn { padding: 0.5rem 1.05rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ---- hero ---- */
.hero { padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(3rem, 6vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.hero h1 { font-size: var(--t-h1); margin-bottom: 1.5rem; }
.hero .lead { margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.hero-figure { position: relative; }
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.figcap { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--muted); margin-top: 0.7rem; }

/* ---- generic section heading block ---- */
.sec-head { max-width: 70ch; margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.sec-head h2 { font-size: var(--t-h2); margin-bottom: 1rem; }
.sec-num { font-family: var(--font-mono); color: var(--gold); font-size: 0.85rem; letter-spacing: 0.1em; }

/* ---- the "two counters / one timeline" style problem-answer rows ---- */
.cols { display: grid; gap: clamp(1.8rem, 4vw, 3rem); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* pillar / feature block — hairline top rule, no card */
.pillar { padding-top: 1.4rem; border-top: 1px solid var(--line); }
.pillar h3 { font-size: var(--t-h3); margin-bottom: 0.6rem; }
.pillar p { color: var(--body); font-size: 1rem; }
.pillar .k { font-family: var(--font-mono); color: var(--gold); font-size: 0.8rem; letter-spacing: 0.1em; display: block; margin-bottom: 0.9rem; }

/* numbered process steps */
.steps { display: grid; gap: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.5rem; padding-block: 1.8rem; border-top: 1px solid var(--line); align-items: start; }
.step:last-child { border-bottom: 1px solid var(--line); }
.step .n { font-family: var(--font-mono); font-size: 1.4rem; color: var(--gold); font-weight: 500; }
.step h3 { font-size: var(--t-h3); margin-bottom: 0.5rem; }
.step p { color: var(--body); font-size: 1rem; max-width: 60ch; }

/* spec / data tables (Plex Mono, tabular) */
.spec { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.spec th, .spec td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec thead th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.spec td.code { font-family: var(--font-mono); color: var(--ink); white-space: nowrap; font-feature-settings: "tnum"; }
.spec tr:hover td { background: var(--colour-surface); }

.code-chip { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--ink); background: var(--colour-surface-alt); padding: 0.15rem 0.5rem; border-radius: 2px; }

/* product render tiles */
.tile { border-top: 1px solid var(--line); padding-top: 1.3rem; }
.tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #fff; }
.tile h3 { font-size: 1.05rem; margin: 1rem 0 0.4rem; }
.tile p { font-size: 0.96rem; color: var(--body); }
.tile .k { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--gold); }

/* fabric colour chips */
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem 1.2rem; }
.chip .sw { aspect-ratio: 3 / 2; border-radius: var(--radius); border: 1px solid var(--line); }
.chip .code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink); margin-top: 0.6rem; }
.chip .nm { font-size: 0.86rem; color: var(--muted); }

/* applications list — typographic, vertical-first */
.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(2rem, 5vw, 4rem); }
.app { display: grid; grid-template-columns: 1fr; gap: 0.35rem; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.app h3 { font-size: 1.1rem; }
.app p { font-size: 0.98rem; color: var(--body); max-width: 54ch; }
.app .tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }

/* project / case rows */
.case { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding-block: clamp(2.2rem, 5vw, 3.4rem); border-top: 1px solid var(--line); }
.case:nth-child(even) .case-media { order: 2; }
.case-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.case-body h3 { font-size: var(--t-h3); margin-bottom: 0.7rem; }
.case-body .where { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; }
.case-body .stat { font-family: var(--font-mono); color: var(--gold); font-size: 0.9rem; margin-top: 0.9rem; }
.case--text { border-top: 1px solid var(--line); padding-block: 1.5rem; }
.case--text h3 { font-size: 1.08rem; margin-bottom: 0.3rem; }
.case--text .where { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.stat-b .v { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; color: var(--ink); line-height: 1; font-feature-settings: "tnum"; }
.section--dark .stat-b .v { color: #fff; }
.stat-b .l { color: var(--muted); font-size: 0.92rem; margin-top: 0.5rem; }
.section--dark .stat-b .l { color: var(--on-dark); }

/* schematic (inline SVG, palette-driven) */
.schematic { width: 100%; }
.schematic svg { width: 100%; height: auto; }
.sch-ink { stroke: var(--ink); }
.sch-gold { stroke: var(--gold); }
.sch-fill-gold { fill: var(--gold-bright); }
.sch-line { stroke: var(--line); }
.sch-label { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); letter-spacing: 0.04em; }
.sch-label-ink { font-family: var(--font-mono); font-size: 11px; fill: var(--ink); }
.sch-tall { display: none; }

/* forms */
.field { display: grid; gap: 0.4rem; margin-bottom: 1.2rem; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--ink); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 1rem; padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }

/* contact split */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.cinfo dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 1.5rem; }
.cinfo dd { font-size: 1.05rem; color: var(--ink); margin-top: 0.3rem; }
.cinfo dd a { color: var(--ink); border-bottom: 1px solid var(--line); }
.cinfo dd a:hover { border-bottom-color: var(--gold); }

/* footer */
.site-footer { background: var(--dark); color: var(--on-dark); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.f-brand img { height: 46px; width: auto; margin-bottom: 1.1rem; }
.f-brand p { color: var(--on-dark); font-size: 0.95rem; max-width: 34ch; }
.f-nav { display: grid; gap: 0.6rem; align-content: start; }
.f-nav a { color: var(--on-dark); font-size: 0.95rem; }
.f-nav a:hover { color: #fff; }
.f-contact { font-size: 0.95rem; line-height: 1.8; color: var(--on-dark); }
.f-contact a { color: var(--on-dark); border-bottom: 1px solid var(--line-dark); }
.f-contact a:hover { color: #fff; }
.foot-base { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 1.4rem; border-top: 1px solid var(--line-dark); font-size: 0.84rem; color: var(--muted); }
.foot-credit { color: var(--muted); }
.credit-link { color: var(--gold-bright); border-bottom: 1px solid transparent; }
.credit-link:hover { border-bottom-color: var(--gold-bright); }

/* utilities */
.stack > * + * { margin-top: 1.1rem; }
.mt-2 { margin-top: 2rem; }
.note { font-size: 0.92rem; color: var(--muted); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .case, .case:nth-child(even) .case-media { grid-template-columns: 1fr; }
  .case:nth-child(even) .case-media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sch-wide { display: none; }
  .sch-tall { display: block; }
  /* collapse the primary nav to the hamburger before the row can cram/wrap
     (6 links + Contact button + logo stop fitting well below this width) */
  .nav {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gut) 1.5rem; transform: translateY(-130%); transition: transform .25s ease;
  }
  .nav.open { transform: translateY(0); }
  .nav a:not(.btn) { padding: 0.85rem 0; border-bottom: 1px solid var(--line); white-space: normal; }
  .nav .btn { margin-top: 1rem; text-align: center; }
  .nav-toggle { display: block; }
}
@media (max-width: 640px) {
  .cols-2, .cols-3, .cols-4, .apps, .chips, .stats { grid-template-columns: 1fr; }
  .chips { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 3rem 1fr; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
