/* ==========================================================================
   evbp.work stylesheet
   Everything visual derives from the design tokens below.
   Change a token here and it changes everywhere.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens (FIXED, from Evan's design system)
   -------------------------------------------------------------------------- */
:root {
  --bg: #1A1917;
  --bg-raised: #232220;
  --bg-sunken: #151412;
  --text: #F0EDE6;
  --subtle: rgba(240, 237, 230, 0.8);
  --secondary: rgba(240, 237, 230, 0.58);
  --muted: rgba(240, 237, 230, 0.55);
  --ink: #F0EDE6;
  --line: rgba(240, 237, 230, 0.9);
  --border: rgba(240, 237, 230, 0.14);
  --border-strong: rgba(240, 237, 230, 0.28);
  --dot: rgba(140, 135, 125, 0.16);
  --hero-light: rgba(255, 250, 240, 0.16);
  --radius: 5px;
  --max-w: 1200px;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
  --font-display: 'Newsreader', serif;
  --font-sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
  --dot-grid: radial-gradient(circle, var(--dot) 1px, transparent 1px);
}

/* --------------------------------------------------------------------------
   2. Base and reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--secondary);
  background-color: var(--bg);
  /* The signature dotted grid ground, on every page */
  background-image: var(--dot-grid);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

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

/* Left-aligned, sentence case, never bold */
h1, h2, h3 {
  color: var(--text);
  text-align: left;
}

a {
  color: var(--text);
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

a:hover {
  text-decoration-color: var(--text);
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link for keyboard users: hidden until focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-raised);
  color: var(--text);
  padding: 10px 18px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Visually hidden but available to screen readers and crawlers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Inline Lucide icons: plain SVG, stroked with currentColor so a colour
   class controls them. Sparse and consistent to match the light type. */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke-width: 1.5;
}

.icon-accent { color: var(--text); }
.icon-muted  { color: var(--muted); }
.icon-sm { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   3. Typography scale (FIXED)
   -------------------------------------------------------------------------- */
.hero-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 18em;
}

.section-title {
  font-family: var(--font-display);
  font-size: 38.4px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 16px;
}

.card-title {
  font-size: 20.8px;
  font-weight: 300;
  line-height: 1.35;
  margin-bottom: 10px;
}

.eyebrow {
  display: block;
  font-size: 12.48px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
}

.section-sub {
  max-width: 42em;
  margin-bottom: 0;
}

/* Small print / captions in muted */
.caption {
  font-size: 12.48px;
  line-height: 1.5;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 96px 0;
}

.section-head {
  margin-bottom: 48px;
}

/* --------------------------------------------------------------------------
   5. Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 25, 23, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

/* Brand is the logo image, never the text "evbp.work" */
.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14.5px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
}

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

/* Current page gets the accent color */
.nav-links a[aria-current="page"] {
  color: var(--text);
}

/* Mobile toggle: hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
}

.nav-toggle-bars {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top: 6px; }

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  padding: 13px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

/* --------------------------------------------------------------------------
   7. Hero, with the ambient neon light (Home) travelling over the dot grid
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 128px 0 96px;
}

/* The moving light layer: accent-coloured dots revealed only inside a soft
   mask that drifts across the field, so a pulse of light appears to travel
   through the grid and brighten the dots it passes. Home only. */
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(240, 237, 230, 0.45) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.7;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 22%);
          mask-image: radial-gradient(circle, #000 0%, transparent 22%);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 55% 120%;
          mask-size: 55% 120%;
  -webkit-mask-position: -20% 30%;
          mask-position: -20% 30%;
  animation: heroGlow 14s ease-in-out infinite;
}

@keyframes heroGlow {
  0%   { -webkit-mask-position: -25% 25%; mask-position: -25% 25%; }
  50%  { -webkit-mask-position: 125% 65%; mask-position: 125% 65%; }
  100% { -webkit-mask-position: -25% 25%; mask-position: -25% 25%; }
}

/* Keep hero content above the glow */
.hero .container {
  position: relative;
  z-index: 1;
}

/* Hero subline. Plex Sans against the Newsreader anchor sentence above it,
   so the two read as statement then explanation. This is where the one
   hand-drawn mark in the hero lives. */
