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

  /* Colors - Dark Glassmorphism */
  --bg-base: #07090e;
  --bg-panel: rgba(255, 255, 255, 0.04);
  --bg-panel-hover: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-strong: rgba(255, 255, 255, 0.2);
  --neon-cyan: #00f2fe;
  --neon-blue: #4facfe;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;
  --error-color: #ff4b4b;
  
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  lang: en;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(0, 242, 254, 0.05), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(79, 172, 254, 0.05), transparent 25%);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .brand-name, nav a {
  margin-top: 0;
  color: var(--text-bright);
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

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

a:hover {
  color: var(--text-bright);
  text-shadow: 0 0 8px var(--neon-cyan);
}

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

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

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

/* 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: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Typography Scale */
.text-xxl { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; font-weight: 700; }
.text-xl { font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.2; font-weight: 600; }
.text-lg { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.3; font-weight: 600; }
.text-md { font-size: 1.125rem; }
.text-sm { font-size: 0.875rem; }

/* Header */
.site-header {
  height: 64px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(7, 9, 14, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 100;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-bright);
}

.brand-icon {
  width: 24px;
  height: 24px;
}

.desktop-nav {
  display: flex;
  gap: var(--space-24);
  min-width: 0;
}

.desktop-nav a {
  color: var(--text-main);
  font-size: var(--space-16);
  font-weight: 500;
}

.desktop-nav a:hover {
  color: var(--neon-cyan);
  text-shadow: none;
}

.header-cta {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
  color: var(--bg-base);
  padding: var(--space-8) var(--space-16);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
}

.header-cta:hover {
  color: var(--bg-base);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
  text-shadow: none;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-bright);
  padding: var(--space-8);
}

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

/* Hero Section */
.hero {
  padding: var(--space-64) 0;
  position: relative;
}

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

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-top: var(--space-16);
  margin-bottom: var(--space-40);
}

/* Card Style: Glass Overlay */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-24);
  margin-bottom: var(--space-64);
  min-width: 0;
}

.glass-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  text-decoration: none;
  border: 1px solid var(--border-glass);
  transition: transform 0.3s ease, border-color 0.3s ease;
  min-width: 0;
}

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

.glass-card:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 4px;
}

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

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

.glass-card-overlay h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-bright);
}

.glass-card-overlay p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Content Pages */
.page-header {
  padding: var(--space-64) 0 var(--space-40) 0;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: var(--space-40);
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-40);
  margin-bottom: var(--space-64);
  min-width: 0;
}

.main-content {
  min-width: 0;
}

.main-content h2 {
  margin-top: var(--space-40);
  margin-bottom: var(--space-24);
  color: var(--neon-cyan);
}

.main-content p {
  margin-bottom: var(--space-24);
}

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

.main-content li {
  margin-bottom: var(--space-8);
}

/* Featured Image for Content Pages */
.featured-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--space-40);
  border: 1px solid var(--border-glass);
}

/* Data Table (Cookie Policy, Tech Specs) */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-24);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

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

th {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  color: var(--text-bright);
}

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

/* Stats Block */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-24);
  margin: var(--space-40) 0;
}

.stat-box {
  padding: var(--space-24);
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-12);
}

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

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

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

.form-control {
  width: 100%;
  padding: var(--space-16);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-bright);
  font-family: var(--font-sans);
  font-size: 1rem;
  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-color);
}

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

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

.btn-submit {
  display: inline-block;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
  color: var(--bg-base);
  border: none;
  padding: var(--space-16) var(--space-40);
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  width: 100%;
}

.btn-submit:hover {
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

/* Map Block */
.map-block {
  width: 100%;
  height: 300px;
  background-color: #0c1220;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-40);
}

.map-bg-grid {
  position: absolute;
  inset: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
}

.map-marker {
  position: relative;
  z-index: 2;
  color: var(--neon-cyan);
  text-align: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-glass);
  padding: var(--space-64) 0 var(--space-40) 0;
  margin-top: var(--space-64);
  background: rgba(7, 9, 14, 0.5);
}

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

.footer-col h4 {
  color: var(--text-bright);
  margin-bottom: var(--space-16);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

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

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

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

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-24);
  background: rgba(7, 9, 14, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--neon-cyan);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

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

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

.cookie-btn {
  background: transparent;
  border: 1px solid var(--border-glass-strong);
  color: var(--text-main);
  padding: var(--space-8) var(--space-16);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

.cookie-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cookie-btn[data-cookie-choice="accept"] {
  background: var(--neon-cyan);
  color: var(--bg-base);
  border-color: var(--neon-cyan);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 767px) {
  .site-header {
    height: 52px;
  }
  .desktop-nav, .header-cta {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  
  /* Mobile Menu Overlay */
  .mobile-menu-wrapper {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--bg-base);
    border-bottom: 1px solid var(--border-glass);
    padding: var(--space-24);
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  body[data-menu-open="true"] .mobile-menu-wrapper {
    transform: translateY(0);
  }

  .mobile-menu-wrapper a {
    font-size: 1.125rem;
    color: var(--text-main);
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--border-glass);
  }
  
  .glass-card-overlay {
    background: linear-gradient(to top, rgba(7, 9, 14, 1) 0%, rgba(7, 9, 14, 0.8) 70%, transparent 100%);
  }

  .featured-img {
    height: 250px;
    margin-bottom: var(--space-24);
  }
}

@media (max-width: 399px) {
  :root {
    --space-64: 40px;
    --space-40: 24px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .cookie-actions {
    flex-direction: column;
  }
  .cookie-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;
  }
}