/* ==========================================================================
   B.R.A.I.N. Solutions LLC — site styles
   Design language: deep-field dark, electric signal accents, clinical precision.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Tokens */
:root {
  /* Surfaces */
  --bg:            #05070e;
  --bg-raise:      #090d1a;
  --bg-card:       rgba(18, 25, 44, 0.55);
  --bg-card-solid: #0d1322;

  /* Ink */
  --ink:           #e9eefb;
  --ink-soft:      #b3c0da;
  --ink-mute:      #7d8ba8;
  --ink-faint:     #717e99;   /* 4.9:1 on --bg — these are 10-11px labels */

  /* Signal */
  --signal:        #35e7ff;
  --signal-deep:   #12a6c9;
  --violet:        #8b5cf6;
  --violet-soft:   #a78bfa;
  --mint:          #4ade80;
  --amber:         #fbbf24;

  /* Lines & glow */
  --line:          rgba(139, 168, 224, 0.14);
  --line-strong:   rgba(139, 168, 224, 0.26);
  --glow-signal:   0 0 0 1px rgba(53, 231, 255, 0.35), 0 8px 40px -12px rgba(53, 231, 255, 0.45);

  /* Type */
  --font-display: "Space Grotesk", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* Metrics */
  --shell:    1200px;
  --shell-nr: 900px;
  --radius:   18px;
  --radius-sm: 12px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------ 2. Reset/base */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.032em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: rgba(53, 231, 255, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--signal);
  color: #04121a;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 0 0 10px 10px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* -------------------------------------------------------------- 3. Backdrop */
/* Animated synaptic field, painted behind everything. */
#neural-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
}

/* Aurora wash: two slow-drifting radial gradients over the canvas. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58vw 48vw at 12% -8%,  rgba(53, 231, 255, 0.16), transparent 62%),
    radial-gradient(52vw 46vw at 92% 6%,   rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(70vw 60vw at 50% 108%, rgba(18, 166, 201, 0.12), transparent 64%);
  filter: blur(6px);
}

/* Fine grid, gives the whole thing an instrument-panel feel. */
.grid-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(139, 168, 224, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 168, 224, 0.045) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(120vw 100vh at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120vw 100vh at 50% 0%, #000 20%, transparent 78%);
}

/* Analogue film grain — kills gradient banding on large dark fields. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- 4. Layout */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 28px;
}

main { position: relative; z-index: 2; }

section {
  position: relative;
  padding-block: clamp(72px, 11vw, 132px);
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong) 22%, var(--line-strong) 78%, transparent);
}

/* ------------------------------------------------------------------ 5. Nav */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.masthead.is-stuck {
  background: rgba(5, 7, 14, 0.78);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 17px;
  white-space: nowrap;
}
.wordmark svg { width: 34px; height: 34px; flex: none; }
.wordmark__dot { color: var(--signal); }

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  padding: 9px 15px;
  font-size: 14.5px;
  color: var(--ink-soft);
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--ink); background: rgba(139, 168, 224, 0.09); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------- 6. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
              background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: linear-gradient(135deg, var(--signal), var(--violet-soft));
  color: #04101a;
  box-shadow: 0 10px 34px -12px rgba(53, 231, 255, 0.7);
}
.btn--primary:hover { box-shadow: 0 18px 46px -14px rgba(53, 231, 255, 0.85); }

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(139, 168, 224, 0.05);
}
.btn--ghost:hover { border-color: rgba(53, 231, 255, 0.5); background: rgba(53, 231, 255, 0.08); }

.btn--sm { padding: 10px 20px; font-size: 14px; }

/* --------------------------------------------------------------- 7. Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(53, 231, 255, 0.16);
  animation: pip 2.6s ease-in-out infinite;
}
@keyframes pip {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 4px rgba(53, 231, 255, 0.16); }
  50%      { opacity: 0.55; box-shadow: 0 0 0 8px rgba(53, 231, 255, 0.03); }
}
.eyebrow--violet { color: var(--violet-soft); }
.eyebrow--violet::before { background: var(--violet-soft); box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.16); }

/* ----------------------------------------------------------------- 8. Hero */
.hero {
  padding-block: clamp(64px, 10vw, 118px) clamp(56px, 8vw, 96px);
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  /* Sized so the longest line, "between the clinic", sets on one line in the
     hero's left column. Raising this cap re-introduces a fourth wrapped line. */
  font-size: clamp(2.35rem, 5.3vw, 4.05rem);
  margin-bottom: 26px;
}
.hero h1 .stack { display: block; }

