/* =================================================================
   Owen Reid - site design system
   Swiss editorial grid. Warm paper, near-monochrome ink, hairlines
   not boxes, one restrained accent. Low data-to-ink ratio.
   One file restyles every page; all legacy class and variable
   names are preserved.
   ================================================================= */

:root {
    /* ---- ink / type ---- */
    --ink:        #1C1A17;   /* warm near-black, headings + primary ink */
    --ink-2:      #34302A;   /* secondary dark ink */
    --slate:      #4A463E;   /* body text on paper */
    --slate-2:    #8A8276;   /* muted warm grey */

    /* ---- hairlines ---- */
    --line:       #D8D2C5;   /* hairline rule */
    --line-2:     #E3DED4;   /* fainter hairline */

    /* ---- paper / fields ---- */
    --paper:      #F4F1EA;   /* warm off-white, never stark white */
    --tint:       #EFEBE2;   /* faint sectioning tone */
    --tint-2:     #EAE5DA;   /* slightly deeper panel */

    /* ---- the single restrained accent (oxblood / umber) ---- */
    --accent:     #6B3F2A;
    --accent-d:   #51301F;   /* deeper, for hover */
    --accent-sft: #ECE3DA;   /* whisper-quiet accent wash */

    /* ---- "positive" tone, kept monochrome-adjacent, no loud green ---- */
    --roi:        #6B3F2A;
    --roi-d:      #51301F;
    --roi-sft:    #ECE3DA;

    /* ---- shadow tokens kept defined but effectively flat (no heavy shadows) ---- */
    --shadow:     0 1px 0 rgba(28,26,23,.04);
    --shadow-lg:  0 1px 0 rgba(28,26,23,.06);

    /* ---- geometry: square, editorial. radius kept tiny ---- */
    --radius:     2px;
    --radius-sm:  2px;
    --maxw:       1180px;
    --gutter:     clamp(22px, 5vw, 76px);
    --col-gap:    clamp(20px, 3vw, 44px);

    /* ---- type families ---- */
    --serif:      'Newsreader', 'Fraunces', Georgia, 'Times New Roman', serif;
    --display:    'Fraunces', 'Newsreader', Georgia, serif;
    --mono:       'IBM Plex Mono', ui-monospace, Menlo, 'SFMono-Regular', monospace;
    --sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* ---- eyebrow tuning ---- */
    --fs-eyebrow: 11px;
    --ls-eyebrow: 0.2em;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--slate);
    font-family: var(--sans);
    font-size: 16.5px;
    line-height: 1.65;
    letter-spacing: 0.003em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: rgba(107, 63, 42, 0.15); color: var(--ink); }

img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
    color: var(--ink);
    font-family: var(--serif);
    line-height: 1.13;
    margin: 0 0 .4em 0;
    font-weight: 400;
    letter-spacing: -0.012em;
}

p { margin: 0 0 1.1em 0; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- eyebrow label (accent tick + kicker lockup) ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--mono);
    font-size: var(--fs-eyebrow);
    font-weight: 500;
    letter-spacing: var(--ls-eyebrow);
    text-transform: uppercase;
    color: var(--slate-2);
    margin: 0 0 22px 0;
}
.eyebrow::before {
    content: "";
    width: 32px;
    height: 1px;
    background: var(--accent);
    flex: none;
}
.eyebrow.roi { color: var(--slate-2); }
.eyebrow.roi::before { background: var(--accent); }
.eyebrow.muted { color: var(--slate-2); }
.eyebrow.muted::before { background: var(--line); }

/* ---------- buttons ---------- */
/* Quiet, editorial. Primary = ink-filled (one restrained filled CTA).
   Ghost = hairline. Arrow nudges on hover. No gradients, no glow. */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 15px 26px;
    border-radius: var(--radius);
    border: 1px solid var(--ink);
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    transition: background .28s ease, color .28s ease, border-color .28s ease;
    white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-lg { padding: 17px 30px; font-size: 12px; }
