:root {
    /* Color Palette */
    --bg-dark: #0a0b10;
    --bg-panel: rgba(20, 22, 30, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #a0a5b5;
    
    --accent-cyan: #00f3ff;
    --accent-cyan-hover: #00c4cc;
    --accent-purple: #bf00ff;
    
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glass-hover: rgba(0, 243, 255, 0.3);
    
    --error-color: #ff3366;
    
    /* Spacing Scale */
    --sp-4: 4px;
    --sp-8: 8px;
    --sp-12: 12px;
    --sp-16: 16px;
    --sp-24: 24px;
    --sp-40: 40px;
    --sp-64: 64px;
    
    /* Header Heights */
    --header-h-desktop: 64px;
    --header-h-mobile: 52px;
    
    /* Typography */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

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

/* Ambient Background (Dark Glassmorphism) */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-dark);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-cyan);
    top: -100px;
    right: -100px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
    bottom: -100px;
    left: -100px;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6, a, p, span, .brand-name {
    overflow-wrap: anywhere;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: var(--sp-16);
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--sp-16);
    color: var(--text-secondary);
}

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

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

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 4px;
}

ul, ol {
    margin-bottom: var(--sp-16);
    padding-left: var(--sp-24);
    color: var(--text-secondary);
}

li {
    margin-bottom: var(--sp-8);
}

strong {
    color: var(--text-primary);
}

/* Layout Utilities */
main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--header-h-desktop) var(--sp-24) var(--sp-64);
    min-width: 0;
}

.section-spacing {
    margin-top: var(--sp-64);
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--sp-12);
}

.neon-border {
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-purple));
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.neon-border-left {
    border-left: 4px solid var(--accent-purple);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-12) var(--sp-24);
    border-radius: var(--sp-8);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-cyan);
    color: #000000;
}

.btn-primary:hover {
    background-color: var(--accent-cyan-hover);
    color: #000000;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

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

.btn-outline:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-compact {
    padding: var(--sp-8) var(--sp-16);
    font-size: 0.875rem;
}

/* Header */
.site-header {
    position: relative;
    width: 100%;
    height: var(--header-h-desktop);
    display: flex;
    align-items: center;
    z-index: 100;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: var(--sp-12);
    text-decoration: none;
    color: var(--text-primary);
    min-width: 0;
}

.brand-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-nav {
    display: flex;
    align-items: center;
    min-width: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--sp-24);
    margin: 0;
    padding: 0;
}

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

.nav-links a:hover, .nav-links a[aria-current="page"] {
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

#mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    position: absolute;
    transition: all 0.3s ease;
}

.hamburger-line:nth-child(1) { top: 0; }
.hamburger-line:nth-child(2) { top: 11px; }
.hamburger-line:nth-child(3) { bottom: 0; }

/* Hero Section */
.hero {
    margin-top: var(--sp-40);
    padding: var(--sp-64) var(--sp-40);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.hero-content 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;
    margin-bottom: var(--sp-24);
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: var(--sp-40);
}

/* Grid & Cards (Glass overlay style) */
.services-grid {
    display: flex;
    flex-direction: column;
    gap: var(--sp-40);
}

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

.card {
    position: relative;
    border-radius: var(--sp-12);
    overflow: hidden;
    aspect-ratio: 4/5;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
}

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

.card-overlay {
    position: relative;
    z-index: 1;
    margin: var(--sp-16);
    padding: var(--sp-24);
    border: 1px solid var(--border-glass);
}

.card-overlay h3 {
    margin-bottom: var(--sp-8);
    font-size: 1.25rem;
}

.card-overlay p {
    font-size: 0.875rem;
    margin-bottom: var(--sp-16);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-8);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Supporting Section */
.supporting-section {
    padding: var(--sp-64) var(--sp-40);
}

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

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--sp-24);
    margin-top: var(--sp-40);
}

.stat-block {
    display: flex;
    flex-direction: column;
    gap: var(--sp-12);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-cyan);
    line-height: 1;
}

.stat-unit {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-left: 4px;
}

.stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

