/* ---- Dark Swiss / gallery aesthetic ----
   Near-black canvas, generous whitespace, serif headlines, clean sans body.
   System fonts only — nothing loaded from a CDN. */

:root {
  --ink: #f2f2f0;
  --ink-soft: #9a9a96;
  --line: #2a2a2a;
  --paper: #0d0d0d;
  --surface: #161616;
  --accent: #8fb4d6; /* steel: labels, hovers, the hot pen — nowhere else */
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 1320px;
  --gap: 32px;

  /* Type scale: every font-size on the site is one of these eight steps.
     Each grows gently with the window, so large screens don't shrink the text. */
  --fs-display: min(calc(9.8vw - 4px), 76px); /* hero name; sized to fit its line */
  --fs-h1: clamp(30px, 4.4vw, 56px);          /* page titles, contact headline */
  --fs-h2: clamp(26px, 3.2vw, 44px);          /* section titles */
  --fs-h3: clamp(22px, 2vw, 30px);            /* sub-section titles */
  --fs-lead: clamp(17px, 1.3vw, 22px);        /* intros, item titles, serif notes */
  --fs-body: clamp(15px, 0.9vw, 18px);        /* running text, form fields */
  --fs-small: clamp(13px, 0.75vw, 15px);      /* buttons, nav, prices, footer */
  --fs-label: clamp(11px, 0.6vw, 13px);       /* uppercase kickers, captions, field labels */

  /* Decorative SVG loops share one base period. Each animated section scales it
     with a local --m modifier, so the whole page re-times from this one knob
     while every section keeps its own relative rhythm. Nothing below sets a raw
     duration — every loop is calc(var(--loop) * <modifier>). */
  --loop: 6s;

  /* The one easing curve for entrances, reveals, the nav underline and the accordion.
     app.js builds GSAP's default ease from these same four numbers. */
  --ease-draw: cubic-bezier(0.2, 0.6, 0.2, 1);
  /* How long one scroll reveal takes: the .reveal fallback transition, and
     app.js's GSAP reveals and heading lines, all read this value. */
  --reveal-dur: 0.55s;
}

* { box-sizing: border-box; }

/* No visible scrollbar — the page scrolls normally, the bar just doesn't
   draw. scrollbar-width covers Firefox + Chromium; the pseudo covers Safari. */
html { scroll-behavior: smooth; scrollbar-width: none; }
/* Lenis drives the scroll itself once it's up; native smooth fights it. */
html.lenis { scroll-behavior: auto; }
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Drafting grid behind the top of the page (120px major, 24px minor),
   fading out downward. Below the blueprint (-1) and all content. */
body::before {
  content: "";
  position: fixed;  /* the sheet stays put; the page scrolls over it */
  top: 0;
  left: 0;
  right: 0;
  height: 1100px;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }

a { color: inherit; text-decoration: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: none;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn--sm { padding: 8px 16px; font-size: var(--fs-small); }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(13, 13, 13, 0.78);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { font-family: var(--serif); font-size: var(--fs-lead); letter-spacing: 0.01em; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 30px); }
.nav a:not(.btn) {
  position: relative;
  font-size: var(--fs-small);
  color: var(--ink-soft);
  transition: color 0.25s ease;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-draw);
}
.nav a:not(.btn):hover { color: var(--ink); }
.nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }

/* ---- Layout primitives ---- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

.section { padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
/* Read by screen readers, not shown: keeps the heading order whole where the design has no visible heading */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Ultrawide (21:9 and 4K): the centered column keeps the gallery margins, but
   the header/footer content must anchor to the SAME column — hugging the
   screen edges leaves them floating a metre away from everything else. The
   column also widens a step so it doesn't read as a letterboxed phone site. */
@media (min-width: 2000px) {
  :root { --maxw: 1480px; }
  .site-header,
  .site-footer {
    padding-left: calc((100vw - var(--maxw)) / 2 + 48px);
    padding-right: calc((100vw - var(--maxw)) / 2 + 48px);
  }
  .site-footer { max-width: none; }
}
.section-head { max-width: 660px; margin: 0 0 clamp(32px, 5vw, 56px); }
/* A head that closes its section (Industries) takes no margin, or it adds to the section's own bottom padding. */
.section-head:last-child { margin-bottom: 0; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: var(--fs-label);
  color: var(--accent);
  margin: 0 0 18px;
}
.section-head h2 { font-size: var(--fs-h2); line-height: 1.1; margin: 0 0 16px; }
.section-head p { color: var(--ink-soft); margin: 0; font-size: var(--fs-lead); }
.section-head p.kicker { color: var(--accent); font-size: var(--fs-label); } /* the rule above outranks .kicker */

