:root {
    /* Spacing Scale */
    --space-4: 4px;
    --space-8: 8px;
    --space-16: 16px;
    --space-24: 24px;
    --space-40: 40px;
    --space-64: 64px;

    /* Colors - Dark Glassmorphism */
    --bg-dark: #0B0C10;
    --bg-panel: rgba(11, 12, 16, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.08);
    
    --neon-cyan: #00F2FE;
    --neon-blue: #4FACFE;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --error-red: #EF4444;

    /* Typography */
    --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Layout */
    --max-width: 1200px;
    --header-height-desktop: 64px;
    --header-height-mobile: 52px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-ui);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography Constraints */
h1, h2, h3, h4, h5, h6, .brand-name, .nav-link {
    overflow-wrap: anywhere;
    color: var(--text-main);
    line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: var(--space-24); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: var(--space-24); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); margin-bottom: var(--space-16); }
p { margin-bottom: var(--space-16); }

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(79, 172, 254, 0.4);
}

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

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 4px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-24);
}

/* Header */
.site-header {
    height: var(--header-height-desktop);
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand:hover {
    color: var(--text-main);
    text-shadow: none;
}

.brand-icon {
    width: 24px;
    height: 24px;
    fill: url(#neon-gradient);
}

.main-nav {
    display: flex;
    gap: var(--space-24);
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    font-weight: 500;
    padding: var(--space-8) var(--space-16);
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--neon-cyan);
    background: var(--glass-highlight);
    text-shadow: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: var(--space-8);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Hero Section */
.hero {
    padding: var(--space-64) 0;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
    background: radial-gradient(circle at top right, rgba(0, 242, 254, 0.1), transparent 40%),
                radial-gradient(circle at bottom left, rgba(79, 172, 254, 0.1), transparent 40%);
}

.hero-content {
    max-width: 800px;
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: var(--space-40);
    max-width: 600px;
}

/* Glass Card Overlay Strategy */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-40);
    margin: var(--space-64) 0;
}

.glass-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    min-width: 0;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: var(--neon-cyan);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--space-24);
    background: linear-gradient(to top, rgba(11, 12, 16, 0.95) 0%, rgba(11, 12, 16, 0.8) 60%, transparent 100%);
    backdrop-filter: blur(8px);
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
    border-top: 1px solid var(--glass-border);
}

.card-meta {
    display: flex;
    gap: var(--space-8);
}

.tag {
    background: var(--glass-highlight);
    color: var(--neon-cyan);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px var(--space-8);
    border-radius: 4px;
    text-transform: uppercase;
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link {
    display: inline-block;
    color: var(--bg-dark);
    background: linear-gradient(90deg, var(--neon-cyan) 0%, var(--neon-blue) 100%);
    padding: var(--space-8) var(--space-16);
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    align-self: flex-start;
}

.card-link:hover {
    color: var(--bg-dark);
    opacity: 0.9;
}

.click-target::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
}

/* Page Sections */
.section-pad {
    padding: var(--space-64) 0;
}

.content-block {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: var(--space-40);
    backdrop-filter: blur(12px);
    margin-bottom: var(--space-64);
}

/* Articles (Sub-pages) */
.article-header {
    text-align: center;
    padding: var(--space-64) 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: var(--space-40);
}

.article-meta {
    color: var(--text-muted);
    margin-bottom: var(--space-24);
    font-size: 0.875rem;
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    padding-bottom: var(--space-64);
}

.article-body h2 {
    margin-top: var(--space-40);
    color: var(--neon-cyan);
}

.article-body h3 {
    margin-top: var(--space-24);
}

.article-body ul {
    margin-bottom: var(--space-24);
    padding-left: var(--space-24);
}

.article-body li {
    margin-bottom: var(--space-8);
}

.stat-block {
    display: flex;
    flex-direction: column;
    margin: var(--space-24) 0;
    padding: var(--space-24);
    background: var(--glass-highlight);
    border-left: 4px solid var(--neon-cyan);
    border-radius: 0 8px 8px 0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px; /* strict 12px requirement */
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: var(--space-24);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: var(--space-16);
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    background: var(--glass-highlight);
    color: var(--neon-cyan);
    font-weight: 600;
}

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

/* Forms */
.form-group {
    margin-bottom: var(--space-24);
}

.form-label {
    display: block;
    margin-bottom: var(--space-8);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: var(--space-16);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-ui);
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 1px var(--neon-cyan);
}

.form-control.is-invalid {
    border-color: var(--error-red);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.error-message {
    display: none;
    color: var(--error-red);
    font-size: 0.875rem;
    margin-top: var(--space-8);
}

.is-invalid + .error-message {
    display: block;
}

.btn-submit {
    background: linear-gradient(90deg, var(--neon-cyan) 0%, var(--neon-blue) 100%);
    color: var(--bg-dark);
    border: none;
    padding: var(--space-16) var(--space-40);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-submit:hover {
    opacity: 0.9;
}

.map-placeholder {
    width: 100%;
    height: 300px;
    background: var(--glass-highlight);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: var(--space-24);
}

/* Footer */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-panel);
    padding: var(--space-64) 0 var(--space-24);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-40);
    margin-bottom: var(--space-64);
}

.footer-col h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-24);
    color: var(--neon-cyan);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-8);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--space-8);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--space-24);
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: var(--space-24);
    left: var(--space-24);
    right: var(--space-24);
    max-width: 800px;
    margin: 0 auto;
    background: rgba(11, 12, 16, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: var(--space-24);
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
}

.cookie-banner.is-visible {
    display: block;
}

.cookie-text {
    margin-bottom: var(--space-16);
    font-size: 0.875rem;
}

.cookie-actions {
    display: flex;
    gap: var(--space-16);
    flex-wrap: wrap;
}

.cookie-btn {
    background: var(--glass-highlight);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: var(--space-8) var(--space-16);
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-btn:hover {
    background: var(--glass-border);
}

.cookie-btn.primary {
    background: linear-gradient(90deg, var(--neon-cyan) 0%, var(--neon-blue) 100%);
    color: var(--bg-dark);
    border: none;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        height: var(--header-height-mobile);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height-mobile);
        left: 0;
        right: 0;
        background: rgba(11, 12, 16, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: var(--space-24);
        border-bottom: 1px solid var(--glass-border);
        z-index: 50;
    }
    
    .main-nav.is-visible {
        display: flex;
    }

    .hero {
        padding: var(--space-40) 0;
    }
    
    .content-block {
        padding: var(--space-24);
    }
}

@media (max-width: 400px) {
    .container {
        padding: 0 var(--space-16);
    }
    
    .guides-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}