/* ═══════════════════════════════════════════════════════════
   Remote Consultants dark industrial B2B
   Teenage-Engineering-inspired: sharp geometry, monospace
   numbering, ruler ticks, crop marks, accent as punctuation.
   No external fonts or dependencies.

   Each theme is a personality, not a recolor. Themes set:
   neutrals (temperature), texture, radius, display type,
   accent-bar pattern, glow position, and a secondary hue.
   Derived accent tints are computed with color-mix() from
   --accent on the root element, so a theme only names hues.
   ═══════════════════════════════════════════════════════════ */

/* ─── Tokens ─── */
:root,
[data-theme="a"] {
  color-scheme: dark;

  /* Shared type ramp */
  --text:     #f2f2f4;
  --text2:    #a8a8b6;
  --text3:    #7e7e90;
  --border:   rgba(255,255,255,.07);
  --border2:  rgba(255,255,255,.12);
  --border3:  rgba(255,255,255,.20);
  --font:     ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono:     ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --header-h: 68px;

  /* Theme A: Amber, "instrument panel" (default) */
  --theme-name:   "Amber";
  --bg:           #0a0908;
  --bg-deep:      #060505;
  --surface:      #141210;
  --surface2:     #1b1916;
  --surface3:     #23201c;
  --accent:       #ffb224;
  --accent-2:     #ff8a1f;
  --on-accent:    #1a1000;
  --radius:       3px;
  --radius-lg:    6px;
  --node-radius:  50%;
  --display-font:      var(--font);
  --display-weight:    750;
  --display-tracking:  -.035em;
  --display-transform: none;
  --display-scale:     1;
  --display-leading:   1.04;
  --texture:      radial-gradient(circle, rgba(255,236,210,.06) 1px, transparent 1.4px);
  --texture-size: 24px 24px;
  --bar:          linear-gradient(90deg, var(--accent), transparent 85%);
  --bar-h:        2px;
  --glow-x:       -10%;
  --glow-y:       -20%;
  --num-bg:       var(--accent-dim);
  --num-fg:       var(--accent);

  /* Derived accent tints (recomputed per theme) */
  --accent-dim:   color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-dim2:  color-mix(in srgb, var(--accent) 7%, transparent);
  --accent-glow:  color-mix(in srgb, var(--accent) 9%, transparent);
  --accent-line:  color-mix(in srgb, var(--accent) 34%, transparent);
  --tint-surface: color-mix(in srgb, var(--accent) 2.5%, transparent);
  --tint-card:    color-mix(in srgb, var(--accent) 5%, transparent);
}

/* Theme B: Signal, "poster". True black, square corners,
   uppercase display, solid bars, graph-paper grid. */
[data-theme="b"] {
  --theme-name:   "Signal";
  --bg:           #070707;
  --bg-deep:      #030303;
  --surface:      #111111;
  --surface2:     #181818;
  --surface3:     #202020;
  --accent:       #f45d48;
  --accent-2:     #ffd2c9;
  --on-accent:    #160403;
  --radius:       0px;
  --radius-lg:    0px;
  --node-radius:  0;
  --display-weight:    850;
  --display-tracking:  -.02em;
  --display-transform: uppercase;
  --display-scale:     .9;
  --display-leading:   .98;
  --texture:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  --texture-size: 32px 32px;
  --bar:          linear-gradient(var(--accent), var(--accent));
  --bar-h:        3px;
  --glow-x:       70%;
  --glow-y:       -30%;
  --num-bg:       var(--accent);
  --num-fg:       var(--on-accent);
}

/* Theme C: Mint, "terminal". Green-black, monospace display,
   scanlines, dashed bars, blinking cursor. */
[data-theme="c"] {
  --theme-name:   "Mint";
  --bg:           #050806;
  --bg-deep:      #030504;
  --surface:      #0c120e;
  --surface2:     #111a15;
  --surface3:     #17221b;
  --accent:       #34d399;
  --accent-2:     #a7f3d0;
  --on-accent:    #01140c;
  --radius:       2px;
  --radius-lg:    2px;
  --node-radius:  1px;
  --display-font:      var(--mono);
  --display-weight:    700;
  --display-tracking:  -.04em;
  --display-scale:     .84;
  --display-leading:   1.08;
  --texture:      repeating-linear-gradient(0deg, rgba(140,255,200,.035) 0 1px, transparent 1px 3px);
  --texture-size: auto;
  --bar:          repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 12px);
  --bar-h:        2px;
  --glow-x:       30%;
  --glow-y:       -40%;
}