/* ---- Animated header glyphs ----
   A small looping line-drawing sits beside each section title. Each is a self
   contained inline SVG; the motion below is pure CSS and pauses for users who
   ask for reduced motion (see the bottom of this file). */
.section-head.has-glyph { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 30px); }
.section-head.has-glyph .head-text { min-width: 0; order: 1; flex: 1 1 auto; }
.section-head.has-glyph .head-glyph { order: 2; }
.section-head.has-glyph .head-text :last-child { margin-bottom: 0; }
.head-glyph {
  flex: none;
  width: clamp(54px, 7vw, 70px);
  height: clamp(54px, 7vw, 70px);
  color: var(--ink);
}
.head-glyph svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Services — an idea (spark) resolves into a finished object (the cube draws on) */
.glyph-idea { --m: 0.8; }
.glyph-idea .gi-spark {
  transform-box: fill-box;
  transform-origin: center;
  animation: gi-spark calc(var(--loop) * var(--m)) ease-in-out infinite both;
}
.glyph-idea .gi-draw {
  stroke-dasharray: 100;
  animation: gi-cube calc(var(--loop) * var(--m)) ease-in-out infinite both;
}
/* Holds trimmed (shorter loop via --m); the spark/draw transitions keep their
   absolute speed, only the static dwell between them is cut. */
