/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection {
  background: rgba(91,140,90,0.3);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   DESIGN TOKENS — DARK (default)
   ═══════════════════════════════════════════ */
:root {
  --bg-deep: #0F1114;
  --bg-raised: #161920;
  --bg-card: #1C2028;
  --bg-surface: #232830;
  --text-primary: #E0DDD6;
  --text-secondary: #8B8D8A;
  --text-tertiary: #5A5C59;
  --moss: #5B8C5A;
  --moss-light: #6FA36E;
  --moss-dim: rgba(91,140,90,0.12);
  --moss-glow: rgba(91,140,90,0.06);
  --warm: #C2873E;
  --warm-light: #D4A05C;
  --warm-dim: rgba(194,135,62,0.12);
  --warm-glow: rgba(194,135,62,0.06);
  --border: rgba(91,140,90,0.1);
  --border-strong: rgba(91,140,90,0.2);
  --logo-filter: grayscale(100%) brightness(2);
  --logo-filter-hover: grayscale(30%) brightness(1.6);
  --logo-opacity: 0.55;
  --canvas-alpha: 0.35;
  --pattern-svg-color: #5B8C5A;
  --font-display: 'Fraunces', serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --wrap: 1200px;
  --wrap-wide: 1400px;
  --wrap-narrow: 740px;
}

/* ═══════════════════════════════════════════
   DESIGN TOKENS — LIGHT
   Triggered by OS preference or data-theme
   ═══════════════════════════════════════════ */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-deep: #F5F4F1;
    --bg-raised: #ECEAE5;
    --bg-card: #E3E1DC;
    --bg-surface: #DAD8D3;
    --text-primary: #1a1a18;
    --text-secondary: #555550;
    --text-tertiary: #8A8A85;
    --moss: #4A7A49;
    --moss-light: #5B8C5A;
    --moss-dim: rgba(74,122,73,0.1);
    --moss-glow: rgba(74,122,73,0.05);
    --warm: #A87235;
    --warm-light: #C2873E;
    --warm-dim: rgba(168,114,53,0.1);
    --warm-glow: rgba(168,114,53,0.05);
    --border: rgba(74,122,73,0.12);
    --border-strong: rgba(74,122,73,0.22);
    --logo-filter: grayscale(100%) brightness(0.8);
    --logo-filter-hover: grayscale(30%) brightness(0.9);
    --logo-opacity: 0.45;
    --canvas-alpha: 0.25;
    --pattern-svg-color: #4A7A49;
    --pattern-grid-opacity: 0.18;
    --pattern-hex-opacity: 0.14;
    --pattern-flow-opacity: 0.18;
    --pattern-interference-opacity: 0.12;
    --flow-accent-opacity: 0.12;
    --contour-opacity: 0.1;
  }
}
/* Manual override: [data-theme="light"] on html */
:root[data-theme="light"] {
  --bg-deep: #F5F4F1;
  --bg-raised: #ECEAE5;
  --bg-card: #E3E1DC;
  --bg-surface: #DAD8D3;
  --text-primary: #1a1a18;
  --text-secondary: #555550;
  --text-tertiary: #8A8A85;
  --moss: #4A7A49;
  --moss-light: #5B8C5A;
  --moss-dim: rgba(74,122,73,0.1);
  --moss-glow: rgba(74,122,73,0.05);
  --warm: #A87235;
  --warm-light: #C2873E;
  --warm-dim: rgba(168,114,53,0.1);
  --warm-glow: rgba(168,114,53,0.05);
  --border: rgba(74,122,73,0.12);
  --border-strong: rgba(74,122,73,0.22);
  --logo-filter: grayscale(100%) brightness(0.8);
  --logo-filter-hover: grayscale(30%) brightness(0.9);
  --logo-opacity: 0.45;
  --canvas-alpha: 0.25;
  --pattern-svg-color: #4A7A49;
  --pattern-grid-opacity: 0.18;
  --pattern-hex-opacity: 0.14;
  --pattern-flow-opacity: 0.18;
  --pattern-interference-opacity: 0.12;
  --flow-accent-opacity: 0.12;
  --contour-opacity: 0.1;
}

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 3rem;
}
.wrap-wide {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 0 4rem;
}
.wrap-narrow {
  max-width: var(--wrap-narrow);
  margin: 0 auto;
  padding: 0 3rem;
}

