/* ============================================================
   CMT ENGINEERS: design system
   Editorial-brutalist / blueprint aesthetic.
   Palette: bone, stone, concrete, ink, signal red.
   Type: Archivo (display) · DM Sans (text) · IBM Plex Mono (labels)
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bone:      #EFEBE3;
  --stone:     #E4DED4;
  --concrete:  #B9B1A4;
  --concrete2: #8B8377;
  --ink:       #15120D;
  --ink2:      #211C15;
  --ink3:      #2F281E;
  --mute:      #5E574C;
  --red:       #C8381C;
  --redink:    #9C2A12;   /* red for small text on light bg (AA) */
  --red-bright:#F2683F;   /* red for small text on ink bg (AA)   */
  --line:      rgba(21, 18, 13, .16);
  --line-d:    rgba(239, 235, 227, .12);

  --font-display: 'Archivo', system-ui, sans-serif;
  --font-sans:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --ease:      cubic-bezier(.22, .61, .36, 1);
  --ease-out:  cubic-bezier(.16, 1, .3, 1);

  --container: 1400px;
  --gutter: clamp(20px, 3.4vw, 48px);

  --sp-1: clamp(48px, 7vw, 96px);     /* section padding   */
  --sp-2: clamp(72px, 9.5vw, 150px);  /* big section pad   */
}
@media (min-width: 1800px) { :root { --container: 1560px; } }
@media (min-width: 2300px) { :root { --container: 1720px; } }

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html.no-scroll { overflow: hidden; }
body {
  font-family: var(--font-sans);
  background: var(--bone);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
::selection { background: var(--red); color: #fff; }
img { display: block; max-width: 100%; }
/* <picture> wrappers stay transparent to existing img layout (.proj .im, .figure img, etc.) */
picture { display: contents; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-weight: inherit; }

/* native cursor hidden only when custom cursor is live */
html.has-cursor.cursor-live, html.has-cursor.cursor-live * { cursor: none !important; }

/* ---------- film grain ---------- */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 200; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .035; mix-blend-mode: multiply;
  animation: grain 9s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0) } 10% { transform: translate(-3%,2%) }
  30% { transform: translate(2%,-4%) } 50% { transform: translate(-4%,-2%) }
  70% { transform: translate(3%,3%) } 90% { transform: translate(-2%,4%) }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

/* ---------- layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 1.8vw, 28px); }
.col-4  { grid-column: span 4; }  .col-5 { grid-column: span 5; }
.col-6  { grid-column: span 6; }  .col-7 { grid-column: span 7; }
.col-8  { grid-column: span 8; }  .col-12 { grid-column: span 12; }
@media (max-width: 980px) {
  .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 12; }
}
.section   { padding-top: var(--sp-2); padding-bottom: var(--sp-2); position: relative; }
.section-s { padding-top: var(--sp-1); padding-bottom: var(--sp-1); position: relative; }
.bg-stone { background: var(--stone); }
.bg-ink   { background: var(--ink); color: var(--bone); }
.bg-ink .label-mute { color: var(--concrete); }

/* ---------- type ---------- */
.label {
  font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: .18em; font-size: 11px; font-weight: 500; line-height: 1.6;
}
.label-red  { color: var(--redink); }
.label-mute { color: var(--mute); }
/* small red text needs a brighter tint on dark surfaces for AA contrast */
.bg-ink .label-red, .hero .label-red, .pagehead .label-red, .footer .label-red,
.cta-band .label-red, .bg-ink .ulink.red, .pagehead .ulink.red { color: var(--red-bright); }
.display {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: -.03em; line-height: .92; text-transform: uppercase;
}
.display .accent { color: var(--red); }
.mono { font-family: var(--font-mono); }
.lead  { font-size: clamp(16px, 1.35vw, 19px); }
.muted { color: var(--mute); }
.bg-ink .muted { color: var(--concrete); }