.grad {
  background: linear-gradient(103deg, #ffffff 4%, var(--signal) 44%, var(--violet-soft) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  font-size: clamp(1.06rem, 1.5vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 20px;
}

.hero__scope {
  font-size: 14.5px;
  color: var(--ink-mute);
  max-width: 54ch;
  padding-left: 15px;
  border-left: 2px solid rgba(53, 231, 255, 0.4);
  margin-bottom: 34px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

/* Expanded acronym, rendered as a stack of initial-led lines. */
.acronym {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--line-strong);
  padding-left: 22px;
}
.acronym li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink-mute);
  opacity: 0;
  transform: translateX(-8px);
  animation: acr 0.6s var(--ease) forwards;
}
.acronym li:nth-child(1) { animation-delay: 0.45s; }
.acronym li:nth-child(2) { animation-delay: 0.57s; }
.acronym li:nth-child(3) { animation-delay: 0.69s; }
.acronym li:nth-child(4) { animation-delay: 0.81s; }
.acronym li:nth-child(5) { animation-delay: 0.93s; }
@keyframes acr { to { opacity: 1; transform: none; } }

.acronym b {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--signal);
  width: 15px;
  flex: none;
}

/* Hero instrument panel ---------------------------------------------------- */
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(30, 41, 71, 0.62), rgba(9, 13, 26, 0.72));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95);
}
.panel::after {
  /* single specular sweep along the top edge */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53, 231, 255, 0.75), transparent);
}

.panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.panel__live { display: inline-flex; align-items: center; gap: 7px; color: var(--mint); }
.panel__live::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pip 1.9s ease-in-out infinite;
}

.trace { display: block; width: 100%; height: auto; }

.panel__legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.panel__legend div {
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}
.panel__legend div:last-child { border-right: 0; }
.panel__legend dt,
.panel__legend .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 5px;
}
.panel__legend .v {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

/* --------------------------------------------------------- 9. Marquee strip */
.strip {
  border-block: 1px solid var(--line);
  background: rgba(9, 13, 26, 0.5);
  overflow: hidden;
  position: relative;
  z-index: 2;
}
.strip::before, .strip::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.strip::before { left: 0;  background: linear-gradient(90deg, var(--bg), transparent); }
.strip::after  { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }

.marquee {
  display: flex;
  width: max-content;
  animation: slide 44s linear infinite;
}
.strip:hover .marquee { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

.marquee span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 30px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
}
.marquee span::after {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--signal);
  opacity: 0.6;
}

/* ------------------------------------------------------ 10. Section headers */
.sec-head { max-width: 66ch; margin-bottom: clamp(40px, 5vw, 62px); }
.sec-head h2 {
  font-size: clamp(2rem, 3.9vw, 3.05rem);
  margin-bottom: 20px;
}
.sec-head p {
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------- 11. Domain cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  padding: 32px 30px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.card::before {
  /* cursor-tracked halo */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%),
              rgba(53, 231, 255, 0.16), transparent 66%);
  pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }

.card__icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  margin-bottom: 22px;
  color: var(--signal);
  background: rgba(53, 231, 255, 0.09);
  border: 1px solid rgba(53, 231, 255, 0.22);
}
.card__icon svg { width: 23px; height: 23px; }
.card--v .card__icon {
  color: var(--violet-soft);
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.24);
}
.card--m .card__icon {
  color: var(--mint);
  background: rgba(74, 222, 128, 0.09);
  border-color: rgba(74, 222, 128, 0.22);
}
.card--a .card__icon {
  color: var(--amber);
  background: rgba(251, 191, 36, 0.09);
  border-color: rgba(251, 191, 36, 0.22);
}

.card h3 { font-size: 1.28rem; margin-bottom: 12px; }
.card p  { color: var(--ink-mute); font-size: 15.2px; }

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 0;
  padding: 0;
}
.tags li {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ------------------------------------------------------------ 12. Platforms */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(36px, 5vw, 70px);
  align-items: center;
}

