/* Kvatr homepage. The palette and type are the DTU deck's (2026-09-30): navy and cream, an
   orange and a blue for the lit windows, Space Grotesk over IBM Plex Sans.

   Dark mode follows the visitor's system setting (prefers-color-scheme) — no toggle, no script.
   The hero, the header, the "Kvatr" boxes, the screens and the contact band stay navy in both
   themes; everything else reads its colours from the tokens below.

   Every text/background pair holds WCAG AA (4.5:1) in both themes (checked 2026-10-01). */

:root {
    --navy: #16232E;
    --navy-2: #1D2F3E;
    --navy-3: #2B4155;
    --navy-line: #2E4558;
    --cream: #F5F3EE;
    --on-navy-muted: #B9C6CF;
    --orange: #F0925E;
    --blue: #7CC3E0;

    --bg: #F3F2EE;
    --bg-alt: #E7EBEA;
    --surface: #FBFAF7;
    --surface-cool: #E2E9EE;
    --surface-warm: #F7E0D2;
    --text: #16232E;
    --muted: #4A5866;
    --accent: #A9481A;
    --accent-cool: #2A6886;
    --border: #DEDBD3;

    --font-head: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    --font-body: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
    --radius: 12px;
    --gutter: 24px;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0F171E;
        --bg-alt: #131E27;
        --surface: #17232C;
        --surface-cool: #1E2F3C;
        --surface-warm: #3A2B22;
        --text: #ECE8E1;
        --muted: #A3B0BA;
        --accent: #F0925E;
        --accent-cool: #7CC3E0;
        --border: #263540;
    }
}

/* ---- Base ---- */

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

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

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}

h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); max-width: 22em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p { margin: 0; }

a { color: var(--accent-cool); text-underline-offset: 3px; }

ul, ol { margin: 0; padding: 0; list-style: none; }