.h-hero { font-size: clamp(48px, 8.6vw, 132px); }
.h-page { font-size: clamp(38px, 6.4vw, 96px); }
.h-sec  { font-size: clamp(28px, 4.4vw, 58px); }
.h-mid  { font-size: clamp(24px, 3.4vw, 44px); }
.h-card { font-size: clamp(19px, 2.2vw, 27px); }

/* word-split reveal */
[data-reveal="words"] .w { display: inline-block; }
html.js [data-reveal="words"]:not(.in) .w {
  opacity: 0; transform: translateY(.55em) rotate(1.5deg); filter: blur(10px);
}
[data-reveal="words"] .w {
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), filter .7s var(--ease-out);
}

/* ---------- reveal (blur + rise), hidden state only when JS is live ---------- */
html.js [data-reveal]:not([data-reveal="words"]) {
  opacity: 0; transform: translateY(30px); filter: blur(14px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out);
}
html.js [data-reveal].in, [data-reveal].in { opacity: 1; transform: none; filter: none; }
[data-reveal="words"] { opacity: 1; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal="words"] .w { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}

/* ---------- blueprint gridlines ---------- */
.gridlines {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background-image: repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent 20%);
}
.gridlines.on-dark { background-image: repeating-linear-gradient(to right, var(--line-d) 0, var(--line-d) 1px, transparent 1px, transparent 20%); opacity: .8; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: .13em; font-size: 12px; font-weight: 500;
  padding: 16px 26px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--bone);
  text-decoration: none; transition: .3s var(--ease); user-select: none;
}
.btn .a { transition: transform .3s var(--ease); }
.btn:hover .a { transform: translate(3px, -3px); }
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(0, 0); box-shadow: 2px 2px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--bone); box-shadow: 5px 5px 0 var(--red); }
.btn--light { background: transparent; color: var(--bone); border-color: var(--bone); }
.btn--light:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); box-shadow: 5px 5px 0 var(--red); }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--ink); border-color: var(--ink); box-shadow: 5px 5px 0 var(--red); }
.btn--block { width: 100%; justify-content: center; }
.btn.is-busy { opacity: .6; pointer-events: none; }
.bg-ink .btn--ghost { color: var(--bone); border-color: var(--bone); }

.ulink {
  position: relative; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: .13em; font-size: 12px; text-decoration: none;
  color: inherit; padding-bottom: 3px;
}
.ulink::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.ulink:hover::after { transform: scaleX(1); }
.ulink.red { color: var(--redink); }