/* Theme D: Violet, "studio". Indigo-black, softer radii,
   light display weight, violet-to-pink gradients, hatching. */
[data-theme="d"] {
  --theme-name:   "Violet";
  --bg:           #09080e;
  --bg-deep:      #050409;
  --surface:      #13111b;
  --surface2:     #1a1724;
  --surface3:     #221e2e;
  --accent:       #a78bfa;
  --accent-2:     #f472b6;
  --on-accent:    #13072b;
  --radius:       8px;
  --radius-lg:    14px;
  --node-radius:  50%;
  --display-weight:    600;
  --display-tracking:  -.045em;
  --display-scale:     1.04;
  --texture:      repeating-linear-gradient(45deg, rgba(210,190,255,.03) 0 1px, transparent 1px 14px);
  --texture-size: auto;
  --bar:          linear-gradient(90deg, var(--accent), var(--accent-2) 55%, transparent);
  --bar-h:        2px;
  --glow-x:       60%;
  --glow-y:       10%;
}

/* Theme E: Sky, "blueprint". Navy-black, major/minor grid,
   ruler-tick bars, cyan secondary. */
[data-theme="e"] {
  --theme-name:   "Sky";
  --bg:           #060a10;
  --bg-deep:      #03060a;
  --surface:      #0c131c;
  --surface2:     #111b27;
  --surface3:     #172332;
  --accent:       #38bdf8;
  --accent-2:     #22d3ee;
  --on-accent:    #02121d;
  --radius:       2px;
  --radius-lg:    4px;
  --node-radius:  0;
  --display-weight:    700;
  --display-tracking:  -.03em;
  --texture:
    linear-gradient(rgba(120,190,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,190,255,.06) 1px, transparent 1px),
    linear-gradient(rgba(120,190,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,190,255,.025) 1px, transparent 1px);
  --texture-size: 96px 96px, 96px 96px, 16px 16px, 16px 16px;
  --bar:          repeating-linear-gradient(90deg, var(--accent) 0 1px, transparent 1px 8px);
  --bar-h:        6px;
  --glow-x:       -20%;
  --glow-y:       30%;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease;
}

/* ─── Theme texture (fixed, fades toward the bottom) ─── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--texture);
  background-size: var(--texture-size);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.45) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Ambient glow (position varies by theme) ─── */
body::after {
  content: "";
  position: fixed;
  left: var(--glow-x);
  top: var(--glow-y);
  width: 1000px;
  height: 1000px;
  max-width: 120vw;
  max-height: 120vw;
  background: radial-gradient(circle, var(--accent-glow), transparent 62%);
  pointer-events: none;
  z-index: 0;
  transition: background .6s ease, left .6s var(--ease-out), top .6s var(--ease-out);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ─── Layout ─── */
.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; position: relative; z-index: 1; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ─── Typography ─── */
h1, h2, h3 { font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
h1, h2 {
  font-family: var(--display-font);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  text-transform: var(--display-transform);
  line-height: var(--display-leading);
}
h1 { font-size: calc(clamp(2.7rem, 5.8vw, 4.4rem) * var(--display-scale)); text-wrap: balance; }
h2 { font-size: calc(clamp(1.9rem, 3.4vw, 2.7rem) * var(--display-scale)); text-wrap: balance; }
h3 { font-size: clamp(1.08rem, 1.6vw, 1.24rem); }

.kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .7em;
}
.num {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  background: var(--num-bg);
  color: var(--num-fg);
  padding: 4px 7px;
  border-radius: 2px;
  letter-spacing: .04em;
}

/* ─── Header ─── */
.top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
/* Accent hairline under the header, fading out to the right */
.top::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(420px, 40vw);
  height: 1px;
  background: linear-gradient(90deg, var(--accent-line), transparent);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 1.5px solid var(--accent-line);
  display: grid;
  place-items: center;
  background: var(--surface);
  font-family: var(--mono);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--accent);
  box-shadow: 0 0 14px var(--accent-dim2), inset 0 -2px 0 var(--accent-dim);
  transition: border-color .3s ease, box-shadow .3s ease, border-radius .3s ease;
}
.logo-sm { width: 28px; height: 28px; font-size: .66rem; box-shadow: none; }
.brand:hover .logo { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-dim); }
.brand-text { display: grid; gap: 1px; }
.brand-name { font-weight: 700; font-size: .95rem; letter-spacing: .01em; }
.brand-sub {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text3);
}

