/* ==========================================================================
   Efficient Digital Marketing Agency

   Warm paper stock, navy-black ink taken from the logo (#13132B), one cobalt
   signal. No gradients, no glow, no soft shadows — depth comes from three
   flat surface tones (paper / alt / dark) plus hairline rules.

   The hero has two modes. The DEFAULT is the static one, so a visitor with no
   JavaScript or a blocked GSAP CDN gets a correct page for free. script.js
   adds .hero-anim to <html> only once it is certain it can animate.
   ========================================================================== */

:root {
    /* light surfaces, lightest to deepest */
    --paper:      #F6F4EF;
    --paper-alt:  #EDEAE2;
    --surface:    #FFFFFF;

    --ink:        #13132B;   /* straight from the logo */
    --body:       #4E5064;
    --muted:      #85879B;
    --hairline:   #DEDACF;
    --rule:       #C9C4B6;   /* the stronger structural rule */

    --signal:     #2340E8;
    --signal-dk:  #1A31B8;

    /* dark band */
    --d-bg:       #13132B;
    --d-surface:  #1A1A3A;
    --d-text:     #F6F4EF;
    --d-body:     #A0A2BA;
    --d-muted:    #7C7E99;
    --d-hairline: #2A2A48;

    --font:    "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
    --display: "Fraunces", Georgia, "Times New Roman", serif;

    --wrap:    1240px;
    --gutter:  clamp(1.25rem, 4vw, 3rem);
    --section: clamp(4.5rem, 9vw, 8rem);
    --radius:  3px;
    --ease:    cubic-bezier(0.22, 1, 0.36, 1);
    --header:  76px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* No scroll-behavior: smooth here on purpose — the hero is pinned by
   ScrollTrigger, and a global smooth-scroll property is the one thing it asks
   you not to combine with pinning. site.js handles anchors instead. */
html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* clip, not hidden: `hidden` would make body a scroll container and quietly
       break every position:sticky on the page */
    overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
ul, ol { list-style: none; }

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

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--ink); color: var(--paper); padding: 0.75rem 1.25rem; font-weight: 500;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* --------------------------------------------------------------------------
   Surface bands — the layering
   -------------------------------------------------------------------------- */

.band-alt { background: var(--paper-alt); }

.band-dark {
    /* re-point the tokens so every component inside just works */
    --ink:      var(--d-text);
    --body:     var(--d-body);
    --muted:    var(--d-muted);
    --hairline: var(--d-hairline);
    --rule:     var(--d-hairline);
    --surface:  var(--d-surface);
    background: var(--d-bg);
    color: var(--d-text);
}

/* --------------------------------------------------------------------------
   Type primitives
   -------------------------------------------------------------------------- */

.eyebrow, .label {
    font-size: 0.7rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted);
}
.eyebrow { margin-bottom: 1.15rem; }

.section-title {
    font-family: var(--display); font-weight: 400;
    font-variation-settings: "opsz" 96;
    font-size: clamp(1.85rem, 3.5vw, 2.75rem);
    line-height: 1.12; letter-spacing: -0.01em;
    max-width: 22ch;
}
.section-title em { font-style: italic; }

.section-lede {
    margin-top: 1.2rem; max-width: 58ch;
    color: var(--body); font-size: 1.08rem;
}

/* figures align wherever they appear — this is what the monospace was for */
.stat-fig, .step-no, .service-no, .failure-no, .rv, .contact-email, .tag {
    font-variant-numeric: tabular-nums lining-nums;
}

/* Every entrance effect is scoped to .js (set by an inline script in <head>).
   Without it the page renders in its final state — nothing depends on an
   observer that will never run. */
