/* ============================================================
   StaticBay Labs — staticbaylabs.com
   Ink / red / off-white · Space Grotesk · trace motif
   Single-theme brand site: every color painted explicitly.
   ============================================================ */

:root {
  --ink: #141413;
  --ink-deep: #0E0D0C;
  --ink-soft: #1E1B18;
  --paper: #FAF7F2;
  --white: #FFFFFF;
  --red: #C8102E;
  --red-bright: #E5484D;
  --text-on-dark: #F4F1EB;
  --text-mut-dark: #A5A19A;
  --text-body: #4A463F;
  --text-mut: #6E6A63;
  --text-faint: #8B877F;
  --border: #E7E1D7;
  --border-dark: #2A2724;
  --font: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --r-card: 14px;
  --r-btn: 8px;
  --gutter-l: clamp(44px, 7vw, 72px);
  --gutter-r: clamp(20px, 5vw, 48px);
  --trace-x: clamp(18px, 3.5vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

h1, h2, h3 { text-wrap: balance; margin: 0; color: var(--ink); font-weight: 700; }
p { margin: 0; }
a { color: var(--red); text-decoration: none; }
a:hover { color: #A00D25; }

.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* period / accent marks */
.dot-ink { color: var(--red); }
.dot-glow { color: var(--red-bright); }

/* ---------------- trace motif ---------------- */
.trace {
  position: absolute;
  left: var(--trace-x);
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 3;
  pointer-events: none;
}
.trace-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    var(--red-bright) 0%,
    var(--red) 14%,
    rgba(200, 16, 46, 0.45) 34%,
    var(--red) 52%,
    rgba(200, 16, 46, 0.45) 72%,
    var(--red) 90%,
    var(--red-bright) 100%);
  transform-origin: top;
  transform: scaleY(1);
  will-change: transform;
}
.trace-dot {
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  background: rgba(200, 16, 46, 0.35);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.4), background 0.45s, box-shadow 0.45s;
}
.trace-dot.lit {
  transform: translate(-50%, -50%) scale(1);
  background: var(--red);
  box-shadow: 0 0 16px rgba(229, 72, 77, 0.85);
}
.trace-dot.terminus { width: 20px; height: 20px; }
.trace-dot.terminus.lit {
  background: var(--red-bright);
  box-shadow: 0 0 34px rgba(229, 72, 77, 1), 0 0 76px rgba(200, 16, 46, 0.6);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 26px rgba(229, 72, 77, 0.9), 0 0 60px rgba(200, 16, 46, 0.5); }
  50%      { box-shadow: 0 0 40px rgba(229, 72, 77, 1), 0 0 90px rgba(200, 16, 46, 0.7); }
}
.motion .trace-fill { transform: scaleY(0); }
@media (prefers-reduced-motion: reduce) {
  .trace-fill { transform: scaleY(1) !important; }
  .trace-dot { transition: none; }
  .trace-dot.terminus.lit { animation: none; }
}

/* ---------------- reveal on scroll ---------------- */
.motion .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.motion .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--ink);
  border-bottom: 1px solid var(--border-dark);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
}
.brand:hover { color: var(--white); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand .labs { font-weight: 400; color: var(--text-faint); }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
}
.site-nav a {
  color: #D8D4CC;
  font-size: 15px;
  padding: 10px 2px;
}
.site-nav a:hover { color: var(--white); }
.site-nav a[aria-current="page"] { color: var(--white); font-weight: 600; }

.btn {
  display: inline-block;
  border-radius: var(--r-btn);
  font-size: 15.5px;
  font-weight: 600;
  padding: 13px 26px;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font);
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: #A00D25; color: var(--white); }
.btn-ghost-dark { border-color: #3A3733; color: #E8E4DC; font-weight: 500; }
.btn-ghost-dark:hover { border-color: #6E6A63; color: var(--white); }
.site-nav .btn { padding: 11px 20px; font-size: 14.5px; }

.menu-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.menu-btn svg { display: block; }

@media (max-width: 840px) {
  .menu-btn { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink-deep);
    border-bottom: 1px solid var(--border-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 12px var(--gutter-r) 20px var(--gutter-l);
    gap: 4px;
  }
  .site-nav a { padding: 13px 4px; font-size: 16px; }
  .site-nav .btn { margin-top: 10px; text-align: center; padding: 14px; }
  .site-header.open .site-nav { display: flex; }
}

/* ---------------- sections: shared ---------------- */
section { position: relative; }
.section-dark { background: var(--ink); }
.section-deep { background: var(--ink-deep); }
.section-paper { background: var(--paper); }
.section-white { background: var(--white); }

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-mut-dark);
}
.h-xl {
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  color: var(--white);
}
.h-l { font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -0.01em; }
.h-m { font-size: clamp(24px, 3.2vw, 36px); letter-spacing: -0.01em; }
.on-dark { color: var(--white); }
.lede-dark { font-size: clamp(16.5px, 2vw, 19.5px); line-height: 1.58; color: var(--text-mut-dark); }
.lede { font-size: clamp(16px, 1.8vw, 17.5px); color: var(--text-mut); }