.top-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top-nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text2);
  border: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.top-nav-num { color: var(--text3); font-size: .62rem; transition: color .2s ease; }
.top-nav a:hover { color: var(--text); border-color: var(--border2); background: var(--surface); }
.top-nav a:hover .top-nav-num { color: var(--accent); }

/* ─── Theme switcher ─── */
.theme-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.theme-name {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text3);
  min-width: 9.5em;
  white-space: nowrap;
}
.theme-name::before { content: "COLOR: "; color: var(--text3); }
.theme-name::after { content: var(--theme-name); color: var(--accent); }

/* Explicit accent arrow: makes the five swatches read as a color-control,
   not passive status dots. */
.theme-arrow {
  position: relative;
  width: 24px;
  height: 2px;
  margin: 0 3px;
  background: var(--accent);
  animation: theme-arrow-nudge 1.8s ease-in-out infinite;
}
.theme-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--accent);
}
@keyframes theme-arrow-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .theme-arrow { animation: none; }
}

.theme-dot {
  --swatch: #888;
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  display: grid;
  place-items: center;
  transition: border-color .2s ease, background .2s ease;
}
.theme-dot[data-theme-choice="a"] { --swatch: #ffb224; --shape: 50%; }
.theme-dot[data-theme-choice="b"] { --swatch: #f45d48; --shape: 0; }
.theme-dot[data-theme-choice="c"] { --swatch: #34d399; --shape: 1px; }
.theme-dot[data-theme-choice="d"] { --swatch: #a78bfa; --shape: 35%; }
.theme-dot[data-theme-choice="e"] { --swatch: #38bdf8; --shape: 2px; }
/* The swatch shape previews each theme's corner geometry. */
.theme-dot .dot-fill {
  width: 10px;
  height: 10px;
  border-radius: var(--shape);
  background: var(--swatch);
  display: block;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
}
.theme-dot[data-theme-choice="e"] .dot-fill { transform: rotate(45deg) scale(.9); }
.theme-dot:hover { background: var(--surface3); }
.theme-dot:hover .dot-fill { transform: scale(1.25); box-shadow: 0 0 10px var(--swatch); }
.theme-dot[data-theme-choice="e"]:hover .dot-fill { transform: rotate(45deg) scale(1.15); }
.theme-dot:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.theme-dot[aria-pressed="true"] {
  border-color: var(--accent-line);
  background: var(--surface3);
  box-shadow: 0 0 0 1px var(--accent-line), 0 0 16px var(--accent-dim);
}
.theme-dot[aria-pressed="true"] .dot-fill {
  transform: scale(1.2);
  box-shadow: 0 0 14px 2px var(--swatch);
}
.theme-dot[data-theme-choice="e"][aria-pressed="true"] .dot-fill {
  transform: rotate(45deg) scale(1.08);
}
/* A small down-arrow points directly to the selected color. */
.theme-dot[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 3px);
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--accent);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  min-height: 48px;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 650;
  font-size: .88rem;
  letter-spacing: .02em;
  border: 1.5px solid var(--border2);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease, filter .2s ease;
  position: relative;
}
/* Trailing arrow that slides on hover */
.btn::after {
  content: "→";
  font-family: var(--mono);
  transition: transform .2s var(--ease-out);
}
.btn:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-dim2);
  transform: translateY(-1px);
}
.btn:hover::after { transform: translateX(3px); }
.btn:active { transform: translateY(0); }

.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 750;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.18);
}
.btn.primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 28px var(--accent-dim), inset 0 -2px 0 rgba(0,0,0,.18);
  transform: translateY(-2px);
  color: var(--on-accent);
  background: var(--accent);
}
.btn.primary:active { transform: translateY(0); filter: brightness(.95); }

/* ─── Hero ─── */
.hero {
  padding: 112px 0 104px;
  position: relative;
  overflow: hidden;
}
/* Rotated outline squares: large background geometry */
.hero::before {
  content: "";
  position: absolute;
  top: 24px;
  right: -120px;
  width: 560px;
  height: 560px;
  border: 1px solid var(--border);
  outline: 1px solid var(--border);
  outline-offset: 48px;
  transform: rotate(35deg);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line) 20%, var(--accent-line) 80%, transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 64px;
  align-items: center;
}
.hero-content { display: grid; gap: 24px; justify-items: start; }
.h1-accent { color: var(--accent); }
[data-theme="d"] .h1-accent,
[data-theme="e"] .h1-accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Terminal cursor, Mint only */
[data-theme="c"] .h1-accent::after {
  content: "";
  display: inline-block;
  width: .5em;
  height: .82em;
  margin-left: .12em;
  vertical-align: -.06em;
  background: var(--accent);
  animation: cursor-blink 1.1s steps(1) infinite;
}
@keyframes cursor-blink { 50% { opacity: 0; } }

