/* ==========================================================================
   styles.css: visual design, version 2 ("situation picture").
   --------------------------------------------------------------------------
   Dark, precise and technical: blue-black ground, one signal color, mono type
   for labels and numbers. Light theme available via the header toggle.

     1. Fonts            6. Hero + radar        11. Contact + form
     2. Tokens           7. Sections + cards    12. Topic pages + FAQ
     3. Base             8. Services page       13. Legal + 404
     4. Layout helpers   9. About               14. Footer
     5. Header + nav    10. Quote + CTA         15. Motion

   To recolor the site, change --accent in section 2.
   The CSP allows no inline styles: use classes, never style="".
   ========================================================================== */

/* ============================================================== 1. FONTS == */
/* Self-hosted variable fonts (latin subset), no third-party requests. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* ============================================================= 2. TOKENS == */
:root {
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 68px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 180ms var(--ease);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070a10;
  --bg-2: #0a0f18;
  --surface: #0e1521;
  --surface-2: #141d2c;
  --line: rgba(160, 185, 220, 0.13);
  --line-strong: rgba(160, 185, 220, 0.26);
  --text: #eaf0f8;
  --muted: #a7b4c8;
  --faint: #8492a8;
  --accent: #3ddbb4;
  --accent-ink: #03241c;
  --accent-soft: rgba(61, 219, 180, 0.12);
  --accent-line: rgba(61, 219, 180, 0.45);
  --glow: rgba(61, 219, 180, 0.16);
  --grid: rgba(160, 185, 220, 0.06);
  --header-bg: rgba(7, 10, 16, 0.78);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --photo-filter: saturate(0.85) contrast(1.05);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f9;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #e8ecf3;
  --line: rgba(15, 30, 55, 0.12);
  --line-strong: rgba(15, 30, 55, 0.24);
  --text: #0a1220;
  --muted: #445267;
  --faint: #5a6880;
  --accent: #006b56;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 107, 86, 0.09);
  --accent-line: rgba(0, 107, 86, 0.4);
  --glow: rgba(0, 150, 120, 0.14);
  --grid: rgba(15, 30, 55, 0.055);
  --header-bg: rgba(243, 245, 249, 0.82);
  --shadow: 0 30px 60px -34px rgba(15, 30, 55, 0.28);
  --photo-filter: none;
}

/* =============================================================== 3. BASE == */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

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

p {
  margin: 0 0 1.1em;
}
p:last-child {
  margin-bottom: 0;
}
/* Long German compounds must never widen the page. */
p,
li {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  /* Long German compounds must break on phones instead of overflowing. */
  overflow-wrap: break-word;
  hyphens: auto;
  hyphenate-limit-chars: 12 5 5;
}
h1 {
  font-size: clamp(2.05rem, 1.15rem + 3.7vw, 4rem);
}
h2 {
  font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.7rem);
}
h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 300;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transition: top var(--fast);
}
.skip-link:focus {
  top: 1rem;
}

/* Reading progress along the top edge. Pure CSS, only where supported. */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .progress {
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes progress {
  to {
    transform: scaleX(1);
  }
}

/* ============================================================= 4. LAYOUT == */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}
.section-alt {
  background: var(--bg-2);
}

main {
  counter-reset: section;
}

/* Mono label above headings. Numbered automatically inside sections. */
.kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.section .section-head .kicker::before {
  counter-increment: section;
  content: counter(section, decimal-leading-zero) " /";
  color: var(--faint);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.25rem, 5vw, 3.75rem);
}
.section-sub,
.lead {
  margin: 1.25rem 0 0;
  max-width: 40rem;
  font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-block: 0.25rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  transition: border-color var(--fast), gap var(--fast);
}
.text-link:hover {
  border-color: var(--accent);
  gap: 0.7rem;
}

