:root {
    /* Backgrounds */
    --bg:              #09090b;   /* Near-black page base */
    --bg-alt:          #111114;   /* Slightly lighter (footer, sidebar, alt sections) */

    /* Surfaces (translucent overlays on dark bg) */
    --surface:         rgba(255, 255, 255, 0.03);
    --surface-strong:  rgba(255, 255, 255, 0.06);
    --surface-ink:     #ffffff;

    /* Text */
    --text:            #a1a1aa;   /* Body / secondary text */
    --text-strong:     #f4f4f5;   /* Headings and high-emphasis text */
    --muted:           #71717a;   /* De-emphasised labels */
    --muted-strong:    #52525b;

    /* Accents */
    --accent:          #4f8ef7;   /* Primary blue — CTAs, active states, links */
    --accent-strong:   #3b82f6;
    --accent-secondary: #14B8A6;   /* Teal #14B8A6 — secondary gradient stop */  /* Previous #8b5cf6 Purple — secondary gradient stop */
    --accent-warm:     #f59e0b;   /* Amber — warm / warning states */
    --accent-glow:     rgba(79, 142, 247, 0.15); /* Soft blue halo for shadows */

    /* Borders */
    --border:          rgba(255, 255, 255, 0.08);
    --border-strong:   rgba(255, 255, 255, 0.12);

    /* Shadows */
    --shadow:          0 24px 60px rgba(0, 0, 0, 0.5);
    --shadow-strong:   0 36px 96px rgba(0, 0, 0, 0.7);

    /* Border Radius */
    --radius-xl: 1rem;     /* Outer page cards, hero wrappers */
    --radius-lg: 0.75rem;  /* Content cards, review cards */
    --radius-md: 0.5rem;   /* Inputs, code blocks, nav items */
    --radius-sm: 0.25rem;  /* Tags, small badges */
}

@media (min-width: 768px) {
    :root {
        --radius-xl: 1.5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --radius-xl: 2rem;
    }
}

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

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    background-color: var(--bg);
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(circle at 50% -20%, rgba(79, 142, 247, 0.12), transparent 50%),
        radial-gradient(circle at 10%  40%, rgba(139, 92, 246, 0.08), transparent 30%),
        radial-gradient(circle at 90%  80%, rgba(245, 158, 11, 0.05),  transparent 30%),
        var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, .display {
    color: var(--text-strong);
    letter-spacing: -0.04em;
    line-height: 1.1;
    font-weight: 800;
}

h1:focus, h2:focus, h3:focus, h4:focus, .display:focus {
    outline: none;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.accent-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.lede {
    font-size: 1rem;
    color: var(--text);
    max-width: 65ch;
}

@media (min-width: 768px) { .lede { font-size: 1.2rem; } }
@media (min-width: 1024px) { .lede { font-size: 1.35rem; } }

.headline { font-size: 2rem; }
@media (min-width: 768px) { .headline { font-size: 3rem; } }
@media (min-width: 1024px) { .headline { font-size: clamp(4rem, 7vw, 6rem); } }

/* Layout */
.page-shell {
    width: 100%;
    padding: 2.5rem 1rem;
    margin-inline: auto;
}

@media (min-width: 768px)  { .page-shell { padding: 4rem 2rem; } }
@media (min-width: 1024px) {
    .page-shell {
        max-width: 82rem;
        padding: clamp(3rem, 5vw, 6rem) clamp(1.5rem, 4vw, 2.5rem);
    }
}

.section { margin-top: 4rem; }
@media (min-width: 768px)  { .section { margin-top: 6rem; } }
@media (min-width: 1024px) { .section { margin-top: 8rem; } }

.section-intro { margin-bottom: 3rem; }

/* Grid */
.grid, .grid-2, .grid-3,
.feature-grid, .card-grid, .content-grid,
.split-grid, .stat-grid, .admin-grid, .trust-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-3, .feature-grid, .card-grid, .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .grid-2, .content-grid, .split-grid, .admin-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 2rem; }
}

@media (min-width: 1024px) {
    .grid-3, .feature-grid, .card-grid, .trust-grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

.grid > *, .grid-2 > *, .grid-3 > *, .feature-grid > *, .card-grid > *, .content-grid > *, .split-grid > *, .stat-grid > *, .admin-grid > *, .trust-grid > * {
    min-width: 0;
}

/* Cards */
.panel, .card, .feature-card, .stat-card,
.content-card, .code-card, .impact-card, .metric-card, .page-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 0;
    position: relative;
}

@media (min-width: 768px) {
    .panel, .card, .feature-card, .stat-card, .content-card, .code-card, .impact-card, .metric-card, .page-card {
        padding: 2rem;
    }
}

.card:hover, .feature-card:hover, .stat-card:hover, .content-card:hover, .code-card:hover, .impact-card:hover, .metric-card:hover {
    border-color: var(--border-strong);
    background: var(--surface-strong);
    transform: translateY(-4px);
}

.page-card {
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid transparent;
    width: 100%;
}

@media (min-width: 768px) { .button { width: auto; } }

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.button-primary {
    background: var(--text-strong);
    color: var(--bg);
}

.button-secondary {
    background: var(--surface);
    color: var(--text-strong);
    border: 1px solid var(--border);
}

.button-glow {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* Badges & Tags */
.pill, .badge, .tag {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    color: var(--text-strong);
}

.verified { color: var(--accent); border-color: var(--accent); }
.semiverified { color: var(--accent-warm); border-color: var(--accent-warm); }
.unverified { color: var(--muted); border-color: var(--muted); }

.tag.positive { color: #4ade80; border-color: rgba(74, 222, 128, 0.2); }
.tag.neutral { color: #94a3b8; border-color: rgba(148, 163, 184, 0.2); }
.tag.intent { color: var(--accent-secondary); border-color: rgba(139, 92, 246, 0.2); }

/* Proof Strip */
.proof-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .proof-strip {
        grid-template-columns: repeat(4, 1fr);
    }
}

.proof-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.proof-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.proof-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-strong);
}

/* Lists */
.list-stack {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.5rem 0;
}

.list-item::before {
    content: "✓";
    color: var(--accent);
    font-weight: 900;
    flex-shrink: 0;
}

/* Forms */
input, textarea, select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    color: #fff;
    width: 100%;
    transition: all 0.2s ease;
    font: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-strong);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Code */
pre, .code-sample {
    background: #000;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    width: 0;
    min-width: 100%;
}

code {
    color: #e2e8f0;
    white-space: pre-wrap;
}

/* Blazor Specifics */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50770;
}

.validation-message {
    color: #e50770;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUg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41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

/* Footer */
.shell-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 4rem 1rem 2rem;
    margin-top: 6rem;
}

@media (min-width: 1024px) {
    .shell-footer {
        padding: 6rem 2rem 3rem;
    }
}

.shell-footer-grid {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr;
    max-width: 82rem;
    margin-inline: auto;
}

@media (min-width: 768px) {
    .shell-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .shell-footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand img {
    width: 48px;
    height: 48px;
}

.footer-group h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-strong);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

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

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    max-width: 82rem;
    margin-inline: auto;
}

/* Supporter Logos */
.supporter-logo {
    filter: brightness(0) invert(1);
    opacity: 0.6;
    transition: opacity 0.3s ease;
    max-height: 40px;
    width: auto;
}

.supporter-logo:hover {
    opacity: 1;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
    justify-items: center;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .trust-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .trust-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 100%;
    transition: all 0.3s ease;
}

.trust-item:hover {
    background: var(--surface-strong);
    border-color: var(--accent-glow);
    transform: translateY(-2px);
}