/* ==========================================================================
   Solid Agents — design system
   Visual language: warm white surface, ink text, signal-red accent,
   hairline frames with registration ticks, Instrument Sans + Plex Mono.
   ========================================================================== */

:root {
    --bg: #fdfdfc;
    --surface: #ffffff;
    --surface-warm: #faf9f7;
    --ink: #1b1b18;
    --ink-soft: #3e3e3a;
    --muted: #706f6c;
    --border: #e3e3e0;
    --border-strong: #d4d4d0;
    --red: #f53003;
    --red-dark: #d92a02;
    --red-tint: #fff5f2;
    --red-tint-border: #ffd9cd;
    --font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --frame-w: 1200px;
    --pad: 24px;
    --radius: 10px;
    --shadow-card: 0 1px 2px rgba(27, 27, 24, 0.05), 0 4px 16px rgba(27, 27, 24, 0.04);
    --shadow-pop: 0 2px 4px rgba(27, 27, 24, 0.06), 0 12px 32px rgba(27, 27, 24, 0.10);
}

/* ---- Reset ---- */

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

p { margin: 0; }

/* ---- Type scale ---- */

.display {
    font-size: clamp(2.6rem, 6.4vw, 4.35rem);
    letter-spacing: -0.035em;
    line-height: 1.02;
}

.h-section {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    letter-spacing: -0.03em;
}

.lead {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    line-height: 1.55;
    color: var(--muted);
    max-width: 58ch;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    background: var(--red);
    flex: 0 0 auto;
}

/* ---- Frame: hairline rails + registration ticks ---- */

.frame {
    max-width: var(--frame-w);
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
    position: relative;
}

@media (min-width: 1264px) {
    .frame::before,
    .frame::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 1px;
        background: var(--border);
    }
    .frame::before { left: 0; }
    .frame::after { right: 0; }
}

.section {
    border-top: 1px solid var(--border);
    position: relative;
    padding: clamp(64px, 9vw, 112px) 0;
}

@media (min-width: 1264px) {
    .section .frame .tick,
    .tick {
        position: absolute;
        width: 7px;
        height: 7px;
        background: var(--red);
        top: -4px;
    }
    .tick--left { left: -4px; }
    .tick--right { right: -4px; }
}

@media (max-width: 1263.98px) {
    .tick { display: none; }
}

.section-head {
    display: grid;
    gap: 18px;
    max-width: 760px;
    margin-bottom: clamp(40px, 6vw, 64px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 13px 26px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease,
        color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}

.btn .arrow {
    display: inline-block;
    transition: transform 0.18s ease;
}

.btn:hover .arrow { transform: translateX(4px); }

.btn--primary {
    background: var(--red);
    color: #fff;
}

.btn--primary:hover {
    background: var(--red-dark);
    box-shadow: 0 6px 20px rgba(245, 48, 3, 0.28);
}

.btn--secondary {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--border-strong);
}

.btn--secondary:hover {
    border-color: var(--ink);
}

.btn--lg { padding: 16px 32px; font-size: 1.05rem; }

.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(253, 253, 252, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.18rem;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.brand-mark {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
}

.brand span em {
    font-style: normal;
    color: var(--red);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 8px 13px;
    border-radius: 8px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover { color: var(--ink); background: rgba(27, 27, 24, 0.05); }

.site-nav a.is-active:not(.btn) { color: var(--red); }

.site-nav .btn { margin-left: 10px; padding: 9px 18px; font-size: 0.9rem; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    color: var(--ink);
}

.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 12px var(--pad) 20px;
        gap: 4px;
        box-shadow: var(--shadow-pop);
    }
    .site-header.nav-open .site-nav { display: flex; }
    .site-nav a { padding: 12px 10px; font-size: 1.05rem; }
    .site-nav .btn { margin: 10px 0 0; justify-content: center; }
}

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

.hero {
    border-top: none;
    padding-top: clamp(48px, 7vw, 96px);
    padding-bottom: clamp(56px, 8vw, 104px);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
}

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
}

.hero-copy { display: grid; gap: 26px; justify-items: start; }

