/* ==========================================================================
   eigenstack.de — Sovereign Bare-Metal Precision
   Single local stylesheet. No external resources, no tracking, no CDN.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Local fonts (latin subset, self-hosted)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Backgrounds */
  --bg-primary: #090d14;
  --bg-surface: #111827;
  --bg-surface-elevated: #182234;
  --bg-code: #0b111b;

  /* Borders and grid */
  --border-subtle: #1e293b;
  --border-strong: #334155;

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-placeholder: #52637a;

  /* Accents */
  --accent-primary: #10b981;
  --accent-primary-hover: #059669;
  --accent-secondary: #38bdf8;
  --accent-warning: #f59e0b;

  /* Fonts */
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Geometry */
  --radius-sm: 4px;
  --radius-md: 6px;
  --container-max: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(4rem, 8vw, 7rem);
  --header-height: 68px;
  --inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  overflow-x: clip;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5.7vw, 3.85rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.7rem, 3.8vw, 2.65rem);
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(16, 185, 129, 0.28);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.65rem 1rem;
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   4. Shared primitives
   -------------------------------------------------------------------------- */
.mono-label,
.eyebrow,
.section-meta,
.risk-tag,
.tag,
.service-index,
.card-index,
.footer-meta,
.legal-meta {
  font-family: var(--font-mono);
  font-weight: 500;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  color: var(--accent-primary);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  flex: none;
  background: var(--accent-primary);
}

.section {
  padding-block: var(--section-space);
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  display: grid;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.section-head > div {
  max-width: 760px;
}

.section-meta {
  color: var(--text-muted);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.section-lead {
  max-width: 62ch;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  max-width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.055);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.45;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.13);
  animation: status-pulse 2.8s ease-in-out infinite;
}

.status-dot--sm {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.icon-box {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.055);
  color: var(--accent-secondary);
}

.icon-box--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.055);
  color: var(--accent-warning);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  max-width: 100%;
  padding: 0.72rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition:
    background-color 170ms ease,
    border-color 170ms ease,
    color 170ms ease;
}

.btn svg {
  flex: none;
}

.btn--primary {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: #04150e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn--primary:hover {
  border-color: var(--accent-primary-hover);
  background: var(--accent-primary-hover);
  color: #04150e;
}

.btn--secondary {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text-primary);
}

.btn--secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-surface);
}

.btn--sm {
  min-height: 38px;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
}

.btn--block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   5. Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(9, 13, 20, 0.96);
}