.btn .arw { transition: transform .28s ease; font-family: var(--sans); }
.btn:hover .arw { transform: translateX(4px); }

/* ---------- top nav ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    backdrop-filter: saturate(120%) blur(9px);
    -webkit-backdrop-filter: saturate(120%) blur(9px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    font-family: var(--serif);
    font-weight: 500;
    color: var(--ink);
    font-size: 19px;
    letter-spacing: 0.005em;
    display: flex;
    align-items: center;
    gap: 11px;
}
.nav-brand:hover { color: var(--ink); }
.nav-brand .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
    box-shadow: none;
    flex: none;
}
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav-links a {
    color: var(--slate-2);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 6px 0;
    border-radius: 0;
    position: relative;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 1px;
    background: var(--ink);
    transition: width .3s ease;
}
.nav-links a:hover { color: var(--ink); background: transparent; }
.nav-links a:hover::after { width: 100%; }
.nav-links a.nav-cta {
    color: var(--ink);
}
.nav-links a.nav-cta::after { background: var(--accent); width: 100%; }
.nav-links a.nav-cta:hover { color: var(--accent); }
@media (max-width: 680px) {
    .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- generic section ---------- */
.section { padding: clamp(64px, 9vh, 104px) 0; }
.section.tint { background: var(--tint); }
.section.ink { background: var(--ink); color: #CFC8BA; }
.section-sm { padding: clamp(52px, 7vh, 80px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vh, 52px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(27px, 3.4vw, 42px);
    line-height: 1.13;
    letter-spacing: -0.014em;
}
.section-head p { font-size: 17px; color: var(--slate); margin-top: 10px; max-width: 60ch; }
.ink h2, .ink h3 { color: var(--paper); }
.ink a { color: var(--paper); border-bottom: 1px solid rgba(244,241,234,.3); }
.ink a:hover { color: var(--paper); border-color: var(--paper); }

/* ---------- hero ---------- */
/* Flat warm paper, no gradient wash. Fraunces 300 display headline. */
.hero {
    padding: clamp(72px, 13vh, 132px) 0 clamp(48px, 8vh, 96px);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.hero .eyebrow { margin-bottom: clamp(30px, 5vh, 46px); }
.hero h1 {
    font-family: var(--display);
    font-weight: 300;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.018em;
    max-width: 18ch;
    margin: 0 0 4px;
    color: var(--ink);
    text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero .lede {
    font-family: var(--sans);
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.66;
    color: var(--ink-2);
    max-width: 56ch;
    margin: clamp(26px, 4vh, 40px) 0 0;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: clamp(30px, 4.5vh, 44px);
}

/* ---- hero meta triptych (Find / Prove / Build), hairline-top discipline ---- */
.hero-meta {
    margin-top: clamp(40px, 6vh, 64px);
    padding-top: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
}
.hero-meta .item {
    padding: 26px clamp(20px, 3vw, 36px) 0 0;
    border-right: 1px solid var(--line);
}
.hero-meta .item:last-child { border-right: 0; padding-right: 0; }
.hero-meta .item .k {
    font-family: var(--serif);
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.1;
}
.hero-meta .item .v {
    margin-top: 9px;
    font-size: 13.5px;
    color: var(--slate-2);
    line-height: 1.55;
    max-width: 26ch;
}
@media (max-width: 680px) {
    .hero-meta { grid-template-columns: 1fr; }
    .hero-meta .item {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 22px 0;
    }
    .hero-meta .item:last-child { border-bottom: 0; }
}

/* ---------- stat band ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: clamp(40px, 6vh, 64px);
    border-top: 1px solid var(--line);
}
.stat {
    background: transparent;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    padding: 28px clamp(20px, 3vw, 36px) 4px clamp(24px, 3vw, 40px);
}
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; padding-right: 0; }
.stat .n {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 38px;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.stat .n .u { color: var(--accent); }
.stat .l { font-size: 14.5px; color: var(--slate); line-height: 1.5; }
@media (max-width: 760px) {
    .stats { grid-template-columns: 1fr; }
    .stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 0; }
    .stat:last-child { border-bottom: 0; }
}

/* ---------- process / approach steps (hairline rows, no boxes) ---------- */
.steps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: clamp(20px, 4vw, 48px);
    align-items: start;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    padding: clamp(28px, 4vh, 40px) 0;
    transition: background .3s ease;
}
.step:hover { box-shadow: none; transform: none; background: rgba(107, 63, 42, 0.022); }
.step .num {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 0.9;
    color: var(--ink);
    width: auto; height: auto;
    display: block;
    background: transparent;
    border-radius: 0;
    letter-spacing: -0.02em;
    transition: color .3s ease;
}
.step:hover .num { color: var(--accent); }
.step h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(19px, 2vw, 24px);
    line-height: 1.2;
    letter-spacing: -0.008em;
    margin-bottom: 9px;
}
.step p { font-size: 16px; margin: 0; color: var(--slate); max-width: 64ch; line-height: 1.62; }
@media (max-width: 600px) {
    .step { grid-template-columns: auto 1fr; gap: 16px 22px; }
    .step .num { font-size: 30px; }
    .step h3 { grid-column: 1 / -1; }
    .step p { grid-column: 1 / -1; }
}

/* ---------- case studies (full-bleed cells, hairline dividers) ---------- */
.cases { display: grid; gap: 0; border-top: 1px solid var(--line); }
.case {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(24px, 4vw, 56px);
    padding: clamp(40px, 6vh, 64px) 0;
    align-items: start;
}
.case.flip { grid-template-columns: 1fr 1.15fr; }
.case.flip .case-media { order: 2; }
.case-body { padding: 0; }
.case-cat {
    font-family: var(--mono);
    font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 16px;
}
.case-body h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(23px, 2.8vw, 32px);
    line-height: 1.1;
    letter-spacing: -0.014em;
    margin-bottom: 22px;
}
.case-block { margin-bottom: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.case-block:first-of-type { border-top: 0; padding-top: 0; }
.case-block .k {
    display: block;
    font-family: var(--mono);
    font-size: 11px; font-weight: 500; letter-spacing: .14em;
    text-transform: uppercase; color: var(--accent);
    margin-bottom: 8px;
}
.case-block p { font-size: 15.5px; margin: 0; color: var(--slate); line-height: 1.6; }
.case-result { color: var(--ink-2); font-weight: 500; }
.case-metric {
    display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
    margin: 0 0 22px; padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.case-metric .fig {
    font-family: var(--display); font-weight: 300;
    font-size: clamp(34px, 4.6vw, 52px); line-height: 1;
    color: var(--accent); letter-spacing: -0.02em;
}
.case-metric .fig .u { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--slate-2); letter-spacing: 0.04em; margin-left: 5px; }
.case-metric .note { font-size: 14px; color: var(--slate); max-width: 32ch; line-height: 1.45; }
.case-media {
    background: var(--tint);
    display: flex; align-items: center; justify-content: center;
    padding: clamp(26px, 3vw, 40px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    align-self: stretch;
}
.case.flip .case-media { border: 1px solid var(--line); }
.case-media img { border-radius: var(--radius); box-shadow: none; width: 100%; object-fit: contain; }
.case-media.logo { background: var(--tint); }
.case-media.logo img { max-width: 168px; box-shadow: none; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
    font-family: var(--mono);
    font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
    color: var(--slate-2);
    background: transparent;
    border: 1px solid var(--line);
    padding: 6px 11px; border-radius: var(--radius);
}
@media (max-width: 860px) {
    .case, .case.flip { grid-template-columns: 1fr; gap: 28px; }
    .case.flip .case-media { order: 0; }
}

/* ---------- feature / "where this pays off" cards (hairline-top, no box) ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.fcard {
    background: transparent;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    padding: 30px clamp(22px, 2.6vw, 36px) 6px 0;
    transition: none;
}
.fcard:hover { box-shadow: none; transform: none; }
.grid-3 .fcard:nth-child(3n) { border-right: 0; padding-right: 0; }
.grid-2 .fcard:nth-child(2n) { border-right: 0; padding-right: 0; }
.fcard h3 { font-family: var(--serif); font-weight: 500; font-size: 19px; margin-bottom: 9px; letter-spacing: -0.008em; }
.fcard p { font-size: 15px; margin: 0; color: var(--slate); line-height: 1.6; }
.fcard .ic {
    width: auto; height: auto; border-radius: 0;
    background: transparent; color: var(--accent);
    display: block;
    font-family: var(--serif);
    font-size: 22px; margin-bottom: 14px;
}
@media (max-width: 860px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .fcard {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 26px 0;
    }
    .grid-3 .fcard:last-child, .grid-2 .fcard:last-child { border-bottom: 0; }
}

/* ---------- contact / CTA band ---------- */
/* Inverted ink band, square, no rounded pill, no center-stacked SaaS look */
.cta-band {
    background: var(--ink);
    border-radius: var(--radius);
    padding: clamp(48px, 7vh, 72px) clamp(28px, 5vw, 64px);
    color: var(--paper);
    text-align: left;
}
.cta-band h2 {
    color: var(--paper);
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.016em;
    max-width: 20ch;
}
.cta-band p { color: #C4BCAD; font-size: 17px; max-width: 56ch; margin: 18px 0 30px; }
.cta-band .hero-cta { justify-content: flex-start; margin-top: 0; }
.cta-band .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-band .btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.cta-band .btn-ghost { background: transparent; color: var(--paper); border-color: rgba(244,241,234,.3); }
.cta-band .btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
@media (max-width: 600px) { .cta-band { padding: 40px 26px; } }

/* ---------- footer ---------- */
.foot {
    border-top: 1px solid var(--line);
    padding: clamp(36px, 5vh, 52px) 0;
    color: var(--slate-2);
    font-size: 13px;
    font-family: var(--mono);
    letter-spacing: 0.04em;
}
.foot-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.foot a { color: var(--slate-2); }
.foot a:hover { color: var(--ink); }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---------- spotlight feature band (no gradient, hairline frame) ---------- */
.spotlight {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
    background: var(--tint);
    border: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: clamp(40px, 6vh, 64px) clamp(30px, 5vw, 56px);
}
.spotlight > div:first-child { padding-left: 0; }
.spotlight h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.12;
    letter-spacing: -0.014em;
    margin-bottom: 16px;
    color: var(--ink);
}
.spotlight p { font-size: 16.5px; color: var(--slate); margin-bottom: 26px; max-width: 54ch; }
.spotlight .sp-side { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.sp-chip {
    display: flex; align-items: baseline; gap: 13px;
    background: transparent; border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 16px 0; font-size: 15px; font-weight: 500; color: var(--ink);
}
.sp-chip .tick {
    color: var(--accent); font-weight: 500;
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
    flex: none;
}
@media (max-width: 820px) {
    .spotlight { grid-template-columns: 1fr; padding: 36px 0; }
    .spotlight > div:first-child { padding: 0 var(--gutter); }
    .spotlight .sp-side { margin: 0 var(--gutter); }
}

/* ---------- work / project cards (hairline, no shadow) ---------- */
.wgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.5vw, 32px); }
.wcard {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: none;
    display: flex; flex-direction: column;
    transition: border-color .25s ease;
}
.wcard:hover { transform: none; box-shadow: none; border-color: var(--ink); }
.wcard-img { aspect-ratio: 16 / 10; background: var(--tint); overflow: hidden; border-bottom: 1px solid var(--line); }
.wcard-img img { width: 100%; height: 100%; object-fit: cover; }
.wcard-body { padding: 24px clamp(22px, 2vw, 28px) 26px; display: flex; flex-direction: column; flex: 1; }
.wcard-cat {
    font-family: var(--mono);
    font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 12px;
}
.wcard-body h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin-bottom: 10px; letter-spacing: -0.01em; }
.wcard-body p { font-size: 14.5px; color: var(--slate); margin: 0 0 18px; flex: 1; line-height: 1.6; }
.wcard .more {
    font-family: var(--sans);
    font-weight: 500; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ink);
    border-top: 1px solid var(--line);
    padding-top: 16px;
}
.wcard:hover .more { color: var(--accent); }
@media (max-width: 920px) { .wgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wgrid { grid-template-columns: 1fr; } }