/* ---------- nav ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 95; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; background: var(--red);
  transform: scaleX(0); transform-origin: left;
}
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
  border-bottom: 1px solid transparent; color: var(--bone);
}
.nav.scrolled {
  background: rgba(21, 18, 13, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-color: var(--line-d);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.nav .brand img { height: 51px; }
.nav .links { display: flex; align-items: center; gap: clamp(18px, 2vw, 30px); }
.navlink {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
  font-size: 11.5px; padding: 6px 0; position: relative; color: inherit; text-decoration: none;
}
.navlink::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.navlink:hover::after, .navlink.active::after { transform: scaleX(1); }
.navlink.active { color: var(--red); }
.nav .btn { padding: 12px 20px; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.burger span { width: 26px; height: 2px; background: currentColor; transition: .3s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 85; background: var(--ink); color: var(--bone);
  transform: translateY(-100%); transition: transform .5s var(--ease), visibility .5s;
  visibility: hidden; display: flex; flex-direction: column; justify-content: center;
  padding: 90px 28px 110px; overflow-y: auto;
}
.drawer.open { transform: none; visibility: visible; }
.drawer a {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.02em; font-size: clamp(28px, 7vw, 40px); padding: 10px 0;
  border-bottom: 1px solid var(--line-d); color: var(--bone); text-decoration: none;
}
.drawer a:hover, .drawer a.red { color: var(--red); }
.drawer .label { margin-top: 22px; color: var(--concrete); }
@media (max-width: 1080px) {
  .nav .links { display: none; }
  .burger { display: flex; }
}

/* ---------- hero (WebGL) ---------- */
.hero {
  position: relative; background: var(--ink); color: var(--bone);
  min-height: 92vh; min-height: 92svh; display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; padding-top: 140px;
}
.hero .webgl-wrap { position: absolute; inset: 0; z-index: 0; }
.webgl-contours { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.webgl-contours.webgl-dead { display: none; }
.webgl-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(200, 56, 28, .14), transparent 55%),
    radial-gradient(90% 70% at 20% 90%, rgba(239, 235, 227, .05), transparent 60%);
}
.hero .hero-body { position: relative; z-index: 2; padding-bottom: clamp(40px, 6vh, 90px); }
.hero-kicker { display: flex; align-items: center; gap: 14px; }
.hero-kicker .tick { width: 34px; height: 1.5px; background: var(--red); }
.hero-sub { max-width: 52ch; color: var(--concrete); }
.hero-meta {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border-top: 1px solid var(--line-d); padding-top: 18px; margin-top: clamp(28px, 4vh, 54px);
  color: var(--concrete);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue .dot { width: 7px; height: 7px; background: var(--red); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0%,100% { transform: translateY(0) } 50% { transform: translateY(7px) } }
@media (prefers-reduced-motion: reduce) { .scroll-cue .dot { animation: none; } }

/* ---------- pagehead (interior pages) ---------- */
.pagehead {
  background: var(--ink); color: var(--bone); position: relative; overflow: hidden;
  padding: clamp(150px, 22vh, 230px) 0 clamp(56px, 9vh, 96px);
}
.pagehead .big {
  position: absolute; right: -2%; top: 4%; font-family: var(--font-display);
  font-weight: 900; font-size: 30vw; line-height: 1; color: rgba(239, 235, 227, .045);
  pointer-events: none; text-transform: uppercase; user-select: none;
}
.pagehead .crumbs a { text-decoration: none; }
.pagehead .crumbs a:hover { color: var(--red); }

/* ---------- stat band ---------- */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ink); color: var(--bone); border: 1px solid var(--ink); }
.stat-band > div { padding: clamp(20px, 2vw, 32px); border-right: 1px solid var(--line-d); }
.stat-band > div:last-child { border-right: 0; }
.stat-band b { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 2.6vw, 44px); line-height: 1; display: block; }
.stat-band b em { font-style: normal; color: var(--red); }
.stat-band .label { color: var(--concrete); margin-top: 8px; font-size: 10px; }
@media (max-width: 760px) {
  .stat-band { grid-template-columns: 1fr 1fr; }
  .stat-band > div:nth-child(2n) { border-right: 0; }
  .stat-band > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-d); }
}

/* ---------- marquee ---------- */
.mq-wrap { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; }
.mq { display: flex; white-space: nowrap; width: max-content; animation: mq 40s linear infinite; }
.mq span { padding: 0 28px; border-right: 1px solid var(--line); }
@keyframes mq { to { transform: translateX(-50%); } }
.mq-wrap:hover .mq { animation-play-state: paused; }
.bg-ink .mq span, .on-dark .mq span { border-color: var(--line-d); }
@media (prefers-reduced-motion: reduce) { .mq { animation: none; } }

/* ---------- service rows ---------- */
.svc-row {
  position: relative; display: grid; grid-template-columns: 90px 1fr auto;
  gap: 24px; align-items: center; padding: clamp(24px, 3vw, 40px) 22px;
  border-top: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: .4s var(--ease); overflow: hidden;
}
.svc-row:last-child { border-bottom: 1px solid var(--line); }
.svc-row .idx { font-family: var(--font-mono); font-size: 13px; color: var(--redink); }
.svc-row h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(24px, 3.4vw, 44px); line-height: 1; transition: .4s var(--ease); }
.svc-row p { color: var(--mute); max-width: 56ch; font-size: 15px; margin-top: 8px; transition: .4s; }
.svc-row .go { font-family: var(--font-mono); font-size: 22px; transition: .4s var(--ease); }
.svc-row:hover { background: var(--ink); padding-left: 36px; }
.svc-row:hover h3 { color: var(--bone); }
.svc-row:hover p { color: var(--concrete); }
.svc-row:hover .go { transform: translate(4px, -4px); color: var(--red); }
@media (max-width: 760px) {
  .svc-row { grid-template-columns: 48px 1fr; }
  .svc-row .go { display: none; }
}