.hero-sub {
  max-width: 34em;
  margin-top: 24px;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--secondary);
}

/* "The thinking" section. The point of view leads the section, so it is set
   a step larger than body copy and in --subtle rather than --secondary. */
.thinking-lead {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--subtle);
  max-width: 34em;
  margin-bottom: 20px;
}

.thinking-lead:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   8. Cards (shared)
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   9. Data visuals (minimalist, monochrome + single accent)
   Built as CSS/HTML, no chart library. Each carries a muted source line.
   -------------------------------------------------------------------------- */
.figure {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.figure-cap {
  margin-top: 18px;
  font-size: 12.48px;
  color: var(--muted);
}

/* Horizontal bar rows: label, track with fill, value */
.bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bar-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.bar-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 300;
}

.bar-track {
  position: relative;
  height: 10px;
  background: var(--bg-raised);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  /* thin, quiet fill; rounded data-end sits naturally from the pill radius */
  background: var(--border-strong);
}

/* The punchline figure is the one that wears the accent */
.bar-fill.is-key {
  background: var(--text);
}

.bar-value {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bar-value strong {
  color: var(--text);
  font-weight: 500;
}

/* Range visual (proposal win rates): a 0 to 100% axis with a highlighted band */
.range {
  position: relative;
  height: 12px;
  background: var(--bg-raised);
  border-radius: 999px;
  margin: 14px 0 10px;
}

.range-band {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--border-strong);
  border-radius: 999px;
}

.range-mark {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 20px;
  background: var(--text);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.range-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  font-size: 13px;
}

.range-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
}

.swatch-band { background: var(--border-strong); }
.swatch-mark { background: var(--text); }

/* Stat tiles: a single big number with a plain-words label */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.stat-num {
  font-size: 38.4px;
  font-weight: 300;
  line-height: 1;
  color: var(--text);
}

.stat.is-key .stat-num {
  color: var(--text);
}

.stat-label {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

/* Two-column layout for a text block beside a figure */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* --------------------------------------------------------------------------
   10. The signal line (signature element), scroll-linked.
   JS sets --p (0 to 1) each frame from scroll progress. Without JS or with
   reduced motion, --p falls back to 1: line fully drawn, dot at the end.
   -------------------------------------------------------------------------- */
.signal {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.signal-line,
.signal-fill {
  position: absolute;
  background: var(--border);
}

.signal-fill {
  background: var(--border-strong);
}

.signal-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 8px rgba(240, 237, 230, 0.12);
}

/* Horizontal orientation (Home framework) */
.signal.axis-x {
  top: 16px;
  left: 0;
  right: 0;
  height: 8px;
}

.signal.axis-x .signal-line {
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
}

.signal.axis-x .signal-fill {
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
  transform: scaleX(var(--p, 1));
  transform-origin: left center;
}

.signal.axis-x .signal-dot {
  top: 50%;
  left: calc(var(--p, 1) * 100%);
  transform: translate(-50%, -50%);
}

/* Vertical orientation (Services capabilities) */
.signal.axis-y {
  top: 0;
  bottom: 0;
  left: 8px;
  width: 8px;
}

.signal.axis-y .signal-line {
  left: 3px;
  top: 0;
  bottom: 0;
  width: 1px;
}

.signal.axis-y .signal-fill {
  left: 3px;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: scaleY(var(--p, 1));
  transform-origin: center top;
}

.signal.axis-y .signal-dot {
  left: 50%;
  top: calc(var(--p, 1) * 100%);
  transform: translate(-50%, -50%);
}

/* --------------------------------------------------------------------------
   11. Home framework: three cards, quote + effect + description
   -------------------------------------------------------------------------- */
.framework {
  position: relative;
  padding-top: 33px; /* room for the horizontal signal above the cards */
}

.framework-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
}

.f-quote {
  font-size: 16px;
  font-style: italic;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.4;
}

.f-effect {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}

.f-desc {
  font-size: 15px;
}

/* Icon that leads a framework card */
.card > .icon {
  margin-bottom: 14px;
}