.js .reveal {
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* a hairline that draws itself across a row as the row arrives */
.rule-draw { position: relative; }
.rule-draw::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: var(--hairline);
    transform-origin: left center;
    transition: transform 0.8s var(--ease) 0.12s;
}
.js .rule-draw::after { transform: scaleX(0); }
.js .rule-draw.in::after { transform: scaleX(1); }
.rule-draw:last-child::after { display: none; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 60;
    padding-block: 1.05rem;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled { background: var(--paper); border-bottom-color: var(--hairline); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: block; }
.brand-logo { height: 32px; width: auto; }
.brand-logo-light { height: 30px; filter: brightness(0) invert(1); opacity: 0.94; }

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 1.9vw, 1.75rem); }
.nav > a {
    font-size: 0.93rem; color: var(--body); padding-block: 0.3rem;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.nav > a:hover { color: var(--ink); border-bottom-color: var(--signal); }
.nav-cta {
    color: var(--ink) !important; border: 1px solid var(--ink) !important;
    border-radius: var(--radius); padding: 0.48rem 1.05rem !important; font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }

.nav-toggle {
    display: none; width: 44px; height: 44px; margin-right: -10px;
    border: none; background: none; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle .bars { position: relative; width: 22px; height: 13px; }
.nav-toggle .bars span {
    position: absolute; left: 0; width: 100%; height: 1.5px; background: var(--ink);
    transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle .bars span:nth-child(1) { top: 2px; }
.nav-toggle .bars span:nth-child(2) { top: 9px; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { top: 6px; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    -webkit-appearance: none; appearance: none;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font); font-weight: 500; font-size: 0.97rem; line-height: 1;
    padding: 0.92rem 1.6rem;
    border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}
.btn-primary { background: var(--signal); color: #FFFFFF; border-color: var(--signal); }
.btn-primary:hover { background: var(--signal-dk); border-color: var(--signal-dk); transform: translateY(-2px); }
/* transparent explicitly: `appearance: none` does NOT clear the UA stylesheet's
   background-color:buttonface on <button>, so a ghost button rendered as a real
   <button> comes out light grey. Every other .btn-ghost here is an <a>, which is
   why the cookie notice was the only place it showed. */
.btn-ghost { background-color: transparent; border-color: var(--rule); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { position: relative; }
.hero-stage { padding-block: calc(var(--header) + clamp(2.5rem, 7vw, 5rem)) clamp(3rem, 7vw, 5.5rem); }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.hero-copy { position: relative; min-width: 0; }

.beat {
    font-family: var(--display); font-weight: 400;
    font-variation-settings: "opsz" 144;
    line-height: 1.07; letter-spacing: -0.012em; color: var(--ink);
}
.hero-sub { color: var(--body); max-width: 46ch; margin-bottom: 1.7rem; }

.hero-graph { position: relative; min-width: 0; }
.hero-graph canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Not an ornament — a readout of the pinned sequence. Three segments, one per
   beat, filling as you scrub. A pinned hero's worst failure is the visitor not
   knowing how much of it there is. */
.scroll-cue {
    display: none; align-items: center; gap: 0.85rem; margin-top: 2.4rem;
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--muted);
}
.cue-track { display: flex; align-items: center; gap: 6px; }
.cue-seg { display: block; width: 26px; height: 2px; background: var(--hairline); overflow: hidden; }
.cue-seg i {
    display: block; width: 100%; height: 100%; background: var(--signal);
    transform: scaleX(var(--p, 0)); transform-origin: left center;
}
.cue-count { font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0.1em; }
.cue-count b { font-weight: 500; color: var(--ink); }

/* ---- static mode (default) ---- */
.beats { display: block; }
.beats .beat { display: block; }
.beats .beat[data-beat="1"] { font-size: clamp(1.95rem, 4vw, 3.1rem); margin-bottom: 0.5rem; }
.beats .beat[data-beat="2"],
.beats .beat[data-beat="3"] { font-size: clamp(1.35rem, 2.4vw, 1.85rem); color: var(--body); }
.beats .beat[data-beat="3"] { color: var(--ink); }
.hero-tail { margin-top: 2.2rem; }
.hero-graph { height: clamp(340px, 46vw, 540px); }

/* ---- animated mode ---- */
.hero-anim .hero-stage {
    min-height: 100svh; display: grid; align-content: center;
    padding-block: calc(var(--header) + 1rem) 1.5rem;
}
.hero-anim .hero-grid { width: 100%; }
.hero-anim .beats { display: grid; }
.hero-anim .beats .beat {
    grid-area: 1 / 1;
    font-size: clamp(1.85rem, 3.8vw, 3rem);
    color: var(--ink); opacity: 0; will-change: opacity, transform;
}
.hero-anim .hero-tail { opacity: 0; margin-top: 2rem; }
.hero-anim .scroll-cue { display: flex; }
.hero-anim .hero-graph { height: min(72svh, 620px); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: var(--section); }
.section, .hero, [id] { scroll-margin-top: calc(var(--header) + 16px); }
.section-head { margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }

.cols-2 {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.6rem, 4vw, 3.5rem);
    border-top: 1px solid var(--rule); padding-top: clamp(1.8rem, 3vw, 2.4rem);
}
.cols-2 p { color: var(--body); }

/* a white panel is how a light band gets a second plane, without becoming
   a grid of little boxes — one panel, many ruled rows */
.panel {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: clamp(0.5rem, 2vw, 1.4rem) clamp(1.2rem, 3vw, 2.4rem);
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stats { padding-block: clamp(3.2rem, 6vw, 4.8rem); }
.stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 3rem) clamp(2rem, 5vw, 4.5rem);
}
.stat { position: relative; padding-top: 1.35rem; border-top: 1px solid var(--d-hairline); }
.stat::before {
    content: ""; position: absolute; top: -1px; left: 0;
    width: 34px; height: 2px; background: var(--signal);
    transform-origin: left center;
    transition: transform 0.7s var(--ease);
}
.js .stat::before { transform: scaleX(0); }
.js .stat.in::before { transform: scaleX(1); }
.stat-fig {
    display: block; font-family: var(--display); font-weight: 500;
    font-variation-settings: "opsz" 72;
    font-size: clamp(2.15rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.014em;
}
.stat-label {
    display: block; margin-top: 0.8rem;
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--d-body);
}

/* --------------------------------------------------------------------------
   The problem — four failure modes
   -------------------------------------------------------------------------- */

.failures { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.8rem, 4vw, 3rem); }
.failure { border-top: 1px solid var(--rule); padding-top: 1.3rem; }
.failure-no {
    display: block; font-size: 0.7rem; font-weight: 500;
    letter-spacing: 0.14em; color: var(--signal); margin-bottom: 0.7rem;
}
.failure h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 0.55rem; }
.failure p { color: var(--body); font-size: 0.99rem; }

