/* Public Stekkie site. Admin/account pages use MudBlazor + app.css instead. */

:root {
    --bg: #f7f8f6;
    --surface: #ffffff;
    --surface-2: #eef2ef;
    --ink: #12202f;
    --ink-2: #3d4b5c;
    --muted: #6b7686;
    --line: #dde3e0;
    --brand: #0e9f6e;
    --brand-ink: #087a54;
    --brand-soft: #e3f5ec;
    --warn-soft: #fff4dc;
    --warn-ink: #8a5a00;
    --danger: #b42318;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(18, 32, 47, .06), 0 8px 24px rgba(18, 32, 47, .06);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e151d;
        --surface: #151f2a;
        --surface-2: #1b2734;
        --ink: #e9eef3;
        --ink-2: #c1ccd7;
        --muted: #8b98a7;
        --line: #263444;
        --brand: #2bc38a;
        --brand-ink: #5ad8a8;
        --brand-soft: #123628;
        --warn-soft: #3a2e12;
        --warn-ink: #f2c26b;
        --danger: #ff8a7a;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
        color-scheme: dark;
    }
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
/* Anchor targets (e.g. /handleiding#wifi), focused form fields and scrolled-to errors stay below the sticky header. */
html { scroll-padding-top: 84px; }
/* FocusOnNavigate (Routes.razor) focuses the h1 for screen readers; don't draw a focus ring around it. */
h1:focus, h1:focus-visible { outline: none; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--brand-ink); }
a:hover { color: var(--brand); }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
img, svg { max-width: 100%; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 5;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-small { font-size: 1.05rem; margin-bottom: 8px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .97rem; }
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a.active { color: var(--ink); font-weight: 600; }
.site-nav a.nav-cta { background: var(--brand); color: #fff; font-weight: 600; margin-left: 6px; }
.site-nav a.nav-cta:hover { background: var(--brand-ink); }
.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 820px) {
    .nav-toggle-label {
        display: block; margin-left: auto; width: 44px; height: 44px; cursor: pointer; position: relative;
    }
    .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
        position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); content: ""; border-radius: 2px;
    }
    .nav-toggle-label span { top: 21px; }
    .nav-toggle-label span::before { left: 0; top: -7px; }
    .nav-toggle-label span::after { left: 0; top: 7px; }
    .site-nav {
        display: none; position: absolute; left: 0; right: 0; top: 64px;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
        box-shadow: var(--shadow);
    }
    .site-nav a { padding: 12px; border-radius: 10px; }
    .site-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
    .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* Sections */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--brand-ink); margin-bottom: 8px; }
.lead { font-size: 1.2rem; color: var(--ink-2); }
.page-head { padding: clamp(40px, 7vw, 72px) 0 8px; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 span { color: var(--brand); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: .92rem; color: var(--muted); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; font-weight: 650; font-size: 1rem;
    text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-small { padding: 8px 16px; font-size: .93rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Device mock (hero) */
.device-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
    box-shadow: var(--shadow); padding: 22px;
}
.device-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.device-card-head strong { font-size: 1.05rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.pill-warn { background: var(--warn-soft); color: var(--warn-ink); }
.pill-muted { background: var(--surface-2); color: var(--muted); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.soc { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.soc .value { font-size: 3rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1; }
.soc-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 18px; }
.soc-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #4fd1a1); border-radius: inherit; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.metric .label { font-size: .8rem; color: var(--muted); }
.metric .val { font-weight: 650; font-variant-numeric: tabular-nums; }

/* Cards and grids */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.section-alt .card { background: var(--bg); }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.icon {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 14px;
}
.icon svg { width: 22px; height: 22px; }

.steps { counter-reset: step; display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 62px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
    content: counter(step); position: absolute; left: 16px; top: 15px;
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--brand); color: #fff; font-weight: 700; font-size: .95rem;
}
.steps li strong { display: block; }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 8px; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before {
    content: ""; position: absolute; left: 2px; top: .45em; width: 16px; height: 16px; border-radius: 50%;
    background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.5L12 5.4' fill='none' stroke='%230e9f6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .97rem; }
table.data th, table.data td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }
table.data code { white-space: nowrap; }

/* Prose (handleiding) */
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose pre {
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 14px 16px; overflow-x: auto; font-size: .85rem; line-height: 1.5; margin: 0 0 1em;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
/* Long addresses (e.g. the webhook URL) wrap instead of widening the page on phones. */
.prose p code, .prose li code { overflow-wrap: anywhere; }
.callout { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 1.2em 0; }
.callout-warn { border-left-color: #e0a100; background: var(--warn-soft); }
.callout p:last-child { margin-bottom: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
.toc a { text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; }
.toc a:hover { color: var(--ink); }

/* Firmware list */
.release { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.release + .release { margin-top: 14px; }
.release-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 8px; }
.release-head h3 { margin: 0; font-variant-numeric: tabular-nums; }
.release-meta { color: var(--muted); font-size: .9rem; }
.release-notes { white-space: pre-line; color: var(--ink-2); margin: 10px 0 14px; }
.hash { font-family: var(--mono); font-size: .78rem; color: var(--muted); word-break: break-all; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Forms */
.order-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .order-grid { grid-template-columns: 1fr; } }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 4vw, 28px); }
.form-card h2 { font-size: 1.3rem; margin-top: 8px; }
.form-card h2:first-child { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field-row-wide { grid-template-columns: 1fr 2fr; }
@media (max-width: 560px) { .field-row, .field-row-wide { grid-template-columns: 1fr; } }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea {
    font: inherit; color: var(--ink); background: var(--bg);
    border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 1px; border-color: var(--brand); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); }
.validation-message, .validation-errors { color: var(--danger); font-size: .88rem; }
.validation-errors { padding-left: 1.2em; margin: 0 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; margin-bottom: 16px; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.summary { position: sticky; top: 88px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary-row:last-of-type { border-bottom: 0; }
.summary-total { font-weight: 750; font-size: 1.15rem; }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; background: var(--warn-soft); color: var(--warn-ink); }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }

.pay-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 22px 0; }
.pay-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.pay-box dt { color: var(--muted); }
.pay-box dd { margin: 0; font-weight: 650; word-break: break-word; }

/* CTA band */
.cta-band { background: var(--ink); color: #fff; border-radius: 22px; padding: clamp(28px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .75); }
@media (prefers-color-scheme: dark) { .cta-band { background: var(--surface-2); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; margin-top: 24px; background: var(--surface); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-inner p { margin: 0; max-width: 360px; font-size: .95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: flex-start; }
.footer-nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.footer-nav a:hover { color: var(--ink); }
