/* ============================================================
   BLOXXER Open Company – Stylesheet
   Modern, clean, responsiv, mit Dark-Mode.
   ============================================================ */

:root {
    --brand:        #4f46e5;   /* Indigo */
    --brand-600:    #4338ca;
    --brand-700:    #3730a3;
    --accent:       #06b6d4;   /* Cyan */
    --ink:          #0f172a;
    --ink-soft:     #334155;
    --muted:        #64748b;
    --line:         #e2e8f0;
    --bg:           #ffffff;
    --surface:      #f8fafc;
    --surface-2:    #f1f5f9;
    --white:        #ffffff;
    --radius:       16px;
    --radius-sm:    10px;
    --shadow-sm:    0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
    --shadow-md:    0 10px 30px -12px rgba(15,23,42,.18);
    --shadow-lg:    0 24px 60px -20px rgba(79,70,229,.35);
    --maxw:         1080px;
    --font:         'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink:       #f1f5f9;
        --ink-soft:  #cbd5e1;
        --muted:     #94a3b8;
        --line:      #1e293b;
        --bg:        #0b1120;
        --surface:   #0f172a;
        --surface-2: #111c33;
        --white:     #0f172a;
        --shadow-md: 0 10px 30px -12px rgba(0,0,0,.6);
        --shadow-lg: 0 24px 60px -20px rgba(79,70,229,.5);
    }
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.skip-link {
    position: absolute; left: -999px; top: 0;
    background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
    border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 30px; height: 30px; border-radius: 9px; flex: none;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: var(--shadow-md);
    position: relative;
}
.brand-mark::after {
    content: ""; position: absolute; inset: 7px; border-radius: 4px;
    background: var(--bg); opacity: .0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; letter-spacing: -.01em; }
.brand-text small { font-weight: 600; font-size: .68rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a {
    color: var(--ink-soft); font-weight: 500; font-size: .96rem;
    padding: .5rem .8rem; border-radius: 8px;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.site-nav a.is-active { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.nav-cta { background: var(--brand); color: #fff !important; padding: .55rem 1.1rem !important; border-radius: 999px !important; margin-left: .5rem; }
.nav-cta:hover { background: var(--brand-600) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem); }
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.eyebrow {
    display: inline-block; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    font-size: .78rem; color: var(--brand); margin: 0 0 1rem;
    padding: .35rem .8rem; border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
    border-radius: 999px; background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 1.2rem; font-weight: 800; }
.hero-lead { font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--ink-soft); margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-glow {
    position: absolute; z-index: 1; top: -30%; right: -10%; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--brand) 40%, transparent), transparent 62%);
    filter: blur(30px); opacity: .5; pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.02em; margin: 0 0 .5rem; font-weight: 800; }
.section-sub { color: var(--muted); font-size: 1.1rem; margin: 0 0 2.5rem; }

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.card {
    position: relative; display: block; padding: 1.6rem; background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease; color: var(--ink);
}
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.card-index { font-size: .8rem; font-weight: 700; color: var(--brand); letter-spacing: .1em; }
.card h3 { margin: .5rem 0 .5rem; font-size: 1.2rem; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }
.card-arrow { position: absolute; top: 1.6rem; right: 1.5rem; color: var(--brand); font-size: 1.2rem; opacity: 0; transform: translateX(-4px); transition: .2s; }
.card:hover .card-arrow { opacity: 1; transform: translateX(0); }

/* ---------- Page head ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -.02em; margin: 0 0 .6rem; font-weight: 800; }
.page-lead { font-size: 1.2rem; color: var(--ink-soft); margin: 0; max-width: 60ch; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; letter-spacing: -.01em; margin: 2.4rem 0 .8rem; font-weight: 700; padding-top: .4rem; }
.prose h3 { font-size: 1.25rem; margin: 1.8rem 0 .6rem; font-weight: 700; }
.prose p { margin: 0 0 1.15rem; color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.3rem; color: var(--ink-soft); }
.prose li { margin: .4rem 0; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--ink); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
    margin: 1.6rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--brand);
    background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink);
    font-size: 1.08rem;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
    background: var(--surface-2); padding: .15em .45em; border-radius: 6px; font-size: .9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prose pre {
    background: var(--surface-2); padding: 1.1rem 1.3rem; border-radius: var(--radius-sm);
    overflow-x: auto; margin: 0 0 1.4rem; border: 1px solid var(--line); line-height: 1.5;
}
.prose pre code { background: none; padding: 0; }

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.6rem; font-size: .96rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--surface); font-weight: 700; color: var(--ink); }

.callout {
    margin: 1.6rem 0; padding: 1.1rem 1.3rem; border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.callout strong { color: var(--ink); }

.lead { font-size: 1.2rem; color: var(--ink); font-weight: 500; }

/* ---------- Pager ---------- */
.pager { border-top: 1px solid var(--line); }
.pager-inner { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem 24px; }
.pager-link { display: flex; flex-direction: column; padding: 1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 200px; transition: .2s; color: var(--ink); }
.pager-link:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pager-link span { font-size: .82rem; color: var(--muted); }
.pager-link strong { color: var(--ink); }
.pager-link.next { text-align: right; margin-left: auto; }

/* ---------- CTA band ---------- */
.cta-band { padding: clamp(3rem, 7vw, 5rem) 0; background: linear-gradient(135deg, var(--brand-700), var(--brand) 55%, var(--accent)); color: #fff; }
.cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.cta-inner h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin: 0 0 .8rem; letter-spacing: -.02em; }
.cta-inner p { font-size: 1.15rem; opacity: .92; margin: 0 0 2rem; }
.cta-band .btn-primary { background: #fff; color: var(--brand-700); }
.cta-band .btn-primary:hover { background: #f1f5f9; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-top: 3rem; margin-top: 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; padding-bottom: 2rem; }
.footer-brand { display: flex; gap: .9rem; max-width: 360px; }
.footer-brand strong { display: block; }
.footer-brand p { margin: .3rem 0 0; color: var(--muted); font-size: .95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; align-content: start; }
.footer-nav a { color: var(--ink-soft); font-size: .95rem; }
.footer-nav a:hover { color: var(--brand); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 1.3rem 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
        background: var(--bg); border-bottom: 1px solid var(--line); padding: 1rem 24px 1.5rem;
        transform: translateY(-120%); transition: transform .28s ease; box-shadow: var(--shadow-md); gap: .2rem;
    }
    .site-nav.open { transform: translateY(0); }
    .site-nav a { padding: .8rem 1rem; }
    .nav-cta { margin-left: 0; text-align: center; margin-top: .5rem; }
    .pager-link { min-width: 0; flex: 1; }
}
