/* Layout concept: a quiet, left-aligned page on a cool paper ground. Big display
   type does the talking, one highlighter colour marks the key phrase in each
   section, and the hero animation is the single moving moment. */
:root {
  --bg: #f4f7f4;
  --surface: #ffffff;
  --tint: #e8eee9;
  --ink: #10221d;
  --muted: #4b5b55;
  --line: #d3ddd7;
  --accent: #2742c9;
  --accent-ink: #ffffff;
  --marker: #f3d54e;
  --marker-soft: rgba(243, 213, 78, 0.8);
  --marker-ink: #10221d;
  --band: #10221d;
  --band-fg: #e8eeea;
  --band-muted: #a7b7b0;
  --band-line: #2a3e37;
  --band-surface: #172c26;
  --accent-on-ink: #93a6ff;
  --logo: #10221d;
  --bar-track: #dfe7e2;
  --focus: #2742c9;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --step-3: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  --step-5: clamp(2.75rem, 1.4rem + 6vw, 6rem);

  --radius: 10px;
  --wrap: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1513;
    --surface: #13201c;
    --tint: #101c18;
    --ink: #e6ece9;
    --muted: #9fada7;
    --line: #26372f;
    --accent: #93a6ff;
    --accent-ink: #0d1513;
    --marker: #e2c53f;
    --marker-soft: rgba(226, 197, 63, 0.3);
    --marker-ink: #0d1513;
    --band: #16261f;
    --band-fg: #e6ece9;
    --band-muted: #a0b0a9;
    --band-line: #2c4239;
    --band-surface: #1c3029;
    --accent-on-ink: #93a6ff;
    --logo: #1f342c;
    --bar-track: #1f2e29;
    --focus: #93a6ff;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1513;
  --surface: #13201c;
  --tint: #101c18;
  --ink: #e6ece9;
  --muted: #9fada7;
  --line: #26372f;
  --accent: #93a6ff;
  --accent-ink: #0d1513;
  --marker: #e2c53f;
  --marker-soft: rgba(226, 197, 63, 0.3);
  --marker-ink: #0d1513;
  --band: #16261f;
  --band-fg: #e6ece9;
  --band-muted: #a0b0a9;
  --band-line: #2c4239;
  --band-surface: #1c3029;
  --accent-on-ink: #93a6ff;
  --logo: #1f342c;
  --bar-track: #1f2e29;
  --focus: #93a6ff;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--bg);
}

h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

.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; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hl {
  background: linear-gradient(transparent 58%, var(--marker-soft) 58%, var(--marker-soft) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-inline: 0.04em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 var(--step-0)/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -8px var(--accent); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 0.9375rem; }
.btn-on-ink { background: var(--marker); border-color: var(--marker); color: var(--marker-ink); }
.btn-on-ink:hover { box-shadow: 0 6px 18px -8px var(--marker); }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover { transition: none; transform: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.1875rem/1 var(--display); letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .lg-spoke { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.brand-mark .lg-hub { fill: var(--accent); }
.brand-mark .lg-ring { fill: none; stroke: var(--ink); stroke-width: 3.4; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 8px 12px;
  border-radius: 6px;
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { background: var(--tint); }
.site-nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none;
  font: 500 0.9375rem/1 var(--body);
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 9px 14px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px; }
  .site-nav .btn { margin: 8px 0 0; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 88px) clamp(40px, 6vw, 88px); overflow: hidden; }
.hero-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; } }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero h1 { font-size: var(--step-5); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; }
.lede { font: 500 var(--step-2)/1.35 var(--body); color: var(--muted); }
.rotator { font: 700 clamp(1.25rem, 1rem + 1.2vw, 1.75rem)/1.2 var(--display); letter-spacing: -0.02em; min-height: 2.4em; }
.rot-word { display: inline-block; color: var(--accent); transition: transform 0.3s ease, opacity 0.3s ease; }
.rot-word.is-out { opacity: 0; transform: translateY(-0.35em); }
.rot-word.is-in { opacity: 0; transform: translateY(0.35em); transition: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art { margin: 0; min-width: 0; max-width: 100%; }
.hero-art canvas { display: block; width: 100%; height: 420px; }
@media (max-width: 899px) { .hero-art canvas { height: 240px; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tint { background: var(--tint); }
.section-ink {
  background: var(--band);
  color: var(--band-fg);
  --muted: var(--band-muted);
  --line: var(--band-line);
}
.section-ink a { color: var(--accent-on-ink); }
.section-title { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; }
.section-sub { color: var(--muted); font-size: var(--step-1); max-width: 52ch; }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(32px, 4vw, 48px); min-width: 0; }

/* ---------- Problem ---------- */
.problem-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .problem-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } }
.problem-grid h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; }