@supports (backdrop-filter: blur(12px)) {
  .site-header {
    background: rgba(9, 13, 20, 0.84);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.brand-mark {
  flex: none;
}

.brand-name {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
}

.brand-accent {
  color: #34d399;
}

.brand-domain {
  color: var(--text-muted);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  transition:
    background-color 170ms ease,
    border-color 170ms ease;
}

.nav-toggle:hover {
  border-color: var(--text-muted);
  background: var(--bg-surface);
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 1rem var(--gutter) 1.25rem;
  border-bottom: 1px solid var(--border-strong);
  background: var(--bg-surface);
}

.site-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.nav-link:hover {
  background: rgba(148, 163, 184, 0.07);
  color: var(--text-primary);
}

.nav-cta {
  width: 100%;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.bg-tech-grid {
  background-image: radial-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(ellipse 90% 78% at 50% 0%, #000 12%, transparent 76%);
  mask-image: radial-gradient(ellipse 90% 78% at 50% 0%, #000 12%, transparent 76%);
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 8%;
  bottom: 0;
  display: none;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--border-subtle) 22%, var(--border-subtle) 78%, transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  margin-top: 1.5rem;
  max-width: 17ch;
}

.hero-title .accent {
  color: var(--accent-primary);
}

.hero-sub {
  max-width: 58ch;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-actions .btn {
  flex: 1 1 auto;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: 1.4rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-note-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-note-item::before {
  content: "";
  width: 3px;
  height: 3px;
  flex: none;
  background: var(--accent-primary);
}

.hero-visual {
  min-width: 0;
}

.terminal {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #0d1420 0%, var(--bg-code) 100%);
  box-shadow: var(--inset-highlight);
  font-family: var(--font-mono);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(24, 34, 52, 0.48);
}

.terminal-leds {
  display: flex;
  gap: 5px;
  flex: none;
}

.terminal-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
}

.terminal-led--red {
  background: #7f1d1d;
}

.terminal-led--amber {
  background: #78350f;
}

.terminal-led--green {
  background: #064e3b;
}

.terminal-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex: none;
  color: var(--accent-primary);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
}

.terminal-body {
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem 1rem;
}

.terminal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  min-width: 0;
  font-size: 0.75rem;
  line-height: 1.65;
}

.terminal-token {
  white-space: nowrap;
}

.terminal-key {
  flex: 0 0 auto;
  min-width: 5.5rem;
  color: var(--accent-secondary);
  font-weight: 500;
}

.terminal-key::after {
  content: ":";
  color: var(--text-muted);
}

.terminal-value {
  min-width: 0;
  flex: 1 1 9rem;
  color: var(--text-secondary);
  overflow-wrap: break-word;
}

.terminal-accent {
  color: var(--text-primary);
}

.terminal-dot {
  color: var(--border-strong);
}

.terminal-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-subtle);
  background: rgba(9, 13, 20, 0.42);
}

.terminal-metric {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border-right: 1px solid var(--border-subtle);
}

.terminal-metric:last-child {
  border-right: 0;
}

.terminal-metric-value {
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
}

.terminal-metric-label {
  color: var(--text-muted);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   7. Cards, risks and services
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 1rem;
}

.card-grid > * {
  min-width: 0;
}

.risk-card,
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--inset-highlight);
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.risk-card:hover,
.service-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-elevated);
}

.risk-card {
  gap: 0.8rem;
  padding: 1.35rem;
}

.risk-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.35rem;
  width: 34px;
  height: 2px;
  background: var(--accent-warning);
}

.card-top,
.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.card-index,
.service-index {
  color: var(--text-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

.risk-tag {
  align-self: flex-start;
  color: var(--accent-warning);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  line-height: 1.3;
}

.risk-card h3 {
  font-size: 1.0625rem;
}

.risk-card p,
.service-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.risk-card p {
  font-size: 0.90625rem;
}

.service-card {
  gap: 0.85rem;
  padding: 1.4rem;
}

.service-card::after {
  content: "";
  position: absolute;
  right: 1.4rem;
  bottom: 0;
  left: 1.4rem;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent 72%);
  opacity: 0.55;
}

.service-card h3 {
  margin-top: 0.35rem;
  font-size: 1.1875rem;
}

.service-card p {
  margin-bottom: 0.35rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  list-style: none;
}

.tag {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.045);
  color: var(--accent-secondary);
  font-size: 0.59375rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. Method / ownership
   -------------------------------------------------------------------------- */
.section--method {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.38) 0%, rgba(9, 13, 20, 0) 38%);
}

.method-grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4rem);
}

.method-intro {
  min-width: 0;
}

.method-intro h2 {
  max-width: 15ch;
}

.method-intro .section-lead {
  margin-top: 1.25rem;
}

.project-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-mark span {
  color: var(--accent-primary);
}

.blueprint {
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-code);
  box-shadow: var(--inset-highlight);
}

.blueprint-head,
.blueprint-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-mono);
}

.blueprint-head {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(24, 34, 52, 0.42);
}

.mono-label {
  color: var(--text-muted);
  font-size: 0.625rem;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.mini-tag {
  flex: none;
  padding: 0.1rem 0.35rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 3px;
  color: var(--accent-secondary);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  line-height: 1.4;
}

.blueprint-canvas {
  display: grid;
  gap: 0;
  padding: 1rem;
}

.stack-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.6rem 0.45rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: break-word;
}