/* --------------------------------------------------------------------------
   Why us
   -------------------------------------------------------------------------- */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.8rem, 4vw, 3.2rem); }
.pillar { border-top: 1px solid var(--ink); padding-top: 1.4rem; }
.pillar h3 { font-size: 1.06rem; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 0.6rem; }
.pillar p { color: var(--body); font-size: 0.99rem; }

.pull {
    font-family: var(--display); font-weight: 400;
    font-variation-settings: "opsz" 72;
    font-size: clamp(1.35rem, 2.5vw, 1.9rem); line-height: 1.28; letter-spacing: -0.008em;
    max-width: 36ch; margin-top: clamp(3rem, 6vw, 4.5rem);
    padding-left: 1.6rem; border-left: 1px solid var(--signal);
}
.pull em { font-style: italic; }

/* --------------------------------------------------------------------------
   Services — a ruled list inside one panel
   -------------------------------------------------------------------------- */

.service {
    display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(0.6rem, 3vw, 3rem);
    padding-block: clamp(1.5rem, 2.8vw, 2.1rem);
}
.service-name { position: relative; padding-left: 1.1rem; }
.service-name::before {
    content: ""; position: absolute; left: 0; top: 0.32em; bottom: 0.32em;
    width: 2px; background: var(--hairline);
    transition: background-color 0.25s ease;
}
.service:hover .service-name::before { background: var(--signal); }
.service-no {
    display: block; font-size: 0.7rem; font-weight: 500;
    letter-spacing: 0.14em; color: var(--muted); margin-bottom: 0.4rem;
}
.service h3 {
    font-family: var(--display); font-weight: 400;
    font-variation-settings: "opsz" 36;
    font-size: clamp(1.18rem, 1.9vw, 1.5rem); line-height: 1.18; letter-spacing: -0.008em;
    transition: color 0.25s ease;
}
.service:hover h3 { color: var(--signal); }
.service-body p { color: var(--body); font-size: 1rem; }
.service-meta { margin-top: 0.7rem; color: var(--muted) !important; font-size: 0.92rem !important; }