/* A category heading paired with its Lucide icon (capabilities, steps) */
.cap-head,
.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.step-head { margin-bottom: 10px; }

/* Capability list items lightened with a small muted check */
.cap li {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* The service funnel: a small inline-SVG flow of the three steps.
   Sits above the numbered cards so the progression reads at a glance. */
.funnel {
  width: 100%;
  max-width: 720px;
  height: auto;
  margin-bottom: 40px;
  color: var(--muted);
}

.funnel .funnel-node { fill: var(--bg-raised); stroke: var(--border-strong); }
.funnel .funnel-num  { fill: var(--text); font-size: 13px; font-weight: 500; }
.funnel .funnel-label { fill: var(--muted); font-size: 12px; }
.funnel .funnel-link { stroke: var(--border-strong); }
.funnel .funnel-arrow { fill: var(--text); }

.step-label {
  display: block;
  font-size: 12.48px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   12. Work grid (Home): five project cards, some with demo media
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
}

.work-grid .card p {
  font-size: 15px;
}

.work-meta {
  font-size: 12.48px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.work-media {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-sunken);
}

/* --------------------------------------------------------------------------
   12b. Tools grid (Home): demo GIF on top, title and description below
   -------------------------------------------------------------------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  list-style: none;
}

.tools-grid .card p {
  font-size: 15px;
}

.tools-grid .work-media {
  margin-top: 0;
  margin-bottom: 18px;
}

/* Ways to work together: three entry points, side by side. Cards stretch to
   equal height so the buttons line up along the bottom. */
.ways-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  align-items: stretch;
}

.ways-grid .card {
  display: flex;
  flex-direction: column;
}

.ways-grid .card p {
  font-size: 15px;
}

/* Pushes the button to the bottom edge regardless of copy length. */
.ways-grid .btn {
  margin-top: auto;
  align-self: flex-start;
}

.ways-grid .card p + .btn {
  margin-top: 22px;
}

.ways-note {
  margin-top: 32px;
  font-size: 15px;
  color: var(--muted);
}

.ways-note a { color: var(--text); }

/* --------------------------------------------------------------------------
   13. CTA band
   -------------------------------------------------------------------------- */
.cta {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-title {
  font-family: var(--font-display);
  font-size: 38.4px;
  font-weight: 500;
  line-height: 1.25;
  max-width: 22em;
}

.cta-mail {
  display: inline-block;
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   14. Services: capabilities (vertical signal) and the three-step funnel
   -------------------------------------------------------------------------- */
.caps-frame {
  max-width: 42em;
  margin-bottom: 40px;
  color: var(--muted);
}

.caps {
  position: relative;
  padding-left: 28px; /* room for the vertical signal on the left */
}

.caps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  list-style: none;
}

.cap h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 14px;
}

.cap ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cap li {
  font-size: 15px;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.cap li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Vertical three-step progression (Services + Overview) */
.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 32px;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
}

.step-num {
  font-size: 38.4px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1;
  padding-top: 24px;
}

.step .card {
  max-width: 720px;
}