.spaced-top {
  margin-top: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 600 1rem/1.2 var(--font-sans);
  cursor: pointer;
  transition: background var(--fast), border-color var(--fast), color var(--fast),
    box-shadow var(--fast), transform var(--fast);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  box-shadow: 0 0 0 4px var(--accent-soft), 0 12px 32px -12px var(--accent);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-sm {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
}
.btn-block {
  width: 100%;
}

/* Panel used all over the site. The spotlight follows the pointer (main.js). */
.card {
  position: relative;
  display: block;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  transition: border-color var(--fast), transform var(--fast), box-shadow var(--fast);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(20rem circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 65%);
  opacity: 0;
  transition: opacity 300ms var(--ease);
  pointer-events: none;
}
.card:hover::after {
  opacity: 1;
}
.card > * {
  position: relative;
  z-index: 1;
}
a.card:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* Check list: used for service bullets and topic pages. */
.checks {
  display: grid;
  gap: 0.7rem 2rem;
}
.checks li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--muted);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.42em;
  width: 0.42rem;
  height: 0.78rem;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tags li {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--surface);
}

/* ============================================================= 5. HEADER == */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
  min-height: 2.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark-mark {
  flex: none;
  color: var(--accent);
}
.wordmark-sub {
  display: none;
  margin-left: 0.65rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.nav {
  display: none;
  gap: 0.25rem;
}
.nav a {
  position: relative;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--fast), background var(--fast);
}
.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.nav a[aria-current="page"] {
  color: var(--text);
}
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn,
.lang-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--fast), border-color var(--fast), background var(--fast);
}
.icon-btn:hover,
.lang-btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* Sun in dark mode (click to go light), moon in light mode. */
[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
  display: none;
}

.nav-cta {
  display: none;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem var(--gutter) 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.mobile-nav.is-open {
  display: flex;
}
.mobile-nav a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.mobile-nav a:not(.btn):hover {
  background: var(--surface-2);
}
.mobile-nav a[aria-current="page"] {
  color: var(--accent);
}
.mobile-nav .mobile-lang {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
}
.mobile-nav .btn {
  margin-top: 0.75rem;
}
/* Without JS the menu button cannot open anything: show the links instead. */
html:not(.js) .menu-toggle {
  display: none;
}
html:not(.js) .mobile-nav {
  display: flex;
}

/* =============================================================== 6. HERO == */
.hero,
.page-hero {
  position: relative;
  overflow: hidden;
}
.hero {
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3.5rem, 8vw, 6.5rem);
}
.page-hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4.5rem);
}

/* Fine grid that fades out, a soft glow, and a slow scan line. */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 34rem at 88% -8%, var(--glow), transparent 62%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 96%);
  mask-image: linear-gradient(180deg, #000 35%, transparent 96%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 9rem;
  background: linear-gradient(180deg, transparent, var(--accent-soft) 85%, var(--accent-line));
  opacity: 0.5;
  animation: scan 9s linear infinite;
}
@keyframes scan {
  from {
    transform: translateY(-10rem);
  }
  to {
    transform: translateY(110vh);
  }
}

.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
.hero-copy {
  max-width: 44rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.5rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.status-dot {
  position: relative;
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(3.4);
    opacity: 0;
  }
}

.hero-slogan {
  margin: 1.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.6rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--accent);
}
.hero-sub {
  margin: 1rem 0 0;
  max-width: 36rem;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

/* -- Radar: the frameworks orbit the person who runs the program. -- */
.radar {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
}
.radar-disc {
  position: relative;
  width: min(100%, 17rem);
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--accent-soft), transparent 68%),
    linear-gradient(var(--line), var(--line)) 50% 50% / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 50% 50% / 100% 1px no-repeat;
}
.radar-ring {
  position: absolute;
  inset: 15%;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: spin 60s linear infinite;
}
.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 285deg, var(--accent-line) 360deg);
  opacity: 0.55;
  animation: spin 9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.radar-photo {
  position: absolute;
  inset: 27%;
  margin: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 0 0 6px var(--bg), 0 0 48px var(--glow);
}
.radar-photo picture {
  display: block;
  height: 100%;
}
.radar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: var(--photo-filter);
}
.radar-caption {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.radar-nodes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.radar-nodes li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
  animation: ping 9s linear infinite;
}
.radar-nodes li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}
/* Each node lights up when the sweep passes its angle. */
@keyframes ping {
  0%,
  14%,
  100% {
    border-color: var(--line-strong);
    box-shadow: none;
  }
  2% {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), 0 0 24px var(--glow);
  }
}
.radar-nodes li:nth-child(1) { animation-delay: -7.75s; }   /*  50deg */
.radar-nodes li:nth-child(2) { animation-delay: -1.25s; }   /* 310deg */
.radar-nodes li:nth-child(3) { animation-delay: -6.75s; }   /*  90deg */
.radar-nodes li:nth-child(4) { animation-delay: -2.25s; }   /* 270deg */
.radar-nodes li:nth-child(5) { animation-delay: -5.75s; }   /* 130deg */
.radar-nodes li:nth-child(6) { animation-delay: -3.25s; }   /* 230deg */
.radar-nodes li:nth-child(7) { animation-delay: -4.5s; }    /* 180deg */
.radar-nodes li:nth-child(8) { animation-delay: 0s; }       /*   0deg */

