/* ============================================================
   TRISIGH "instrument on paper" design
   Warm paper base, ink hairlines, one burnt-sienna accent.
   Display: Bricolage Grotesque · Body: Spline Sans · Data: Fragment Mono
   ============================================================ */

:root {
    --paper: #f6f3ec;
    --surface: #fffdf8;
    --ink: #1b1812;
    --muted: #6d665a;
    --faint: #6f6857;
    --line: #e3ddcf;
    --line-strong: #cfc7b2;
    --accent: #b04313;
    --accent-dark: #9c3a0f;
    --accent-dim: rgba(176, 67, 19, .09);
    --accent-line: rgba(176, 67, 19, .42);
    --btn-text: #fff8f2;
    --ink-soft: #b5aea0;
    --ink-faint: #8f8875;
    --text-xs: 12px;
    --text-sm: 13.5px;
    --text-base: 16px;
    --text-md: 18px;
    --text-lg: 22px;
    --font-display: 'Bricolage Grotesque', 'Spline Sans', sans-serif;
    --font-body: 'Spline Sans', -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'Fragment Mono', ui-monospace, 'Cascadia Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: light; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    overflow-x: hidden;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(176, 67, 19, .18); }

main { flex: 1; }

a { text-decoration: none; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; }
p { text-wrap: pretty; }

.mono { font-family: var(--font-mono); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; width: 100%; }

.skip-link {
    position: absolute; left: -9999px; top: 12px; z-index: 100;
    background: var(--ink); color: var(--paper);
    padding: 10px 18px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 12px; }

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- BUTTONS & LINKS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--accent); color: var(--btn-text);
    font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); line-height: 1;
    padding: 13px 26px; border-radius: 10px; border: 1px solid var(--accent-dark);
    cursor: pointer;
    box-shadow: 0 2px 0 var(--accent-dark), 0 6px 18px rgba(176, 67, 19, .18);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: var(--accent-dark); box-shadow: 0 3px 0 var(--accent-dark), 0 10px 24px rgba(176, 67, 19, .25); }
.btn:active { transform: translateY(1px); box-shadow: 0 0 0 var(--accent-dark), 0 3px 10px rgba(176, 67, 19, .2); }
.btn-sm { padding: 10px 18px; font-size: var(--text-sm); }
.btn-lg { padding: 17px 32px; font-size: var(--text-base); border-radius: 12px; }

.text-link {
    font-weight: 600; color: var(--ink); padding-bottom: 3px;
    border-bottom: 2px solid var(--line-strong);
    transition: color .15s, border-color .15s;
}
.text-link:hover { color: var(--accent); border-color: var(--accent-line); }

/* bigger touch targets on touch devices */
@media (pointer: coarse) {
    .text-link { padding: 12px 2px; }
}

/* ---------- NAV ---------- */
nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(246, 243, 236, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-strong);
}
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 15px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); letter-spacing: -.02em;
}
.logo-mark { width: 24px; height: 24px; fill: var(--accent); flex-shrink: 0; }

.nav-links { display: flex; gap: 30px; font-size: var(--text-base); font-weight: 500; color: var(--muted); }
.nav-links a { position: relative; padding: 4px 0; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: var(--accent); border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
    display: none; background: transparent; border: 1px solid var(--line-strong);
    color: var(--ink); font-size: var(--text-md); border-radius: 8px;
    width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center;
}

/* ---------- HERO ---------- */
.hero { position: relative; padding: 88px 0 40px; }

.status {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-mono); font-size: var(--text-sm); color: var(--muted);
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: 7px 15px; margin-bottom: 30px;
    background: var(--surface);
}
.pulse {
    width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 0 rgba(176, 67, 19, .4);
    animation: pulse 2.2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(176, 67, 19, .4); }
    70% { box-shadow: 0 0 0 7px rgba(176, 67, 19, 0); }
    100% { box-shadow: 0 0 0 0 rgba(176, 67, 19, 0); }
}

h1 {
    font-size: clamp(44px, 7vw, 92px);
    font-weight: 800; letter-spacing: -.035em; line-height: .98;
    max-width: 12em;
    text-wrap: balance;
}
h1 .accent { color: var(--accent); }

.lead {
    margin-top: 28px; max-width: 36em;
    color: var(--muted); font-size: var(--text-md); line-height: 1.7;
}
.hero-actions { display: flex; gap: 28px; align-items: center; margin-top: 38px; flex-wrap: wrap; }
.hero-meta { margin-top: 24px; font-size: var(--text-sm); color: var(--faint); }

/* ---------- CHART PANEL ---------- */
.chart-panel {
    margin-top: 64px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(27, 24, 18, .08), 0 1px 0 rgba(27, 24, 18, .04);
    overflow: hidden;
}
.chart-head {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 16px 22px; border-bottom: 1px solid var(--line);
    font-size: var(--text-sm);
}
.chart-head .q { color: var(--ink); }
.chart-head .q::before { content: '> '; color: var(--accent); }
.chart-head .range { color: var(--faint); }