/* Asymmetric split layouts */
.split {
  display: grid;
  gap: 4rem;
  align-items: start;
}
.split-2-1 {
  grid-template-columns: 2fr 1fr;
}
.split-1-2 {
  grid-template-columns: 1fr 2fr;
}
.split-side-sticky {
  position: sticky;
  top: 8rem;
}
@media (max-width: 900px) {
  .split-2-1,
  .split-1-2 {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .split-side-sticky {
    position: static;
  }
}

/* ═══════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 4rem;
  transition: background 0.4s ease, border-color 0.4s ease;
}
nav.scrolled {
  background: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-wordmark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  font-variation-settings: 'opsz' 72, 'WONK' 1;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s;
  font-size: 1rem;
  line-height: 1;
}
.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}
/* Show sun in dark mode, moon in light mode */
#theme-icon-moon { display: none; }
:root[data-theme="light"] #theme-icon-sun { display: none; }
:root[data-theme="light"] #theme-icon-moon { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) #theme-icon-sun { display: none; }
  :root:not([data-theme="dark"]) #theme-icon-moon { display: inline; }
}

.nav-links .nav-cta {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bg-deep);
  background: var(--moss);
  padding: 7px 18px;
  border-radius: 4px;
  transition: background 0.2s;
}
.nav-links .nav-cta:hover {
  background: var(--moss-light);
  color: var(--bg-deep);
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  margin-left: 1rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 4px 0;
  transition: transform 0.25s, opacity 0.2s;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu drawer */
.nav-menu[hidden] { display: none; }
.nav-menu {
  display: flex;
  flex-direction: column;
  padding: 1rem 4rem 1.4rem;
  gap: 0.9rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-deep) 96%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-family: var(--font-body);
}
.nav-menu a {
  color: var(--text-secondary);
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-menu a:hover { color: var(--text-primary); }
.nav-menu a.nav-cta {
  align-self: flex-start;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bg-deep) !important;
  background: var(--moss);
  padding: 7px 18px;
  border-radius: 4px;
  margin-top: 0.4rem;
}
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-links .nav-cta { display: none; }
  .nav-links .theme-toggle { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 600px) {
  .nav-menu { padding: 1rem 1.25rem 1.4rem; }
}

/* Section labels */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 1.5rem;
  display: block;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: linear-gradient(to bottom, transparent, var(--bg-deep));
  pointer-events: none;
  z-index: 1;
}
/* Hero flow field canvas */
#hero-flow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: var(--canvas-alpha);
  z-index: 0;
}

/* Blueprint grid overlay — subtle technical texture */
.blueprint-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image:
    linear-gradient(var(--moss) 1px, transparent 1px),
    linear-gradient(90deg, var(--moss) 1px, transparent 1px);
  background-size: 80px 80px;
}
/* Cross-hair marks at grid intersections */
.blueprint-grid::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle, var(--moss) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.5;
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-descriptor {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 2rem;
  display: block;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'WONK' 1;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  max-width: 860px;
  margin-bottom: 2rem;
}
.hero-sub {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 3rem;
}
.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--bg-deep);
  background: var(--moss);
  padding: 11px 26px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--moss-light); }
.btn-ghost {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--warm);
  background: transparent;
  padding: 11px 26px;
  border-radius: 4px;
  border: 1px solid rgba(194,135,62,0.25);
  text-decoration: none;
  transition: all 0.2s;
}
.btn-ghost:hover {
  border-color: var(--warm);
  background: var(--warm-dim);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}