.stack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.stack-list li {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 20px;
  padding: 19px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.stack-list li:last-child { border-bottom: 1px solid var(--line); }
.stack-list .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  padding-top: 4px;
}
.stack-list .v { color: var(--ink-soft); font-size: 15.4px; }
.stack-list .v strong { color: var(--ink); font-weight: 600; }

/* Device pair --------------------------------------------------------------- */
.devices {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 22px;
  padding: 20px 0;
}
.device {
  position: relative;
  width: 190px;
  aspect-ratio: 9 / 19;
  border-radius: 30px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, rgba(30, 41, 71, 0.7), rgba(7, 10, 20, 0.9));
  padding: 9px;
  box-shadow: 0 44px 80px -34px rgba(0, 0, 0, 0.98), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.device--b { width: 168px; margin-bottom: 34px; }
.device__screen {
  width: 100%; height: 100%;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  background: radial-gradient(120% 80% at 50% 0%, #12203c, #060a14 70%);
}
.device__notch {
  position: absolute;
  top: 9px; left: 50%;
  transform: translateX(-50%);
  width: 52px; height: 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  z-index: 3;
}
.device__label {
  position: absolute;
  bottom: -30px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ------------------------------------------------------------ 13. Principles */
.principles {
  display: grid;
  /* Four commitments — two columns divides evenly; three would orphan one. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.principle {
  background: var(--bg-raise);
  padding: 32px 28px;
  transition: background 0.3s var(--ease);
}
.principle:hover { background: #0e1526; }
.principle__n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--signal);
  margin-bottom: 16px;
}
.principle h3 { font-size: 1.1rem; margin-bottom: 10px; }
.principle p  { color: var(--ink-mute); font-size: 14.6px; }

/* ---------------------------------------------------------------- 14. Scope */
.scope-wrap {
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(251, 191, 36, 0.06), rgba(9, 13, 26, 0.6) 55%);
  padding: clamp(32px, 4.4vw, 54px);
}
.scope-wrap .eyebrow { color: var(--amber); }
.scope-wrap .eyebrow::before {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
}
.scope-wrap h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin-bottom: 20px; }
.scope-wrap > p {
  color: var(--ink-soft);
  max-width: 72ch;
  margin-bottom: 16px;
  font-size: 1.02rem;
}
.scope-points {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.scope-points li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 13px;
  color: var(--ink-soft);
  font-size: 15.3px;
}
.scope-points svg { width: 18px; height: 18px; margin-top: 4px; color: var(--amber); }

/* ---------------------------------------------------------------- 15. About */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
  margin-top: 46px;
}
.figure {
  background: var(--bg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}
.figure__v {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 9px;
  background: linear-gradient(120deg, #fff, var(--signal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.figure__k {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* -------------------------------------------------------------- 16. Contact */
.contact-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(34px, 5vw, 68px);
  align-items: start;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px 30px;
}
.contact-row {
  display: grid;
  gap: 4px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-of-type { border-bottom: 0; padding-bottom: 4px; }
.contact-row .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.contact-row .v { font-size: 15.6px; color: var(--ink); }
.contact-row a.v:hover { color: var(--signal); }
.contact-row address { font-style: normal; font-size: 15.6px; color: var(--ink); }

/* --------------------------------------------------------------- 17. Footer */
.foot {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 14, 0.85);
  padding-block: 58px 34px;
  margin-top: 40px;
}
.foot__top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 42px;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}
.foot__blurb {
  color: var(--ink-mute);
  font-size: 14.6px;
  max-width: 40ch;
  margin-top: 18px;
}
.foot h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot ul a { color: var(--ink-soft); font-size: 14.6px; transition: color 0.2s; }
.foot ul a:hover { color: var(--signal); }

.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
  font-size: 13.4px;
  color: var(--ink-faint);
}
.foot__bottom p { margin: 0; }

/* --------------------------------------------------------- 18. Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ----------------------------------------------------------- 19. Legal pages */
.doc {
  position: relative;
  z-index: 2;
  max-width: var(--shell-nr);
  margin-inline: auto;
  padding: clamp(56px, 8vw, 92px) 28px clamp(60px, 8vw, 96px);
}
.doc h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); margin-bottom: 14px; }
.doc__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 40px;
}
.doc h2 {
  font-size: 1.42rem;
  margin: 46px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.doc h3 { font-size: 1.08rem; margin: 28px 0 10px; color: var(--ink); }
.doc p, .doc li { color: var(--ink-soft); font-size: 16px; }
.doc p { margin-bottom: 15px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 18px; display: grid; gap: 9px; }
.doc a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.doc strong { color: var(--ink); }
.doc .callout {
  border: 1px solid rgba(251, 191, 36, 0.26);
  background: rgba(251, 191, 36, 0.05);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  margin: 26px 0;
}
.doc .callout p:last-child { margin-bottom: 0; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 30px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--signal); }