.stack-node--accent {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

.stack-node--accent .stack-node-title {
  color: var(--accent-primary);
}

.stack-node--base {
  border-color: var(--border-subtle);
  background: #0d1521;
}

.stack-node-title {
  color: var(--text-primary);
  font-size: 0.6875rem;
  font-weight: 500;
}

.stack-node-meta {
  color: var(--text-muted);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.stack-link {
  display: grid;
  place-items: center;
  height: 30px;
  position: relative;
}

.stack-link::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--border-strong);
}

.stack-link span {
  position: relative;
  z-index: 1;
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  background: var(--bg-code);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.blueprint-foot {
  justify-content: flex-start;
  border-top: 1px solid var(--border-subtle);
  background: rgba(16, 185, 129, 0.04);
  color: var(--text-secondary);
  font-size: 0.59375rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.blueprint-foot .status-dot {
  flex: none;
}

.principles {
  min-width: 0;
  border-top: 1px solid var(--border-subtle);
}

.principle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.principle-num {
  padding-top: 0.15rem;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.principle h3 {
  margin-bottom: 0.55rem;
  font-size: 1.125rem;
}

.principle p {
  max-width: 58ch;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.72;
}

/* --------------------------------------------------------------------------
   9. Process
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 1rem;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--inset-highlight);
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.step:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-elevated);
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.step-num {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
}

.step h3 {
  margin-top: 0.2rem;
  font-size: 1.125rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.72;
}

.step-output {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.step-output span {
  color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   10. Contact and form
   -------------------------------------------------------------------------- */
.section--contact {
  position: relative;
  background:
    radial-gradient(ellipse 70% 60% at 18% 0%, rgba(16, 185, 129, 0.045), transparent 68%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.28), rgba(9, 13, 20, 0));
}

.contact-grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: start;
}

.contact-copy {
  min-width: 0;
}

.contact-copy h2 {
  max-width: 18ch;
}

.contact-copy .section-lead {
  margin-top: 1.25rem;
}

.contact-direct {
  display: grid;
  gap: 0.45rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-subtle);
}

.contact-email {
  width: fit-content;
  max-width: 100%;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: color 160ms ease;
}

.contact-email:hover {
  color: var(--accent-primary);
}

.contact-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.5rem;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.contact-list svg {
  flex: none;
  margin-top: 0.2rem;
  color: var(--accent-primary);
}

.form-card {
  min-width: 0;
  padding: clamp(1.15rem, 3vw, 1.8rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--inset-highlight);
}

.form-grid {
  display: grid;
  gap: 1.05rem;
}

.field {
  min-width: 0;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.req {
  color: var(--accent-primary);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.5;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-placeholder);
  opacity: 1;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--text-muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--accent-warning);
}

.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.field-error {
  margin-top: 0.35rem;
  color: var(--accent-warning);
  font-size: 0.75rem;
  line-height: 1.5;
}

.field-error:empty {
  display: none;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  cursor: pointer;
}

.select-wrap select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.checkbox-field {
  padding-top: 0.15rem;
}

.checkbox-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0.15rem 0 0;
  padding: 0;
  flex: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.checkbox-row label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.6;
  cursor: pointer;
}

.checkbox-row label a,
.form-direct a,
.form-privacy-note a {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkbox-row label a:hover,
.form-direct a:hover,
.form-privacy-note a:hover {
  color: var(--text-primary);
}

.checkbox-field.has-error .checkbox-row label {
  color: var(--accent-warning);
}

.form-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.2rem;
}