/* ---------- list ticks ---------- */
.ticklist { list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.ticklist li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ticklist li::before { content: "/"; font-family: var(--font-mono); color: var(--red); }
.bg-ink .ticklist li { border-color: var(--line-d); }
@media (max-width: 600px) { .ticklist { grid-template-columns: 1fr; } }

/* ---------- project tiles ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(14px, 1.6vw, 22px); }
.proj { position: relative; overflow: hidden; background: var(--ink); border: 1px solid var(--line); display: block; text-decoration: none; min-height: 300px; }
.proj.span-8 { grid-column: span 8; }
.proj.span-4 { grid-column: span 4; }
.proj.span-6 { grid-column: span 6; }
.proj.tall { min-height: clamp(380px, 44vw, 540px); }
@media (max-width: 980px) {
  .proj.span-8, .proj.span-6 { grid-column: span 12; }
  .proj.span-4 { grid-column: span 6; }
}
@media (max-width: 640px) { .proj.span-4 { grid-column: span 12; } }
.proj .im {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.35) contrast(1.04) brightness(.96);
  transition: transform .8s var(--ease), filter .6s var(--ease);
}
.proj:hover .im { filter: none; transform: scale(1.06); }
.proj .scrim { position: absolute; inset: 0; background: linear-gradient(transparent 36%, rgba(10, 8, 5, .92)); z-index: 1; }
.proj .meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(16px, 2vw, 26px); }
.proj .num { position: absolute; top: 16px; left: 18px; z-index: 2; font-family: var(--font-display); font-weight: 800; font-size: 28px; color: rgba(239, 235, 227, .85); mix-blend-mode: difference; }
.proj .cat {
  position: absolute; top: 18px; right: 18px; z-index: 2; font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: .14em; font-size: 10px; color: var(--bone);
  border: 1px solid rgba(239, 235, 227, .5); padding: 5px 9px;
  background: rgba(21, 18, 21, .35); backdrop-filter: blur(4px);
}
.proj h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; color: var(--bone); font-size: clamp(20px, 2.4vw, 30px); line-height: .96; }
.proj .loc { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--concrete); margin-top: 8px; }
.proj .blurb { color: rgba(239, 235, 227, .85); font-size: 14px; margin-top: 12px; max-height: 0; opacity: 0; overflow: hidden; transition: .5s var(--ease); }
.proj:hover .blurb { max-height: 200px; opacity: 1; }
.proj .stats { display: flex; gap: 22px; margin-top: 14px; }
.proj .stats b { font-family: var(--font-display); font-weight: 800; color: var(--bone); font-size: 18px; display: block; line-height: 1; }
.proj .stats span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--concrete); }
.proj .corner { position: absolute; width: 14px; height: 14px; z-index: 3; opacity: 0; transition: .4s var(--ease); }
.proj .corner.ctl { top: 10px; left: 10px; border-top: 1.5px solid var(--red); border-left: 1.5px solid var(--red); transform: translate(6px, 6px); }
.proj .corner.cbr { bottom: 10px; right: 10px; border-bottom: 1.5px solid var(--red); border-right: 1.5px solid var(--red); transform: translate(-6px, -6px); }
.proj:hover .corner { opacity: 1; transform: translate(0, 0); }

/* ---------- figures ---------- */
.figure { position: relative; border: 1px solid rgba(21, 18, 13, .15); overflow: hidden; }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure figcaption {
  position: absolute; bottom: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em;
  font-size: 10px; background: rgba(239, 235, 227, .94); color: var(--ink);
  padding: 7px 11px;
}
.figure[data-parallax-img] img { transform: scale(1.14); }
img[loading="lazy"] { opacity: 0; filter: blur(10px); transition: opacity .7s var(--ease), filter .9s var(--ease); }
img[loading="lazy"].loaded { opacity: 1; filter: none; }

/* ---------- quote cells ---------- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 980px) { .quote-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .quote-grid { grid-template-columns: 1fr; } }
.quote-cell { background: var(--stone); padding: clamp(22px, 2.4vw, 34px); }
.bg-stone .quote-cell { background: var(--bone); }
.quote-cell .qmark { color: var(--red); font-family: var(--font-display); font-size: 46px; line-height: .4; height: 22px; }
.quote-cell p { font-size: 15px; margin-top: 14px; }
.quote-cell .qby { margin-top: 18px; }
.quote-cell .qby span { color: var(--mute); }
.pquote { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.04; font-size: clamp(26px, 4.6vw, 60px); text-transform: uppercase; }

/* ---------- client wordmarks ---------- */
.clients-row {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line); border-right: 0;
}
.client-mark {
  border-right: 1px solid var(--line); padding: clamp(20px, 2vw, 34px) 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  text-align: center; transition: .35s var(--ease); position: relative;
}
.client-mark .cm-name {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.01em; font-size: clamp(15px, 1.25vw, 20px); line-height: 1;
  color: var(--mute); transition: .35s var(--ease);
}
.client-mark .cm-sub { font-size: 11px; color: var(--mute); letter-spacing: .14em; opacity: .8; }
.client-mark:hover { background: var(--ink); }
.client-mark:hover .cm-name { color: var(--bone); }
.client-mark.is-badge .cm-name { color: var(--redink); }
.bg-ink .clients-row { border-color: var(--line-d); }
.bg-ink .client-mark { border-color: var(--line-d); }
.bg-ink .client-mark .cm-name { color: var(--concrete); }
.bg-ink .client-mark:hover { background: var(--bone); }
.bg-ink .client-mark:hover .cm-name { color: var(--ink); }
@media (max-width: 980px) { .clients-row { grid-template-columns: repeat(3, 1fr); } .client-mark:nth-child(-n+3){ border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .clients-row { grid-template-columns: repeat(2, 1fr); } .client-mark:nth-child(-n+4){ border-bottom: 1px solid var(--line); } .client-mark:nth-child(5){ border-bottom: 1px solid var(--line);} }

/* ---------- roster (team) ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 980px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .team-grid { grid-template-columns: 1fr; } }
.team-card { background: var(--bone); padding: clamp(22px, 2.4vw, 32px); transition: background .35s var(--ease); }
.team-card:hover { background: var(--ink); }
.team-card .tc-top { display: flex; justify-content: space-between; align-items: baseline; }
.team-card h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(22px, 2.4vw, 29px); margin-top: 18px; transition: .35s; }
.team-card:hover h3 { color: var(--bone); }
.team-card .tc-role { color: var(--red); margin-top: 7px; }
.team-card p { color: var(--mute); font-size: 14px; margin-top: 14px; transition: .35s; }
.team-card:hover p { color: var(--concrete); }

/* ---------- value cells ---------- */
.value-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (max-width: 720px) { .value-grid { grid-template-columns: 1fr; } }
.value-cell { padding: clamp(24px, 2.6vw, 38px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: .3s var(--ease); }
.value-cell:hover { background: var(--stone); }
.value-cell h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(19px, 2.2vw, 27px); margin-top: 14px; }
.value-cell p { color: var(--mute); font-size: 14px; margin-top: 10px; }
.bg-ink .value-grid { border-color: var(--line-d); }
.bg-ink .value-cell { border-color: var(--line-d); }
.bg-ink .value-cell:hover { background: var(--ink2); }
.bg-ink .value-cell p { color: var(--concrete); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--redink); color: var(--bone); }
.cta-band .cta-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-band .cta-tint { position: absolute; inset: 0; background: rgba(156, 42, 18, .87); }
.cta-band .webgl-wrap { position: absolute; inset: 0; }
.cta-band .container { position: relative; z-index: 2; }