.hero-copy .display strong {
    font-weight: 600;
    color: var(--red);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-note {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}

/* Hero diagram */

.hero-visual {
    position: relative;
    background:
        linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 100% 36px,
        linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 36px 100%,
        var(--surface-warm);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: clamp(18px, 3vw, 30px);
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(253, 253, 252, 0.9));
    pointer-events: none;
}

.diagram { position: relative; z-index: 1; width: 100%; height: auto; }

.diagram .node-box {
    fill: var(--surface);
    stroke: var(--border-strong);
    stroke-width: 1;
}

.diagram .node-label {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    fill: var(--ink-soft);
    text-transform: uppercase;
}

.diagram .agent-box { fill: var(--red); }

.diagram .agent-title {
    font-family: var(--font-sans);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
    fill: #fff;
}

.diagram .agent-sub {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    fill: rgba(255, 255, 255, 0.82);
}

.diagram .server-label {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    fill: var(--ink-soft);
}

.diagram .flow {
    fill: none;
    stroke: var(--border-strong);
    stroke-width: 1.4;
    stroke-dasharray: 5 6;
    animation: flow-dash 1.6s linear infinite;
}

.diagram .flow--red { stroke: var(--red); opacity: 0.75; }

.diagram .flow-dot { fill: var(--red); }

.diagram .status-dot { fill: #2fb344; }

@keyframes flow-dash {
    to { stroke-dashoffset: -22; }
}

.hero-chip {
    position: absolute;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 7px 13px;
    color: var(--ink-soft);
    box-shadow: var(--shadow-card);
    white-space: nowrap;
}

.hero-chip b { color: var(--red); font-weight: 600; }

.hero-chip--one { top: 34%; left: -14px; animation: chip-float 5s ease-in-out infinite; }
.hero-chip--two { bottom: 20%; right: -12px; animation: chip-float 6s ease-in-out 0.8s infinite; }

@keyframes chip-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@media (max-width: 960px) {
    .hero-chip--one { left: 8px; }
    .hero-chip--two { right: 8px; }
}

/* ---- Systems strip ---- */

.strip {
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.strip-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: stretch;
}

.strip-cell {
    padding: 26px 18px;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.strip-cell:first-child { border-left: none; }

.strip-cell .eyebrow { font-size: 0.66rem; }
.strip-cell .eyebrow::before { display: none; }

.strip-name {
    font-weight: 600;
    font-size: 1.06rem;
    letter-spacing: -0.01em;
}

.strip-cell--label { gap: 8px; }

.strip-cell--label .eyebrow::before { display: block; }

@media (max-width: 860px) {
    .strip-grid { grid-template-columns: 1fr 1fr; }
    .strip-cell--label { grid-column: 1 / -1; border-left: none; border-bottom: 1px solid var(--border); }
    .strip-cell:nth-child(odd):not(.strip-cell--label) { border-left: none; }
    .strip-cell:nth-child(n+4) { border-top: 1px solid var(--border); }
}

/* ---- Steps (What we do) ---- */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

@media (max-width: 860px) {
    .steps { grid-template-columns: 1fr; }
}

.step {
    background: var(--surface);
    padding: 34px 30px 38px;
    display: grid;
    gap: 14px;
    align-content: start;
    transition: background-color 0.2s ease;
}

.step:hover { background: var(--surface-warm); }

.step-num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--red);
}

.step h3 { font-size: 1.35rem; }

.step p { color: var(--muted); font-size: 0.99rem; }

/* ---- Feature grid ---- */

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

@media (max-width: 860px) {
    .features { grid-template-columns: 1fr; }
}

.feature {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 30px 30px 34px;
    display: grid;
    gap: 13px;
    align-content: start;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-pop);
    border-color: var(--border-strong);
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: var(--red-tint);
    border: 1px solid var(--red-tint-border);
    display: grid;
    place-items: center;
    color: var(--red);
}

.feature-icon svg { width: 21px; height: 21px; }

.feature h3 { font-size: 1.28rem; }

.feature p { color: var(--muted); font-size: 0.98rem; }

