/* ==========================================================================
   vanemmerik.net — shared design layer
   Dark ground, Geist / Geist Mono, one accent per section.
   Pages set the accent with <body data-accent="amber|coral|cyan">.
   ========================================================================== */

:root {
    --bg: #07080A;
    --bg-alt: #0B0C0F;
    --surface: #0D0F12;
    --surface-2: #14171C;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --text: #F2F3F5;
    --muted: #9AA1AC;
    --dim: #7C8490;
    --ok: #5BE49B;

    --amber: #F5B841;
    --coral: #FF6B5B;
    --cyan: #4CC9F0;
    --accent: var(--text);

    --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --radius: 18px;
    --gutter: 48px;
}

body[data-accent="amber"] { --accent: var(--amber); }
body[data-accent="coral"] { --accent: var(--coral); }
body[data-accent="cyan"]  { --accent: var(--cyan); }

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

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg);
}
.skip-link:focus { top: 12px; color: var(--bg); }

/* ---------- Layout ---------- */

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

.section { padding: 112px var(--gutter); }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--tight { padding-top: 0; }

.stack { display: flex; flex-direction: column; }
.section-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 32px; flex-wrap: wrap; margin-bottom: 56px;
}
.section-head__title { display: flex; flex-direction: column; gap: 14px; }

.grid-bg {
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 64px 64px;
    animation: drift 10s linear infinite;
}

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

.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
}
.mono { font-family: var(--mono); }
.label {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.h-display {
    margin: 0;
    font-size: clamp(48px, 7vw, 96px);
    line-height: .94;
    font-weight: 650;
    letter-spacing: -.048em;
}
.h2 {
    margin: 0;
    font-size: clamp(34px, 4.2vw, 52px);
    line-height: 1;
    font-weight: 600;
    letter-spacing: -.04em;
}
.h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 600px; }
.muted { color: var(--muted); }
.text-gold, .text-accent { color: var(--accent); }

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

.site-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px var(--gutter);
    background: rgba(7, 8, 10, .78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.brand__mark {
    width: 36px; height: 36px; border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .18);
    display: grid; place-items: center;
    font-family: var(--mono); font-size: 13px; font-weight: 500;
    transition: border-color .4s, background-color .4s;
}
.brand:hover .brand__mark { border-color: var(--accent); }
.brand__name { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }

.nav { display: flex; gap: 4px; align-items: center; font-size: 14px; }
.nav a {
    display: flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 16px; border-radius: 999px;
    color: var(--muted);
    transition: background-color .3s, color .3s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.nav a[aria-current="page"] {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 11%, transparent);
}
.nav a[aria-current="page"]::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none;
    width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid var(--line-2); background: transparent; cursor: pointer;
    align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

.segmented {
    display: flex; padding: 3px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px;
    font-family: var(--mono); font-size: 12px;
}
.segmented a {
    display: flex; align-items: center; justify-content: center;
    min-height: 38px; min-width: 44px; padding: 0 14px; border-radius: 999px; color: var(--muted);
    transition: background-color .3s, color .3s;
}
.segmented a.is-active { background: var(--text); color: var(--bg); font-weight: 600; }

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

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 0 24px; border-radius: 999px;
    border: 1px solid transparent; cursor: pointer;
    background: transparent; color: inherit;
    font-weight: 600; font-size: 15px; white-space: nowrap;
    transition: transform .4s var(--ease), background-color .3s, border-color .3s, color .3s, box-shadow .4s;
}
.btn svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn--accent { background: var(--accent); color: var(--bg); }
.btn--accent:hover { color: var(--bg); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.btn--light { background: var(--text); color: var(--bg); }
.btn--light:hover { color: var(--bg); }
.btn--ghost { border-color: rgba(255, 255, 255, .2); color: var(--text); font-weight: 500; }
.btn--ghost:hover { border-color: var(--accent); }
.btn[disabled] { opacity: .6; cursor: progress; }

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

.card {
    padding: 28px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
    transition: transform .5s var(--ease), border-color .4s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.card--static:hover { transform: none; border-color: var(--line); }
.card--accent { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

.grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 300px)), 1fr)); }

.chip {
    display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--line-2); font-size: 13px;
}

/* ---------- Stat strip ---------- */

.stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.stat { padding: 30px 24px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat__value { font-size: 42px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; }

/* ---------- Progress bars ---------- */

.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar__fill {
    display: block; height: 100%; border-radius: 4px; background: var(--accent);
    transform-origin: left; transform: scaleX(0);
    transition: transform 1.6s var(--ease);
}
.is-visible .bar__fill, .no-js .bar__fill { transform: scaleX(1); }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; color: var(--muted); }
.input {
    width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 12px;
    background: var(--bg); border: 1px solid var(--line-2); color: var(--text); font-size: 15px;
    transition: border-color .3s, box-shadow .3s;
}
textarea.input { resize: vertical; min-height: 140px; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }

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

.site-footer {
    padding: 28px var(--gutter); border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .06em;
}
.site-footer a:hover { color: var(--accent); }
.site-footer__links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .18s; }
.js .reveal[data-delay="3"] { transition-delay: .28s; }
.js .reveal[data-delay="4"] { transition-delay: .38s; }
.js .reveal[data-delay="5"] { transition-delay: .5s; }

/* ---------- Keyframes ---------- */

@keyframes drift   { to { background-position: 64px 64px, 64px 64px; } }
@keyframes orbit   { to { transform: rotate(360deg); } }
@keyframes blink   { 50% { opacity: 0; } }
@keyframes pulse   { 0%, 100% { opacity: .12; } 50% { opacity: 1; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes scan    { 0% { transform: translateY(-100%); } 100% { transform: translateY(400%); } }
@keyframes spin    { to { transform: rotate(360deg); } }

.blink { animation: blink 1.2s step-end infinite; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }

.spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: spin .8s linear infinite;
}

.skeleton {
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04));
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    :root { --gutter: 24px; }
    .section { padding-top: 80px; padding-bottom: 80px; }
    .nav-toggle { display: inline-flex; }
    .site-header { flex-wrap: wrap; }
    .site-header .nav {
        display: none; order: 3; width: 100%;
        flex-direction: column; align-items: stretch; padding-top: 8px;
    }
    .site-header.is-open .nav { display: flex; }
    .header-actions { margin-left: auto; }
    .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 560px) {
    :root { --gutter: 16px; }
    .header-actions .btn__label { display: none; }
    .btn--hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; }
    .bar__fill { transform: scaleX(1); }
}