@keyframes gi-spark {
  0%, 12%   { opacity: 1; transform: scale(1); }
  21%, 84%  { opacity: 0; transform: scale(.5); }
  93%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes gi-cube {
  0%, 17%   { stroke-dashoffset: 100; opacity: 0; }
  22%       { opacity: 1; }
  54%, 68%  { stroke-dashoffset: 0; opacity: 1; }
  80%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

/* How I work — one piece multiplies into many, then back */
.glyph-many { --m: 0.6; }
.glyph-many .gm-cell {
  transform-box: fill-box;
  transform-origin: center;
  animation: gm-cell calc(var(--loop) * var(--m)) ease-in-out infinite both;
  animation-delay: var(--d, 0s);
}
@keyframes gm-cell {
  0%, 12%   { opacity: 0; transform: scale(.18); }
  31%, 61%  { opacity: 1; transform: scale(1); }
  79%, 100% { opacity: 0; transform: scale(.18); }
}

/* About — two meshing gears, counter-rotating (engineering / precision) */
.glyph-gears .gg-a,
.glyph-gears .gg-b {
  transform-box: fill-box;
  transform-origin: center;
}
.glyph-gears { --m-a: 2.5; --m-b: 1.5; }   /* ratio kept so the meshing reads right */
.glyph-gears .gg-a { animation: gg-spin calc(var(--loop) * var(--m-a)) linear infinite; }
.glyph-gears .gg-b { animation: gg-spin calc(var(--loop) * var(--m-b)) linear infinite reverse; opacity: .82; }
@keyframes gg-spin { to { transform: rotate(360deg); } }

/* ---- Hero ---- */
.hero { padding: clamp(40px, 6vw, 76px) 0 clamp(48px, 7vw, 88px); max-width: 760px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: var(--fs-label);
  color: var(--accent);
  margin: 0 0 24px;
}
/* Always a single line: below the 76px cap the size tracks the viewport,
   tuned so the text spans the available width with a safety margin. */
.hero-title {
  font-size: var(--fs-display);
  line-height: 1.04;
  margin: 0;
  white-space: nowrap;
}
.hero-sub {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: var(--fs-lead);
  line-height: 1.45;
  color: var(--ink-soft);
}

/* hero entrance — staggered rise on load */
.hero > * { animation: rise 0.9s var(--ease-draw) both; }
.hero .eyebrow { animation-delay: 0.05s; }
.hero .hero-title { animation-delay: 0.16s; }
.hero .hero-sub { animation-delay: 0.24s; }
.hero .process { animation-delay: 0.32s; }
/* ---- Blueprint layer — ghost CAD linework ----
   One drawing at a time, right-aligned, FIXED to the viewport: the page
   scrolls over it, the drawing stays put and keeps tracing. app.js
   traces it on canvas layers it adds here, at constant pen speed, stroke
   handing off to stroke like a plotter; the hot pen and its glow are
   drawn there too. A mask fades it out under the text column.
   Sized for a sub-minute visit: full trace in ~8.5s, cycle ~11.5s. */
.hero-blueprint {
  position: fixed;
  inset: 0;
  z-index: -1; /* below all in-flow content, above the body background */
  pointer-events: none;
  color: var(--ink);
  /* Full strength while the hero is on screen; app.js adds .past-hero once
     it has scrolled away, so the drawing doesn't compete with section text. */
  --bp-strong: 0.5;
  --bp-rest: 0.28;
  opacity: var(--bp-strong);
  transition: opacity 1s ease;
  -webkit-mask-image: linear-gradient(90deg, transparent 2%, rgba(0, 0, 0, 0.45) 40%, #000 64%);
  mask-image: linear-gradient(90deg, transparent 2%, rgba(0, 0, 0, 0.45) 40%, #000 64%);
}
/* Desktop only: the ≤900px band keeps its own fixed strength (see below).
   Must stay before .fade so the cross-fade always reaches 0. */
@media (min-width: 901px) {
  .hero-blueprint.past-hero { opacity: var(--bp-rest); }
}
.hero-blueprint.fade { opacity: 0; }
/* every drawing renders centered in one consistent box on the right,
   so wide and tall objects read at the same visual scale. The <svg> is
   invisible: app.js reads its box and draws the linework on canvas. */
.hero-blueprint svg {
  position: absolute;
  right: 4vw;
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 720px);
  height: min(70vh, 660px);
  display: block;
}
/* Ultrawide: the linework rides the content column's right edge, not the
   screen's — pinned to the viewport it drifts a metre off into the margin.
   The fade is re-stopped around the drawing's new position so it reads at
   the same strength as on a laptop. */
@media (min-width: 2000px) {
  .hero-blueprint svg { right: calc((100vw - var(--maxw)) / 2 + 48px); }
  .hero-blueprint {
    -webkit-mask-image: linear-gradient(90deg, transparent 28%, rgba(0, 0, 0, 0.3) 50%, #000 66%);
    mask-image: linear-gradient(90deg, transparent 28%, rgba(0, 0, 0, 0.3) 50%, #000 66%);
  }
}

@media (max-width: 900px) {
  /* On small screens the drawing keeps a fixed band at the top — a fifth of
     the screen between the header and the hero text. The page scrolls up
     underneath it; a paper-coloured scrim under the band melts the passing
     text away in a soft gradient instead of a hard cut. */
  .hero { padding-top: calc(20vh + 40px); }
  .hero-blueprint {
    inset: 80px 0 auto 0;
    height: 20vh;
    z-index: 6;
    -webkit-mask-image: none;
    mask-image: none;
  }
  /* The swap fade moves onto the drawing's canvases — fading the whole band
     would blink the scrim off every cycle and flash the text hidden behind it. */
  .hero-blueprint, .hero-blueprint.fade { opacity: 1; transition: none; }
  .hero-blueprint canvas { opacity: 0.38; transition: opacity 1s ease; }
  .hero-blueprint.fade canvas { opacity: 0; }
  .hero-blueprint svg {
    right: 50%;
    top: 50%;
    bottom: auto;
    transform: translate(50%, -50%);
    width: 90vw;
    height: 20vh;
  }
  .hero-blueprint::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -80px;
    height: calc(80px + 20vh + 64px);
    z-index: -1;
    background: linear-gradient(180deg,
      var(--paper) 0%,
      var(--paper) calc(100% - 64px),
      rgba(13, 13, 13, 0) 100%);
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* ---- Process strip (below the hero title) ---- */
.process {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: clamp(11px, 1.7vw, 20px);
  margin: 40px 0 0;
  --ico: clamp(26px, 3.4vw, 34px);
  --m: 0.5;
}
.process .step {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  animation: flow-accent calc(var(--loop) * var(--m)) ease-in-out infinite;
}
/* The dim-and-brighten pulse rides on the icon only, so the labels below it
   keep their full contrast. */
.process .step svg {
  opacity: 0.6;
  animation: flow calc(var(--loop) * var(--m)) ease-in-out infinite;
  animation-delay: inherit;
}
.process .arrow {
  display: inline-flex;
  margin-top: calc((var(--ico) - 11px) / 2);
  color: var(--ink-soft);
  opacity: 0.6;
  animation: flow calc(var(--loop) * var(--m)) ease-in-out infinite;
}
.process .step svg { width: var(--ico); height: var(--ico); color: inherit; display: block; }
.process .arrow svg { width: 11px; height: 11px; display: block; }
.process .step-label {
  font-size: 10px; /* off-scale on purpose: the step row must fit one line inside the diagram */
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* always-on, subtle: a soft highlight flows left -> right through the steps */
@keyframes flow {
  0%        { opacity: 0.6; }
  18%       { opacity: 1; }
  51%, 100% { opacity: 0.6; }
}
/* ...and the icon it lands on lights up in the accent (labels keep their grey) */
@keyframes flow-accent {
  0%        { color: var(--ink); }
  18%       { color: var(--accent); }
  51%, 100% { color: var(--ink); }
}
.process > *:nth-child(1)  { animation-delay: 0s; }
.process > *:nth-child(2)  { animation-delay: 0.1s; }
.process > *:nth-child(3)  { animation-delay: 0.2s; }
.process > *:nth-child(4)  { animation-delay: 0.3s; }
.process > *:nth-child(5)  { animation-delay: 0.4s; }
.process > *:nth-child(6)  { animation-delay: 0.5s; }
.process > *:nth-child(7)  { animation-delay: 0.6s; }
.process > *:nth-child(8)  { animation-delay: 0.7s; }
.process > *:nth-child(9)  { animation-delay: 0.8s; }
.process > *:nth-child(10) { animation-delay: 0.9s; }
.process > *:nth-child(11) { animation-delay: 1s; }
.process > *:nth-child(12) { animation-delay: 1.1s; }
.process > *:nth-child(13) { animation-delay: 1.2s; }

/* ---- Services (expandable list) ----
   Each service is a native <details>. Titles show by default; the body expands
   on click — no JS, no dividers, no marker. A subtle 45° highlight sweeps
   left-to-right across the titles as the ambient "these open" cue (no hover):
   each title carries a solid base colour with a moving highlight band over it,
   both clipped to the glyphs, so only the text lights — never the gaps. The
   base layer always covers, so the text never drops out as the band passes.
   The per-row phase (--i) lets the band flow diagonally down the list as one
   sweep; the open title is solid white and still. */
.services-accordion { max-width: 820px; --m: 2.1; }
.service:nth-child(1) { --i: 0; }
.service:nth-child(2) { --i: 1; }
.service:nth-child(3) { --i: 2; }
.service:nth-child(4) { --i: 3; }
.service:nth-child(5) { --i: 4; }
.service:nth-child(6) { --i: 5; }
.service:nth-child(7) { --i: 6; }
.service:nth-child(8) { --i: 7; }
.service > summary {
  padding: clamp(14px, 2vw, 20px) 2px;
  cursor: pointer;
  list-style: none;                 /* drop the default disclosure triangle */
}
.service > summary::-webkit-details-marker { display: none; }
.service > summary h3 {
  /* base title colour; brightened on small screens where the soft grey
     reads too dark at phone text sizes */
  --title-ink: var(--ink-soft);
  position: relative;
  font-size: var(--fs-lead);
  margin: 0;
  color: var(--title-ink);
}
/* The sweep lives on a text-clipped COPY of the title (data-text), overlaid
   on the real one. background-clip:text disables subpixel antialiasing on
   Windows — kept on the base title it renders the whole list fuzzy; on the
   overlay only the moving band pays that cost, the letters stay crisp. */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .service > summary h3::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(120deg, transparent 38%, rgba(255, 255, 255, 0.85) 50%, transparent 62%);
    background-repeat: no-repeat;
    background-size: 250% 100%;
    background-position: 125% 0;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: heading-shine calc(var(--loop) * var(--m)) ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * var(--loop) * var(--m) / 36);
  }
}
.service[open] > summary h3 { color: var(--ink); }
.service[open] > summary h3::after { content: none; }
@keyframes heading-shine {
  0%   { background-position: 125% 0; }
  64%  { background-position: -125% 0; }
  100% { background-position: -125% 0; }
}

.service-body { padding: 0 2px clamp(16px, 2vw, 22px); max-width: 62ch; }
.service-body p { margin: 0; color: var(--ink-soft); font-size: var(--fs-body); }

/* Smooth height animation where the browser can size to keyword heights;
   elsewhere it falls back to instant open/close — still fully functional. */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .service::details-content {
    block-size: 0;
    overflow: hidden;
    opacity: 0;
    transition: block-size 0.32s var(--ease-draw),
                opacity 0.28s ease,
                content-visibility 0.32s allow-discrete;
  }
  .service[open]::details-content { block-size: auto; opacity: 1; }
}

/* ---- Capability pillars (Make / Develop) ----
   The whole offering, bucketed into two columns side by side — a discipline
   header on top of each, its four services (the same <details> accordion)
   below. Collapses to one stacked column on narrow screens. */
.pillars {
  margin-top: clamp(8px, 2vw, 16px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 56px);
}
.pillar-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 6px;
}
.pillar-no {
  display: block;
  font-size: var(--fs-label);
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 14px;
}
.pillar-name { font-size: var(--fs-h3); margin: 0 0 8px; }
.pillar-tag {
  margin: 0;
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
/* the accordion caps its own width by default; let it fill the pillar column */
.pillar .services-accordion { max-width: none; }
/* narrower columns: titles a step smaller than the old full-width rows */
.pillar .service > summary h3 { font-size: var(--fs-lead); }
/* Products reuse the pillar column: the name, then the link */
.product > .btn { margin-top: 22px; }
.pillars.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .pillars, .pillars.products { grid-template-columns: 1fr; gap: 36px; }
  .pillar .service > summary h3 { font-size: var(--fs-lead); }
  .service > summary h3 { --title-ink: #cfcfca; }
}

/* ---- How I work pillars ---- */
.why {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(24px, 3vw, 44px);
}
.why-item h3 { font-family: var(--serif); font-size: var(--fs-lead); margin: 0 0 10px; }
.why-item p { color: var(--ink-soft); margin: 0; font-size: var(--fs-body); }

/* ---- Projects: shared card media (showroom strip + portfolio grid) ----
   The list lives in projects.js. .is-drawing marks a blueprint SVG standing
   in for a photo: its strokes are black in an <img>, so they're inverted. */
.project-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.project-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-img.is-drawing { object-fit: contain; padding: 12%; filter: invert(1); opacity: 0.7; }

/* ---- Work: the showroom strip on the main page ----
   Two copies of the same set slide left by exactly one copy's width, so the
   loop has no seam. The items are pictures, not links: nothing to hover,
   click, select or drag, and nothing pauses it. Under reduced motion it stands
   still and scrolls by hand instead. */
.showroom {
  --item: clamp(220px, 26vw, 320px);
  overflow: hidden;
  margin: 0 calc(-1 * clamp(20px, 4vw, 48px));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-user-select: none;
  user-select: none;
}
.showroom-track {
  display: flex;
  gap: 24px;
  width: max-content;
  padding-right: 24px; /* the gap between the two copies, so -50% lands exactly */
  animation: showroom-slide calc(var(--loop) * 7) linear infinite;
}
@keyframes showroom-slide { to { transform: translateX(-50%); } }
.showroom-item { flex: 0 0 var(--item); display: block; }
.showroom-item img { -webkit-user-drag: none; pointer-events: none; }
/* No background behind the drawings here: they sit straight on the page. */
.showroom-item .project-media { background: none; border: 0; }
.showroom-title {
  display: block;
  margin-top: 12px;
  font-size: var(--fs-body);
  color: var(--ink-soft);
}
.showroom-more { margin: clamp(28px, 4vw, 40px) 0 0; }

/* ---- Portfolio page: the full grid ---- */
.portfolio-title { font-size: var(--fs-h1); line-height: 1.05; margin: 0 0 16px; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 32px);
}
.project-card { scroll-margin-top: 96px; display: flex; flex-direction: column; }
.project-card:target .project-media { border-color: var(--accent); }
/* Header grows to the tallest in its row, so every picture lines up. */
.project-head { flex: 1 0 auto; margin-bottom: 14px; }
.project-line { margin: 0; line-height: 1.35; }
.project-line + .project-line { margin-top: 8px; }
.project-problem { color: var(--ink-soft); font-size: var(--fs-body); }
.project-solution { color: var(--ink); font-family: var(--serif); font-size: var(--fs-lead); }
.project-label {
  display: block;
  font-family: var(--sans);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 2px;
}
.project-noscript { color: var(--ink-soft); }

/* ---- Industries: one field at a time, cycling like a slider ----
   Every slide and tick shares one timeline; --i (set per element) phases each
   one into its own slot via a negative animation-delay. */
.industry-slider {
  --n: 9;
  --m: 0.25;                              /* per-slide dwell, as a fraction of base */
  --step: calc(var(--loop) * var(--m));
  --total: calc(var(--n) * var(--step));
  order: 2;                 /* sit on the right; the title stays on the left */
  flex: none;
  width: clamp(132px, 18vw, 172px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.ind-head { max-width: 880px; }
.ind-stage { position: relative; width: 100%; height: 92px; }
.ind-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  will-change: opacity, transform;
  animation: ind-cycle var(--total) linear infinite both;
  animation-delay: calc(var(--i) * var(--step) * -1);
}
.ind-slide svg {
  width: clamp(44px, 5vw, 54px);
  height: clamp(44px, 5vw, 54px);
  color: var(--ink);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .9;
}
.ind-slide figcaption {
  font-family: var(--serif);
  font-size: var(--fs-lead);
  letter-spacing: -0.01em;
  color: var(--ink);
}
@keyframes ind-cycle {
  0%    { opacity: 0; transform: translateX(-26px); }
  2.5%  { opacity: 1; transform: translateX(0); }
  9%    { opacity: 1; transform: translateX(0); }
  11.5% { opacity: 0; transform: translateX(26px); }
  12%   { opacity: 0; transform: translateX(-26px); }
  100%  { opacity: 0; transform: translateX(-26px); }
}

/* ---- Clients ---- */
.clients {
  --m: 1;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 36px);
  animation: logo-shine calc(var(--loop) * var(--m)) linear infinite;
}
.client {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.client img {
  height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.client figcaption {
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-align: center;
}

/* One specular highlight travels left-to-right across the whole row as a single
   continuous wavefront. A registered --shine progress (0→1) is animated once on
   the row; each logo places its own silhouette-masked bar at that global
   position minus the logo's measured left offset (--logo-x, published by
   app.js), so the separate bars line up into one straight 30° band — no scatter.
   Only the logos light, never the gaps; the <img> is untouched. Without JS the
   bars fall back to sweeping in sync. */
@property --shine {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
@keyframes logo-shine {
  0%   { --shine: 0; }
  38%  { --shine: 1; }
  100% { --shine: 1; }
}
.client-logo { position: relative; display: inline-block; line-height: 0; }
.client-logo img { display: block; }
.client-shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: var(--logo);
          mask-image: var(--logo);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
}
.client-shine::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: 0;
  width: 90px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.9) 50%,
    transparent);
  /* the global wavefront, expressed in this logo's local space */
  transform: translateX(calc(var(--shine) * (var(--row-w, 1200px) + 180px) - 90px - var(--logo-x, 0px))) skewX(-30deg);
}

/* ---- About ---- */
.about-body { max-width: 760px; }
.about-body p { color: var(--ink-soft); margin: 0 0 16px; font-size: var(--fs-lead); line-height: 1.5; max-width: 52ch; }
.about-body p:last-child { margin-bottom: 0; }

/* ---- Contact ---- */
.contact .lead {
  font-family: var(--serif);
  font-size: var(--fs-h1);
  line-height: 1.08;
  margin: 0 0 20px;
  max-width: 18ch;
}
.contact-note {
  color: var(--ink-soft);
  font-size: var(--fs-body);
  max-width: 52ch;
  margin: 0 0 clamp(28px, 4vw, 44px);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px) auto;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.contact-form { display: grid; gap: 18px; }
.contact-form label {
  display: grid;
  gap: 8px;
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-form input:not(.hp),
.contact-form textarea {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--ink-soft); }
.contact-form ::placeholder { color: var(--ink-soft); opacity: 0.55; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* honeypot */
.form-sent { margin: 0; font-size: var(--fs-body); color: var(--ink); }
.contact-side-note { font-family: var(--serif); font-size: var(--fs-lead); margin: 0 0 18px; }
.contact-side .contact-links { margin-bottom: 22px; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-social {
  position: relative;
  font-size: var(--fs-body);
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.contact-social:hover { color: var(--ink); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px clamp(20px, 4vw, 48px);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.site-footer a:hover { color: var(--ink); }

/* ---- Mobile sticky CTA ----
   Small-screen only; app.js hides it while the contact section is visible. */
.mobile-cta { display: none; }
@media (max-width: 600px) {
  .mobile-cta {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 30;
    display: inline-flex;
    padding: 12px 26px;
    font-size: var(--fs-small);
    letter-spacing: 0.02em;
    color: var(--ink);
    background: rgba(13, 13, 13, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid var(--ink);
    border-radius: 999px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
    transition: opacity 0.25s ease, visibility 0.25s;
  }
  .mobile-cta.is-hidden { opacity: 0; visibility: hidden; }
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--reveal-dur) var(--ease-draw),
              transform var(--reveal-dur) var(--ease-draw);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
/* Where GSAP runs (app.js sets has-motion), it moves the reveals; the CSS
   transition stays for the order page and for when GSAP fails to load. */
html.has-motion .reveal { transition: none; }

@media (max-width: 600px) {
  .nav { gap: 16px; }
  /* $= so the same rule covers the other pages, where these carry a "/". */
  .nav a[href$="#services"],
  .nav a[href$="#industries"],
  .nav a[href$="#about"] { display: none; }

  /* Process strip stays one row: everything scales with the viewport
     instead of wrapping the tail onto a second line. space-between spreads
     the leftover width evenly so the row spans edge to edge — packed left,
     it all pooled up as a lopsided right gap. */
  .process { flex-wrap: nowrap; justify-content: space-between; gap: 1.4vw; --ico: 6vw; }
  .process .arrow { margin-top: calc((var(--ico) - 2.4vw) / 2); }
  .process .arrow svg { width: 2.4vw; height: 2.4vw; }
  .process .step-label { font-size: clamp(7px, 2.3vw, 10px); letter-spacing: 0.04em; }

  /* The small head glyphs stay inline beside their titles; only the wide
     industries slider moves below its text — beside it, the text was
     squeezed to a sliver at phone widths. */
  .ind-head { flex-direction: column; align-items: flex-start; gap: 22px; }
  .ind-head .industry-slider {
    order: 2;
    align-self: center;
    width: clamp(150px, 52vw, 210px);
    margin-top: 4px;
  }
  .ind-slide svg { width: 52px; height: 52px; }
  .ind-slide figcaption { font-size: var(--fs-lead); }

  /* Stack clients one per row so no two logos share a line. */
  .clients { flex-direction: column; align-items: center; }

  /* Stacked: the sweep travels top-to-bottom instead of left-to-right — a
     horizontal band descends the column, placed at the shared --shine wavefront
     using each logo's measured top offset (--logo-y). */
  .client-shine::after {
    top: 0;
    bottom: auto;
    left: -40%;
    right: -40%;
    width: auto;
    height: 90px;
    background: linear-gradient(180deg,
      transparent,
      rgba(255, 255, 255, 0.9) 50%,
      transparent);
    transform: translateY(calc(var(--shine) * (var(--col-h, 600px) + 180px) - 90px - var(--logo-y, 0px))) skewY(-30deg);
  }
}

/* ---- Reduced motion: respect the OS setting ----
   Looping and entrance animations stop; colour and fade transitions keep
   their timing, since they move nothing. The few transitions that do move
   something are switched off one by one below. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .nav a:not(.btn)::after { transition: none; }
  .reveal { opacity: 1; transform: none; }
  .showroom { overflow-x: auto; scrollbar-width: none; }
  .showroom-track { animation: none; }
  .showroom-track > [aria-hidden="true"] { display: none; }

  /* Freeze the decorative loops on a sensible, complete frame. */
  .head-glyph *, .ind-slide { animation: none !important; }
  .glyph-idea .gi-spark { opacity: 0 !important; }
  .glyph-idea .gi-draw { stroke-dashoffset: 0 !important; opacity: 1 !important; }
  .glyph-many .gm-cell { opacity: 1 !important; transform: none !important; }
  .ind-slide { opacity: 0 !important; transform: none !important; }
  .ind-slide:first-of-type { opacity: 1 !important; }
  .client-shine { display: none !important; }

  /* Drop the heading sweep entirely — the base titles are already flat text. */
  .service > summary h3::after { content: none !important; }

  /* ::details-content isn't matched by the universal rule above. */
  .service::details-content { transition: none !important; }
}

/* ---- Skawheels order page (order.html only) ----
   Reuses the contact-form field styles; adds the preview, the option cards,
   the stepper and the price lines. */
.order.section { border-top: 0; padding-top: 28px; }
.order-title { font-size: var(--fs-h1); line-height: 1.06; margin: 0 0 18px; }
.order-intro { color: var(--ink-soft); max-width: 60ch; margin: 0 0 clamp(28px, 4vw, 48px); }
.order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
/* Heading, intro and preview pin as one block at their starting position
   while the form scrolls; the preview takes whatever height is left. */
.order-stage {
  position: sticky;
  top: var(--order-top, 104px);
  height: calc(100svh - var(--order-top, 104px) - 24px);
  min-height: 520px;
  display: flex;
  flex-direction: column;
}
.order-stage .order-intro { margin-bottom: 24px; }
.order-diy { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.order-diy-title {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.order-diy p { color: var(--ink-soft); margin: 0 0 18px; }
.order-preview {
  flex: 1 1 auto;
  min-height: 260px;
  /* The spotlight's glow from above. It sits behind the transparent canvas,
     so it stays put while the board turns. */
  background:
    radial-gradient(55% 60% at 50% -8%, rgba(255, 240, 222, 0.22), rgba(255, 240, 222, 0.06) 55%, transparent 78%),
    var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
}
.order-preview canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.order-preview canvas:active { cursor: grabbing; }
/* Chalk, not graphite: the spotlight glow behind it is too light for grey text. */
.order-preview-msg { margin: 0; padding: 24px; max-width: 34ch; text-align: center; color: var(--ink); font-size: var(--fs-small); }
.order-preview.is-live .order-preview-msg { display: none; }

.order-field { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.order-field > legend,
.order-form .order-field > label {
  display: block;
  padding: 0;
  margin: 0 0 10px;
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.order-each { letter-spacing: 0.04em; text-transform: none; margin-left: 6px; }
.order-options { display: grid; gap: 8px; }
.order-options--two { grid-template-columns: 1fr 1fr; }
.order-form .order-option {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px 14px 12px 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: border-color 0.18s ease;
}
.order-option:hover { border-color: var(--ink-soft); }
.order-option:has(input:checked) { border-color: var(--ink); }
.order-option:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
/* Beats .contact-form input:not(.hp), which would draw the radio as a text box. */
.order-form .order-option input {
  position: absolute;
  left: 14px;
  top: 15px;
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: var(--ink);
}
.order-option-name { font-size: var(--fs-body); color: var(--ink); }
.order-option-price { font-size: var(--fs-small); color: var(--ink-soft); }

.order-stepper { display: flex; align-items: stretch; width: max-content; }
.order-stepper input {
  width: 72px !important;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.order-stepper input::-webkit-outer-spin-button,
.order-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.order-step {
  width: 46px;
  font: inherit;
  font-size: var(--fs-lead);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.18s ease;
}
.order-step:hover { border-color: var(--ink-soft); }
.order-step:first-child { border-right: 0; }
.order-step:last-child { border-left: 0; }
.order-full { margin: 0; font-size: var(--fs-small); color: var(--ink); }
.order-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.order-preset {
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink-soft);
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}
.order-preset span { color: var(--ink-soft); margin-left: 6px; font-weight: 400; font-variant-numeric: tabular-nums; transition: color 0.18s ease; }
.order-preset:hover { border-color: var(--ink); }
.order-preset[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.order-preset[aria-pressed="true"] span { color: var(--paper); opacity: 0.7; }

.order-lines { margin: 4px 0 0; border-top: 1px solid var(--line); }
.order-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-body);
}
.order-lines dt { color: var(--ink-soft); }
.order-lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.order-total dt,
.order-total dd { color: var(--ink); font-family: var(--serif); font-size: var(--fs-lead); }
.order-terms { margin: 0; font-size: var(--fs-small); color: var(--ink-soft); }
.order-selftest {
  margin: 32px 0 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: var(--fs-small);
  white-space: pre-wrap;
}

@media (max-width: 860px) {
  /* One column. The heading scrolls away; the preview pins under the header
     and the options slide up beneath it, fading out as they reach it. */
  .order-grid { grid-template-columns: 1fr; row-gap: 0; }
  .order-stage { display: contents; }
  .order-preview {
    position: sticky;
    top: 75px;
    z-index: 5;
    flex: none;
    aspect-ratio: 4 / 3;
    min-height: 0;
    margin-bottom: 36px;
    /* The fade: a paper-coloured shadow below the preview's lower edge. */
    box-shadow: 0 22px 22px 4px var(--paper);
  }
}
@media (max-width: 420px) {
  .order-options--two { grid-template-columns: 1fr; }
}