/* ---- Pricing ---- */

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: stretch;
}

@media (max-width: 860px) {
    .pricing-grid { grid-template-columns: 1fr; }
}

.price-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 36px 34px 40px;
    display: grid;
    gap: 16px;
    align-content: start;
}

.price-card--accent {
    border-color: var(--red-tint-border);
    background: linear-gradient(180deg, var(--red-tint), var(--surface) 70%);
}

.price-kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--red);
}

.price-title { font-size: 1.6rem; letter-spacing: -0.02em; }

.price-card p { color: var(--muted); font-size: 0.99rem; }

.price-list {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.price-list li {
    display: flex;
    gap: 11px;
    font-size: 0.97rem;
    color: var(--ink-soft);
}

.price-list li::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-top: 8px;
    background: var(--red);
}

.pricing-note {
    margin-top: 26px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--red);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--surface);
    padding: 20px 24px;
    color: var(--ink-soft);
    font-size: 0.99rem;
    max-width: 860px;
}

/* ---- Compare cards ---- */

.compare-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

@media (max-width: 1024px) {
    .compare-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
    .compare-cards { grid-template-columns: 1fr; }
}

.compare-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 28px 26px 30px;
    display: grid;
    gap: 12px;
    align-content: start;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.compare-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-pop);
    border-color: var(--border-strong);
}

.compare-card .card-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.compare-card h3 { font-size: 1.22rem; padding-right: 30px; }

.compare-card p { color: var(--muted); font-size: 0.95rem; }

.compare-card .card-arrow {
    position: absolute;
    top: 26px;
    right: 24px;
    color: var(--red);
    transition: transform 0.2s ease;
}

.compare-card:hover .card-arrow { transform: translate(3px, -3px); }

/* ---- Comparison table ---- */

.page-head {
    padding-top: clamp(48px, 6vw, 80px);
    padding-bottom: clamp(36px, 5vw, 56px);
    display: grid;
    gap: 18px;
    max-width: 820px;
}

.cmp-wrap { overflow-x: auto; }

.cmp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    font-size: 0.97rem;
}

.cmp-table th, .cmp-table td {
    padding: 20px 22px;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--border);
}

.cmp-table thead th {
    border-top: none;
    background: var(--surface-warm);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 16px;
    padding-bottom: 16px;
}

.cmp-table thead th.col-us { color: var(--red); }

.cmp-table .row-label {
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    width: 20%;
    min-width: 150px;
}

.cmp-table .cell-them { color: var(--muted); width: 40%; }

.cmp-table .cell-us {
    background: var(--red-tint);
    box-shadow: inset 3px 0 0 var(--red);
    color: var(--ink-soft);
    width: 40%;
}

.mark {
    display: inline-block;
    font-weight: 700;
    margin-right: 8px;
}

.mark--x { color: #b8b6b2; }
.mark--ok { color: var(--red); }

.cmp-footnote {
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--muted);
    max-width: 760px;
}

/* Stacked table on small screens */

@media (max-width: 820px) {
    .cmp-table, .cmp-table tbody, .cmp-table tr, .cmp-table td { display: block; width: 100%; }
    .cmp-table thead { display: none; }
    .cmp-table tr { border-top: 1px solid var(--border); }
    .cmp-table tr:first-child { border-top: none; }
    .cmp-table td { border-top: none; padding: 14px 20px; }
    .cmp-table .row-label { padding-top: 22px; font-size: 1.08rem; width: auto; }
    .cmp-table .cell-them, .cmp-table .cell-us { width: auto; }
    .cmp-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-family: var(--font-mono);
        font-size: 0.68rem;
        font-weight: 500;
        letter-spacing: 0.11em;
        text-transform: uppercase;
        color: var(--muted);
        margin-bottom: 7px;
    }
    .cmp-table .cell-us[data-label]::before { color: var(--red); }
    .cmp-table .cell-us { margin-bottom: 8px; }
}

/* Pager between comparison pages */