/* --------------------------------------------------------------------------
   Process — one edge you scroll along
   -------------------------------------------------------------------------- */

.spine { position: relative; }
.spine-line {
    position: absolute; top: 5px; left: 0; right: 0; height: 1px; background: var(--rule);
    transform-origin: left center;
    transition: transform 1.1s var(--ease);
}
.js .spine-line { transform: scaleX(0); }
.js .spine.in .spine-line { transform: none; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.8rem, 4vw, 3.2rem); }
.step { position: relative; padding-top: 2.4rem; }
.step-node {
    position: absolute; top: 1px; left: 0;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--signal); outline: 4px solid var(--paper);
    transition: transform 0.5s var(--ease);
}
.js .step-node { transform: scale(0); }
.js .spine.in .step:nth-child(1) .step-node { transform: scale(1); transition-delay: 0.30s; }
.js .spine.in .step:nth-child(2) .step-node { transform: scale(1); transition-delay: 0.62s; }
.js .spine.in .step:nth-child(3) .step-node { transform: scale(1); transition-delay: 0.94s; }

.step-no {
    display: block; font-size: 0.7rem; font-weight: 500;
    letter-spacing: 0.14em; color: var(--signal); margin-bottom: 0.7rem;
}
.step h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 0.55rem; letter-spacing: -0.005em; }
.step p { color: var(--body); font-size: 0.99rem; }
.step-out {
    margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--hairline);
    color: var(--muted) !important; font-size: 0.92rem !important;
}

/* --------------------------------------------------------------------------
   Deliverables
   -------------------------------------------------------------------------- */

.deliverables > li {
    display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(0.5rem, 3vw, 3rem);
    padding-block: clamp(1.3rem, 2.4vw, 1.8rem);
}
.d-name { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; }
.d-name h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.005em; }
.tag {
    font-size: 0.68rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--signal); border: 1px solid currentColor; border-radius: var(--radius);
    padding: 0.2rem 0.5rem; white-space: nowrap;
}
.deliverables p { color: var(--body); font-size: 1rem; }

/* --------------------------------------------------------------------------
   Engagement models
   -------------------------------------------------------------------------- */

.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.model {
    background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
    padding: clamp(1.4rem, 2.6vw, 2rem);
    display: flex; flex-direction: column;
    transition: border-color 0.25s ease, transform 0.25s var(--ease);
}
.model:hover { border-color: var(--signal); transform: translateY(-2px); }
.model-tag {
    font-size: 0.68rem; font-weight: 500; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 1.4rem;
}
.model h3 {
    font-family: var(--display); font-weight: 400;
    font-variation-settings: "opsz" 48;
    font-size: clamp(1.4rem, 2.2vw, 1.75rem); letter-spacing: -0.01em; margin-bottom: 0.7rem;
}
.model p { color: var(--body); font-size: 0.99rem; }
.model-note {
    margin-top: auto; padding-top: 1.1rem;
    color: var(--muted) !important; font-size: 0.91rem !important;
}

/* --------------------------------------------------------------------------
   Measurement — dark, with the sample report
   -------------------------------------------------------------------------- */

.measure-grid {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start;
}
.measure-points { margin-top: clamp(2rem, 4vw, 2.8rem); display: grid; gap: 1.5rem; }
.measure-points li { border-top: 1px solid var(--d-hairline); padding-top: 1rem; }
.measure-points h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 0.35rem; }
.measure-points p { color: var(--d-body); font-size: 0.96rem; }