.hero-desc {
  color: var(--text2);
  font-size: 1.1rem;
  max-width: 54ch;
  line-height: 1.7;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero-direct {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: .82rem;
}
.hero-direct-label {
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text3);
}
.hero-direct a { color: var(--text); letter-spacing: .04em; transition: color .2s ease; }
.hero-direct a:hover { color: var(--accent); }

/* ─── Crop-mark frame (wraps a card) ─── */
.frame { position: relative; }
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 0 solid var(--accent-line);
  pointer-events: none;
  transition: border-color .3s ease, transform .3s var(--ease-out);
}
.frame::before { top: -9px; left: -9px; border-top-width: 1px; border-left-width: 1px; }
.frame::after { bottom: -9px; right: -9px; border-bottom-width: 1px; border-right-width: 1px; }
.frame:hover::before { border-color: var(--accent); transform: translate(-3px, -3px); }
.frame:hover::after { border-color: var(--accent); transform: translate(3px, 3px); }

/* ─── Cards ─── */
.card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  transition: border-color .25s ease, box-shadow .25s ease, transform .3s var(--ease-out), background .25s ease;
}
/* Accent wash revealed on hover */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--tint-card), transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
/* Theme-patterned accent bar along the top edge */
.card::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: var(--bar-h);
  background: var(--bar);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: .4;
  pointer-events: none;
  transition: opacity .3s ease, transform .35s var(--ease-out);
  transform-origin: left;
}
.card:hover {
  border-color: var(--accent-line);
  background: var(--surface2);
  box-shadow: 0 18px 48px -12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  transform: translateY(-3px);
}
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; }

/* ─── Hero card ─── */
.hero-card {
  padding: 34px;
  border-color: var(--border2);
  box-shadow: 0 24px 64px -20px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.04);
}
.hero-card::after { opacity: .8; }
.hero-card-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text2);
  padding: 6px 10px;
  border: 1px solid var(--border2);
  border-radius: 2px;
  background: var(--bg);
}
.hero-card h3 {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 1.2rem;
}
.hero-list { list-style: none; display: grid; gap: 4px; }
.hero-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 2px 12px;
  align-items: baseline;
  padding: 10px 12px 10px 14px;
  border-left: 2px solid var(--border2);
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: border-color .2s ease, background .2s ease;
}
.hero-list li:hover { border-left-color: var(--accent); background: var(--accent-dim2); }
.step-num {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .06em;
}
.step-label { font-weight: 700; color: var(--text); font-size: .94rem; }
.step-desc {
  grid-column: 2;
  color: var(--text2);
  font-size: .85rem;
  line-height: 1.5;
}

/* ─── Sections ─── */
.section {
  padding: 112px 0;
  position: relative;
}
.section-band {
  background:
    linear-gradient(180deg, var(--tint-surface), transparent 40%),
    color-mix(in srgb, var(--surface) 45%, var(--bg));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
/* Registration crosshair at the top-left of the band */
.section-band::before {
  content: "";
  position: absolute;
  top: -7px;
  left: max(24px, calc(50% - 560px));
  width: 13px;
  height: 13px;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 1px 100% no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 100% 1px no-repeat;
  opacity: .7;
  z-index: 2;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(0, 380px);
  gap: 22px 48px;
  align-items: end;
  margin-bottom: 60px;
}
.section-head .section-index { grid-column: 1 / -1; margin-bottom: 10px; }
.section-desc {
  color: var(--text2);
  font-size: .96rem;
  line-height: 1.65;
  padding-left: 18px;
  border-left: 1px solid var(--border2);
}

/* Section index: number, name, ruler, count. Acts as a chapter divider. */
.section-index {
  --tick: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.section-index-name { color: var(--accent); white-space: nowrap; }
.section-index-count { color: var(--text3); white-space: nowrap; }
.section-index-rule {
  flex: 1;
  min-width: 40px;
  height: 9px;
  position: relative;
  background:
    linear-gradient(var(--border3), var(--border3)) left bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--border3) 0 1px, transparent 1px calc(var(--tick) * 5)) left bottom / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, var(--border2) 0 1px, transparent 1px var(--tick)) left bottom / 100% 4px no-repeat;
}
.section-index-rule::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 1px;
  background: var(--accent);
}

