/* ==========================================================================
   GridWorks — Infrastructure & Platform Engineering
   Shared stylesheet. Terminal-native / bento-dashboard design system.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* surfaces */
  --bg:            #0B0D0F;
  --bg-2:          #0E1216;
  --surface:       #11161B;
  --surface-2:     #151C22;
  --surface-3:     #1A222A;

  /* lines */
  --line:          #1E272F;
  --line-2:        #26323C;
  --line-3:        #33424E;

  /* type */
  --text:          #E8EFF5;
  --text-2:        #B3C0CC;
  --text-3:        #8896A3;   /* 6.4:1 on --bg */
  --text-4:        #7A8794;   /* 5.3:1 on --bg, 4.7:1 on --surface-2 */

  /* accents */
  --cyan:          #22D3EE;
  --cyan-2:        #67E8F9;
  --cyan-dim:      #0E7490;
  --cyan-glow:     rgba(34, 211, 238, 0.14);
  --amber:         #FBBF24;
  --amber-dim:     rgba(251, 191, 36, 0.12);
  --lime:          #A3E635;
  --rose:          #FB7185;
  --violet:        #A78BFA;

  /* fonts */
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* metrics */
  --maxw: 1280px;
  --gut: 24px;
  --r: 6px;
  --r-lg: 10px;

  --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 30px rgba(0,0,0,0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ambient grid + glow backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.35) 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.35) 60%, transparent 100%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  top: -280px; left: 50%;
  width: 1100px; height: 700px;
  margin-left: -550px;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(34,211,238,0.10), transparent 62%);
  filter: blur(30px);
  pointer-events: none;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mono);
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.35rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.08rem, 1.7vw, 1.28rem); }
h4 { font-size: 1rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--cyan); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--cyan-2); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.15em; }
li { margin-bottom: 0.42em; }
li::marker { color: var(--cyan-dim); }

strong { color: var(--text); font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

::selection { background: rgba(34,211,238,0.28); color: #fff; }

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

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--bg-2); }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg-2); }
*::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--cyan); color: #06272E;
  padding: 10px 16px; font-family: var(--mono); font-size: 13px; font-weight: 700;
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}
.wrap-narrow { max-width: 860px; }

.section { padding: 86px 0; position: relative; }
.section-sm { padding: 56px 0; }
.section-tight { padding-top: 0; }
.section-line { border-top: 1px solid var(--line); }

.sec-head { margin-bottom: 42px; max-width: 780px; }
.sec-head p { color: var(--text-3); font-size: 1rem; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* micro-label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--cyan-dim);
}
.eyebrow.plain::before { display: none; }
.eyebrow.amber { color: var(--amber); }
.eyebrow.amber::before { background: rgba(251,191,36,0.5); }

.lead { font-size: 1.06rem; color: var(--text-2); }
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); }
.small { font-size: 0.86rem; }
.cyan { color: var(--cyan); }
.amber { color: var(--amber); }
.lime { color: var(--lime); }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   4. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,13,15,0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand svg { width: 22px; height: 22px; flex-shrink: 0; }
.brand .brand-dim { color: var(--text-4); font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
  padding: 0;
}
.nav-links li { margin: 0; }
.nav-links a {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-3);
  padding: 7px 11px;
  border-radius: var(--r);
  transition: color .16s, background .16s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--cyan); background: rgba(34,211,238,0.07); }

.nav-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 38px; height: 34px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  color: var(--text-2);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nav-toggle:hover { border-color: var(--line-3); color: var(--text); }
.nav-toggle span {
  display: block;
  width: 16px; height: 1.5px;
  background: currentColor;
  position: relative;
  transition: transform .22s var(--ease), background .18s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute; left: 0;
  width: 16px; height: 1.5px;
  background: currentColor;
  transition: transform .22s var(--ease);
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 10px 18px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s var(--ease);
  white-space: nowrap;
  text-align: center;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--cyan);
  color: #04252C;
  box-shadow: 0 0 0 1px rgba(34,211,238,0.4), 0 6px 22px rgba(34,211,238,0.16);
}
.btn-primary:hover { background: var(--cyan-2); color: #04252C; box-shadow: 0 0 0 1px rgba(103,232,249,0.55), 0 8px 28px rgba(34,211,238,0.26); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--text-2);
}
.btn-ghost:hover { border-color: var(--line-3); color: var(--text); background: var(--surface-2); }