.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}
.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--text-tertiary), transparent);
  animation: pulse-down 2s ease infinite;
}
@keyframes pulse-down {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════
   THE PROBLEM — SCROLLY SECTION
   ═══════════════════════════════════════════ */
.problem-section {
  padding: 8rem 0;
  position: relative;
}
/* problem-section divider handled by SVG flow-accent */
.problem-statement {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  font-variation-settings: 'opsz' 72;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 2rem;
  max-width: 780px;
}
.problem-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.75;
}
.problem-body em {
  color: var(--warm-light);
  font-style: normal;
}

/* Counter terms — stacked aside variant */
.counter-terms-aside {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  align-self: start;
  margin-top: 3rem;
}
.counter-term {
  padding: 1.75rem;
  position: relative;
}
.counter-term + .counter-term {
  border-top: 1px solid var(--border);
}
.counter-term--warm {
  background: color-mix(in srgb, var(--warm-dim) 60%, transparent);
}
.counter-term h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}
.counter-term--warm h3 { color: var(--warm-light); }
.counter-term p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.counter-term .term-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.6rem;
  display: block;
}

/* ═══════════════════════════════════════════
   APPROACH — RESEARCH AS FRAME
   ═══════════════════════════════════════════ */
.approach-section {
  padding: 8rem 0;
  position: relative;
}

/* SVG section dividers — replace flat gradient lines */
.svg-divider {
  width: 100%;
  height: 40px;
  display: block;
  position: relative;
  z-index: 1;
  color: var(--moss);
}
/* Override inline SVG colors via CSS */
.svg-divider line,
.svg-divider path { stroke: currentColor; }
.svg-divider circle { stroke: currentColor; }
.svg-divider--flow circle { fill: currentColor; stroke: none; }

/* Organic SVG background colors handled via currentColor on their parent rules */
.approach-head {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.approach-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════
   FROSTED CARD — glass effect over patterns
   Patterns show through section bg, cards blur them
   ═══════════════════════════════════════════ */
.research-loop,
.service-card,
.principle-card,
.person-card,
.counter-terms-aside,
.stack-list,
.notes-aside {
  background: color-mix(in srgb, var(--bg-raised) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Research loop visual — stacks in split layout */
.research-loop {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 3rem;
}
.split .research-loop {
  grid-template-columns: 1fr;
}
.split .loop-step {
  border-right: none;
  border-bottom: 1px solid var(--border);
}
.split .loop-step:last-child { border-bottom: none; }
.split .loop-step::after { content: none; }
.loop-step {
  padding: 2rem;
  border-right: 1px solid var(--border);
  position: relative;
}
.loop-step:last-child { border-right: none; }
.loop-step .step-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--moss);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: block;
}
.loop-step h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.loop-step p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
/* Arrow connectors */
.loop-step::after {
  content: '\2192';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--moss);
  z-index: 2;
  background: var(--bg-deep);
  padding: 4px 2px;
}
.loop-step:last-child::after { content: none; }

@media (max-width: 700px) {
  .research-loop { grid-template-columns: 1fr; }
  .loop-step { border-right: none; border-bottom: 1px solid var(--border); }
  .loop-step:last-child { border-bottom: none; }
  .loop-step::after { content: none; }
}

/* ═══════════════════════════════════════════
   SERVICES — WHAT WE DO
   ═══════════════════════════════════════════ */
.services-section {
  padding: 8rem 0;
  position: relative;
}
.services-head {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.services-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 3rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  transition: border-color 0.2s;
}
.service-card:hover {
  border-color: var(--border-strong);
}
/* Phosphor icon in service cards */
.service-icon-wrap {
  margin-bottom: 1.25rem;
}
.service-icon-wrap i {
  font-size: 1.8rem;
  color: var(--moss);
  opacity: 0.8;
}
.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   OPEN SOURCE STACK
   ═══════════════════════════════════════════ */
.stack-section {
  padding: 8rem 0;
  position: relative;
}
.stack-head {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.stack-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 3rem;
}