/* ---------- filters ---------- */
.filter {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
  font-size: 11px; padding: 11px 18px; border: 1.5px solid var(--line);
  background: transparent; color: var(--mute); transition: .25s var(--ease);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.active { background: var(--ink); border-color: var(--ink); color: var(--bone); }

/* ---------- forms ---------- */
.field label { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; display: block; margin-bottom: 8px; color: var(--mute); }
.field input, .field select, .field textarea {
  width: 100%; padding: 15px 16px; border: 1.5px solid var(--line); border-radius: 0;
  background: transparent; font-family: var(--font-sans); font-size: 16px; color: var(--ink);
  transition: border-color .25s, background .25s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2315120D' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); background: rgba(200, 56, 28, .025); }
.field textarea { resize: vertical; min-height: 130px; }
.field input[type="file"] { padding: 12px; font-size: 13px; font-family: var(--font-mono); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .wide { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .wide { grid-column: span 1; } }
.form-head { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin: 34px 0 22px; }
form.sent .formnote { color: var(--red); }
form.send-error .formnote { color: var(--redink); }

/* ---------- contact info rows ---------- */
.info-row { display: block; border-top: 1px solid var(--line); padding: 22px 0; text-decoration: none; }
.info-row:last-of-type { border-bottom: 1px solid var(--line); }
.info-row .display { transition: color .3s; }
.info-row:hover .display { color: var(--red); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--bone); position: relative; overflow: hidden; padding-top: clamp(56px, 7vw, 96px); }
.footer .gridlines { opacity: .5; }
.footer-grid { display: grid; grid-template-columns: 4fr 2fr 2fr 3fr; gap: clamp(24px, 3vw, 48px); padding-bottom: clamp(40px, 5vw, 72px); border-bottom: 1px solid var(--line-d); position: relative; z-index: 2; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.footer a { text-decoration: none; }
.footer .f-links a { display: block; padding: 5px 0; color: var(--concrete); transition: color .25s, padding-left .25s; font-size: 14.5px; }
.footer .f-links a:hover { color: var(--bone); padding-left: 6px; }
.footer .badge {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; font-size: 10px;
  border: 1px solid var(--line-d); display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; color: var(--concrete); margin-top: 22px;
}
.footer .badge::before { content: "★"; color: var(--red); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 0 110px; position: relative; z-index: 2; color: var(--concrete); }
.footer-mark {
  position: absolute; left: 50%; bottom: -4vw; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 900; font-size: clamp(120px, 24vw, 420px);
  line-height: 1; letter-spacing: -.02em; color: transparent;
  -webkit-text-stroke: 1px rgba(239, 235, 227, .09); user-select: none; pointer-events: none;
  white-space: nowrap; z-index: 1;
}

/* ---------- mobile quick-contact bar ---------- */
.mobile-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80;
  display: none; grid-template-columns: auto 1fr; gap: 1px;
  border: 1.5px solid var(--ink); background: var(--ink);
  box-shadow: 0 10px 30px rgba(21, 18, 13, .35);
  transition: transform .4s var(--ease), opacity .4s;
}
.mobile-cta.hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
.mobile-cta a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
  font-size: 12px; text-decoration: none; padding: 16px 18px;
}
.mobile-cta .mc-call { background: var(--bone); color: var(--ink); }
.mobile-cta .mc-quote { background: var(--red); color: #fff; }
@media (max-width: 760px) {
  .mobile-cta { display: grid; }
  body { padding-bottom: 64px; }
}

/* ---------- custom cursor ---------- */
.cur-dot, .cur-ret { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; opacity: 0; }
html.cursor-live .cur-dot, html.cursor-live .cur-ret { opacity: 1; }
.cur-dot { width: 6px; height: 6px; background: var(--red); }
.cur-ret { width: 34px; height: 34px; transition: width .3s var(--ease), height .3s var(--ease); }
.cur-ret .c { position: absolute; width: 9px; height: 9px; border-color: var(--red); border-style: solid; border-width: 0; transition: .3s var(--ease); }
.cur-ret .c-tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.cur-ret .c-tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.cur-ret .c-bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.cur-ret .c-br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.cur-ret .cur-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bone); opacity: 0; transition: opacity .25s; white-space: nowrap;
}
.cur-ret.is-link { width: 52px; height: 52px; }
.cur-ret.is-down { transform-origin: center; }
.cur-ret.is-down .c { border-color: var(--bone); }
.cur-ret.is-label { width: 86px; height: 86px; }
.cur-ret.is-label::before { content: ""; position: absolute; inset: 0; background: rgba(200, 56, 28, .92); }
.cur-ret.is-label .cur-label { opacity: 1; }
.cur-ret.is-label .c { border-color: var(--bone); }
.cur-ret.is-text { width: 4px; height: 30px; }
.cur-ret.is-text .c { opacity: 0; }