.btn-line {
  background: transparent;
  border-color: rgba(34,211,238,0.35);
  color: var(--cyan);
}
.btn-line:hover { background: rgba(34,211,238,0.08); border-color: var(--cyan); color: var(--cyan-2); }

.btn-lg { padding: 13px 24px; font-size: 13px; }
.btn-sm { padding: 7px 13px; font-size: 11.5px; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }

.arrow-link {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.arrow-link span { transition: transform .2s var(--ease); display: inline-block; }
.arrow-link:hover span { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   6. Cards / bento
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  transition: border-color .22s, background .22s, transform .22s var(--ease);
}
.card-hover:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-3); font-size: 0.93rem; }

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.b-3  { grid-column: span 3; }
.b-4  { grid-column: span 4; }
.b-5  { grid-column: span 5; }
.b-6  { grid-column: span 6; }
.b-7  { grid-column: span 7; }
.b-8  { grid-column: span 8; }
.b-9  { grid-column: span 9; }
.b-12 { grid-column: span 12; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* Grid children must be allowed to shrink below their min-content size,
   otherwise wide tables / diagrams / code blocks push the page sideways
   instead of scrolling inside their own container. */
.bento > *,
.grid-2 > *, .grid-3 > *, .grid-4 > *,
.hero-grid > *, .svc-grid > *, .legal-grid > *,
.steps > *, .case-stats > *, .foot-grid > *,
.form-row > *, .form > * { min-width: 0; }

/* capability cell */
.cap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}
.cap-head { display: flex; align-items: flex-start; gap: 12px; }
.cap-ico {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface-3);
  display: grid;
  place-items: center;
  color: var(--cyan);
}
.cap-ico svg { width: 17px; height: 17px; }
.cap-index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.1em;
  margin-left: auto;
}
.cap-list {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cap-list li { margin: 0; }

.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 3px 7px;
  white-space: nowrap;
}
.chip-cyan { color: var(--cyan); border-color: rgba(34,211,238,0.28); background: rgba(34,211,238,0.06); }
.chip-amber { color: var(--amber); border-color: rgba(251,191,36,0.28); background: rgba(251,191,36,0.06); }

/* --------------------------------------------------------------------------
   7. Terminal window
   -------------------------------------------------------------------------- */
.term {
  background: #080A0C;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.term::after {
  /* scanline sheen */
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.term-dots { display: flex; gap: 6px; }
.term-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line-3);
  display: block;
}
.term-dots i:first-child { background: #4B5A66; }
.term-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.05em;
  margin-left: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
  flex-shrink: 0;
}
.term-body {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  padding: 16px;
  overflow-x: auto;
  color: var(--text-2);
  -webkit-overflow-scrolling: touch;
}
.term-body pre { margin: 0; font: inherit; }
.term-body .line { white-space: pre; }
.term-body .wrapline { white-space: pre-wrap; word-break: break-word; }

.pr { color: var(--cyan); font-weight: 700; }        /* prompt $ */
.cmd { color: var(--text); }                          /* typed command */
.flag { color: var(--violet); }
.out { color: var(--text-3); }
.ok { color: var(--lime); }
.warn { color: var(--amber); }
.err { color: var(--rose); }
.dim { color: var(--text-4); }

.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--cyan);
  vertical-align: -3px;
  margin-left: 2px;
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* --------------------------------------------------------------------------
   8. Code blocks
   -------------------------------------------------------------------------- */
.code {
  background: #080A0C;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.code-name {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.code-lang {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.code pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.3px;
  line-height: 1.72;
  color: var(--text-2);
  -webkit-overflow-scrolling: touch;
  tab-size: 2;
}
.code code { font: inherit; }