.form-privacy-note,
.form-direct {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.form-privacy-note {
  max-width: 60ch;
}

.form-direct {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.form-status--success {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
  color: var(--text-primary);
}

.form-status--error {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
  color: var(--text-primary);
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-top: clamp(2.75rem, 5vw, 4rem);
  background: #070a10;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-brand {
  min-width: 0;
}

.footer-brand .brand {
  margin-bottom: 1rem;
}

.footer-brand p {
  max-width: 40ch;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.625rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-heading {
  margin-bottom: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.5rem;
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-block: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.footer-meta {
  color: var(--text-muted);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   12. Legal pages
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.page-hero .bg-tech-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
  -webkit-mask-image: radial-gradient(ellipse 75% 95% at 25% 0%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 95% at 25% 0%, #000 10%, transparent 78%);
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.75rem, 6vw, 4.75rem);
}

.back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.back-link:hover {
  color: var(--accent-primary);
}

.back-link svg {
  flex: none;
}

.page-hero h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 5vw, 3.1rem);
}

.legal-meta {
  margin-top: 0.9rem;
  color: var(--text-muted);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.legal-section {
  padding-block: var(--section-space);
}

.legal-layout {
  display: grid;
  gap: 2.5rem;
}

.legal-aside {
  min-width: 0;
}

.legal-toc {
  display: grid;
  gap: 0.2rem;
  align-content: start;
  padding-left: 1rem;
  border-left: 1px solid var(--border-subtle);
  list-style: none;
}

.legal-toc-label {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.legal-toc a {
  display: block;
  padding: 0.27rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  transition: color 160ms ease;
}

.legal-toc a:hover {
  color: var(--accent-primary);
}

.legal-content {
  min-width: 0;
  max-width: 780px;
}

.legal-content section {
  padding-top: 1.75rem;
  margin-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

.legal-content section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.legal-content h2 {
  margin-bottom: 0.9rem;
  font-size: 1.3rem;
  line-height: 1.3;
}

.legal-content h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.legal-content p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.legal-content p + p {
  margin-top: 0.8rem;
}

.legal-content address {
  margin-top: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-style: normal;
  line-height: 1.8;
}

.legal-content a {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-content a:hover {
  color: var(--text-primary);
}

.legal-content ul {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.9rem;
  list-style: none;
}

.legal-content li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal-content li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--accent-primary);
}

.legal-note {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--accent-primary);
  background: rgba(16, 185, 129, 0.045);
  color: var(--text-secondary) !important;
  font-size: 0.875rem !important;
  line-height: 1.7 !important;
}

/* --------------------------------------------------------------------------
   13. Responsive enhancements (mobile-first)
   -------------------------------------------------------------------------- */
@media (min-width: 480px) {
  .hero-actions .btn {
    flex: 0 1 auto;
  }
}

@media (min-width: 640px) {
  .card-grid {
    gap: 1.1rem;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 1rem;
  }

  .field--full {
    grid-column: 1 / -1;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .legal-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
  }

  .legal-toc-label {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .card-grid--2,
  .card-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid--3 > :last-child {
    grid-column: 1 / -1;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .risk-card,
  .service-card {
    padding: 1.5rem;
  }

  .risk-card::before {
    left: 1.5rem;
  }

  .service-card::after {
    right: 1.5rem;
    left: 1.5rem;
  }

  .principle {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1.65rem 0;
  }
}

@media (min-width: 900px) {
  :root {
    --header-height: 72px;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 1.2rem;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }

  .nav-link {
    padding: 0.5rem 0.7rem;
    font-size: 0.875rem;
  }

  .nav-cta {
    width: auto;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 0.75fr 0.75fr;
    gap: 2.5rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .legal-toc {
    grid-template-columns: 1fr;
  }

  .legal-toc-label {
    grid-column: auto;
  }
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  }

  .hero::after {
    display: block;
    right: 44%;
  }

  .hero-title {
    max-width: 14ch;
  }

  .terminal-body {
    padding: 1.3rem 1.15rem;
  }

  .card-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-grid--3 > :last-child {
    grid-column: auto;
  }

  .card-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(3rem, 6vw, 5rem);
    align-items: start;
  }

  .method-intro {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  }

  .legal-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 3.5rem;
  }

  .legal-aside {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    align-self: start;
  }
}

@media (min-width: 1280px) {
  .hero-title {
    font-size: 3.85rem;
  }

  .terminal {
    margin-left: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   14. Reduced motion and print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-grid,
  .hero-visual,
  .form-card,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  h1,
  h2,
  h3,
  p,
  li {
    color: #111 !important;
  }

  .section,
  .legal-section {
    padding-block: 1.5rem;
  }
}