/* the panel holds while the four points scroll past it */
.report {
    position: sticky; top: calc(var(--header) + 2rem);
    background: var(--d-surface); border: 1px solid var(--d-hairline); border-radius: var(--radius);
    padding: clamp(1.3rem, 2.6vw, 1.9rem);
}
.report-head {
    display: flex; justify-content: space-between; gap: 1rem;
    border-bottom: 1px solid var(--d-hairline); padding-bottom: 0.9rem; margin-bottom: 1.3rem;
}
.report-rows { display: grid; gap: 1rem; }
.report-rows li {
    display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 2.6rem;
    align-items: center; gap: 0.9rem;
    font-size: 0.86rem;
}
.rk { color: var(--d-body); }
.rt { position: relative; height: 6px; background: rgba(255, 255, 255, 0.07); border-radius: 1px; }
/* the baseline the whole panel is measured against, marked at 1.00 */
.rt::after { content: ""; position: absolute; right: 0; top: -4px; bottom: -4px; width: 1px; background: var(--d-hairline); }
.rf { position: absolute; left: 0; top: 0; bottom: 0; background: var(--signal); border-radius: 1px; }
.rv { text-align: right; color: var(--d-text); }
/* the row that got cut — dashed, the way a dying edge dashes in the hero */
.is-cut .rk, .is-cut .rv { color: var(--d-muted); }
.is-cut .rv { font-style: italic; }
.is-cut .rt { background: none; height: 1px; border-bottom: 1px dashed rgba(255, 255, 255, 0.2); }
.is-cut .rt::after { display: none; }
.report-foot {
    margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--d-hairline);
    color: var(--d-muted); font-size: 0.83rem;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-list { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--hairline); }
.faq-item h3 { font: inherit; font-weight: 400; }
.faq-q {
    width: 100%; background: none; border: none; cursor: pointer; text-align: left;
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    padding: 1.3rem 0; font-size: 1.05rem; font-weight: 500; color: var(--ink);
    transition: color 0.2s ease;
}
.faq-q:hover { color: var(--signal); }

.faq-sign { position: relative; flex: none; width: 13px; height: 13px; }
.faq-sign::before, .faq-sign::after {
    content: ""; position: absolute; background: var(--signal);
    transition: transform 0.3s var(--ease), opacity 0.3s ease;
}
.faq-sign::before { top: 6px; left: 0; width: 13px; height: 1px; }
.faq-sign::after  { left: 6px; top: 0; width: 1px; height: 13px; }
.faq-item.open .faq-sign::after { transform: scaleY(0); opacity: 0; }