.chart-body { position: relative; padding: 26px 22px 8px; }
.chart { display: block; width: 100%; height: 260px; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .deploy { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 5; }
.chart .area { fill: rgba(176, 67, 19, .07); stroke: none; }
.chart .line {
    fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round;
    stroke-dasharray: 2400; stroke-dashoffset: 2400;
    transition: stroke-dashoffset 2.4s cubic-bezier(.3, 0, .2, 1) .3s;
}
.chart-panel.drawn .chart .line { stroke-dashoffset: 0; }

.anno {
    position: absolute; font-size: var(--text-xs); color: var(--muted);
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 8px; padding: 6px 11px;
    box-shadow: 0 6px 16px rgba(27, 24, 18, .07);
}
.anno b { color: var(--accent); font-weight: 400; }
.anno-deploy { left: calc(64% - 30px); top: 34px; }
.anno-p99 { right: 26px; top: 58px; }

.chart-foot {
    display: flex; justify-content: space-between;
    padding: 10px 22px 16px; font-size: var(--text-xs); color: var(--faint);
}

/* ---------- SECTIONS ---------- */
section { padding: 96px 0; }
.sec-head { max-width: 640px; margin-bottom: 60px; }
.eyebrow-mono {
    display: block; font-family: var(--font-mono);
    font-size: var(--text-sm); color: var(--accent); margin-bottom: 16px;
}
.sec-head h2 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -.03em; text-wrap: balance; }
.sec-head p { color: var(--muted); margin-top: 16px; font-size: var(--text-md); }

/* ---------- PILLARS (spec sheet, not cards) ---------- */
.pillars {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.pillar { border-top: 2px solid var(--ink); padding-top: 22px; }
.pillar-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.pico { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; }
.pnum { font-size: var(--text-sm); color: var(--faint); }
.pillar h3 { font-size: var(--text-lg); letter-spacing: -.02em; margin-bottom: 10px; }
.pillar p { color: var(--muted); font-size: var(--text-base); }

/* ---------- SPLIT (product) ---------- */
.split {
    display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start;
}
.split-left h2 { font-size: clamp(30px, 3.8vw, 44px); letter-spacing: -.028em; text-wrap: balance; }
.split-note { margin-top: 18px; color: var(--muted); font-size: var(--text-base); }
.split-right p { color: var(--muted); font-size: var(--text-base); margin-bottom: 18px; }

.spec { margin-top: 30px; border-top: 1px solid var(--line-strong); }
.spec-row {
    display: grid; grid-template-columns: 200px 1fr; gap: 18px;
    padding: 16px 0; border-bottom: 1px solid var(--line);
}
.spec-row dt { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink); padding-top: 2px; }
.spec-row dd { color: var(--muted); font-size: var(--text-base); }

/* ---------- NUMBERS ---------- */
.stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-block: 2px solid var(--ink);
}
.stat { padding: 30px 24px; border-left: 1px solid var(--line-strong); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .n {
    font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px);
    font-weight: 800; letter-spacing: -.03em; color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.stat .l { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--faint); margin-top: 8px; }

.stack-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.chip {
    font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted);
    border: 1px solid var(--line-strong); border-radius: 6px;
    padding: 6px 12px; background: var(--surface);
}

/* ---------- CTA ---------- */
.cta-band {
    text-align: center;
    background: var(--ink);
    border-radius: 20px; padding: 80px 32px 64px;
    position: relative; overflow: hidden;
}
.cta-band::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(246, 243, 236, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(246, 243, 236, .05) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse 75% 90% at 50% 115%, #000 25%, transparent 75%);
    mask-image: radial-gradient(ellipse 75% 90% at 50% 115%, #000 25%, transparent 75%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: var(--paper); font-size: clamp(32px, 4.4vw, 50px); letter-spacing: -.03em; }
.cta-band p { color: var(--ink-soft); margin: 16px auto 36px; font-size: var(--text-base); max-width: 32em; }
.cta-band .btn { background: var(--accent); border-color: var(--accent-dark); box-shadow: 0 3px 0 var(--accent-dark), 0 10px 30px rgba(176, 67, 19, .35); }
.cta-band .btn:hover { background: var(--accent-dark); }
.cta-note { margin-top: 26px; font-size: var(--text-xs); color: var(--ink-faint); }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--line-strong); padding: 56px 0 40px; margin-top: 24px; }
.foot-inner {
    display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
    align-items: flex-start;
}
.foot-tag { color: var(--faint); font-size: var(--text-sm); margin-top: 14px; max-width: 260px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 26px; font-size: var(--text-base); font-weight: 500; color: var(--muted); }
.foot-links a:hover { color: var(--accent); }
.foot-bottom {
    margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
    font-size: var(--text-sm); color: var(--faint);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- REVEAL ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .pulse { animation: none; }
    .chart .line { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 940px) {
    .hero { padding-top: 64px; }
    .pillars { grid-template-columns: 1fr; gap: 36px; }
    .split { grid-template-columns: 1fr; gap: 36px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
    .anno-deploy { left: 55%; }
}

@media (max-width: 860px) {
    .menu-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--paper); border-bottom: 1px solid var(--line-strong);
        flex-direction: column; gap: 0; padding: 8px 28px 16px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .nav-links a.active::after { display: none; }
    section { padding: 68px 0; }
}

@media (max-width: 640px) {
    .container { padding: 0 20px; }
    .nav-inner { padding: 14px 20px; }
    .spec-row { grid-template-columns: 1fr; gap: 4px; }
    .anno-p99 { top: auto; bottom: 40px; }
    .hero-actions .btn-lg { width: 100%; }
    .chart { height: 190px; }
}