/* ============================================================ 7. SECTIONS = */
.split {
  display: grid;
  gap: clamp(1.5rem, 5vw, 4rem);
}
.split .section-head {
  margin-bottom: 0;
}
.split-body {
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.22rem);
  line-height: 1.7;
  color: var(--muted);
}
.split-body .text-link {
  margin-top: 1.75rem;
  font-size: 1rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
}
.card-grid > li {
  display: grid;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.card-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
}
.card-title {
  margin-bottom: 0.6rem;
}
.card-text {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}
.card-arrow {
  margin-top: auto;
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  color: var(--accent);
  transition: transform var(--fast);
}
a.card:hover .card-arrow {
  transform: translateX(6px);
}

.story-list {
  display: grid;
  gap: 1rem;
}
.story {
  padding: clamp(1.6rem, 4vw, 2.5rem);
}
.tag {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.story h3 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
}
.story p:last-child {
  color: var(--muted);
}

/* ============================================================ 8. SERVICES = */
.service-list {
  display: grid;
  gap: 1rem;
}
.service {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.service-side {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.service-index {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.service h2 {
  font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem);
}
.service-desc {
  margin: 0.9rem 0 1.6rem;
  max-width: 44rem;
  font-size: 1.08rem;
  color: var(--muted);
}
.service-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 1.75rem 0 0;
}
.page-jump {
  margin-top: 1.75rem;
}

.network-list {
  display: grid;
  gap: 1rem;
}
.network-item {
  padding: 1.4rem 1.5rem;
}
.network-item h3 {
  margin-bottom: 0.4rem;
  font-size: 1.08rem;
}
.network-item p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.expertise-groups {
  display: grid;
  gap: 2.5rem;
}
.expertise-group h3 {
  margin-bottom: 1.1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}

/* Three steps on a line. */
.steps {
  display: grid;
  gap: 2.25rem;
  counter-reset: none;
}
.step {
  position: relative;
  padding-left: 4.25rem;
}
.step-num {
  position: absolute;
  left: 0;
  top: -0.25rem;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 3rem;
  bottom: -2.25rem;
  width: 1px;
  background: linear-gradient(var(--accent-line), var(--line));
}
.step h3 {
  margin-bottom: 0.4rem;
  font-size: 1.35rem;
}
.step p {
  color: var(--muted);
}

/* =============================================================== 9. ABOUT = */
.about-grid {
  position: relative;
  display: grid;
  gap: clamp(2.25rem, 6vw, 4.5rem);
  align-items: start;
}
.portrait {
  margin: 0;
  max-width: 24rem;
}
.portrait-frame {
  position: relative;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
/* Corner brackets, like a viewfinder. */
.portrait-frame::before,
.portrait-frame::after {
  content: "";
  position: absolute;
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--accent);
}
.portrait-frame::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: var(--radius);
}
.portrait-frame::after {
  right: -1px;
  bottom: -1px;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: var(--radius);
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  filter: var(--photo-filter);
}
.portrait figcaption {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.1rem;
}
.portrait figcaption strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.portrait figcaption span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.about-copy h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.2rem);
}
.about-sub {
  margin: 1.5rem 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--accent);
  hyphens: manual;
}
.about-body {
  max-width: 42rem;
  color: var(--muted);
}