.stack-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.stack-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  color: inherit;
  text-decoration: none;
}
.stack-item:last-child { border-bottom: none; }
.stack-item:hover { background: color-mix(in srgb, var(--bg-raised) 50%, transparent); }
.stack-item .stack-name {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--moss);
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.stack-item .stack-name i {
  font-size: 1.1rem;
  opacity: 0.6;
}
.stack-item .stack-desc {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
}
.stack-item .stack-desc p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .stack-item { grid-template-columns: 1fr; }
  .stack-item .stack-name { border-right: none; border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; }
  .stack-item .stack-desc { padding: 1rem 1.25rem; }
}

/* ═══════════════════════════════════════════
   PRINCIPLES
   ═══════════════════════════════════════════ */
.principles-section {
  padding: 8rem 0;
  position: relative;
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
@media (max-width: 700px) {
  .principles-grid { grid-template-columns: 1fr; }
}
.principle-card {
  padding: 2rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.principle-card .p-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--moss);
  margin-bottom: 0.75rem;
  display: block;
}
.principle-icon {
  margin-bottom: 1rem;
}
.principle-icon i {
  font-size: 1.6rem;
  color: var(--moss);
  opacity: 0.6;
}
.principle-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.principle-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   FIELD NOTES
   ═══════════════════════════════════════════ */
.notes-section {
  padding: 8rem 0;
  position: relative;
}
.notes-list {
  list-style: none;
  margin-top: 2rem;
}
.notes-list li {
  border-bottom: 1px solid var(--border);
}
.notes-list li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0;
  text-decoration: none;
  transition: color 0.2s;
}
.notes-list li a:hover { color: var(--moss-light); }
.notes-list .note-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
}
.notes-list .note-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-left: 1.5rem;
  letter-spacing: 0.04em;
}
.notes-list .note-type--technical { color: var(--moss); opacity: 0.85; }
.notes-list .note-type--essay { color: var(--text-secondary); opacity: 0.7; }
.notes-list .note-type--agony { color: var(--warm); opacity: 0.85; }

/* Notes aside — type legend */
.notes-aside {
  margin-top: 3.5rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.notes-aside-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
}
.notes-type-legend {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.type-item {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.type-dot--technical { background: var(--moss); opacity: 0.7; }
.type-dot--essay { background: var(--text-secondary); opacity: 0.5; }
.type-dot--agony { background: var(--warm); opacity: 0.5; }

/* ═══════════════════════════════════════════
   PEOPLE
   ═══════════════════════════════════════════ */
.people-section {
  padding: 8rem 0;
  position: relative;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 600px) {
  .people-grid { grid-template-columns: 1fr; }
}
.person-card {
  padding: 1.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.person-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.person-avatar {
  display: block;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft, #f3f0ea);
  border: 1px solid var(--border);
}
.person-meta {
  min-width: 0;
}
.person-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}
.person-card .role {
  font-size: 0.82rem;
  color: var(--warm);
  margin-bottom: 0;
}
.person-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.person-links {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.person-links a {
  color: var(--warm);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.person-links a:hover {
  border-bottom-color: currentColor;
}

/* ═══════════════════════════════════════════
   CONTACT / CTA
   ═══════════════════════════════════════════ */
.cta-section {
  padding: 8rem 0 10rem;
  text-align: center;
  position: relative;
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  font-variation-settings: 'opsz' 72;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.cta-section p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-email {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--warm);
  text-decoration: none;
  border-bottom: 1px solid rgba(194,135,62,0.3);
  transition: border-color 0.2s;
  margin-top: 1.5rem;
  display: inline-block;
}
.cta-email:hover { border-bottom-color: var(--warm); }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}
footer p {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════
   ORGANIC SECTION DIVIDERS
   ═══════════════════════════════════════════ */
.section-divider {
  width: 100%;
  height: 60px;
  display: block;
  opacity: 0.15;
}
.section-divider path {
  fill: none;
  stroke: var(--moss);
  stroke-width: 0.5;
}

/* ═══════════════════════════════════════════
   BACKGROUND PATTERNS
   ═══════════════════════════════════════════ */
.pattern-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  color: var(--moss);
  /* Horizontal fade — patterns dissolve toward the right */
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0) 80%);
  mask-image: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0) 80%);
}
/* Pattern SVGs — stroke only, no fills */
.pattern-bg svg circle { fill: none; stroke: currentColor; }
.pattern-bg svg path { fill: none; stroke: currentColor; }
.pattern-bg svg rect[fill] { fill: none; } /* kill pattern rect fills */