/* syntax tokens */
.t-k { color: #C792EA; }   /* keyword */
.t-s { color: #A3E635; }   /* string */
.t-c { color: #6E7F8C; font-style: italic; }  /* comment */
.t-n { color: #FBBF24; }   /* number */
.t-f { color: #22D3EE; }   /* function / resource type */
.t-a { color: #7DD3FC; }   /* attribute / key */
.t-o { color: #93A4B1; }   /* operator / punctuation */
.t-v { color: #F0F6FC; }   /* value emphasis */

/* --------------------------------------------------------------------------
   9. Metric tiles
   -------------------------------------------------------------------------- */
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color .22s, background .22s;
}
.metric:hover { border-color: var(--line-3); background: var(--surface-2); }
.metric::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.5), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.metric:hover::before { opacity: 1; }
.metric-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 10px;
  display: block;
}
.metric-val {
  font-family: var(--mono);
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.metric-val .unit { font-size: 0.5em; color: var(--cyan); font-weight: 600; letter-spacing: 0; }
.metric-note { font-family: var(--mono); font-size: 11px; color: var(--text-4); margin-top: 8px; letter-spacing: 0.02em; }

/* status dot */
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(163,230,53,0.14);
  flex-shrink: 0;
}
.dot-amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(251,191,36,0.14); }
.dot-cyan  { background: var(--cyan);  box-shadow: 0 0 0 3px rgba(34,211,238,0.14); }
.dot-live { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(163,230,53,0.14); }
  50%      { box-shadow: 0 0 0 6px rgba(163,230,53,0.04); }
}

.status-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   10. Tables
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12.4px;
  min-width: 560px;
}
thead th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-4);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
  white-space: nowrap;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,0.015); }
td .sub { display: block; color: var(--text-4); font-size: 11px; margin-top: 2px; }
.num { font-variant-numeric: tabular-nums; }
.t-before { color: var(--rose); }
.t-after { color: var(--lime); }

.scroll-hint {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-4);
  letter-spacing: 0.08em;
  margin-top: 8px;
  display: none;
}

/* --------------------------------------------------------------------------
   11. Diagram frame
   -------------------------------------------------------------------------- */