.step-note {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.step .btn {
  margin-top: 22px;
}

/* --------------------------------------------------------------------------
   15. About: prose and quote cards
   -------------------------------------------------------------------------- */
.prose p {
  max-width: 44em;
  margin-bottom: 20px;
}

.prose a {
  color: var(--text);
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  list-style: none;
}

.quote-card p {
  font-size: 15.5px;
}

.quote-attr {
  margin-top: 18px;
  font-size: 14px;
}

.quote-name {
  display: block;
  font-weight: 400;
  color: var(--text);
  font-style: normal;
}

.quote-role {
  display: block;
  color: var(--muted);
  font-style: normal;
}

/* --------------------------------------------------------------------------
   16. Contact form
   -------------------------------------------------------------------------- */
.form {
  max-width: 560px;
}

.form-field {
  margin-bottom: 22px;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 300;
  color: var(--text);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

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

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 4px rgba(240, 237, 230, 0.12);
}

.form-fallback {
  margin-top: 28px;
  font-size: 14.5px;
}

/* --------------------------------------------------------------------------
   17. Overview: tool cards with media slots and prices
   -------------------------------------------------------------------------- */
.tool-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tool-card .tool-lines {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-line {
  font-size: 14.5px;
}

.tool-line strong {
  font-weight: 500;
  color: var(--text);
}

.tool-media {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-sunken);
}

.price {
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
}

.price-code {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}

/* --------------------------------------------------------------------------
   18. Footer (FIXED): logo, email, LinkedIn, one line of small print
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.footer-row img {
  height: 28px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.footer-row a {
  color: var(--muted);
}

.footer-fine {
  margin-top: 16px;
  font-size: 12.48px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   19. Scroll reveal (only active when JS is running: html.js)
   -------------------------------------------------------------------------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 650ms ease, transform 650ms ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   20. Reduced motion: everything renders fully, no animation
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Kill the ambient hero light: static grid only */
  .hero-glow {
    animation: none;
    opacity: 0;
  }

  .card:hover,
  .btn:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   21. Responsive: single breakpoint keeps this easy to reason about
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .framework-grid,
  .work-grid,
  .tools-grid,
  .ways-grid,
  .caps-grid,
  .quote-grid,
  .stat-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 20px;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding: 80px 0 64px;
  }

  /* Weight 200 is only allowed at 33px and above, so headings that shrink
     below that switch to weight 300. Hero stays above 33px to keep 200. */
  .hero-title {
    font-size: 34px;
  }

  .section-title,
  .cta-title {
    font-size: 28px;
    font-weight: 500;
  }

  /* Nav collapses to a toggle */
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
  }

  /* Text-beside-figure stacks */
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Home framework: cards stack, the signal turns vertical on the left */
  .framework {
    padding-top: 0;
    padding-left: 28px;
  }

  .signal.axis-x {
    top: 0;
    bottom: 0;
    left: 8px;
    right: auto;
    width: 8px;
    height: auto;
  }

  .signal.axis-x .signal-line {
    left: 3px;
    top: 0;
    bottom: 0;
    right: auto;
    width: 1px;
    height: auto;
  }

  .signal.axis-x .signal-fill {
    left: 3px;
    top: 0;
    bottom: 0;
    right: auto;
    width: 1px;
    height: auto;
    transform: scaleY(var(--p, 1));
    transform-origin: center top;
  }

  .signal.axis-x .signal-dot {
    left: 50%;
    top: calc(var(--p, 1) * 100%);
    transform: translate(-50%, -50%);
  }

  /* Footer stacks a little */
  .footer-links {
    margin-left: 0;
  }

  .step {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .step-num {
    padding-top: 0;
    font-size: 28px;
    font-weight: 300;
  }
}

/* --------------------------------------------------------------------------
   14. Drawn underlines
   The one moment of emphasis on the site. Each mark is an inline SVG sitting
   just under the word, drawn with the dasharray / dashoffset technique so it
   arrives like a pen stroke instead of appearing as a finished bar.
   main.js builds the SVG and measures the real path length into --len.
   -------------------------------------------------------------------------- */
[data-underline] {
  position: relative;
  white-space: nowrap;   /* keeps the mark aligned to the phrase it underlines */
}

.ul-svg {
  position: absolute;
  bottom: -0.22em;
  left: -2%;
  width: 104%;
  height: 0.42em;
  pointer-events: none;
  overflow: visible;
}

.ul-svg path {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 300);
  stroke-dashoffset: var(--len, 300);
  /* An ink-like ease: quick out of the gate, settling at the end. */
  transition: stroke-dashoffset 750ms cubic-bezier(.7, .05, .3, 1);
}

/* Fine pen: the quiet register, for one emphasis word in body copy. */
[data-underline="fine"] .ul-svg path {
  stroke-width: 2;
  opacity: 0.55;
}

/* Double scribble: one fast pass right, then a loop back left.
   Reserved for the hero subline phrase. */
[data-underline="scribble"] .ul-svg path {
  stroke-width: 2.4;
  opacity: 0.7;
}

.ul-drawn path { stroke-dashoffset: 0; }

/* Reduced motion: the mark is already there, it just never draws. */
@media (prefers-reduced-motion: reduce) {
  .ul-svg path {
    transition: none;
    stroke-dashoffset: 0;
  }
}
