﻿/* DevBricks – Dark Redesign
   Fonts are self-hosted (no Google Fonts request, GDPR). If the Inter / Space Grotesk
   files are missing, the stack falls back to the bundled Roboto. */

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Medium.ttf') format('truetype');
    font-weight: 500;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
}

:root {
    --bg: #0B0D12;
    --surface: #12151C;
    --surface-2: #161A23;
    --surface-3: #1E2430;
    --border: #232836;
    --border-strong: #2A3040;
    --text: #E8EAF0;
    --text-muted: #9AA3B5;
    --link: #C3CAD9;
    --accent: #4ADE80;
    --accent-hover: #6EE7A0;
    --on-accent: #0B0D12;
    --font-body: 'Inter', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --container: 1200px;
    --gutter: 24px;
}

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

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

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

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text);
    line-height: 1.15;
    margin: 0 0 12px;
}

h1:focus {
    outline: none;
}

p {
    margin: 0 0 16px;
}

a {
    color: var(--link);
    text-decoration: none;
}

    a:hover {
        color: #fff;
    }

    a:focus-visible, button:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 3px;
        border-radius: 4px;
    }

img {
    max-width: 100%;
}

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

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

.accent {
    color: var(--accent);
}

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

.eyebrow {
    margin: 0 0 20px;
    font-size: 14px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    transition: background-color .15s, border-color .15s, color .15s;
}

.btn-primary, .btn-primary:hover {
    color: var(--on-accent);
}

.btn-primary {
    background: var(--accent);
}

    .btn-primary:hover {
        background: var(--accent-hover);
    }

.btn-ghost {
    border: 1px solid var(--border-strong);
    color: var(--text);
}

    .btn-ghost:hover {
        border-color: var(--text-muted);
        color: #fff;
    }

.btn-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.link-accent {
    color: var(--accent);
    font-size: 15px;
}

    .link-accent:hover {
        color: var(--accent-hover);
    }

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

.hero {
    padding-top: 96px;
    padding-bottom: 80px;
    display: flex;
    flex-wrap: wrap;
    gap: 56px;
    align-items: center;
}

.hero-copy {
    flex: 1 1 420px;
}

.hero h1 {
    margin: 0 0 24px;
    font-weight: 700;
    font-size: 60px;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.hero-lead {
    margin: 0 0 36px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 520px;
}

.brick-grid {
    flex: 1 1 320px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 420px;
}

    .brick-grid span {
        aspect-ratio: 1;
        border-radius: 14px;
        background: var(--surface-2);
        border: 1px solid var(--border);
    }

        .brick-grid span.alt {
            background: var(--surface-3);
            border-color: var(--border-strong);
        }

        .brick-grid span.lit {
            background: var(--accent);
            border-color: var(--accent);
        }

/* ---------- Tech pills ---------- */

.tech {
    padding-bottom: 72px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.tech-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-right: 8px;
}

.pill {
    padding: 8px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 14px;
}

/* ---------- Sections & cards ---------- */

.section {
    padding-bottom: 96px;
}

    .section > h2, .section-title {
        font-size: 36px;
        letter-spacing: -.01em;
    }

.section-lead {
    margin: 0 0 36px;
    color: var(--text-muted);
    font-size: 17px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
}

    .card h3 {
        margin: 0 0 10px;
        font-size: 20px;
    }

    .card p {
        color: var(--text-muted);
        margin: 0 0 20px;
        flex: 1;
    }

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--surface-3);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

    .card-icon svg {
        width: 20px;
        height: 20px;
    }

.card-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-panel {
    margin: 0 auto 72px;
    max-width: calc(var(--container) - 2 * var(--gutter));
    padding: 56px var(--gutter);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
}

    .cta-panel h2 {
        font-size: 32px;
    }

    .cta-panel p {
        color: var(--text-muted);
        margin: 0 0 28px;
    }

/* ---------- Module detail (Unity page) ---------- */

