/*
 * Bákn site: tokens, base, and the pieces every page shares (buttons, eyebrow, nav, footer).
 *
 * Everything is scoped under .bk (the root element in Layout/MainLayout.razor) and prefixed bk-.
 * Page sheets build on it: css/home.css for the landing page, css/docs.css for the docs and the
 * self-hosting guide.
 *
 * Palette and type come from the client app (Bakn.Client/wwwroot/css/bakn.css): Geist, the OKLCH
 * neutrals, and the flame gradient. The site and the app are meant to look like one product.
 *
 * Images: every <img> carries width/height attributes for layout stability, so every <img> also
 * gets height:auto. Without it the attribute pins the height while CSS scales the width, and the
 * screenshots squash on narrow windows.
 */

/* ---------- tokens ---------- */

.bk {
    --bk-page: oklch(0.13 0.008 265);
    --bk-deep: oklch(0.105 0.008 265);
    --bk-bg: oklch(0.168 0.006 265);
    --bk-rail: oklch(0.144 0.006 265);
    --bk-surface-1: oklch(0.196 0.006 265);
    --bk-surface-2: oklch(0.232 0.008 265);
    --bk-line: oklch(1 0 0 / 0.07);
    --bk-line-strong: oklch(1 0 0 / 0.12);
    --bk-text: oklch(0.965 0.004 265);
    --bk-text-2: oklch(0.76 0.008 265);
    --bk-text-3: oklch(0.6 0.01 265);
    --bk-text-4: oklch(0.47 0.012 265);
    --bk-brand-hi: oklch(0.72 0.14 248);
    --bk-brand: oklch(0.58 0.2 262);
    --bk-brand-grad: linear-gradient(135deg, oklch(0.66 0.16 252), oklch(0.58 0.2 262) 55%, oklch(0.5 0.22 268));
    --bk-brand-soft: oklch(0.58 0.2 262 / 0.16);
    --bk-brand-glow: oklch(0.58 0.2 262 / 0.45);
    --bk-online: oklch(0.76 0.15 155);
    --bk-limited: oklch(0.8 0.14 80);
    --bk-danger: oklch(0.68 0.19 22);

    --bk-font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bk-mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

    --bk-r-lg: 18px;
    --bk-frame: 1240px;

    color-scheme: dark;
    background: var(--bk-page);
    color: var(--bk-text);
    font-family: var(--bk-font);
    font-size: 15px;
    line-height: 1.55;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

/* Lists, paragraphs and headings are reset with :where() so component rules win without !important. */

/* The page colour also behind overscroll and anything outside .bk. */
html,
body {
    margin: 0;
    padding: 0;
    background: oklch(0.13 0.008 265);
}

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

.bk img {
    display: block;
    max-width: 100%;
    height: auto;
}

.bk a {
    color: inherit;
    text-decoration: none;
}

.bk :focus-visible {
    outline: 2px solid var(--bk-brand-hi);
    outline-offset: 3px;
    border-radius: 6px;
}

.bk :where(h1, h2, h3, h4) {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.bk :where(p) {
    margin: 0;
}

.bk :where(ol, ul) {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------- framing ---------- */

.bk-band {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.bk-wrap {
    max-width: var(--bk-frame);
    margin: 0 auto;
}

/* ---------- shared pieces ---------- */

.bk-dim {
    color: var(--bk-text-3);
}

.bk-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 11px;
    border-radius: 99px;
    border: 1px solid var(--bk-line-strong);
    background: oklch(1 0 0 / 0.04);
    color: var(--bk-text-2);
    font-family: var(--bk-mono);
    font-size: 11.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.bk-eyebrow i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bk-online);
    box-shadow: 0 0 8px var(--bk-online);
}

.bk-icon {
    width: 14px;
    height: 14px;
    flex: none;
}

.bk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 99px;
    border: 1px solid var(--bk-line-strong);
    background: oklch(1 0 0 / 0.04);
    color: var(--bk-text);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}

.bk-btn:hover {
    background: oklch(1 0 0 / 0.08);
    border-color: oklch(1 0 0 / 0.2);
}

.bk .bk-btn-primary {
    border-color: transparent;
    background: var(--bk-brand-grad);
    color: #fff;
    box-shadow: 0 6px 24px -6px var(--bk-brand-glow), inset 0 1px 0 oklch(1 0 0 / 0.25);
}

.bk .bk-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -6px var(--bk-brand-glow), inset 0 1px 0 oklch(1 0 0 / 0.25);
}

.bk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bk-section-head {
    display: grid;
    justify-items: center;
    gap: 16px;
    text-align: center;
}

.bk-section-head h2 {
    max-width: 22ch;
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.12;
}

.bk-section-head p {
    max-width: 56ch;
    color: var(--bk-text-3);
}

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

.bk-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 22px;
}

.bk-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.bk-brand img {
    width: 26px;
    filter: drop-shadow(0 0 10px var(--bk-brand-glow));
}

.bk-nav-links {
    display: flex;
    gap: 28px;
    color: var(--bk-text-2);
    font-size: 13.5px;
}

.bk .bk-nav-links a:hover {
    color: var(--bk-text);
}

/* ---------- footer ---------- */

.bk-footer {
    padding-top: 96px;
}

.bk-foot {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .6fr));
    gap: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--bk-line);
}

.bk-foot p {
    max-width: 38ch;
    margin-top: 10px;
    color: var(--bk-text-3);
    font-size: 13.5px;
}

.bk-foot h2 {
    margin-bottom: 10px;
    color: var(--bk-text-2);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
}

.bk-foot ul {
    display: grid;
    gap: 6px;
    color: var(--bk-text-3);
    font-size: 13px;
}

.bk .bk-foot a:hover {
    color: var(--bk-text);
}

.bk-foot-legal {
    margin-top: 32px;
    color: var(--bk-text-4);
    font-family: var(--bk-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.bk-wordmark {
    height: .66em;
    overflow: hidden;
    margin-top: 24px;
    background: linear-gradient(180deg, oklch(1 0 0 / 0.5), oklch(1 0 0 / 0.04) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(90px, 24vw, 330px);
    font-weight: 700;
    line-height: .78;
    letter-spacing: -0.06em;
    text-align: center;
    user-select: none;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
    .bk-nav-links {
        display: none;
    }

    .bk-foot {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .bk-foot > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .bk-nav .bk-btn {
        height: 36px;
        padding: 0 14px;
    }
}