.diagram {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(rgba(255,255,255,0.016) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px) 0 0 / 28px 100%,
    var(--bg-2);
  padding: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.diagram svg { display: block; min-width: 620px; }
.diagram-wide svg { min-width: 780px; }
.diagram-cap {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.04em;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* svg diagram token classes */
.d-box { fill: #11161B; stroke: #26323C; stroke-width: 1; }
.d-box-a { fill: rgba(34,211,238,0.06); stroke: rgba(34,211,238,0.42); stroke-width: 1; }
.d-box-w { fill: rgba(251,191,36,0.05); stroke: rgba(251,191,36,0.35); stroke-width: 1; }
.d-zone { fill: rgba(255,255,255,0.014); stroke: #1E272F; stroke-width: 1; stroke-dasharray: 4 4; }
.d-t { font-family: var(--mono); font-size: 11px; fill: #E8EFF5; }
.d-t-sm { font-family: var(--mono); font-size: 9.5px; fill: #8896A3; letter-spacing: 0.04em; }
.d-t-lbl { font-family: var(--mono); font-size: 9px; fill: #7A8794; letter-spacing: 0.14em; text-transform: uppercase; }
.d-t-a { font-family: var(--mono); font-size: 11px; fill: #22D3EE; }
.d-line { stroke: #33424E; stroke-width: 1.2; fill: none; }
.d-line-a { stroke: #22D3EE; stroke-width: 1.4; fill: none; opacity: 0.75; }
.d-line-d { stroke: #33424E; stroke-width: 1.2; fill: none; stroke-dasharray: 4 4; }

/* --------------------------------------------------------------------------
   12. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 74px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 .hl {
  color: var(--cyan);
  text-shadow: 0 0 34px rgba(34,211,238,0.32);
}
.hero-sub { font-size: 1.06rem; color: var(--text-3); max-width: 46ch; margin-bottom: 26px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-4);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }

.page-hero {
  padding: 66px 0 42px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { max-width: 20ch; }
.page-hero p { max-width: 62ch; color: var(--text-3); font-size: 1.04rem; }
.crumb {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.crumb a { color: var(--text-4); }
.crumb a:hover { color: var(--cyan); }

/* --------------------------------------------------------------------------
   13. Marquee / logo strip
   -------------------------------------------------------------------------- */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--bg-2);
  overflow: hidden;
}
.strip-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-4);
}
.strip-inner span { display: inline-flex; align-items: center; gap: 8px; }

/* --------------------------------------------------------------------------
   14. Steps / process
   -------------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.step { padding: 24px; border-right: 1px solid var(--line); background: var(--surface); transition: background .2s; }
.step:last-child { border-right: 0; }
.step:hover { background: var(--surface-2); }
.step-n {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.14em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-n::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.step h3 { font-size: 1.02rem; margin-bottom: 8px; }
.step p { font-size: 0.88rem; color: var(--text-3); margin: 0; }
.step-meta { font-family: var(--mono); font-size: 10.5px; color: var(--text-4); margin-top: 14px; letter-spacing: 0.06em; }

/* --------------------------------------------------------------------------
   15. Case snapshot
   -------------------------------------------------------------------------- */
.case {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  transition: border-color .22s;
}
.case:hover { border-color: var(--line-3); }
.case-top { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.case-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.case-top h3 { font-size: 1.05rem; margin-bottom: 8px; }
.case-top p { font-size: 0.9rem; color: var(--text-3); margin: 0; }
.case-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.case-stat { padding: 16px 24px; border-right: 1px solid var(--line); }
.case-stat:last-child { border-right: 0; }
.case-stat .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); display: block; margin-bottom: 6px; }
.case-stat .v { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; color: var(--cyan); letter-spacing: -0.02em; }
.case-stat .v.amberv { color: var(--amber); }

/* --------------------------------------------------------------------------
   16. Service detail blocks
   -------------------------------------------------------------------------- */
.svc {
  border-top: 1px solid var(--line);
  padding: 56px 0;
}
.svc:first-of-type { border-top: 0; padding-top: 8px; }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.svc-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.svc h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.deliver {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.deliver li {
  margin: 0;
  background: var(--surface);
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
}
.deliver li::before {
  content: '▸';
  color: var(--cyan);
  flex-shrink: 0;
}
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  font-family: var(--mono);
  font-size: 12px;
}
.kv dt { color: var(--text-4); letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; padding-top: 3px; }
.kv dd { margin: 0; color: var(--text-2); }

/* --------------------------------------------------------------------------
   17. Team
   -------------------------------------------------------------------------- */
.person {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: border-color .22s, background .22s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.person:hover { border-color: var(--line-3); background: var(--surface-2); }
.person-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar {
  width: 46px; height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: linear-gradient(145deg, var(--surface-3), var(--surface));
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.person-name { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 2px; }
.person-role { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); }
.person p { font-size: 0.89rem; color: var(--text-3); margin-bottom: 14px; }

/* --------------------------------------------------------------------------
   18. Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.field label .req { color: var(--cyan); }
.field input,
.field select,
.field textarea {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  background: #080A0C;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 11px 13px;
  width: 100%;
  transition: border-color .18s, box-shadow .18s, background .18s;
  appearance: none;
  -webkit-appearance: none;
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.65; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5L10 4.5' stroke='%238896A3' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 34px;
  cursor: pointer;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-4); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.12);
  background: var(--bg-2);
}
.field .hint { font-family: var(--mono); font-size: 10.5px; color: var(--text-4); }
.field .err-msg {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rose);
  display: none;
  align-items: center;
  gap: 6px;
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--rose); }
.field.invalid .err-msg { display: flex; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.checkline {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.6;
}
.checkline-wrap { display: flex; flex-direction: column; gap: 7px; }
.checkline-wrap.invalid .err-msg { display: flex; }
.checkline-wrap.invalid .checkline { color: var(--rose); }
.checkline input[type="checkbox"] {
  width: 15px; height: 15px;
  margin: 2px 0 0;
  accent-color: var(--cyan);
  flex-shrink: 0;
  cursor: pointer;
}

.form-success {
  display: none;
  border: 1px solid rgba(163,230,53,0.35);
  background: rgba(163,230,53,0.05);
  border-radius: var(--r-lg);
  padding: 26px;
}
.form-success.show { display: block; }
.form-success h3 { color: var(--lime); font-size: 1.05rem; }
.form-success .term-body { padding: 0; font-size: 12px; }

/* --------------------------------------------------------------------------
   19. CTA band
   -------------------------------------------------------------------------- */
.cta {
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(34,211,238,0.10), transparent 62%),
    var(--surface);
  padding: 52px 34px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}
.cta h2 { margin-bottom: 12px; }
.cta p { max-width: 56ch; margin: 0 auto 26px; color: var(--text-3); }

/* --------------------------------------------------------------------------
   20. Legal / prose
   -------------------------------------------------------------------------- */
.prose { max-width: 74ch; }
.prose h2 {
  font-size: 1.28rem;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { font-size: 1rem; margin-top: 26px; color: var(--text); }
.prose p, .prose li { color: var(--text-3); font-size: 0.95rem; }
.prose .meta-line {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  background: var(--surface);
  margin-bottom: 34px;
}

.toc {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 20px;
  position: sticky;
  top: 84px;
}
.toc-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 12px;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc a {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}
.toc li:last-child a { border-bottom: 0; }
.toc a::before { content: counter(toc, decimal-leading-zero) '  '; color: var(--text-4); }
.toc a:hover { color: var(--cyan); }

.legal-grid { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }

/* --------------------------------------------------------------------------
   21. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 54px 0 26px;
  margin-top: 20px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.foot-about p { font-size: 0.88rem; color: var(--text-4); max-width: 34ch; margin-top: 14px; }
.foot-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 14px;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 9px; }
.foot-col a { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.foot-col a:hover { color: var(--cyan); }
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  padding-top: 22px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.04em;
}
.foot-bottom .spacer { margin-left: auto; }
.foot-status { display: inline-flex; align-items: center; gap: 8px; }

/* --------------------------------------------------------------------------
   22. Motion
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

@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;
  }
  .reveal { opacity: 1; transform: none; }
  .caret { animation: none; }
}

/* --------------------------------------------------------------------------
   23. Imagery
   Photography is treated as a design element, not decoration: every photo is
   desaturated, contrast-lifted, darkened and pushed toward the cyan accent so
   it sits on #0B0D0F like the rest of the system. Text over a photo always
   gets a scrim so contrast stays at AA or better.
   -------------------------------------------------------------------------- */
.ph {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.5) sepia(0.32) hue-rotate(158deg) saturate(1.75) contrast(1.08) brightness(1.02);
  transition: filter .45s var(--ease), transform .6s var(--ease);
}
/* directional cyan wash on top of the duotone filter */
.ph::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(145deg, rgba(34,211,238,0.14), rgba(34,211,238,0) 46%, rgba(167,139,250,0.07));
  pointer-events: none;
}
/* scrim + the same scanline sheen the terminal windows use */
.ph::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg,
      rgba(11,13,15,0) 0%,
      rgba(11,13,15,0.04) 44%,
      rgba(11,13,15,0.30) 68%,
      rgba(11,13,15,0.78) 88%,
      rgba(11,13,15,0.93) 100%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.016) 0 1px, transparent 1px 3px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.05),
    inset 0 0 70px rgba(0,0,0,0.30);
  pointer-events: none;
}
/* no caption sitting on it → scrim is only edge-blending */
.ph-flat::after {
  background:
    linear-gradient(180deg, rgba(11,13,15,0) 0%, rgba(11,13,15,0.06) 66%, rgba(11,13,15,0.42) 100%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.016) 0 1px, transparent 1px 3px);
}
/* for images that are already very dark */
.ph-lift img { filter: grayscale(0.4) sepia(0.3) hue-rotate(158deg) saturate(1.8) contrast(1.05) brightness(1.34); }
/* sits flush inside an existing bordered cell */
.ph-bare {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.ph-16x7 { aspect-ratio: 16 / 7; }
.ph-3x1  { aspect-ratio: 3 / 1; }
.ph-21x6 { aspect-ratio: 21 / 6; }
.ph-4x3  { aspect-ratio: 4 / 3; }

.card-hover:hover .ph img,
.case:hover .ph img {
  filter: grayscale(0.18) sepia(0.14) hue-rotate(158deg) saturate(1.4) contrast(1.04) brightness(1.16);
  transform: scale(1.035);
}
.case:hover .ph-lift img { filter: grayscale(0.16) sepia(0.12) hue-rotate(158deg) saturate(1.45) contrast(1.02) brightness(1.5); }

/* overlay caption */
.ph-cap {
  position: absolute;
  z-index: 3;
  left: 16px;
  right: 16px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 1px 8px rgba(0,0,0,0.95), 0 0 2px rgba(0,0,0,0.9);
}
.ph-cap .sep { color: var(--cyan); }
.ph-cap .qt { color: var(--text-2); }

/* caption underneath, matching .diagram-cap */
.ph-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.04em;
  margin-top: 10px;
  line-height: 1.6;
}
.ph-figure { margin: 0; }

/* --- full-bleed editorial band ------------------------------------------- */
.band {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.band-media { position: absolute; inset: 0; z-index: 0; }
.band-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  filter: grayscale(0.46) sepia(0.3) hue-rotate(158deg) saturate(1.7) contrast(1.12) brightness(1.0);
}
/* Horizontal scrim holds >=0.92 black across the whole text column
   (copy never runs past ~48% of the viewport) and then releases the
   photograph on the right. */
.band-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(11,13,15,0.97) 0%,
      rgba(11,13,15,0.95) 42%,
      rgba(11,13,15,0.62) 60%,
      rgba(11,13,15,0.20) 80%,
      rgba(11,13,15,0.10) 100%),
    linear-gradient(180deg, rgba(11,13,15,0.42) 0%, rgba(11,13,15,0.06) 38%, rgba(11,13,15,0.62) 100%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.band-media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(120deg, rgba(34,211,238,0.10), rgba(34,211,238,0) 55%);
  pointer-events: none;
}
.band + .section-line,
.band + .svc-band + .section-line { border-top: 0; }
.band-inner { position: relative; z-index: 2; padding: 72px 0; }
.band-inner h2 { max-width: 20ch; margin-bottom: 14px; }
.band-inner p { max-width: 54ch; color: var(--text-2); }
.band-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.band-stat .k {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 5px;
}
.band-stat .v {
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.02em;
}