/* ---------------- hero ---------------- */
.hero { padding-block: clamp(64px, 10vw, 118px) clamp(60px, 9vw, 108px); }
.hero .wrap { display: flex; flex-direction: column; gap: 24px; }
.hero .lede-dark { max-width: 700px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero {
  background:
    linear-gradient(180deg, rgba(20, 20, 19, 0.96) 0%, rgba(20, 20, 19, 0.88) 45%, rgba(14, 13, 12, 0.72) 100%),
    var(--ink) url(../assets/img/hero.png) center 70% / cover no-repeat;
}

/* ---------------- stat band ---------------- */
.stats { border-top: 1px solid var(--border-dark); padding-block: clamp(30px, 4vw, 40px); }
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 56px);
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat b {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 13px; line-height: 1.45; color: var(--text-mut-dark); }
@media (max-width: 760px) {
  .stats .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
}

/* ---------------- services ---------------- */
.services { padding-block: clamp(64px, 9vw, 104px); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(30px, 4vw, 46px); }
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.card h3 { font-size: 20.5px; }
.card .hook { font-size: 15px; font-weight: 600; color: var(--ink); }
.card p { font-size: 14.5px; color: var(--text-mut); flex-grow: 1; }
.card .more { font-size: 14.5px; font-weight: 600; }
.card svg { width: 40px; height: 40px; }
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr; } }

