/* RWKIT Consulting — v4: single lean page; background fades from tan to white as you scroll */

:root {
  /* --t goes from 0 (top of page) to 1 (bottom); set by main.js. Only the background moves. */
  --t: 0;
  --bg-top: #faf8f3;
  --bg-bottom: #ffffff;
  --bg: color-mix(in oklab, var(--bg-bottom) calc(var(--t) * 100%), var(--bg-top));
  --panel: #ffffff;
  --ink: #17181c;
  --ink-soft: #5c5d57;
  --ink-faint: #8c8c84;
  --accent: #c2491f;
  --accent-bright: #a83a1a;
  --accent-ink: #ffffff;
  --line: #ddd5c2;
  --line-strong: #17181c;
  color-scheme: light;
}
/* Browsers without color-mix() keep the tan background throughout. */
@supports not (color: color-mix(in oklab, red 50%, blue)) {
  :root { --bg: #faf8f3; }
}
.logo-dark { display: none; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
svg { display: block; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.01em; }
b { font-weight: 700; color: var(--ink); }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  max-width: 1080px; margin: 0 auto; padding: 18px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand img { height: 44px; width: auto; }
.top-nav { display: flex; gap: 22px; margin-left: 12px; }
.top-nav a { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.top-nav a:hover { color: var(--accent-bright); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ---- buttons ---- */
.cta, .cta-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono", monospace; font-size: 0.9rem; font-weight: 600;
  padding: 14px 24px; border-radius: 8px; border: 1px solid transparent;
  text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.cta { background: var(--accent); color: var(--accent-ink); }
.cta:hover { background: var(--accent-bright); transform: translateY(-1px); }
.cta-small { padding: 10px 16px; font-size: 0.82rem; }
.cta-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.cta-ghost:hover { border-color: var(--accent); color: var(--accent-bright); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---- layout ---- */
main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-bright); font-weight: 500;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--accent); }
.lede { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.7; max-width: 640px; }

.section { padding: 80px 0; border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 36px; }
.section-head h2, .contact h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; max-width: 720px; margin-top: 14px; }

.hero { padding-top: 96px; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; max-width: 820px; margin: 18px 0 22px; }

.principles { list-style: none; counter-reset: p; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 72px; }
.principles li { counter-increment: p; padding-top: 16px; border-top: 2px solid var(--line-strong); }
.principles li::before { content: "0" counter(p); font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: var(--accent-bright); display: block; margin-bottom: 10px; }
.principles h3 { font-size: 1.05rem; margin-bottom: 8px; }
.principles p { font-size: 0.95rem; color: var(--ink-soft); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 24px 20px; }
.card .num { display: block; font-size: 0.8rem; color: var(--accent-bright); margin-bottom: 14px; }
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.6; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.way { padding: 28px 26px; }
.way h3 { font-size: 1.2rem; }
.way ul { list-style: none; margin-top: 16px; border-top: 1px solid var(--line); }
.way li { font-size: 0.92rem; padding: 10px 0 10px 18px; border-bottom: 1px solid var(--line); position: relative; }
.way li:last-child { border-bottom: 0; padding-bottom: 0; }
.way li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 8px; height: 2px; background: var(--accent); }
.note { margin-top: 36px; font-size: 0.95rem; color: var(--ink-soft); max-width: 640px; padding-left: 16px; border-left: 3px solid var(--accent); }

/* ---- themed bands ----
   A band runs edge to edge while its content stays on the main column: the negative margins reach the
   viewport, the matching padding brings the content back. Each band re-scopes the colour variables the
   components already use (panel, ink, accent, line), so cards, labels, buttons and borders follow.
   `.section.band` outranks the responsive `.section { padding }` rules below, which would otherwise zero the
   side padding on small screens. */
.section.band {
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%);
  background: var(--band-bg);
  color: var(--ink);
  border-bottom: 0;
}
/* The colour change is the separator: the section before a band drops its hairline, and so does the footer
   when the page ends on one. */
.section:has(+ .band) { border-bottom: 0; }
main:has(> .band:last-child) + .foot { border-top: 0; }
/* Night shift: the RWKIT dark theme. The accent lightens, so labels on an accent fill switch to dark ink. */
.band-dark {
  --band-bg: #141518;
  --panel: #1d1e22;
  --bg-top: #26272b;          /* panel-2: the tinted result callout */
  --ink: #ece7dc;
  --ink-soft: #a9a69c;
  --ink-faint: #8e8b82;
  --accent: #e0703f;
  --accent-bright: #ec8a5c;
  --accent-ink: #17181c;
  --line: #34352f;
  --line-strong: #ece7dc;
  color-scheme: dark;
}
/* Rust: the accent as a ground (accent-bright, 6:1 under paper ink). Paper takes over the accent role, so
   the primary button inverts to a paper fill with a rust label and the eyebrow dash turns paper. */