.gap-chart {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 20px;
  min-width: 0;
}
.bars { display: grid; gap: 22px; }
.bar-row { display: grid; gap: 8px; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.bar-head span { font-size: 0.9375rem; }
.bar-head strong { font: 800 clamp(2rem, 1.5rem + 2vw, 3rem)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.track { height: 18px; background: var(--bar-track); border-radius: 4px; overflow: hidden; }
.bar { height: 100%; border-radius: 4px; }
.bar-use { background: var(--accent); }
.bar-int { background: var(--marker); }
.gap-chart figcaption { font-family: var(--mono); font-size: 0.75rem; }
.gap-chart figcaption a { color: var(--muted); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; gap: 32px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.steps li { display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 2px solid var(--ink); counter-increment: step; min-width: 0; }
.steps li::before { content: "0" counter(step); font-family: var(--mono); font-size: var(--step--1); color: var(--muted); }
.steps h3 { font-size: var(--step-3); font-weight: 800; }
.steps p { color: var(--muted); font-size: var(--step-1); max-width: 30ch; }

/* ---------- What we automate ---------- */
#tasks .section-sub { margin-top: 12px; }
.pillars { margin-top: clamp(28px, 4vw, 44px); display: grid; gap: 16px; }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pillar {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  padding: 26px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.pillar-feature { border: 2px solid var(--accent); }
.pillar-icon { width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pillar-feature .pillar-icon { color: var(--accent); border-color: var(--accent); }
.pillar h3 { font-size: var(--step-3); font-weight: 800; }
.pillar p:not(.pillar-note) { color: var(--muted); }
.pillar-note { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.pillar-note::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--marker) center / 11px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='%2310221d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.tools-line { margin-top: 24px; color: var(--muted); }
.nudge { margin-top: 32px; font-size: var(--step-1); font-weight: 500; }

/* ---------- Services ---------- */
.offers { margin-top: clamp(28px, 4vw, 48px); display: grid; gap: 16px; }
@media (min-width: 760px) { .offers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.offers { padding-top: 12px; }
.offer {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.offer h3 { font-size: var(--step-2); font-weight: 700; }
.offer > p:not(.offer-price):not(.tag) { color: var(--muted); }
.offer-price { padding-top: 20px; font: 500 0.8125rem/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.offer-feature { border: 2px solid var(--ink); }
.tag {
  position: absolute;
  top: -11px;
  left: 22px;
  font: 500 0.6875rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--marker);
  color: var(--marker-ink);
}

.commitments { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.commitments li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.commitments li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--accent) center / 11px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.teaser { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: var(--step-1); }
.teaser a { font-weight: 600; }

/* ---------- Scorecard page ---------- */
.quiz-section { min-height: 60vh; }
.quiz-wrap { max-width: 760px; }
.quiz-intro, .quiz, .quiz-result { display: grid; gap: 20px; justify-items: start; }
.quiz-intro[hidden], .quiz[hidden], .quiz-result[hidden] { display: none; }
.quiz-intro .btn { margin-top: 8px; }

.quiz-top { display: grid; gap: 10px; width: 100%; }
.quiz-progress { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-bar { height: 6px; background: var(--bar-track); border-radius: 3px; overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 0.25s ease; }
.quiz-q { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; min-height: 2.3em; padding-top: 8px; }
.quiz-q:focus { outline: none; }
.quiz-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 520px; }
.quiz-opt {
  min-height: 56px;
  font: 600 var(--step-1)/1 var(--body);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--ink); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.is-picked { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.quiz-back {
  font: 500 0.9375rem/1 var(--body);
  color: var(--muted);
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
}
.quiz-back:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .quiz-bar i, .quiz-opt { transition: none; } }

.quiz-result .score-out { width: 100%; }
#result-title:focus { outline: none; }

.score-out {
  border-radius: 8px;
  background: var(--band);
  color: var(--band-fg);
  padding: 22px;
  display: grid;
  gap: 20px;
}
@media (min-width: 640px) { .score-out { grid-template-columns: auto 1fr; gap: 20px 32px; } }
.score-total { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 6px; }
.score-num { font: 800 3.5rem/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.score-of { font-family: var(--mono); color: var(--band-muted); }
.score-hint { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--band-muted); max-width: 24ch; margin-top: 8px; }
.areas { display: grid; gap: 10px; align-content: center; }
.area { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: 12px; font-family: var(--mono); font-size: 0.8125rem; color: var(--band-muted); }
.meter { height: 8px; background: var(--band-line); border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent-on-ink); border-radius: 4px; transition: width 0.35s ease; }
.area.is-low .meter i { background: var(--marker); }
@media (prefers-reduced-motion: reduce) { .meter i { transition: none; } }
.reco { grid-column: 1 / -1; display: grid; gap: 8px; justify-items: start; padding-top: 18px; border-top: 1px solid var(--band-line); }
.reco-label { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--marker); }
.reco-title { font: 700 var(--step-2)/1.15 var(--display); }
.reco p:not(.reco-label):not(.reco-title) { color: var(--band-muted); font-size: 0.9375rem; max-width: 62ch; }
.reco .btn { margin-top: 6px; background: var(--marker); border-color: var(--marker); color: var(--marker-ink); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; } }
.contact-head { display: grid; gap: 14px; min-width: 0; }
.contact-direct { padding-top: 8px; }
.email { font-family: var(--mono); color: var(--band-fg); user-select: all; word-break: break-all; }
.copy {
  font: 500 0.75rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--band-fg);
  background: transparent;
  border: 1px solid var(--band-line);
  border-radius: 5px;
  padding: 6px 8px;
  margin-left: 6px;
  cursor: pointer;
}
.copy:hover { border-color: var(--band-muted); }

.contact-form { display: grid; gap: 16px; background: var(--band-surface); border: 1px solid var(--band-line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); min-width: 0; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 0.875rem; font-weight: 500; color: var(--band-fg); }
.field input, .field textarea {
  width: 100%;
  font: 400 1rem/1.4 var(--body);
  color: var(--band-fg);
  background: var(--band);
  border: 1px solid var(--band-line);
  border-radius: 7px;
  padding: 11px 12px;
  color-scheme: dark;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent-on-ink); outline-offset: 1px; border-color: transparent; }
.field [aria-invalid="true"] { border-color: var(--marker); }
.form-error { color: var(--marker); font-size: 0.875rem; }
.contact-form .btn { justify-self: start; }
.form-result { display: grid; gap: 10px; padding: 16px; border-radius: 8px; background: var(--band); border: 1px solid var(--band-line); font-size: 0.9375rem; }
.form-result strong { font-family: var(--display); font-size: 1.125rem; }
.form-result pre { margin: 0; white-space: pre-wrap; font: 400 0.8125rem/1.5 var(--mono); color: var(--band-muted); max-height: 220px; overflow: auto; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 32px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.footer-note { font-size: var(--step--1); color: var(--muted); }
