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

    /* Dark Glassmorphism Theme */
    --bg-base: #0a0a0f;
    --bg-surface: rgba(20, 20, 30, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    
    --text-main: #f0f0f5;
    --text-muted: #a0a0b8;
    
    --accent-cyan: #00f3ff;
    --accent-purple: #bd00ff;
    
    --error: #ff4757;
    --success: #2ed573;

    /* Typography */
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Layout */
    --header-height: 64px;
    --container-width: 1200px;
}

@media (max-width: 767px) {
    :root {
        --header-height: 48px;
    }
}

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

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

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

/* Background Ambient Glows */
body::before, body::after {
    content: "";
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    z-index: -1;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
}
body::before {
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
}
body::after {
    bottom: -20%;
    right: -10%;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
}

h1, h2, h3, h4, h5, h6, .brand, nav {
    overflow-wrap: anywhere;
    line-height: 1.2;
    color: #ffffff;
}

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

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

ul {
    list-style-position: inside;
}

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

/* Layout Utilities */
main {
    flex: 1;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--header-height) var(--sp-24) var(--sp-64) var(--sp-24);
    display: flex;
    flex-direction: column;
    gap: var(--sp-64);
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--sp-40);
}

.content-section {
    display: flex;
    flex-direction: column;
    gap: var(--sp-16);
}

.content-section h2 {
    margin-bottom: var(--sp-8);
    font-size: 1.8rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: var(--sp-8);
}

.content-section h3 {
    margin-top: var(--sp-16);
    font-size: 1.4rem;
    color: var(--accent-cyan);
}

.content-section ul {
    margin-left: var(--sp-16);
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--sp-24);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--sp-8);
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
}

.brand-icon {
    color: var(--accent-cyan);
}

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

.main-nav a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--accent-cyan);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-16);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: var(--sp-4);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--sp-8) var(--sp-16);
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-cyan);
    color: #050508;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.btn-primary:hover {
    background: #ffffff;
    color: #050508;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-highlight);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--glass-highlight);
    border-color: var(--accent-cyan);
    color: #fff;
}

/* Hero Section */
.hero {
    margin-top: var(--sp-40);
    padding: var(--sp-64) var(--sp-40);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-purple), transparent);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--sp-24);
    align-items: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Guides Grid & Cards (Card Style 3: Glass Overlay) */
.guides-section {
    display: flex;
    flex-direction: column;
    gap: var(--sp-40);
}

.section-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--sp-24);
}
.grid-cards > * {
    min-width: 0;
}

.card {
    position: relative;
    border-radius: 16px;
    overflow: hidden; /* Clips the background image to border radius */
    display: block;
    aspect-ratio: 4/5;
    text-decoration: none;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    background: var(--bg-surface);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: var(--sp-24);
    background: linear-gradient(to top, rgba(10,10,15,0.95) 15%, rgba(10,10,15,0.7) 60%, rgba(10,10,15,0));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
    transform: translateY(0);
    transition: transform 0.3s ease, background 0.3s ease;
}

.card-tags {
    margin-bottom: var(--sp-4);
}

.tag {
    background: rgba(0, 243, 255, 0.15);
    color: var(--accent-cyan);
    padding: 2px var(--sp-8);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card h3 {
    font-size: 1.4rem;
    color: #fff;
    margin: 0;
}

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

.card-cta {
    margin-top: var(--sp-8);
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 243, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.15), 0 0 40px rgba(189, 0, 255, 0.1);
}

.card:hover img {
    transform: scale(1.05);
}

.card:hover .card-overlay {
    background: linear-gradient(to top, rgba(10,10,15,0.98) 25%, rgba(10,10,15,0.8) 70%, rgba(10,10,15,0));
}

.card:hover .card-cta {
    opacity: 1;
    transform: translateX(4px);
}

/* About Section */
.about-section {
    padding: var(--sp-40);
}
.about-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--sp-16);
    text-align: center;
}

/* Footer */
.main-footer {
    background: rgba(5, 5, 8, 0.9);
    border-top: 1px solid var(--glass-border);
    padding: var(--sp-64) var(--sp-24) var(--sp-24);
    margin-top: auto;
}

.footer-grid {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--sp-40);
    margin-bottom: var(--sp-40);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: var(--sp-16);
    min-width: 0;
}

.brand-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.footer-col a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    max-width: var(--container-width);
    margin: 0 auto;
    text-align: center;
    padding-top: var(--sp-24);
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: var(--sp-24);
    left: var(--sp-24);
    right: var(--sp-24);
    max-width: 800px;
    margin: 0 auto;
    z-index: 9999;
    padding: var(--sp-24);
    display: none; /* Toggled via JS */
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-24);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
    border-left: 4px solid var(--accent-purple);
}

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

.cookie-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
}
.cookie-content h4 {
    margin: 0;
}
.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: var(--sp-8);
    flex-wrap: wrap;
}

/* Forms */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-40);
    align-items: start;
}
.contact-layout > * {
    min-width: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
    margin-bottom: var(--sp-24);
}

.form-group label {
    font-weight: 500;
    color: #fff;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: var(--sp-12) var(--sp-16);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(0, 243, 255, 0.2);
}

.form-control.is-invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.2);
}

.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    display: none;
}
.error-msg.is-visible {
    display: block;
}

.form-success {
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: var(--sp-16);
    border-radius: 8px;
    margin-bottom: var(--sp-24);
    display: none;
}
.form-success.is-visible {
    display: block;
}

.static-map {
    width: 100%;
    height: 300px;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a0f 100%);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--sp-24);
}
.static-map::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}
.map-pin {
    position: relative;
    z-index: 2;
    color: var(--accent-purple);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(189, 0, 255, 0.7)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(189, 0, 255, 0.9)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(189, 0, 255, 0)); }
}

/* Tables (for specs and policies) */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
th, td {
    padding: var(--sp-12) var(--sp-16);
    border-bottom: 1px solid var(--glass-border);
}
th {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-weight: 600;
}

/* Specs Block Component */
.specs-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-24);
    padding: var(--sp-24);
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--accent-cyan);
    border-radius: 0 8px 8px 0;
}
.spec-item {
    display: flex;
    flex-direction: column;
    gap: 12px; /* strict 12px between stat and label as requested */
}
.spec-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.spec-stat {
    font-size: 1.25rem;
    color: #fff;
    font-weight: 600;
}

/* Responsive Overrides */
@media (max-width: 767px) {
    /* Mobile Header & Nav */
    .cta-header {
        display: none; /* simplify mobile header */
    }
    .nav-toggle {
        display: block;
    }
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: var(--sp-24);
        border-bottom: 1px solid var(--glass-border);
        transform: translateY(-150%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        pointer-events: none;
    }
    .main-nav.is-visible {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Layout tweaks */
    main {
        gap: var(--sp-40);
        padding-top: calc(var(--header-height) + var(--sp-24));
    }
    .hero {
        padding: var(--sp-40) var(--sp-24);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-24);
    }

    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
    }
    
    /* Remove negative insets / large offsets below 768px as requested */
    .glass-panel {
        box-shadow: none; /* Reduce complex shadows on mobile */
        border-radius: 8px;
    }
    .card {
        border-radius: 8px;
    }
}

@media (max-width: 399px) {
    /* Below 400px breakpoint */
    :root {
        --sp-64: 40px;
        --sp-40: 24px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .btn {
        width: 100%;
        display: block;
    }
    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }
    .cookie-actions .btn {
        width: 100%;
    }
}

/* Reduced Motion */
@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;
    }
}