/* ---------------- how we work ---------------- */
.how { padding-block: clamp(64px, 9vw, 104px); }
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin-top: clamp(30px, 4vw, 46px);
}
.step { display: flex; flex-direction: column; gap: 10px; }
.step .num { font-size: 13px; letter-spacing: 2px; color: var(--red-bright); font-weight: 600; }
.step h3 { color: var(--white); font-size: 20px; display: flex; align-items: center; gap: 10px; }
.step p { font-size: 14.5px; color: var(--text-mut-dark); }
.node-inline {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 14px rgba(229, 72, 77, 0.9);
  flex: none;
}
.how-closer { margin-top: clamp(30px, 4vw, 42px); font-size: 16px; line-height: 1.6; color: #D8D4CC; max-width: 880px; }
.how-sub { margin-top: 10px; font-size: 15px; color: var(--text-mut-dark); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pill {
  border: 1px solid #3A3733;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-mut-dark);
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------------- two ways ---------------- */
.twoways { padding-block: clamp(60px, 8vw, 92px); }
.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.track {
  border-radius: var(--r-card);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.track .tag { font-size: 12px; letter-spacing: 2px; font-weight: 600; }
.track h3 { font-size: 21px; }
.track p { font-size: 14.5px; flex-grow: 1; }
.track .more { font-size: 14.5px; font-weight: 600; }
.track-light { background: var(--white); border: 1px solid var(--border); }
.track-light .tag { color: var(--red); }
.track-light p { color: var(--text-mut); }
.track-dark { background: var(--ink); }
.track-dark .tag { color: var(--red-bright); }
.track-dark h3 { color: var(--white); }
.track-dark p { color: var(--text-mut-dark); }
.track-dark .more { color: var(--red-bright); }
.track-dark .more:hover { color: var(--white); }
@media (max-width: 800px) { .tracks { grid-template-columns: 1fr; } }

/* ---------------- proof ---------------- */
.proof { padding-block: clamp(64px, 9vw, 104px); }
.proof-lede {
  margin-top: 14px;
  font-size: clamp(16px, 1.9vw, 17.5px);
  line-height: 1.55;
  color: var(--text-body);
  max-width: 860px;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(26px, 3.4vw, 36px);
}
.proof-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
}
.proof-item::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 8px;
  background: var(--red);
}
@media (max-width: 800px) { .proof-grid { grid-template-columns: 1fr; } }

/* ---------------- cta ---------------- */
.cta { padding-block: clamp(72px, 10vw, 116px); }
.cta .wrap { display: flex; flex-direction: column; gap: 18px; }
.cta .lede-dark { max-width: 680px; }
.cta .btn { align-self: flex-start; margin-top: 6px; }

/* ---------------- footer ---------------- */
.site-footer { padding-block: clamp(44px, 6vw, 56px) clamp(28px, 4vw, 36px); }
.foot-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.foot-top .brandline {
  display: flex; align-items: center; gap: 11px;
  color: #E8E4DC; font-size: 15.5px; font-weight: 500;
}
.foot-top .brandline img { width: 30px; height: 30px; border-radius: 8px; }
.foot-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot-nav a { color: var(--text-mut-dark); font-size: 14px; padding: 6px 0; }
.foot-nav a:hover { color: var(--white); }
.foot-legal {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #262421;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-mut);
}
@media (max-width: 700px) {
  .foot-nav { margin-left: 0; }
}

/* ---------------- light header variant ---------------- */
.header-light { background: var(--paper); border-bottom-color: var(--border); }
.header-light .brand { color: var(--ink); }
.header-light .site-nav a { color: var(--text-body); }
.header-light .site-nav a:hover { color: var(--ink); }
.header-light .site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.header-light .site-nav .btn-red { color: var(--white); }
.header-light .menu-btn svg { stroke: var(--ink); }
@media (max-width: 840px) {
  .header-light .site-nav { background: var(--paper); border-bottom-color: var(--border); }
}

/* ---------------- inner-page hero ---------------- */
.page-hero { padding-block: clamp(48px, 7vw, 84px) clamp(30px, 4vw, 48px); }
.page-hero h1 { font-size: clamp(38px, 5.5vw, 58px); letter-spacing: -0.015em; }
.page-hero .lede { margin-top: 14px; max-width: 800px; line-height: 1.6; }

/* ---------------- service blocks ---------------- */
.svc { padding-block: clamp(52px, 7.5vw, 84px); scroll-margin-top: 90px; }
.svc .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.svc-head { display: flex; flex-direction: column; gap: 14px; }
.svc-head svg { width: 44px; height: 44px; }
.svc-head h2 { font-size: clamp(24px, 3vw, 30px); }
.svc-head .desc { font-size: 15.5px; line-height: 1.65; color: var(--text-body); }
.svc-proof { font-size: 13.5px; line-height: 1.5; color: var(--red); font-weight: 600; }
.svc-img { width: 100%; height: auto; border-radius: var(--r-card); border: 1px solid var(--border); margin-top: 6px; }
.svc-bullets { margin: 0; padding: clamp(0px, 2vw, 26px) 0 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; align-content: start; }
.svc-bullets li { list-style: none; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.svc-bullets li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; background: var(--red); }
@media (max-width: 900px) {
  .svc .wrap { grid-template-columns: 1fr; }
  .svc-bullets { padding-top: 0; }
}

/* ---------------- providers ---------------- */
.pcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.pcard { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.pcard .num { font-size: 12px; letter-spacing: 2px; color: var(--red); font-weight: 600; }
.pcard h3 { font-size: 20px; }
.pcard p { font-size: 14.5px; line-height: 1.6; color: var(--text-mut); }
@media (max-width: 800px) { .pcards { grid-template-columns: 1fr; } }
.band { margin-top: clamp(26px, 4vw, 40px); }
.band img { width: 100%; height: clamp(240px, 38vw, 420px); object-fit: cover; object-position: center 42%; border-radius: var(--r-card); border: 1px solid var(--border); }
.band figcaption { margin-top: 10px; font-size: 13.5px; color: var(--text-mut); }

/* ---------------- about ---------------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-prose { display: flex; flex-direction: column; gap: 24px; max-width: 60ch; }
.about-prose p, .about-prose .desc { font-size: 15.5px; line-height: 1.7; color: var(--text-body); }
.about-prose h3 { font-size: 20px; margin-bottom: 8px; }
.about-rail { display: flex; flex-direction: column; gap: 22px; }
.portrait { width: 100%; height: auto; border-radius: var(--r-card); border: 1px solid var(--border); }
.engineer-card { background: var(--ink); border-radius: var(--r-card); padding: 26px 28px; display: flex; flex-direction: column; gap: 11px; }
.engineer-card .tag { font-size: 12px; letter-spacing: 2px; color: var(--red-bright); font-weight: 600; }
.engineer-card .who { font-size: 14.5px; line-height: 1.5; color: var(--text-on-dark); }
.engineer-card .motto { font-size: 14.5px; line-height: 1.55; color: var(--text-mut-dark); font-style: italic; }
.engineer-card .line { font-size: 14px; line-height: 1.5; color: var(--text-mut-dark); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------------- contact ---------------- */
.contact-main { padding-block: clamp(48px, 7vw, 84px) clamp(56px, 8vw, 96px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact-aside { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.contact-aside .row { font-size: 14.5px; color: var(--text-body); }
.contact-aside .sub { font-size: 13.5px; color: var(--text-mut); }
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: clamp(24px, 4vw, 42px); display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field label .req { color: var(--red); }
.field label .opt { font-weight: 400; color: var(--text-faint); }
.field input, .field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #DDD7CC;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
}
.field textarea { min-height: 170px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--red-bright); outline-offset: 1px; }
.btn-ink { background: var(--ink); color: var(--white); border: none; }
.btn-ink:hover { background: #000000; color: var(--white); }
.btn-ink .dot-btn { color: var(--red-bright); font-weight: 700; }
.form-success { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; font-size: 15px; line-height: 1.6; color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- proof strip (home) ---------------- */
.proof-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.proof-strip img { width: 100%; height: 170px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--white); }
@media (max-width: 800px) { .proof-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------- 404 ---------------- */
.err { min-height: 62vh; display: flex; align-items: center; }
.err .wrap { display: flex; flex-direction: column; gap: 18px; padding-block: 80px; }

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
  border-radius: 4px;
}