.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq-a-inner { padding-bottom: 1.4rem; max-width: 74ch; color: var(--body); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-inner {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 5vw, 4.5rem); align-items: end;
}
.contact-lede { color: var(--body); max-width: 48ch; margin-top: 1.1rem; }
.contact-side { display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem; }
.contact-email { font-size: 1.15rem; margin-bottom: 0.9rem; }
.contact-email a { border-bottom: 1px solid var(--rule); transition: border-color 0.2s ease, color 0.2s ease; }
.contact-email a:hover { color: var(--signal); border-bottom-color: var(--signal); }
.contact-note { margin-top: 0.9rem; color: var(--muted); font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer { background: var(--d-bg); color: var(--d-text); padding-block: clamp(3.2rem, 6vw, 4.8rem); }
.footer p { color: var(--d-body); font-size: 0.96rem; max-width: 42ch; margin-top: 1.3rem; }
.footer-top {
    display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}
.footer h3 {
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--d-muted); margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.footer-links a,
.footer-links button {
    font-family: var(--font); font-size: 0.96rem; font-weight: 400;
    width: fit-content; color: var(--d-body);
    background: none; border: none; padding: 0; text-align: left; cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-links a:hover,
.footer-links button:hover { color: var(--d-text); border-bottom-color: var(--signal); }
.footer-legal {
    display: flex; flex-wrap: wrap; justify-content: space-between;
    align-items: center; gap: 0.7rem 1.5rem;
    border-top: 1px solid var(--d-hairline);
    margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.5rem;
    font-size: 0.85rem; color: var(--d-muted);
}

.origin { display: inline-flex; align-items: center; gap: 0.5rem; }
.origin .flag { height: 13px; width: auto; flex: none; }
.origin > span { color: var(--d-body); }

/* --------------------------------------------------------------------------
   Cookie notice
   A real consent gate, not an ornament: the choice is stored and the analytics
   hook is gated behind it. Both answers are one click and equally prominent.
   -------------------------------------------------------------------------- */

.cookie {
    /* same token re-pointing trick as .band-dark, so .btn and .label just work */
    --ink:      var(--d-text);
    --body:     var(--d-body);
    --muted:    var(--d-muted);
    /* lighter than --d-hairline: the panel border sits against the page, but the
       ghost button's border sits against the panel and needs to be seen */
    --rule:     #414268;

    position: fixed; z-index: 120;
    left: var(--gutter); bottom: var(--gutter);
    width: min(430px, calc(100vw - var(--gutter) * 2));
    background: var(--d-bg); color: var(--d-text);
    border: 1px solid var(--d-hairline); border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    transform: translateY(calc(100% + var(--gutter) + 8px));
    visibility: hidden;
    transition: transform 0.55s var(--ease), visibility 0.55s;
}
.cookie.show { transform: none; visibility: visible; }
.cookie::before {
    content: ""; position: absolute; top: -1px; left: -1px;
    width: 38px; height: 2px; background: var(--signal);
}
.cookie .label { display: block; margin-bottom: 0.7rem; }
.cookie p { font-size: 0.92rem; line-height: 1.55; color: var(--d-body); }
.cookie a { color: #9DAEFF; border-bottom: 1px solid currentColor; }
.cookie a:hover { color: #C2CCFF; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.15rem; }
.cookie-actions .btn { padding: 0.7rem 1.1rem; font-size: 0.9rem; }

@media (max-width: 560px) {
    .cookie { left: 0; right: 0; bottom: 0; width: auto; border-radius: 0; border-left: none; border-right: none; border-bottom: none; }
    .cookie::before { left: 0; }
    .cookie-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie { transition: none; }
}

/* --------------------------------------------------------------------------
   Standalone document pages (legal)
   No hero behind the header, so it is solid from the first pixel.
   -------------------------------------------------------------------------- */

body.page-doc .site-header { background: var(--paper); border-bottom-color: var(--hairline); }

.page { padding: calc(var(--header) + clamp(2.5rem, 6vw, 4.5rem)) 0 var(--section); }
.page-head {
    max-width: 62ch; margin-bottom: clamp(2.2rem, 4vw, 3rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.1rem); border-bottom: 1px solid var(--rule);
}
.page-head h1 {
    font-family: var(--display); font-weight: 400;
    font-variation-settings: "opsz" 120;
    font-size: clamp(2.15rem, 4.4vw, 3.2rem); line-height: 1.07; letter-spacing: -0.014em;
}
.page-head .updated {
    margin-top: 0.9rem; color: var(--muted);
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
}

.prose { max-width: 74ch; }
.prose h2 {
    font-size: 1.1rem; font-weight: 600; letter-spacing: -0.005em;
    margin: 2.4rem 0 0.7rem; padding-top: 0.9rem; border-top: 1px solid var(--hairline);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 { font-size: 1rem; font-weight: 600; margin: 1.6rem 0 0.5rem; }
.prose p, .prose li { color: var(--body); }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1.3rem 1.15rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.55rem; padding-left: 0.25rem; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--signal); border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.prose a:hover { border-bottom-color: currentColor; }

.prose .note {
    background: var(--surface); border: 1px solid var(--hairline);
    border-left: 2px solid var(--signal); border-radius: var(--radius);
    padding: 1.05rem 1.25rem; margin-bottom: 1.6rem; font-size: 0.95rem;
}
.prose .note p:last-child { margin-bottom: 0; }

.doc-nav {
    display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem;
    margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.4rem;
    border-top: 1px solid var(--rule); font-size: 0.93rem;
}
.doc-nav a { color: var(--body); border-bottom: 1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease; }
.doc-nav a:hover { color: var(--ink); border-bottom-color: var(--signal); }
.doc-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--signal); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .nav { gap: 1rem; }
    .nav > a { font-size: 0.88rem; }
}

@media (max-width: 1040px) {
    .hero-grid { grid-template-columns: 1fr; gap: clamp(1.5rem, 4vw, 2.5rem); }
    .hero-graph { height: clamp(300px, 52vw, 420px); }

    /* fill the stage instead of centring a short column in a tall box:
       copy takes what it needs, the graph takes everything left */
    .hero-anim .hero-stage {
        grid-template-rows: 1fr;
        align-content: stretch;
        padding-block: calc(var(--header) + 1.25rem) 1.25rem;
    }
    .hero-anim .hero-grid {
        height: 100%;
        grid-template-rows: auto minmax(190px, 1fr);
        align-items: stretch;
    }
    .hero-anim .hero-graph { height: auto; min-height: 0; }
    .hero-anim .scroll-cue { margin-top: 1.4rem; }

    /* single column — the panel sits below the points, so there is nothing
       left to hold it against */
    .measure-grid { grid-template-columns: 1fr; }
    .report { position: static; }
    .models { grid-template-columns: 1fr; }
    .service, .deliverables > li { grid-template-columns: 1fr; gap: 0.7rem; }
    .service-body p { font-size: 0.99rem; }
}

@media (max-width: 860px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .pillars, .steps, .cols-2, .failures, .contact-inner { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr 1fr; gap: 2rem 1.5rem; }
    .footer-top > div:first-child { grid-column: 1 / -1; }
    .contact-inner { align-items: start; }
    .steps { gap: 2.4rem; }

    /* the spine rotates: the edge now runs top to bottom */
    .spine-line {
        top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto;
        transform-origin: center top;
    }
    .js .spine-line { transform: scaleY(0); }
    .step { padding-top: 0; padding-left: 2.2rem; }
    .step-node { top: 0.42rem; left: 1px; }
}

@media (max-width: 680px) {
    .nav {
        display: none; position: absolute; top: calc(100% + 0.55rem);
        left: var(--gutter); right: var(--gutter);
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--paper); border: 1px solid var(--hairline);
        border-radius: var(--radius); padding: 0.4rem;
    }
    .nav.open { display: flex; }
    .nav > a { padding: 0.75rem 0.7rem; border-bottom: none; font-size: 0.95rem; }
    .nav-cta { margin-top: 0.35rem; text-align: center; }
    .nav-toggle { display: inline-flex; }

    .brand-logo { height: 27px; }
    .section-title { max-width: none; }
    .pull { padding-left: 1.2rem; }
    .panel { padding-inline: 1.1rem; }

    /* the beats have to leave the graph somewhere to live */
    .hero-anim .beats .beat { font-size: clamp(1.45rem, 6.2vw, 2.05rem); }
    .hero-anim .hero-sub { font-size: 0.97rem; margin-bottom: 1.3rem; }
    .hero-anim .actions .btn { padding: 0.8rem 1.2rem; font-size: 0.92rem; }
}

@media (max-width: 460px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.7rem 1.3rem; }
    .stat-fig { font-size: 1.9rem; }
    .footer-top { grid-template-columns: 1fr; }
    .report-rows li { grid-template-columns: 4.6rem minmax(0, 1fr) 2.4rem; gap: 0.7rem; font-size: 0.8rem; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .spine-line { transform: none !important; transition: none; }
    .step-node { transform: scale(1) !important; transition: none; }
    .btn:hover, .model:hover { transform: none; }
    .faq-a { transition: none; }
}