/* Displaced grid — SVG dot matrix with organic offset rows */
.pattern-displaced-grid {
  opacity: var(--pattern-grid-opacity, 0.06);
}

/* Hex network — SVG-based, injected per section */
.pattern-hex {
  opacity: var(--pattern-hex-opacity, 0.045);
}

/* Flow lines — parallel organic waves */
.pattern-flow-lines {
  opacity: var(--pattern-flow-opacity, 0.06);
}

/* Interference — concentric rings from offset centres */
.pattern-interference {
  opacity: var(--pattern-interference-opacity, 0.035);
  /* Interference fades from right instead — offset the source centres */
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0) 80%);
  mask-image: linear-gradient(to left, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0) 80%);
}

/* Contour lines background for approach section */
.contour-bg {
  position: absolute;
  top: 0; right: 0;
  width: 50%;
  height: 100%;
  opacity: var(--contour-opacity, 0.04);
  pointer-events: none;
  z-index: 0;
  color: var(--moss);
}
.contour-bg ellipse { stroke: currentColor; fill: none; }

/* Blueprint annotation marks */
.blueprint-mark {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--moss);
  opacity: 0.2;
  position: absolute;
}
.blueprint-mark::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid var(--moss);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  opacity: 0.5;
}

/* Dimension lines on cards */
.service-card {
  position: relative;
}
.service-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: linear-gradient(to right,
    transparent,
    var(--moss) 20%,
    var(--moss) 80%,
    transparent
  );
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}
.service-card:hover::before {
  opacity: 0.3;
}

/* Organic flow accent for problem section */
.flow-accent {
  position: absolute;
  top: 0;
  left: -10%;
  width: 120%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: var(--flow-accent-opacity, 0.05);
  color: var(--moss);
}
.flow-accent path {
  stroke: currentColor;
  fill: none;
  animation: flow-drift 20s ease-in-out infinite alternate;
}
.flow-accent path:nth-child(2) { animation-delay: -3s; animation-duration: 25s; }
.flow-accent path:nth-child(3) { animation-delay: -7s; animation-duration: 22s; }
.flow-accent path:nth-child(4) { animation-delay: -11s; animation-duration: 28s; }
.flow-accent path:nth-child(5) { animation-delay: -15s; animation-duration: 24s; }

@keyframes flow-drift {
  0% { transform: translateY(0px) translateX(0px); }
  33% { transform: translateY(8px) translateX(-5px); }
  66% { transform: translateY(-5px) translateX(8px); }
  100% { transform: translateY(3px) translateX(-3px); }
}

/* Contour lines breathe too */
.contour-bg ellipse {
  animation: contour-pulse 15s ease-in-out infinite alternate;
}
.contour-bg ellipse:nth-child(2) { animation-delay: -2s; }
.contour-bg ellipse:nth-child(3) { animation-delay: -4s; }
.contour-bg ellipse:nth-child(4) { animation-delay: -6s; }
.contour-bg ellipse:nth-child(5) { animation-delay: -8s; }
.contour-bg ellipse:nth-child(6) { animation-delay: -10s; }
.contour-bg ellipse:nth-child(7) { animation-delay: -3s; }
.contour-bg ellipse:nth-child(8) { animation-delay: -7s; }

@keyframes contour-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.7; }
  100% { transform: scale(0.97); opacity: 1; }
}