/* ---------- page transition wipe ---------- */
.page-wipe {
  position: fixed; inset: 0; z-index: 400; background: var(--ink);
  transform: scaleY(1); transform-origin: top; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  transition: transform .55s var(--ease-out);
}
.page-wipe .page-wipe-mark { color: var(--red); opacity: 0; transition: opacity .2s; }
body.page-in .page-wipe { transform: scaleY(0); }
body.page-out .page-wipe { transform: scaleY(1); transform-origin: bottom; pointer-events: all; }
body.page-out .page-wipe .page-wipe-mark { opacity: 1; transition-delay: .15s; }
@media (prefers-reduced-motion: reduce) {
  .page-wipe { display: none; }
}

/* ---------- focus visibility (keyboard users) ---------- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--red); outline-offset: 2px;
}
.bg-ink a:focus-visible, .bg-ink button:focus-visible, .footer a:focus-visible,
.hero a:focus-visible, .pagehead a:focus-visible { outline-color: var(--red-bright); }

/* ---------- misc ---------- */
.hr { border: 0; border-top: 1px solid var(--line); }
.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; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 500; background: var(--red); color: #fff; padding: 12px 18px; font-family: var(--font-mono); text-transform: uppercase; font-size: 12px; letter-spacing: .12em; transition: top .3s; text-decoration: none; }
.skip-link:focus { top: 16px; }

/* ---------- print ---------- */
@media print {
  /* hide all chrome / motion / decorative layers */
  .nav, .drawer, .mobile-cta, .scroll-progress,
  .cur-dot, .cur-ret, .page-wipe, canvas.webgl-contours, .footer-mark {
    display: none !important;
  }
  body::after { display: none !important; } /* film grain */

  html, body {
    background: #fff !important;
    color: #111 !important;
    overflow: visible !important;
  }
  /* legible ink on white for sections that were dark on screen */
  .bg-ink, .hero, .pagehead, .footer, .cta-band, .stat-band {
    background: #fff !important;
    color: #111 !important;
  }
  .bg-ink *, .hero *, .pagehead *, .footer *, .cta-band *, .stat-band * {
    color: #111 !important;
    -webkit-text-stroke: 0 !important;
  }
  a { color: #111 !important; text-decoration: underline; }

  /* keep content visible and unclipped */
  [data-reveal], [data-reveal="words"] .w {
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
  .section, .section-s, .proj, .figure, .quote-cell, .team-card, .value-cell {
    overflow: visible !important;
  }
  img, .proj .im, .figure img {
    max-width: 100% !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .proj .im, .cta-band .cta-img { filter: none !important; }
}