/* --- thin supporting rule band ------------------------------------------- */
.band-thin .band-inner { padding: 0; }
.band-thin {
  height: clamp(140px, 18vw, 220px);
  border-radius: 0;
}
.band-thin .band-media::after {
  background:
    linear-gradient(90deg,
      rgba(11,13,15,0.96) 0%,
      rgba(11,13,15,0.93) 40%,
      rgba(11,13,15,0.58) 58%,
      rgba(11,13,15,0.18) 82%,
      rgba(11,13,15,0.10) 100%),
    linear-gradient(180deg, rgba(11,13,15,0.50) 0%, rgba(11,13,15,0.10) 45%, rgba(11,13,15,0.58) 100%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
}
.band-label {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
}
.band-label .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  /* keep the label inside the scrimmed left half so the photo can breathe */
  padding-right: calc(var(--gut) + 46%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}
.band-label .wrap b { color: var(--text); font-weight: 700; }
.band-label .wrap .sep { color: var(--cyan); opacity: 0.8; }

/* --- hero backdrop --------------------------------------------------------
   Bleeds off the right edge behind the terminal window, feathering to nothing
   well before the headline column so h1/body copy still sit on flat --bg. */
.hero-bg {
  position: absolute;
  inset: 0 0 0 42%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 46%;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.28) 20%, #000 58%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.28) 20%, #000 58%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(11,13,15,0.72) 22%, rgba(11,13,15,0.34) 52%, rgba(11,13,15,0.26) 100%),
    linear-gradient(180deg, rgba(11,13,15,0.34) 0%, rgba(11,13,15,0.05) 26%, rgba(11,13,15,0.72) 88%, var(--bg) 100%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
}
.hero > .wrap { position: relative; z-index: 1; }

/* --- portrait avatars ----------------------------------------------------- */
.avatar-photo {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-3);
}
.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.62) sepia(0.24) hue-rotate(158deg) saturate(1.5) contrast(1.08) brightness(0.92);
  transition: filter .35s var(--ease);
}
.avatar-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(34,211,238,0.16), rgba(34,211,238,0) 62%);
  pointer-events: none;
}
.person:hover .avatar-photo img {
  filter: grayscale(0.2) sepia(0.1) hue-rotate(158deg) saturate(1.3) contrast(1.04) brightness(1.02);
}