/* ======================================================= 10. QUOTE + CTA = */
.quote {
  position: relative;
  margin: 0;
  max-width: 58rem;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
  overflow: hidden;
}
.quote::before {
  content: "\201C";
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  top: -0.14em;
  font-family: var(--font-display);
  font-size: clamp(9rem, 22vw, 17rem);
  line-height: 1;
  color: var(--accent);
  opacity: 0.1;
  pointer-events: none;
}
.quote blockquote {
  position: relative;
  margin: 0;
  color: var(--muted);
}
.quote-highlight {
  display: block;
  margin: 1.25rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}
.quote figcaption {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}
.quote figcaption::before {
  content: "";
  flex: none;
  width: 2rem;
  height: 1px;
  background: var(--accent);
}

.cta-panel {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid var(--accent-line);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(40rem 20rem at 100% 0%, var(--glow), transparent 65%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--surface);
  overflow: hidden;
}
.cta-panel h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
}
.cta-panel p {
  margin: 0.9rem 0 0;
  font-size: 1.12rem;
  color: var(--muted);
}

/* ============================================================ 11. CONTACT = */
.contact-grid {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: start;
}
.contact-details {
  display: grid;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.contact-detail-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
}
.contact-detail-text {
  display: grid;
  min-width: 0;
}
.contact-detail-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.contact-detail-text a {
  padding-block: 0.15rem;
  font-weight: 500;
  overflow-wrap: anywhere;
  transition: color var(--fast);
}
.contact-detail-text a:hover {
  color: var(--accent);
}

.contact-form {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
/* The form only builds an email via JS: without JS, show the hint instead. */
html:not(.js) .contact-form {
  display: none;
}
.form-noscript {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}
.form-noscript a {
  color: var(--accent);
  text-decoration: underline;
}
.field {
  margin-bottom: 1.25rem;
}
.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.field textarea {
  min-height: 9rem;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
  opacity: 1;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.form-hint {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--faint);
}
.form-status {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: var(--accent);
}
.form-status:empty {
  display: none;
}

/* ============================================================== 12. TOPIC = */
.topic-grid {
  display: grid;
  gap: 1rem;
}
.topic-card h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.8rem);
}
.topic-card .checks {
  gap: 0.85rem;
}

.faq {
  max-width: 52rem;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem);
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  transition: color var(--fast);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--accent);
  transition: transform var(--fast), background var(--fast);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  background: var(--accent-soft);
}
.faq summary:hover {
  color: var(--accent);
}
.faq details p {
  max-width: 44rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
}