/* ------------------------------------------------------------ 20. Responsive */
@media (max-width: 1000px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .hero__grid,
  .split,
  .contact-wrap { grid-template-columns: minmax(0, 1fr); }
  .hero__grid { gap: 48px; }
  .foot__top  { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .cards      { grid-template-columns: minmax(0, 1fr); }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .shell { padding-inline: 20px; }
  .nav {
    position: fixed;
    inset: 78px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6, 9, 18, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 22px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 6px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .btn { margin-top: 16px; justify-content: center; }
  .nav-toggle { display: inline-flex; }

  .panel__legend { grid-template-columns: minmax(0, 1fr); }
  .panel__legend div { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel__legend div:last-child { border-bottom: 0; }

  .stack-list li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .device { width: 152px; }
  .device--b { width: 134px; }
  .foot__top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------- 21. Motion & contrast */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .marquee { animation: none; }
  #neural-field { opacity: 0.4; }
}

@media (prefers-contrast: more) {
  :root {
    --ink-mute: #b6c2d8;
    --ink-soft: #d6dff0;
    --line: rgba(160, 185, 235, 0.3);
    --line-strong: rgba(160, 185, 235, 0.5);
  }
}

@media print {
  #neural-field, .aurora, .grid-veil, .grain, .masthead, .strip { display: none !important; }
  body { background: #fff; color: #000; }
  .doc p, .doc li { color: #000; }
}

/* Only 600 is shipped for the display face and for bold body text, so make the
   browser use it rather than synthesising a heavier weight it does not have. */
strong, b { font-weight: 600; }

/* --------------------------------------------------- 22. Small utilities
   These exist so no element needs a style="" attribute, which lets the site
   ship a Content-Security-Policy without 'unsafe-inline'. */
.d-1 { --d: 90ms; }
.d-2 { --d: 180ms; }
.d-3 { --d: 270ms; }

.mt-sm { margin-top: 16px; }

.contact-head    { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-bottom: 20px; }
.contact-intro   { color: var(--ink-soft); max-width: 52ch; margin-bottom: 26px; }

.foot__bottom--bare { padding-top: 0; }
.foot__bottom a { color: inherit; transition: color 0.2s; }
.foot__bottom a:hover { color: var(--signal); }

.doc .callout--signal {
  border-color: rgba(53, 231, 255, 0.26);
  background: rgba(53, 231, 255, 0.05);
}

/* ------------------------------------------- 23. Browser surface (platform)
   Web sits alongside iOS and Android in the composition, not behind them. */
.devices {
  flex-direction: column;
  gap: 46px;
}
.dev-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 22px;
}

.browser {
  position: relative;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(30, 41, 71, 0.7), rgba(7, 10, 20, 0.9));
  overflow: hidden;
  box-shadow: 0 40px 76px -34px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
}
.browser__bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(139, 168, 224, 0.28);
}
.browser__bar span:first-child { background: rgba(53, 231, 255, 0.5); }
.browser__screen { line-height: 0; }
.surface {
  position: relative;
  width: 100%;
  max-width: 400px;
}
.surface .device__label { bottom: -26px; }

/* ==========================================================================
   24. The mark, drawing itself
   The wordmark is horizontal now, so its box is wide rather than square.
   The sign-off above the footer runs the animated version: the trace is drawn
   by stroke-dashoffset over a normalised pathLength of 100, and the cursor is
   translated through keyframes sampled at equal fractions of that same path
   length — so the block stays exactly on the pen, including through the steep
   spikes where x barely advances but path length does.
   ====================================================================== */
.wordmark svg { width: 46px; height: 27px; }

.signoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 46px;
  margin-bottom: 42px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.signoff__mark { width: 168px; height: 100px; }
.signoff__text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Idle until the sign-off is actually on screen, then it loops while it is. */
.signoff__mark .prompt { opacity: 0; }
.signoff__mark .trace  { stroke-dasharray: 100; stroke-dashoffset: 100; }

.signoff.is-in .signoff__mark .prompt {
  animation: bs-prompt 5.6s ease-out infinite;
}
.signoff.is-in .signoff__mark .trace {
  animation: bs-draw 5.6s cubic-bezier(0.55, 0, 0.35, 1) infinite;
}
.signoff.is-in .signoff__mark .cursor {
  animation: bs-track 5.6s cubic-bezier(0.55, 0, 0.35, 1) infinite,
             bs-blink 1s steps(1, end) infinite;
}

@keyframes bs-prompt {
  0%, 2%   { opacity: 0; }
  7%, 100% { opacity: 1; }
}
@keyframes bs-draw {
  0%, 8%    { stroke-dashoffset: 100; }
  58%, 100% { stroke-dashoffset: 0; }
}
@keyframes bs-track {
      8.00% { transform: translate(34.00px, 50.00px); }
      10.50% { transform: translate(39.68px, 50.00px); }
      13.00% { transform: translate(41.54px, 44.86px); }
      15.50% { transform: translate(43.17px, 39.42px); }
      18.00% { transform: translate(44.81px, 33.97px); }
      20.50% { transform: translate(46.30px, 31.50px); }
      23.00% { transform: translate(47.42px, 37.08px); }
      25.50% { transform: translate(48.53px, 42.65px); }
      28.00% { transform: translate(49.64px, 48.22px); }
      30.50% { transform: translate(50.76px, 53.79px); }
      33.00% { transform: translate(51.87px, 59.37px); }
      35.50% { transform: translate(52.99px, 64.94px); }
      38.00% { transform: translate(54.12px, 69.49px); }
      40.50% { transform: translate(55.41px, 63.96px); }
      43.00% { transform: translate(56.70px, 58.42px); }
      45.50% { transform: translate(57.99px, 52.89px); }
      48.00% { transform: translate(59.28px, 47.35px); }
      50.50% { transform: translate(60.58px, 41.82px); }
      53.00% { transform: translate(62.71px, 43.41px); }
      55.50% { transform: translate(65.25px, 48.49px); }
      58.00% { transform: translate(70.00px, 50.00px); }
      64% { transform: translate(85.00px, 50.00px); }
      100% { transform: translate(85.00px, 50.00px); }
}
@keyframes bs-blink {
  0%, 60%   { opacity: 1; }
  61%, 100% { opacity: 0.25; }
}

/* The 404 gets the same mark, larger — it is the whole visual of that page.
   It sits above the fold, so it runs on load rather than waiting for a reveal. */
.doc__mark { width: 210px; height: 124px; margin-bottom: 26px; }
.doc__mark .prompt { opacity: 0; animation: bs-prompt 5.6s ease-out infinite; }
.doc__mark .trace {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: bs-draw 5.6s cubic-bezier(0.55, 0, 0.35, 1) infinite;
}
.doc__mark .cursor {
  animation: bs-track 5.6s cubic-bezier(0.55, 0, 0.35, 1) infinite,
             bs-blink 1s steps(1, end) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .signoff__mark .prompt,
  .doc__mark .prompt { opacity: 1; animation: none !important; }
  .signoff__mark .trace,
  .doc__mark .trace  { stroke-dashoffset: 0; animation: none !important; }
  .signoff__mark .cursor,
  .doc__mark .cursor { transform: translate(85px, 50px); animation: none !important; }
}

@media (max-width: 760px) {
  .signoff__mark { width: 132px; height: 78px; }
  .doc__mark     { width: 168px; height: 100px; }
}

/* ==========================================================================
   25. Mission — vision, mission, the practitioner narrative, the beliefs.
   Visually distinct from the Approach grid above it: that one is a dense
   six-cell list of engineering commitments, this one is prose with room.
   ====================================================================== */
.manifesto {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(53, 231, 255, 0.06), rgba(9, 13, 26, 0.6) 58%);
  overflow: hidden;
}
.manifesto__row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 26px;
  padding: 34px clamp(26px, 3.6vw, 44px);
  align-items: start;
}
.manifesto__row + .manifesto__row { border-top: 1px solid var(--line); }