.page-head {
    padding-top: 72px;
    padding-bottom: 56px;
}

    .page-head h1 {
        font-size: 48px;
        font-weight: 700;
        letter-spacing: -.02em;
        margin-bottom: 16px;
    }

    .page-head p {
        color: var(--text-muted);
        font-size: 18px;
        max-width: 640px;
    }

.module {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 32px;
    scroll-margin-top: 24px;
}

    .module h2 {
        font-size: 32px;
        letter-spacing: -.01em;
    }

.module-intro {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 820px;
    margin-bottom: 32px;
}

.module-body {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 40px;
    align-items: start;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: grid;
    gap: 10px;
}

    .feature-list li {
        position: relative;
        padding-left: 26px;
        color: var(--link);
    }

        .feature-list li::before {
            content: "";
            position: absolute;
            left: 0;
            top: .45em;
            width: 10px;
            height: 10px;
            border-radius: 3px;
            background: var(--accent);
        }

.video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

    .video iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }

/* ---------- Text pages (imprint, privacy, contact) ---------- */

.prose {
    max-width: 820px;
    padding-top: 72px;
    padding-bottom: 96px;
}

    .prose h1 {
        font-size: 48px;
        font-weight: 700;
        letter-spacing: -.02em;
        margin-bottom: 32px;
    }

    .prose h2 {
        font-size: 24px;
        margin-top: 40px;
    }

    .prose h3 {
        font-size: 18px;
        margin-top: 28px;
    }

    .prose p, .prose li {
        color: var(--link);
    }

    .prose a {
        color: var(--accent);
    }

        .prose a:hover {
            color: var(--accent-hover);
        }

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

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

.contact-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.field {
    display: grid;
    gap: 8px;
}

    .field label {
        font-size: 14px;
        font-weight: 500;
        color: var(--text);
    }

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

.field input[type=text],
.field input[type=email],
.field input:not([type]),
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.field textarea {
    resize: vertical;
    min-height: 160px;
}

    .field input:focus, .field textarea:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(74, 222, 128, .2);
    }

.field input.invalid,
.field textarea.invalid {
    border-color: #F87171;
}

.validation-message {
    color: #FCA5A5;
    font-size: 14px;
}

.field-check {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 12px;
}

    .field-check input[type=checkbox] {
        width: 20px;
        height: 20px;
        margin: 2px 0 0;
        accent-color: var(--accent);
    }

    .field-check label {
        font-weight: 400;
        color: var(--link);
        font-size: 15px;
    }

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 20px;
}

.btn:disabled {
    opacity: .6;
    cursor: progress;
}

button.btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

    button.btn.btn-ghost {
        background: transparent;
        border: 1px solid var(--border-strong);
    }

.form-error {
    margin: 0;
    padding: 12px 16px;
    border: 1px solid #7F1D1D;
    background: #2A1215;
    color: #FECACA;
    border-radius: 10px;
}

.form-success h2 {
    margin-top: 0;
}

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

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

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

    .hero {
        padding-top: 48px;
        padding-bottom: 56px;
        gap: 40px;
    }

        .hero h1 {
            font-size: 40px;
        }

    .brick-grid {
        max-width: 220px;
        gap: 10px;
    }

        .brick-grid span {
            border-radius: 10px;
        }

    .page-head h1, .prose h1 {
        font-size: 36px;
    }

    .section > h2, .section-title {
        font-size: 28px;
    }

    .module {
        padding: 24px;
    }

        .module h2 {
            font-size: 26px;
        }

    .cta-panel {
        margin-left: var(--gutter);
        margin-right: var(--gutter);
        padding: 40px 20px;
    }
}

/* ---------- Blazor ---------- */

#blazor-error-ui {
    background: #3a1d1d;
    color: #fff;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.4);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui a {
        color: #fff;
        text-decoration: underline;
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.app-loading {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-body);
}