@media (prefers-reduced-motion: reduce) {
  .ph img { transition: none; }
  .card-hover:hover .ph img,
  .case:hover .ph img { transform: none; }
}

/* --------------------------------------------------------------------------
   24. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .hero-grid { gap: 32px; }
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  :root { --gut: 20px; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 62px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    padding: 8px var(--gut) 16px;
    margin: 0;
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
  }
  .nav.open .nav-links a {
    padding: 12px 4px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav.open .nav-links li:last-child a { border-bottom: 0; }
  .nav.open .nav-links a[aria-current="page"] { background: transparent; }

  .hero { padding: 52px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-sub { max-width: none; }
  .svc-grid { grid-template-columns: 1fr; gap: 26px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2n) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .legal-grid { grid-template-columns: 1fr; gap: 26px; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 24px; }

  .b-3, .b-4, .b-5 { grid-column: span 6; }
  .b-7, .b-8, .b-9 { grid-column: span 12; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 66px 0; }

  .band-inner { padding: 56px 0; }
  /* single column: the scrim has to be uniform, so the photo becomes texture */
  .band-media img,
  .band-thin .band-media img { filter: grayscale(0.5) sepia(0.3) hue-rotate(158deg) saturate(1.7) contrast(1.14) brightness(0.96); }
  .band-media::after,
  .band-thin .band-media::after {
    background:
      linear-gradient(180deg, rgba(11,13,15,0.62) 0%, rgba(11,13,15,0.80) 34%, rgba(11,13,15,0.90) 100%),
      repeating-linear-gradient(180deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
  }
  .band-label .wrap { padding-right: var(--gut); }
  .ph-21x6 { aspect-ratio: 12 / 5; }

  /* stacked hero: the photo drops behind the terminal, headline stays on flat bg */
  .hero-bg { inset: 42% 0 0 0; }
  .hero-bg img {
    object-position: 50% 44%;
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 13%, #000 32%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 13%, #000 32%);
  }
  .hero-bg::after {
    background:
      linear-gradient(180deg, var(--bg) 0%, rgba(11,13,15,0.60) 16%, rgba(11,13,15,0.34) 52%, rgba(11,13,15,0.86) 92%, var(--bg) 100%),
      repeating-linear-gradient(180deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
  }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .section { padding: 52px 0; }
  .sec-head { margin-bottom: 30px; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .b-3, .b-4, .b-5, .b-6, .b-7, .b-8, .b-9 { grid-column: span 12; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .form-row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cta { padding: 38px 22px; }
  .card { padding: 20px; }
  .term-body { font-size: 11.5px; padding: 14px; }
  .code pre { font-size: 11.5px; padding: 14px; }
  .scroll-hint { display: block; }
  .toc ol { columns: 1; }
  .case-stats { grid-template-columns: 1fr; }
  .case-stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .case-stat:last-child { border-bottom: 0; }
  .btn-row .btn { flex: 1 1 100%; }
  .hero-meta { font-size: 10px; gap: 8px 14px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }

  .band-inner { padding: 44px 0; }
  .band-stats { gap: 14px 26px; margin-top: 20px; padding-top: 16px; }
  .band-stat .v { font-size: 0.95rem; }
  .band-thin { height: clamp(120px, 30vw, 160px); }
  .band-label .wrap { font-size: 10px; letter-spacing: 0.12em; gap: 8px; }
  .ph-21x6, .ph-3x1 { aspect-ratio: 2 / 1; }
  .ph-16x7 { aspect-ratio: 16 / 8; }
  .ph-cap { font-size: 9.5px; letter-spacing: 0.11em; left: 12px; right: 12px; bottom: 10px; }
  .avatar-photo { width: 48px; height: 48px; }
}

@media (max-width: 420px) {
  :root { --gut: 16px; }
  h1 { font-size: 1.92rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .metric { padding: 16px; }
}