/* Subpages Content Blocks */
.page-container {
    padding-top: var(--sp-40);
}

.page-header {
    padding: var(--sp-40);
    margin-bottom: var(--sp-40);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--sp-16);
}

.lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    max-width: 800px;
    margin-bottom: 0;
}

.content-block {
    padding: var(--sp-40);
}

.content-block h2 {
    margin-top: var(--sp-40);
    color: var(--accent-cyan);
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: var(--sp-8);
}

.content-block h2:first-child {
    margin-top: 0;
}

.content-block h3 {
    margin-top: var(--sp-24);
    color: var(--text-primary);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: var(--sp-24) 0;
    border-radius: var(--sp-8);
    border: 1px solid var(--border-glass);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    text-align: left;
}

.data-table th, .data-table td {
    padding: var(--sp-16);
    border-bottom: 1px solid var(--border-glass);
}

.data-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--text-primary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Code */
code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--accent-cyan);
}

/* Contact Page Specific */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--sp-40);
    align-items: start;
}

.contact-form-wrapper {
    padding: var(--sp-40);
}

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

.form-group label {
    margin-bottom: var(--sp-8);
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: var(--sp-12);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: var(--sp-8);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.form-group input.is-invalid, .form-group textarea.is-invalid, .form-group select.is-invalid {
    border-color: var(--error-color);
}

.error-msg {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: var(--sp-8);
}

.success-msg {
    margin-top: var(--sp-24);
    padding: var(--sp-16);
    background: rgba(0, 243, 255, 0.1);
    border-left: 4px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.contact-details {
    padding: var(--sp-40);
}

.details-block {
    margin-bottom: var(--sp-24);
}

.map-container {
    width: 100%;
    height: 250px;
    border-radius: var(--sp-8);
    overflow: hidden;
    margin-top: var(--sp-24);
    border: 1px solid var(--border-glass);
}

.static-map {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) invert(100%) sepia(100%) hue-rotate(180deg) saturate(300%) brightness(0.8) contrast(1.2);
}

/* Footer */
.site-footer {
    padding: var(--sp-64) var(--sp-24) var(--sp-24);
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

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

.footer-col h4 {
    margin-bottom: var(--sp-16);
    font-size: 1.125rem;
}

.footer-col p {
    margin-bottom: var(--sp-8);
    font-size: 0.875rem;
}

.footer-brand {
    font-size: 1.5rem;
    display: inline-block;
    margin-bottom: var(--sp-16);
}

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

.footer-links a {
    font-size: 0.875rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--sp-24);
    border-top: 1px solid var(--border-glass);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: var(--sp-24);
    left: var(--sp-24);
    right: var(--sp-24);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--sp-24);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-24);
    z-index: 1000;
}

.cookie-content {
    flex: 1;
    min-width: 280px;
}

.cookie-content h3 {
    margin-bottom: var(--sp-8);
    font-size: 1.125rem;
}

.cookie-content p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

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

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    main {
        padding-top: var(--header-h-mobile);
    }

    .site-header {
        height: var(--header-h-mobile);
    }
    
    #mobile-menu-btn {
        display: block;
    }
    
    .main-nav {
        position: absolute;
        top: var(--header-h-mobile);
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--border-glass);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-nav.is-visible {
        max-height: 400px;
    }
    
    .nav-links {
        flex-direction: column;
        padding: var(--sp-24);
        gap: var(--sp-16);
    }
    
    .header-cta {
        display: none;
    }

    /* Adjust offsets to 0 */
    .neon-border::before {
        inset: 0;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }
    
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
    
    .cookie-actions {
        width: 100%;
    }
    
    .cookie-actions button {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
    
    .content-block, .page-header, .hero, .contact-form-wrapper, .contact-details {
        padding: var(--sp-24);
    }
}

@media (max-width: 400px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-actions {
        flex-direction: column;
    }
    
    .card {
        aspect-ratio: auto;
        min-height: 300px;
    }
}

/* Accessibility & State toggles */
[hidden] {
    display: none !important;
}

@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;
    }
}