/* Sections get relative positioning for overlays */
.problem-section,
.approach-section,
.services-section,
.stack-section,
.principles-section,
.people-section {
  position: relative;
  overflow: hidden;
}
/* Content sits above patterns */
.services-section > .wrap,
.stack-section > .wrap,
.principles-section > .wrap,
.people-section > .wrap {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   SOCIAL PROOF
   ═══════════════════════════════════════════ */
.proof-section {
  padding: 6rem 0;
  position: relative;
}
.proof-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 2.5rem;
  display: block;
}
.proof-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}
.proof-logo {
  height: 130px;
  width: auto;
  filter: var(--logo-filter);
  opacity: var(--logo-opacity);
  transition: opacity 0.3s, filter 0.3s;
}
.proof-logo:hover {
  opacity: 0.9;
  filter: var(--logo-filter-hover);
}
.proof-note {
  text-align: center;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════════ */

/* Hero entrance sequence */
.hero-content .hero-descriptor,
.hero-content h1,
.hero-content .hero-sub,
.hero-content .hero-ctas {
  opacity: 0;
  transform: translateY(30px);
  animation: hero-enter 0.9s ease forwards;
}
.hero-content .hero-descriptor { animation-delay: 0.2s; }
.hero-content h1 { animation-delay: 0.45s; }
.hero-content .hero-sub { animation-delay: 0.7s; }
.hero-content .hero-ctas { animation-delay: 0.95s; }

@keyframes hero-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-indicator {
  opacity: 0;
  animation: fade-in 0.6s ease forwards 1.5s;
}
@keyframes fade-in {
  to { opacity: 1; }
}

/* Scroll-triggered reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-stagger].revealed > * {
  opacity: 1;
  transform: translateY(0);
}
[data-stagger].revealed > *:nth-child(1) { transition-delay: 0s; }
[data-stagger].revealed > *:nth-child(2) { transition-delay: 0.1s; }
[data-stagger].revealed > *:nth-child(3) { transition-delay: 0.2s; }
[data-stagger].revealed > *:nth-child(4) { transition-delay: 0.3s; }
[data-stagger].revealed > *:nth-child(5) { transition-delay: 0.4s; }
[data-stagger].revealed > *:nth-child(6) { transition-delay: 0.5s; }
[data-stagger].revealed > *:nth-child(7) { transition-delay: 0.6s; }
[data-stagger].revealed > *:nth-child(8) { transition-delay: 0.7s; }
[data-stagger].revealed > *:nth-child(9) { transition-delay: 0.8s; }

/* Slide from left */
[data-reveal="left"] {
  transform: translateX(-40px);
}
[data-reveal="left"].revealed {
  transform: translateX(0);
}

/* Slide from right */
[data-reveal="right"] {
  transform: translateX(40px);
}
[data-reveal="right"].revealed {
  transform: translateX(0);
}

/* Scale reveal for counter-terms */
[data-reveal="scale"] {
  transform: scale(0.95);
}
[data-reveal="scale"].revealed {
  transform: scale(1);
}

/* Line draw for section dividers */
.line-reveal {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--border-strong);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.line-reveal.revealed {
  width: 100%;
}

/* Proof logos fade in sequence */
.proof-logos [data-reveal] {
  transform: translateY(15px);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
  .principles-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap, .wrap-wide, .wrap-narrow { padding: 0 1.25rem; }
  nav { padding: 0 1.25rem; }
  .hero { min-height: 85vh; }
  .hero h1 { font-size: clamp(2rem, 7vw, 2.6rem); }
  .nav-links a:not(.nav-cta) { display: none; }
  .proof-logos { gap: 2rem; }
  .proof-logo { height: 70px; }
  .research-loop { grid-template-columns: 1fr; }
  .loop-step { border-right: none; border-bottom: 1px solid var(--border); }
  .loop-step:last-child { border-bottom: none; }
  .loop-step::after { content: none; }
}