/* A row may carry more than one body paragraph. Without this, the second one
   flows back into the label column and sets about fifteen characters wide. */
.manifesto__row > *:not(.manifesto__label) { grid-column: 2; }

.manifesto__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  padding-top: 9px;
}
.manifesto__lead {
  font-family: var(--font-display);
  font-size: clamp(1.32rem, 2.35vw, 1.95rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.manifesto__body {
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  color: var(--ink-soft);
  max-width: 68ch;
}

/* The narrative: why the gaps get found, and why removing layers is the trick. */
.narrative {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(30px, 4vw, 62px);
  margin-top: clamp(40px, 5vw, 64px);
}
.narrative h3 {
  font-size: 1.24rem;
  margin-bottom: 14px;
  padding-top: 20px;
  border-top: 2px solid rgba(53, 231, 255, 0.4);
}
.narrative div:last-child h3 { border-top-color: rgba(167, 139, 250, 0.45); }
.narrative p {
  color: var(--ink-mute);
  font-size: 15.6px;
  margin-bottom: 14px;
}
.narrative p:last-child { margin-bottom: 0; }

/* Four beliefs. Bigger, quieter and fewer than the Approach cells, so the two
   sections do not read as the same list twice. */
.beliefs {
  list-style: none;
  margin: clamp(44px, 5.5vw, 70px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.beliefs li {
  background: var(--bg-raise);
  padding: 32px clamp(24px, 2.6vw, 34px) 34px;
  transition: background 0.3s var(--ease);
}
.beliefs li:hover { background: #0e1526; }
.beliefs__n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--violet-soft);
  margin-bottom: 15px;
}
.beliefs h3 {
  font-size: clamp(1.14rem, 1.5vw, 1.34rem);
  margin-bottom: 11px;
}
.beliefs p { color: var(--ink-mute); font-size: 15.2px; }

@media (max-width: 860px) {
  .manifesto__row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .manifesto__label { padding-top: 0; }
  .narrative,
  .beliefs { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------- 26. Hero panel scene selector
   The panel cycles through one illustration per field we work in. The dots
   also let anyone jump straight to one, which is the only way a visitor with
   reduced motion gets to see the other three. */
.panel__scenes {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.panel__scenes button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(139, 168, 224, 0.28);
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.panel__scenes button:hover { background: rgba(139, 168, 224, 0.55); transform: scale(1.25); }
.panel__scenes button.is-on { background: var(--signal); box-shadow: 0 0 8px rgba(53, 231, 255, 0.6); }
.panel__scenes button:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* The label changes with the scene; stop it nudging the dots around. */
#scene-label { min-width: 15ch; }

@media (max-width: 420px) {
  /* Tighten the bar rather than dropping the dots — for a visitor with reduced
     motion they are the only way to reach the other three illustrations. */
  #scene-label { min-width: 0; }
  .panel__bar { gap: 8px; }
  .panel__scenes { gap: 6px; }
}

/* --------------------------------------------- 27. Mission narrative, x3
   The narrative carries three arguments now — where the problems come from,
   why there is nobody in the middle, and why speed is not corner-cutting. */
.narrative { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.narrative div:nth-child(2) h3 { border-top-color: rgba(167, 139, 250, 0.45); }
.narrative div:nth-child(3) h3 { border-top-color: rgba(74, 222, 128, 0.45); }
.narrative p strong { color: var(--ink); }

@media (max-width: 1000px) {
  /* two columns would orphan the third, so go straight to one */
  .narrative { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------- 28. Evidence note
   The beliefs above are claims; this is where they get their support. Styled
   quieter than a card on purpose — it is a citation, not a selling point. */
.evidence {
  margin-top: 22px;
  padding: 26px clamp(24px, 2.8vw, 34px) 24px;
  border: 1px solid var(--line);
  border-left: 2px solid rgba(53, 231, 255, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(9, 13, 26, 0.5);
}
.evidence__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.evidence p { color: var(--ink-mute); font-size: 15px; max-width: 92ch; }
.evidence strong { color: var(--ink-soft); }
.evidence__src {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.evidence__src a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.evidence__src a:hover { color: #fff; }
.evidence__src span { color: var(--ink-faint); }

/* -------------------------------------------------- 29. Language switcher */
.nav a.lang {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.nav a.lang:hover { color: var(--signal); border-color: rgba(53, 231, 255, 0.4); background: none; }

@media (max-width: 760px) {
  .nav a.lang {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 14px;
    padding: 14px 6px;
  }
}