.cmp-pager {
    margin-top: clamp(40px, 6vw, 56px);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cmp-pager a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.96rem;
    color: var(--ink-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 18px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.cmp-pager a:hover { border-color: var(--ink); color: var(--ink); }

/* ---- CTA band ---- */

.cta-band {
    background: var(--ink);
    color: #fff;
    border-radius: 16px;
    padding: clamp(44px, 6vw, 72px) clamp(28px, 5vw, 64px);
    display: grid;
    gap: 22px;
    justify-items: start;
    position: relative;
    overflow: hidden;
}

.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 120% at 85% 10%, rgba(245, 48, 3, 0.35), transparent 60%),
        radial-gradient(40% 90% at 10% 100%, rgba(245, 48, 3, 0.18), transparent 60%);
    pointer-events: none;
}

.cta-band > * { position: relative; }

.cta-band h2 {
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    letter-spacing: -0.03em;
    color: #fff;
    max-width: 20ch;
}

.cta-band p { color: rgba(255, 255, 255, 0.72); max-width: 52ch; }

.cta-band .btn--primary:hover { box-shadow: 0 6px 24px rgba(245, 48, 3, 0.5); }

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

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 6vw, 72px);
    align-items: start;
}

@media (max-width: 960px) {
    .contact-grid { grid-template-columns: 1fr; }
}

.contact-aside { display: grid; gap: 30px; }

.next-steps { display: grid; gap: 0; }

.next-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}

.next-step:first-child { border-top: none; }

.next-step .step-num { padding-top: 3px; }

.next-step h3 { font-size: 1.08rem; margin-bottom: 4px; }

.next-step p { color: var(--muted); font-size: 0.95rem; }

.contact-form {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: clamp(26px, 4vw, 40px);
    display: grid;
    gap: 22px;
    box-shadow: var(--shadow-card);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
}

.field { display: grid; gap: 8px; }

.field label {
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: -0.005em;
}

.field .optional {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.85rem;
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 12px 14px;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea { resize: vertical; min-height: 130px; }

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(245, 48, 3, 0.14);
}

.checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
}

@media (max-width: 640px) {
    .checks { grid-template-columns: 1fr; }
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.96rem;
    color: var(--ink-soft);
    cursor: pointer;
    font-weight: 400;
}

.check input {
    width: 17px;
    height: 17px;
    accent-color: var(--red);
    cursor: pointer;
}

.form-msg {
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.96rem;
    font-weight: 500;
}

.form-msg--ok {
    background: #ecfbef;
    border: 1px solid #b8e9c3;
    color: #187531;
}

.form-msg--err {
    background: var(--red-tint);
    border: 1px solid var(--red-tint-border);
    color: var(--red-dark);
}

.form-fineprint { font-size: 0.85rem; color: var(--muted); }

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

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: clamp(48px, 6vw, 72px) 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

.footer-brand { display: grid; gap: 14px; justify-items: start; }

.footer-brand p { color: var(--muted); font-size: 0.95rem; max-width: 34ch; }

.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.footer-col a {
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

.footer-col a:hover { color: var(--red); }

.footer-bottom {
    margin-top: clamp(40px, 5vw, 56px);
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.86rem;
    color: var(--muted);
}

.footer-bottom .mono { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.06em; }

/* ---- 404 ---- */

.err-page {
    min-height: 55vh;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 20px;
}

.err-code {
    font-family: var(--font-mono);
    color: var(--red);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
}

/* ---- Scroll reveal ---- */

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal.in { opacity: 1; transform: none; }

/* Hero load-in stagger */

@keyframes rise-in {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

.hero-copy > * {
    animation: rise-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hero-copy > :nth-child(1) { animation-delay: 0.05s; }
.hero-copy > :nth-child(2) { animation-delay: 0.13s; }
.hero-copy > :nth-child(3) { animation-delay: 0.21s; }
.hero-copy > :nth-child(4) { animation-delay: 0.29s; }
.hero-copy > :nth-child(5) { animation-delay: 0.37s; }

.hero-visual {
    animation: rise-in 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s both;
}

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .diagram .flow { animation: none; }
    .diagram .flow-dot { display: none; }
}
