/* VIRA landing page
   Palette: paper #f1f2ee, ink #1a1e23, cobalt #1a3fd6, verified green #1b6e45, write-warning amber #8f5200
   Type: Schibsted Grotesk (headings, UI), Source Serif 4 (reading text), JetBrains Mono (code only) */

:root {
    --paper: #f1f2ee;
    --panel: #fbfbf9;
    --ink: #1a1e23;
    --ink-soft: #4a525a;
    --rule: #cfd3cb;
    --rule-strong: #8d958c;
    --cobalt: #1a3fd6;
    --ok: #1b6e45;
    --warn: #8f5200;
    --warn-bg: #f6e6c8;
    --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
    --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.125rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .86em; background: rgba(26, 30, 35, .07); padding: .08em .35em; border-radius: 3px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

.wrap { width: min(100% - 3rem, 1120px); margin-inline: auto; }

.skip-link {
    position: absolute; top: .75rem; left: .75rem; z-index: 20;
    padding: .6rem 1rem; background: var(--ink); color: var(--paper);
    font-family: var(--sans); font-weight: 600; font-size: .9rem;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }
.wordmark { font-family: var(--sans); font-weight: 700; font-size: 1.4rem; letter-spacing: .02em; text-decoration: none; }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.6rem; font-family: var(--sans); font-size: .95rem; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .3em; }
.site-nav .site-nav__github { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: .3em; }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
h1 {
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(2.5rem, 4.6vw, 3.9rem);
    line-height: 1.04;
    letter-spacing: -.032em;
    margin-bottom: 1.5rem;
}
.lead { max-width: 33rem; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.note { margin-top: 1.75rem; max-width: 30rem; font-size: .95rem; color: var(--ink-soft); padding-left: .9rem; border-left: 3px solid var(--rule-strong); }

.button {
    display: inline-block;
    padding: .7rem 1.15rem;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    font-family: var(--sans); font-weight: 600; font-size: .95rem; line-height: 1.2;
    text-decoration: none;
}
.button:hover { background: var(--ink); color: var(--paper); }
.button--primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.button--primary:hover { background: #12308f; border-color: #12308f; color: #fff; }

/* Example session: the one expressive element */
.session { margin: 0; background: var(--panel); border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.session-bar {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .65rem 1.1rem;
    background: var(--ink); color: var(--paper);
    font-family: var(--sans); font-size: .85rem; font-weight: 600;
}
.session-bar__aside { font-weight: 500; opacity: .7; }
.session-body { padding: 1.4rem 1.25rem 1.25rem; font-family: var(--sans); font-size: 1rem; line-height: 1.5; }
.turn { display: grid; grid-template-columns: 3.4rem 1fr; gap: .75rem; margin-bottom: 1rem; }
.turn-who { font-weight: 700; color: var(--ink-soft); }
.turn-who--vira { color: var(--cobalt); }

.plan { margin: 1.25rem 0 0; border-top: 1px solid var(--rule); }
.plan li {
    display: grid; grid-template-columns: 1.4rem 1fr auto; gap: .85rem; align-items: start;
    padding: .85rem 0; border-bottom: 1px solid var(--rule);
}
.plan code { font-size: .8em; }
.tick {
    position: relative; width: 1.15rem; height: 1.15rem; margin-top: .15rem;
    border-radius: 50%; background: var(--ok); border: 1.5px solid var(--ok);
    animation: verify .3s ease-out both;
    animation-delay: calc(var(--i) * .6s + .5s);
}
.tick::after {
    content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
    animation: verify-mark .2s ease-out both;
    animation-delay: calc(var(--i) * .6s + .6s);
}
@keyframes verify { from { background: transparent; border-color: var(--rule-strong); } }
@keyframes verify-mark { from { opacity: 0; } }

.badge {
    align-self: start; white-space: nowrap;
    padding: .15rem .55rem; border: 1px solid var(--rule-strong); border-radius: 999px;
    font-size: .78rem; font-weight: 600; color: var(--ink-soft);
}
.badge--warn { background: var(--warn-bg); border-color: #d9b46c; color: var(--warn); }

.session-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }
.checks { font-weight: 600; color: var(--ok); }
.run {
    padding: .65rem 1.1rem; border: 0; border-radius: var(--radius);
    background: var(--cobalt); color: #fff; cursor: pointer;
    font: 600 .95rem/1.2 var(--sans);
}
.run:hover { background: #12308f; }
.result { margin-top: 1.1rem; padding: .9rem 1rem; background: #e6efe9; border-left: 3px solid var(--ok); border-radius: 0 var(--radius) var(--radius) 0; }
.result[hidden] { display: none; }

/* Content bands: heading on the left, content on the right */
.band { border-top: 1px solid var(--rule); padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split-head { position: sticky; top: 2rem; }
h2 { font-family: var(--sans); font-weight: 700; font-size: clamp(1.7rem, 2.8vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; }
.split-head p { margin-top: 1rem; color: var(--ink-soft); font-size: 1rem; max-width: 24rem; }
.split-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-family: var(--sans); font-weight: 600; }
.split-links a { color: var(--cobalt); text-underline-offset: .25em; }
.split-links a:hover { color: #12308f; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.2rem; line-height: 1.3; }

/* The one real sequence on the page, so it gets numbers */
.steps { counter-reset: step; max-width: 38rem; }
.steps li { position: relative; padding: 0 0 2.25rem 3.4rem; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: -.1rem; width: 2.25rem; height: 2.25rem;
    display: grid; place-items: center;
    border: 1.5px solid var(--ink); border-radius: 50%; background: var(--paper);
    font-family: var(--sans); font-weight: 700; font-size: .95rem;
}
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 1.1rem; top: 2.4rem; bottom: .3rem; width: 1.5px; background: var(--rule-strong); }
.steps p { margin-top: .35rem; color: var(--ink-soft); }

.principles { max-width: 38rem; }
.principles > div { padding: 1.6rem 0; border-top: 1px solid var(--rule); }
.principles > div:first-child { padding-top: 0; border-top: 0; }
.principles dt { font-family: var(--sans); font-weight: 600; font-size: 1.2rem; line-height: 1.3; }
.principles dd { margin-top: .4rem; color: var(--ink-soft); }

.roadmap { max-width: 38rem; }
.roadmap-row { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: 1.2rem 0; border-top: 1px solid var(--rule); }
.roadmap-row:first-child { border-top: 0; padding-top: 0; }
.roadmap dt { font-family: var(--sans); font-weight: 700; color: var(--ink-soft); }
.roadmap-row--now dt { color: var(--cobalt); }
.roadmap dd { color: var(--ink-soft); }
.roadmap strong { font-family: var(--sans); font-weight: 600; color: var(--ink); }

/* Closing band */
.contribute { background: var(--ink); color: var(--paper); padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.contribute-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contribute h2 { color: var(--paper); }
.contribute-copy p { max-width: 32rem; color: #c9cec6; }
.contribute .actions { margin-top: 1.5rem; }
.contribute :focus-visible { outline-color: #9db2ff; }
.button--light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.button--light:hover { background: #fff; border-color: #fff; color: var(--ink); }
.button--outline { border-color: #7d857c; color: var(--paper); }
.button--outline:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* Chat answer, audit record, install block */
.turn--answer { margin: 1.15rem 0 0; }
.audit-title { margin-bottom: .5rem; font-weight: 600; }
.audit { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .6rem 1rem; }
.audit dt { font-size: .8rem; color: var(--ink-soft); }
.audit dd { font-family: var(--mono); font-size: .85rem; }

.run-steps { max-width: 38rem; }
.run-steps > p { margin-top: 1.1rem; color: var(--ink-soft); }
.codeblock {
    margin: 0; padding: 1.1rem 1.25rem; overflow-x: auto;
    background: var(--ink); color: #e7eae4; border-radius: var(--radius);
    font-family: var(--mono); font-size: .88rem; line-height: 1.7;
}
.codeblock code { background: none; padding: 0; font-size: inherit; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); font-family: var(--sans); font-size: .9rem; color: var(--ink-soft); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; flex-wrap: wrap; min-height: 5rem; padding: 1.25rem 0; }
.footer-inner a { color: var(--ink); text-underline-offset: .25em; }

@media (max-width: 880px) {
    .wrap { width: min(100% - 2rem, 1120px); }
    .hero-grid, .split, .contribute-inner { grid-template-columns: 1fr; }
    .split-head { position: static; }
    .split-head p { max-width: 34rem; }
    .site-header__inner { padding: .75rem 0; }
}

@media (max-width: 520px) {
    body { font-size: 1.05rem; }
    .site-nav a:not(.site-nav__github) { display: none; }
    .turn { grid-template-columns: 1fr; gap: .1rem; }
    .plan li { grid-template-columns: 1.4rem 1fr; }
    .plan .badge { grid-column: 2; justify-self: start; }
    .roadmap-row { grid-template-columns: 1fr; gap: .15rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .tick, .tick::after { animation: none; }
}