svg { display: block; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container.narrow { max-width: 760px; }

@media (max-width: 600px) {
    :root { --gutter: 16px; }
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    background: var(--orange);
    color: var(--navy);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus { top: 12px; }

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--orange);
    color: var(--navy);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid var(--orange);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button:hover { background: #F4A77B; border-color: #F4A77B; }

.button-ghost {
    background: transparent;
    color: var(--cream);
    border-color: var(--navy-line);
}

.button-ghost:hover { background: var(--navy-2); border-color: var(--on-navy-muted); }

.button-small { min-height: 40px; padding: 8px 18px; font-size: 0.9375rem; }

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--navy);
    border-bottom: 1px solid var(--navy-line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 68px;
}

.brand { text-decoration: none; color: var(--cream); }

.logo { display: inline-flex; align-items: center; gap: 10px; }

.logo-word {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    color: var(--cream);
}

.header-nav { display: flex; gap: 28px; margin-left: auto; }

.header-nav a {
    color: var(--on-navy-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9875rem;
}

.header-nav a:hover { color: var(--cream); }

@media (max-width: 860px) {
    .header-nav { display: none; }
    .header-inner .button { margin-left: auto; }
}

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

.hero {
    background: var(--navy);
    color: var(--cream);
    padding: 88px 0 0;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
    gap: 48px;
}

.hero-text { padding-bottom: 96px; }

.hero h1 {
    font-size: clamp(2.75rem, 6.4vw, 5.25rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 18px 0 22px;
}

.hero-lead {
    font-size: clamp(1.125rem, 1.9vw, 1.375rem);
    color: var(--on-navy-muted);
    max-width: 30em;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-status {
    margin-top: 28px;
    font-size: 0.9375rem;
    color: var(--on-navy-muted);
}

.hero-status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--blue);
    vertical-align: 1px;
}

.hero-art { align-self: end; }

.skyline { width: 100%; max-width: 520px; height: auto; margin-left: auto; }

@media (max-width: 860px) {
    .hero { padding-top: 56px; }
    .hero-inner { grid-template-columns: 1fr; gap: 0; }
    .hero-text { padding-bottom: 40px; }
    .skyline { max-width: 360px; margin: 0 auto; }
}

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

.section { padding: 96px 0; }

.section-alt { background: var(--bg-alt); }

@media (max-width: 600px) {
    .section { padding: 64px 0; }
}

.eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.eyebrow-on-dark { color: var(--orange); margin: 0; }

.lead {
    font-size: 1.1875rem;
    color: var(--muted);
    max-width: 40em;
    margin-top: 18px;
}

.page-title { font-size: clamp(2.25rem, 5vw, 3.25rem); margin-bottom: 16px; }

.section .narrow .button { margin-top: 28px; }

.note { margin-top: 32px; color: var(--muted); max-width: 52em; }

.note strong { color: var(--text); }

.source { margin-top: 24px; font-size: 0.875rem; color: var(--muted); }

.sub-heading { margin-top: 72px; font-size: 1.5rem; }

.col-label {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

/* ---- Cards ---- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.card h3 { margin-bottom: 8px; }

.card p { color: var(--muted); }

.card-grid { display: grid; gap: 20px; margin-top: 40px; }

.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
    .card-grid-3 { grid-template-columns: 1fr; }
}

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

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.stat { display: flex; flex-direction: column; gap: 8px; }

.stat-number {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(2.5rem, 4.4vw, 3.25rem);
    line-height: 1;
    color: var(--accent);
}

.stat-text { color: var(--text); }

@media (max-width: 980px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* ---- The platform flow: in → Kvatr → out ---- */

.flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin-top: 44px;
}

.flow-label {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.pill-list { display: grid; gap: 10px; }

.pill-list li { padding: 11px 16px; border-radius: 8px; color: var(--text); }

.pill-list-cool li { background: var(--surface-cool); }

.pill-list-warm li { background: var(--surface-warm); }

.flow-arrow::before {
    content: "→";
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}

.flow-core {
    background: var(--navy);
    color: var(--cream);
    border-radius: 16px;
    padding: 28px;
}

.flow-core-title {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 18px;
}

.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.module-grid li {
    background: var(--navy-2);
    border: 1px solid var(--navy-3);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9375rem;
}

@media (max-width: 960px) {
    .flow { grid-template-columns: 1fr; gap: 16px; }
    .flow-arrow { justify-self: center; }
    .flow-arrow::before { content: "↓"; }
}

/* ---- Places and roles ---- */

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    margin-top: 40px;
}

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

.place-list { display: grid; gap: 10px; }

.place-list li {
    display: flex;
    flex-direction: column;
    background: var(--surface-cool);
    border-left: 4px solid var(--accent-cool);
    border-radius: 8px;
    padding: 12px 16px;
}

.place-list strong { font-weight: 600; }

.place-list span { color: var(--muted); font-size: 0.9375rem; }

.role-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.role-table th, .role-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.role-table thead th { background: var(--bg-alt); font-weight: 600; }

.role-table tbody th { font-weight: 500; white-space: nowrap; }

.role-table td { color: var(--muted); }

.role-table tr:last-child th, .role-table tr:last-child td { border-bottom: 0; }

/* ---- Screens ---- */

.screen-item { margin: 0; display: flex; flex-direction: column; gap: 18px; }

.screen {
    background: var(--navy);
    color: var(--cream);
    border-radius: var(--radius);
    padding: 26px;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 0 var(--navy-line) inset;
}

.screen-small { font-size: 0.9375rem; color: var(--on-navy-muted); }

.screen-big {
    font-family: var(--font-head);
    font-size: 2.75rem;
    font-weight: 600;
    line-height: 1.1;
}

.screen-title { font-family: var(--font-head); font-size: 1.375rem; font-weight: 600; margin-bottom: 4px; }

.screen-line { font-size: 0.9375rem; }

.screen-blue { color: var(--blue); }

.screen-orange { color: var(--orange); }

.screen-muted { color: var(--on-navy-muted); }

.screen-caps { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.8125rem; }

.screen-button {
    align-self: flex-start;
    margin-top: 10px;
    background: #2C6E8F;
    color: #FFFFFF;
    border-radius: 6px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.9375rem;
}

.screen-item figcaption h3 { margin-bottom: 6px; }

.screen-item figcaption p { color: var(--muted); }

/* ---- Set-up steps ---- */

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

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

.step h4 { margin: 18px 0 6px; }

.step p { color: var(--muted); }

.step-art {
    height: 150px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.step-art-dark { background: var(--navy); color: var(--cream); }

.step-art-cool { background: var(--surface-cool); }

.step-art-left { align-items: flex-start; padding: 0 24px; }

.step-art-left .screen-big { font-size: 2.25rem; }

.qr { width: 84px; height: 84px; }

.step-art-caption { font-size: 0.875rem; color: var(--on-navy-muted); }

.phone {
    width: 72px;
    height: 112px;
    border: 3px solid var(--navy);
    border-radius: 14px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.phone-frame {
    width: 34px;
    height: 34px;
    border: 2px dashed var(--accent-cool);
    border-radius: 4px;
}

.phone-label { font-size: 0.8125rem; font-weight: 700; color: var(--text); }

@media (prefers-color-scheme: dark) {
    .phone { border-color: var(--muted); }
}

/* ---- Events and rules ---- */

.events { margin-top: 40px; display: grid; gap: 12px; }

.events-head, .events-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 40px;
}

.events-head span {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.events-head span:nth-child(1) { color: var(--accent-cool); }
.events-head span:nth-child(2) { color: var(--muted); }
.events-head span:nth-child(3) { color: var(--accent); }

.events-row span { position: relative; border-radius: 8px; padding: 14px 16px; }

.event-when { background: var(--surface-cool); }

.event-then { background: var(--surface); border: 1px solid var(--border); }

.event-result { background: var(--surface-warm); }

.event-when::after, .event-then::after {
    content: "→";
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--muted);
}

@media (max-width: 860px) {
    .events-head { display: none; }
    .events-row { grid-template-columns: 1fr; gap: 0; }
    .events-row span { border-radius: 0; }
    .events-row span:first-child { border-radius: 8px 8px 0 0; }
    .events-row span:last-child { border-radius: 0 0 8px 8px; }
    .event-when::after, .event-then::after { content: none; }
    .events { gap: 16px; }
}

/* ---- Money flow ---- */

.money-flow {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    gap: 20px;
    margin-top: 40px;
}

.money-flow .flow-arrow { align-self: center; }

.money-step { border-radius: var(--radius); padding: 24px; }

.money-step h3 { margin-bottom: 10px; }

.money-step-core { background: var(--navy); color: var(--cream); }

.money-step-core p { color: var(--on-navy-muted); }

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

.money-step-warm p { color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips li {
    background: var(--surface-cool);
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 0.9375rem;
}

@media (max-width: 960px) {
    .money-flow { grid-template-columns: 1fr; gap: 14px; }
    .money-flow .flow-arrow { justify-self: center; }
    .money-flow .flow-arrow::before { content: "↓"; }
}

/* ---- Timeline ---- */

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 44px;
    counter-reset: phase;
}

.timeline-step { position: relative; padding-top: 52px; counter-increment: phase; }

.timeline-step::before {
    content: counter(phase);
    position: absolute;
    top: 18px;
    left: 24px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--surface);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 980px) {
    .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* ---- People ---- */

.person-role {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.card .person-role { color: var(--accent); }

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

.contact {
    background: var(--navy);
    color: var(--cream);
    padding: 96px 0;
    text-align: center;
}

.contact h2 { margin: 0 auto; }

.contact-lead { color: var(--on-navy-muted); font-size: 1.1875rem; margin: 18px auto 32px; max-width: 34em; }

@media (max-width: 600px) {
    .contact { padding: 64px 0; }
    .contact .button { width: 100%; }
}

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

.site-footer {
    background: var(--navy);
    color: var(--on-navy-muted);
    border-top: 1px solid var(--navy-line);
    padding: 40px 0;
    font-size: 0.9375rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand { display: flex; flex-direction: column; gap: 12px; max-width: 26em; }

.footer-meta { display: flex; flex-direction: column; gap: 4px; }

.site-footer a { color: var(--cream); }

.footer-copy { margin-top: 8px; }