/* ─── Services grid ─── */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.service {
  padding: 30px 26px 28px;
  display: grid;
  gap: 14px;
  align-content: start;
  grid-template-rows: auto auto 1fr auto;
}
.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.service-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -.02em;
  transition: transform .3s var(--ease-out);
}
.service:hover .service-num { transform: translateX(4px); }
.service p {
  color: var(--text2);
  font-size: .88rem;
  line-height: 1.6;
}
.service-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px dashed var(--border2);
}
.service-list li {
  color: var(--text2);
  font-size: .82rem;
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
  transition: color .2s ease;
}
.service:hover .service-list li { color: var(--text); }
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 9px;
  height: 1px;
  background: var(--accent);
  opacity: .55;
  transition: opacity .2s ease, width .25s var(--ease-out);
}
.service:hover .service-list li::before { opacity: 1; width: 12px; }

/* ─── Service glyphs: pure-CSS pictograms ─── */
.glyph {
  width: 30px;
  height: 30px;
  position: relative;
  display: block;
  opacity: .55;
  transition: opacity .25s ease, transform .3s var(--ease-out);
}
.service:hover .glyph { opacity: 1; transform: rotate(-4deg); }
/* Rack: three server slots with an indicator light */
.glyph-rack {
  border: 1px solid var(--border3);
  border-radius: 2px;
  padding: 5px;
  background: repeating-linear-gradient(180deg, var(--accent) 0 2px, transparent 2px 7px) content-box;
}
.glyph-rack::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
/* Link: two overlapping modules */
.glyph-link::before,
.glyph-link::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border3);
  border-radius: 2px;
}
.glyph-link::before { top: 0; left: 0; }
.glyph-link::after { bottom: 0; right: 0; border-color: var(--accent); background: var(--accent-dim); }
/* Node: ring with a lit core */
.glyph-node {
  border: 1px solid var(--border3);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px);
}
.glyph-node::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed var(--accent-line);
  border-radius: 50%;
}
/* Ring: three-quarter progress dial */
.glyph-ring {
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 270deg, var(--border3) 270deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 10px, #000 10.5px);
  mask: radial-gradient(circle, transparent 10px, #000 10.5px);
}

/* ─── Delivery models: a progression along a rail ─── */
.models {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
  padding-top: 34px;
}
.models::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-line), var(--border2) 40%, var(--border2) 70%, var(--accent-line));
}
.model {
  padding: 28px 24px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.model-node {
  position: absolute;
  top: -30px;
  left: 23px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--accent);
  background: var(--bg);
  border-radius: var(--node-radius);
  transition: background .25s ease, box-shadow .25s ease;
}
/* Stem from the rail node down to the card */
.model-node::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 1px;
  height: 20px;
  background: linear-gradient(var(--accent-line), transparent);
}
.model:hover .model-node { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.model-managed .model-node { background: var(--accent-dim); }
.model-managed { border-color: var(--border2); }
.model-num {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.model p {
  color: var(--text2);
  font-size: .88rem;
  line-height: 1.6;
}

/* ─── Contact: the heaviest block on the page ─── */
.contact {
  padding: 120px 0 128px;
  position: relative;
  background: var(--bg-deep);
  overflow: hidden;
}
/* Accent glow rising from below */
.contact::before {
  content: "";
  position: absolute;
  bottom: -260px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 700px;
  background: radial-gradient(ellipse, var(--accent-glow), transparent 62%);
  pointer-events: none;
}
.contact-panel {
  position: relative;
  padding: 56px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, var(--tint-card), transparent 30%),
    linear-gradient(160deg, var(--surface), var(--bg-deep) 70%);
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05);
}
/* Full-width patterned accent edge */
.contact-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: calc(var(--bar-h) + 1px);
  background: var(--bar);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