/* ====================================================== 13. LEGAL + 404 == */
.legal h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
}
.legal-note {
  margin: 1.5rem 0 0;
  padding: 0.9rem 1.1rem;
  max-width: 44rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  font-size: 0.98rem;
  color: var(--text);
}
.legal-content {
  max-width: 44rem;
  margin-top: 2.5rem;
  overflow-wrap: anywhere;
}
.legal-content h2 {
  margin: 2.75rem 0 0.9rem;
  font-size: 1.4rem;
  hyphens: manual;
}
.legal-content h2:first-child {
  margin-top: 0;
}
.legal-content h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.1rem;
}
.legal-content p,
.legal-content address,
.legal-content li {
  color: var(--muted);
  font-style: normal;
}
.legal-content address {
  margin-bottom: 1.1em;
}
.legal-content ul {
  margin: 0 0 1.1em;
  padding-left: 1.25rem;
  list-style: disc;
}
.legal-content li {
  margin-bottom: 0.4rem;
}
.legal-content li::marker {
  color: var(--accent);
}
.legal-content code {
  padding: 0.1em 0.4em;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.notfound-code {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: clamp(4.5rem, 20vw, 11rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
}
.notfound h2 {
  margin-top: 3rem;
  font-size: 1.5rem;
}
.notfound p {
  margin: 0.75rem 0 1rem;
  color: var(--muted);
}

/* ============================================================= 14. FOOTER = */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-top: clamp(2.75rem, 6vw, 4.5rem);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.75rem;
}
.footer-brand {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  max-width: 22rem;
}
.footer-brand .wordmark {
  margin: 0;
}
.footer-tagline {
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-h {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.footer-col ul {
  display: grid;
  gap: 0.15rem;
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  color: var(--muted);
  font-size: 0.97rem;
  transition: color var(--fast);
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-bottom {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--faint);
}

/* ============================================================= 15. MOTION = */
/* Only with JS: without it, everything stays visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Soft cross-fade between pages where the browser supports it. */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .progress {
    display: none;
  }
  @view-transition {
    navigation: none;
  }
}

/* ========================================================== RESPONSIVE ====
   Mobile first: everything above is the phone layout. */

/* Smallest phones: the header row must fit into 320px. */
@media (max-width: 359px) {
  .header-inner {
    gap: 0.5rem;
  }
  .header-actions {
    gap: 0.3rem;
  }
  .wordmark {
    gap: 0.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 479px) {
  p,
  li {
    hyphens: auto;
    hyphenate-limit-chars: 14 5 5;
  }
}

@media (min-width: 480px) {
  .wordmark-sub {
    display: inline;
  }
  .radar-disc {
    width: min(100%, 20rem);
  }
}

@media (min-width: 640px) {
  .checks-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .services-cards,
  .story-list,
  .network-list,
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .cta-panel {
    grid-template-columns: 1fr auto;
  }
}

/* Two columns: an odd last card fills its row. */
@media (min-width: 640px) and (max-width: 899px) {
  .services-cards > li:last-child:nth-child(odd) {
    grid-column: span 2;
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
  .menu-toggle,
  .mobile-nav,
  .mobile-nav.is-open,
  html:not(.js) .mobile-nav {
    display: none;
  }
  .wordmark-sub {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  /* Nodes sit on the rim of the disc instead of below it. */
  .radar {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 3.25rem;
    gap: 0;
  }
  .radar-disc {
    grid-area: 1 / 1;
    width: 100%;
    max-width: 27rem;
  }
  .radar-nodes {
    grid-area: 1 / 1;
    position: relative;
    display: block;
    width: 100%;
    max-width: 27rem;
    aspect-ratio: 1;
  }
  .radar-caption {
    grid-area: 2 / 1;
    margin-top: 2.25rem;
  }
  .radar-nodes li {
    position: absolute;
    transform: translate(-50%, -50%);
  }
  /* Long labels sit at the top and bottom, where there is room sideways. */
  .radar-nodes li:nth-child(1) { left: 87%; top: 19%; }
  .radar-nodes li:nth-child(2) { left: 13%; top: 19%; }
  .radar-nodes li:nth-child(3) { left: 100%; top: 50%; }
  .radar-nodes li:nth-child(4) { left: 0%; top: 50%; }
  .radar-nodes li:nth-child(5) { left: 87%; top: 81%; }
  .radar-nodes li:nth-child(6) { left: 13%; top: 81%; }
  .radar-nodes li:nth-child(7) { left: 50%; top: 100%; }
  .radar-nodes li:nth-child(8) { left: 50%; top: 0%; }

  .split {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
  .services-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* Three columns: with one card left over, the first and last are wide. */
  .services-cards > li:first-child:nth-last-child(3n + 1),
  .services-cards > li:last-child:nth-child(3n + 1) {
    grid-column: span 2;
  }
  .network-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .expertise-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem 3.5rem;
  }

  .service {
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 2rem;
  }
  .service-side {
    flex-direction: column;
    align-items: flex-start;
  }
  .service .card-icon {
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.8rem;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
  .step {
    padding: 4.5rem 0 0;
  }
  .step-num {
    top: 0;
  }
  .step:not(:last-child)::before {
    left: 3rem;
    right: -2rem;
    top: 1.5rem;
    bottom: auto;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-line), var(--line));
  }

  .about-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
  .portrait {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .footer-grid {
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: auto;
  }
}

@media (min-width: 1024px) {
  .nav-cta {
    display: inline-flex;
  }
}

@media (min-width: 1200px) {
  .wordmark-sub {
    display: inline;
  }
}