.band-rust {
  --band-bg: #a83a1a;
  --panel: #b4451f;
  --bg-top: #b4451f;
  --ink: #faf8f3;
  --ink-soft: #f3d9cc;
  --ink-faint: #e8bfab;
  --accent: #faf8f3;
  --accent-bright: #ffffff;
  --accent-ink: #a83a1a;
  --line: rgba(250, 248, 243, 0.28);
  --line-strong: #faf8f3;
  color-scheme: dark;
}
.band-rust .eyebrow { color: var(--ink-soft); }
.band-rust .cta:hover { background: var(--accent-bright); }

/* ---- results ---- */
.cases { display: grid; gap: 18px; }
.case { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 30px 28px; }
.case-label { display: flex; align-items: center; gap: 10px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 12px; }
.case-label::before { content: ""; width: 20px; height: 2px; background: var(--accent); }
.case h3 { font-size: 1.35rem; max-width: 760px; margin-bottom: 22px; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.lbl { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 8px; }
.case-grid p { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.65; }
.case-result { margin-top: 22px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--bg-top); border-radius: 0 8px 8px 0; font-size: 1rem; color: var(--ink-soft); }

.sub-head { font-size: 1.15rem; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.wins { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.win { padding: 22px 0; border-bottom: 1px solid var(--line); }
.tag { display: inline-block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 8px; }
.win h4 { font-size: 1.02rem; margin-bottom: 6px; }
.win p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.6; }

/* ---- about ---- */
.about p { font-size: 1.08rem; color: var(--ink-soft); line-height: 1.7; max-width: 720px; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 36px; }
.stat { background: var(--panel); padding: 22px 20px; }
.stat .big { font-size: 2.1rem; font-weight: 600; color: var(--accent-bright); letter-spacing: -0.02em; margin-bottom: 6px; }
.stat .lbl { text-transform: none; letter-spacing: 0; font-size: 0.86rem; color: var(--ink-soft); font-family: "Manrope", sans-serif; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip { font-family: "JetBrains Mono", monospace; font-size: 0.76rem; color: var(--ink-soft); border: 1px solid var(--line-strong); padding: 6px 12px; border-radius: 999px; }

.contact { border-bottom: 0; padding-bottom: 96px; }
.contact-inner { position: relative; } /* the signal is placed against the content column, not the band */
.contact h2 { margin-bottom: 14px; }
.contact .lede { max-width: 560px; }

/* Signal: the brand's Signal Pulse repeated as a telemetry trace. A faint paper trace sits still; a brighter
   segment travels along it, one pass per cycle, so the section carries a little motion without a gradient
   or a shadow. pathLength normalises the trace to 1000 so the dash maths is independent of its real length. */
.contact-signal {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 40%; max-width: 520px; height: auto;
  pointer-events: none;
}
.signal-trace { fill: none; stroke: var(--ink); stroke-opacity: 0.22; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.signal-live {
  fill: none; stroke: var(--ink); stroke-opacity: 0.9; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 140 860;
  stroke-dashoffset: 1000;
  animation: signal-pass 7s linear infinite;
}
@keyframes signal-pass { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .signal-live { animation: none; stroke-dasharray: none; stroke-opacity: 0.5; }
}

.foot {
  max-width: 1080px; margin: 0 auto; padding: 24px 24px 40px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 0.82rem; color: var(--ink-faint);
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .grid, .stats { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: 1fr; gap: 22px; margin-top: 56px; }
  .case-grid, .wins { grid-template-columns: 1fr; }
  .contact-signal { position: static; transform: none; width: 100%; max-width: none; margin-top: 40px; }
}
@media (max-width: 640px) {
  .top { padding: 14px 16px; gap: 16px; }
  .top-nav { display: none; }
  .brand img { height: 38px; }
  main { padding: 0 16px; }
  .hero { padding-top: 56px; }
  .section { padding: 52px 0; }
  .grid, .grid-2 { grid-template-columns: 1fr; }
  .case { padding: 24px 18px; }
  .case h3 { font-size: 1.2rem; }
  .ctas .cta, .ctas .cta-ghost { width: 100%; }
  .foot { padding: 20px 16px 32px; }
}