/* Hazard-stripe tab, top-right */
.contact-panel::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 96px;
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 4px, transparent 4px 9px);
  opacity: .45;
}
.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-info { display: grid; gap: 18px; align-content: start; }
.contact-info .section-index { margin-bottom: 8px; }
.contact-info h2 { font-size: calc(clamp(2.2rem, 4.2vw, 3.2rem) * var(--display-scale)); }
.contact-lede {
  color: var(--text2);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 42ch;
}
.contact-meta {
  display: grid;
  gap: 18px;
  margin-top: 10px;
}
.contact-line {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: center;
  font-size: .92rem;
}
.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: .95rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-line:hover .contact-icon {
  border-color: var(--accent-line);
  box-shadow: 0 0 14px var(--accent-dim);
}
.contact-line strong {
  display: block;
  color: var(--text3);
  font-size: .64rem;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.contact-line a {
  color: var(--text);
  overflow-wrap: anywhere;
  transition: color .2s ease;
}
.contact-line a:hover { color: var(--accent); }
.contact-line .detail { color: var(--text2); }

/* ─── Form ─── */
.contact-card {
  padding: 30px 32px 32px;
  background: var(--surface);
  border-color: var(--border2);
  box-shadow: 0 24px 64px -20px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.04);
}
.contact-card::after { opacity: .9; }
/* The form is the primary action; keep it still under the pointer. */
.contact-card:hover { transform: none; background: var(--surface); }
.form { display: grid; gap: 18px; }
.form-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  text-transform: uppercase;
}
.form-head-title { font-size: .74rem; font-weight: 700; letter-spacing: .16em; color: var(--text); }
.form-head-meta { font-size: .62rem; letter-spacing: .14em; color: var(--text3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
label {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text2);
  transition: color .2s ease;
}
.field:focus-within label { color: var(--accent); }
input, textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border2);
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
  font-size: .94rem;
  min-height: 48px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
input:hover, textarea:hover { border-color: var(--border3); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 0 24px var(--accent-dim2);
  background: var(--bg);
}
input::placeholder, textarea::placeholder { color: var(--text3); opacity: 1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 6px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 14px;
  color: var(--text2);
  font-size: .7rem;
  font-family: var(--mono);
  letter-spacing: .04em;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--node-radius);
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 6px var(--accent); opacity: 1; }
  50% { box-shadow: 0 0 14px var(--accent); opacity: .65; }
}
.form-status {
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.55;
  color: var(--accent);
  padding: 12px 14px;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-dim2);
}
.form-status:empty { display: none; }

/* ─── Footer ─── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border2);
  background: var(--bg-deep);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding: 28px 0 40px;
  color: var(--text3);
  font-size: .74rem;
  font-family: var(--mono);
  letter-spacing: .03em;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text2); transition: color .2s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-note { color: var(--text3); }

/* ─── Scroll reveal (only hidden once JS has confirmed it can reveal) ─── */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.js .reveal.visible { opacity: 1; transform: none; }
.js .reveal-stagger > * {
  opacity: 0;
  translate: 0 20px;
  transition: opacity .6s var(--ease-out), translate .6s var(--ease-out), border-color .25s ease, box-shadow .25s ease, transform .3s var(--ease-out), background .25s ease;
}
.js .reveal-stagger.visible > * { opacity: 1; translate: 0 0; }
.js .reveal-stagger.visible > :nth-child(2) { transition-delay: .08s, .08s, 0s, 0s, 0s, 0s; }
.js .reveal-stagger.visible > :nth-child(3) { transition-delay: .16s, .16s, 0s, 0s, 0s, 0s; }
.js .reveal-stagger.visible > :nth-child(4) { transition-delay: .24s, .24s, 0s, 0s, 0s, 0s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal, .js .reveal-stagger > * { opacity: 1; transform: none; translate: none; }
}

/* ─── Responsive: tablet ─── */
@media (max-width: 1024px) {
  .services, .models { grid-template-columns: repeat(2, 1fr); }
  .models { padding-top: 0; }
  .models::before, .model-node { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; align-items: start; }
  .section-head { grid-template-columns: 1fr; gap: 18px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-panel { padding: 44px 36px; }
  .hero::before { opacity: .5; }
}

@media (max-width: 860px) {
  .top-nav { display: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .hero { padding: 76px 0 68px; }
  .section { padding: 80px 0; }
  .contact { padding: 80px 0 88px; }
  .hero::before { display: none; }
}

/* ─── Responsive: mobile ─── */
@media (max-width: 600px) {
  .wrap { width: min(100% - 32px, 1120px); }
  .brand-sub { display: none; }
  /* Keep a compact, explicit color-control cue on mobile. */
  .theme-name { min-width: 0; }
  .theme-name::before { content: "COLOR"; }
  .theme-name::after { display: none; }
  .theme-arrow { width: 16px; margin-right: 0; }
  .theme-bar { padding: 4px 5px; gap: 3px; }
  .services, .models { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 52px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .contact { padding: 56px 0 64px; }
  .contact-panel { padding: 40px 20px 24px; }
  .contact-panel::after { width: 64px; }
  .contact-card { padding: 24px 20px; }
  .hero-card { padding: 26px 22px; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; width: 100%; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .pill { justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