/* ---------- simple text list cards (events / experience) ---------- */
.lcard {
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 28px clamp(20px, 2.4vw, 32px) 4px 0;
}
.lcard .wcard-cat { margin-bottom: 12px; }
.lcard h3 { font-family: var(--serif); font-weight: 500; font-size: 19px; margin-bottom: 10px; letter-spacing: -0.008em; }
.lcard p { font-size: 15px; color: var(--slate); margin: 0; line-height: 1.6; }
.lcard a { color: var(--accent); border-bottom: 1px solid var(--line); }
.lcard a:hover { border-color: var(--accent); }

/* ---------- floating academic button ---------- */
.float-academic {
    position: fixed; bottom: 22px; right: 22px; z-index: 60;
    display: inline-flex; align-items: center; gap: 9px;
    background: var(--ink); color: var(--paper);
    padding: 12px 18px; border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
    box-shadow: var(--shadow-lg);
    transition: background .25s ease;
}
.float-academic .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
    flex: none;
    transition: background .25s ease;
}
.float-academic:hover { transform: none; color: var(--paper); background: var(--accent); }
.float-academic:hover .dot { background: var(--paper); }

/* ---------- utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.lead { font-size: 19px; color: var(--ink-2); line-height: 1.66; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- generic prose inside sections (foreman / project pages) ---------- */
.section h2, .section-sm h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.014em;
    margin-bottom: 0.5em;
}
.section h3, .section-sm h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(19px, 2vw, 23px);
    letter-spacing: -0.008em;
}
.wrap-narrow p { color: var(--slate); }
.wrap-narrow a { color: var(--accent); border-bottom: 1px solid var(--line); transition: border-color .25s ease; }
.wrap-narrow a:hover { color: var(--accent-d); border-color: var(--accent); }
.wrap-narrow ul { color: var(--slate); padding-left: 1.1em; }
.wrap-narrow li { margin-bottom: 0.5em; }
.section.ink .wrap-narrow p { color: #CFC8BA; }

/* respectful of reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* =================================================================
   APPENDED - scroll reveal + inline diagram support
   Added for the elevated build. Nothing above is changed; these
   rules only add behaviour. The inline <head> script adds class
   "js" to <html>, so without JS every ".reveal" stays fully visible.
   ================================================================= */

/* ---- scroll reveal (gated on .js so no-JS shows content) ---- */
.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity .7s cubic-bezier(.2, .6, .2, 1),
        transform .7s cubic-bezier(.2, .6, .2, 1);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---- inline bespoke diagrams sitting inside .case-media ---- */
/* Strip the panel chrome: the diagrams carry their own hairline
   language, so they sit directly on paper, no tint box or border. */
.case-media.diagram {
    background: transparent;
    border: 0;
    padding: 0;
    align-self: center;
}
.case.flip .case-media.diagram { border: 0; }
.case-media.diagram svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* ---- the bespoke SVG primitives (scoped to .diagram) ---- */
/* These mirror the standalone preview so the lifted <svg> markup
   themes correctly against the live site tokens. */
.diagram .d-node { fill: none; stroke: var(--line); stroke-width: 1; }
.diagram .d-node.is-built { stroke: var(--accent); stroke-width: 1.4; }
.diagram .d-fill { fill: var(--paper); stroke: var(--line); stroke-width: 1; }
.diagram .d-fill.is-built { stroke: var(--accent); stroke-width: 1.4; }
.diagram .d-label {
    font-family: var(--mono); font-size: 10px; font-weight: 500;
    letter-spacing: 0.13em; text-transform: uppercase; fill: var(--slate-2);
}
.diagram .d-label.ink { fill: var(--ink); }
.diagram .d-title {
    font-family: var(--serif); font-size: 15px;
    fill: var(--ink); letter-spacing: -0.005em;
}
.diagram .d-edgelabel {
    font-family: var(--mono); font-size: 9.5px; font-weight: 500;
    letter-spacing: 0.1em; text-transform: uppercase; fill: var(--slate-2);
}
.diagram .d-edgelabel.accent { fill: var(--accent); }
.diagram .d-conn { fill: none; stroke: var(--ink); stroke-width: 1; }
.diagram .d-conn.accent { stroke: var(--accent); }
.diagram .d-return { fill: none; stroke: var(--slate-2); stroke-width: 1; stroke-dasharray: 4 4; }
.diagram .d-tick { stroke: var(--accent); stroke-width: 1.4; }
.diagram .d-hint { fill: none; stroke: var(--line); stroke-width: 1; }
.diagram .d-dot-accent { fill: var(--accent); }
.diagram .d-dot-ink { fill: var(--ink); }

/* ---- diagram animation (only once the wrapper is .is-visible) ---- */
.js .diagram .flow { opacity: 0; }
.js .diagram .flow-dot { opacity: 0; offset-rotate: 0deg; }
.js .diagram .draw { stroke-dasharray: var(--len, 300); stroke-dashoffset: var(--len, 300); }

.diagram.is-visible .flow { animation: flowIn .9s ease forwards; }
.diagram.is-visible .draw { animation: drawIn 1.1s ease forwards; }
.diagram.is-visible .flow-dot { animation: travel 3.6s cubic-bezier(.6, 0, .4, 1) .5s infinite; }
.diagram.is-visible .pulse { animation: pulse 3.2s ease-in-out infinite; }
.diagram.is-visible .bubble { animation: bubbleIn .7s ease forwards; }
.diagram.is-visible .sweep { transform-box: fill-box; transform-origin: center; animation: sweep 9s linear infinite; }

.diagram.is-visible .d1 { animation-delay: .0s; }
.diagram.is-visible .d2 { animation-delay: .18s; }
.diagram.is-visible .d3 { animation-delay: .36s; }
.diagram.is-visible .d4 { animation-delay: .54s; }
.diagram.is-visible .d5 { animation-delay: .72s; }

@keyframes flowIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawIn { to { stroke-dashoffset: 0; } }
@keyframes travel {
    0% { opacity: 0; offset-distance: 0%; }
    8% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; offset-distance: 100%; }
}
@keyframes pulse {
    0%, 100% { opacity: .35; }
    50% { opacity: 1; }
}
@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}
@keyframes sweep { to { transform: rotate(360deg); } }

/* ---- the homepage card mark sits neatly inside .wcard-img ---- */
.wcard-img.diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 3vw, 30px);
    background: var(--tint);
}
.wcard-img.diagram svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ---- reduced motion: show everything at rest, no animation ---- */
@media (prefers-reduced-motion: reduce) {
    .js .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .diagram * { animation: none !important; }
    .diagram .flow, .diagram .flow-dot, .diagram .bubble { opacity: 1 !important; }
    .diagram .draw { stroke-dashoffset: 0 !important; }
    .diagram .pulse { opacity: .7 !important; }
}
