:root {
  /* Color Palette - Dark Glassmorphism */
  --bg-base: #0a0b10;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-primary: #38bdf8;
  --accent-secondary: #a855f7;
  
  /* Glass Panels */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  
  /* Spacing Scale */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 30%, rgba(56, 189, 248, 0.08), transparent 25%),
    radial-gradient(circle at 85% 70%, rgba(168, 85, 247, 0.08), transparent 25%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6, nav, .brand-name, .word-wrap {
  overflow-wrap: anywhere;
  margin-top: 0;
  margin-bottom: var(--space-16);
  color: #ffffff;
  line-height: 1.2;
}

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

p { margin-top: 0; margin-bottom: var(--space-24); }
a { color: var(--accent-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-secondary); }

/* Focus & Accessibility */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  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;
  }
}

/* Flex/Grid Safeguards */
.flex-item, .grid-item {
  min-width: 0;
}

/* Reusable Glass Panel */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  padding: var(--space-24);
  color: var(--text-main); /* Ensure contrast */
}

/* Neon Text Gradient */
.neon-text {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-primary); /* fallback */
  display: inline-block;
}

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

/* Header */
.site-header {
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(10, 11, 16, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}
.brand svg {
  width: 24px;
  height: 24px;
}

.nav-links {
  display: flex;
  gap: var(--space-24);
  align-items: center;
}
.nav-links a {
  color: var(--text-main);
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--accent-primary);
}

.header-cta {
  background: linear-gradient(90deg, rgba(56,189,248,0.2), rgba(168,85,247,0.2));
  border: 1px solid var(--accent-primary);
  color: #fff !important;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}
.header-cta:hover {
  background: linear-gradient(90deg, rgba(56,189,248,0.4), rgba(168,85,247,0.4));
  border-color: var(--accent-secondary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--space-8);
}
.menu-toggle svg { width: 24px; height: 24px; }

/* Main Content */
main {
  flex: 1;
  padding: var(--space-64) 0;
}

/* Sections */
section {
  margin-bottom: var(--space-64);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: var(--space-64) 0;
}
.hero p {
  max-width: 600px;
  margin: 0 auto var(--space-40) auto;
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* Grid Layouts */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-40);
}

/* Card Style: Glass overlay - full-bleed image with a translucent panel over it */
.glass-overlay-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 400px;
  text-decoration: none;
  display: block;
  border: 1px solid var(--glass-border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.glass-overlay-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}
.glass-overlay-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.glass-overlay-card .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-24);
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  color: #fff;
}
.glass-overlay-card h3 {
  margin-bottom: var(--space-8);
  font-size: 1.25rem;
}
.glass-overlay-card p {
  margin-bottom: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.card-tags {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
.tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-primary);
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Supporting Stats Block */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-24);
  margin-top: var(--space-40);
}
.stat-item {
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-12);
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Article/Page Content Layout */
.article-header {
  text-align: center;
  margin-bottom: var(--space-40);
}
.article-header img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 16px;
  margin-top: var(--space-24);
  border: 1px solid var(--glass-border);
}
.content-body {
  max-width: 800px;
  margin: 0 auto;
}
.content-body h2 {
  margin-top: var(--space-40);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: var(--space-8);
}
.content-body ul, .content-body ol {
  margin-bottom: var(--space-24);
  padding-left: var(--space-24);
}
.content-body li {
  margin-bottom: var(--space-8);
}
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-24);
}
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-24);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}
.content-body th, .content-body td {
  padding: var(--space-12);
  border-bottom: 1px solid var(--glass-border);
  text-align: left;
}
.content-body th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

/* Contact Form & Map */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-40);
}
.form-group {
  margin-bottom: var(--space-24);
}
.form-group label {
  display: block;
  margin-bottom: var(--space-8);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: var(--space-12);
  border-radius: 8px;
  font-family: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.form-control.is-invalid {
  border-color: #ef4444;
}
.error-msg {
  display: none;
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: var(--space-4);
}
.form-control.is-invalid + .error-msg {
  display: block;
}
.btn-submit {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border: none;
  padding: var(--space-12) var(--space-24);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
}
.btn-submit:hover {
  opacity: 0.9;
}
.static-map {
  width: 100%;
  height: 250px;
  background: 
    linear-gradient(rgba(10, 11, 16, 0.8), rgba(10, 11, 16, 0.8)),
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(56, 189, 248, 0.05) 10px, rgba(56, 189, 248, 0.05) 20px);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-24);
}
.static-map span {
  color: var(--accent-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: var(--space-40) 0;
  margin-top: auto;
  background: rgba(10, 11, 16, 0.5);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-40);
  margin-bottom: var(--space-40);
}
.footer-col h4 {
  color: #fff;
  margin-bottom: var(--space-16);
  font-size: 1rem;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: var(--space-8);
}
.footer-col a {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.footer-col a:hover {
  color: var(--accent-primary);
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--glass-border);
  padding-top: var(--space-24);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-16);
  background: rgba(10, 11, 16, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}
.cookie-banner.is-visible {
  transform: translateY(0);
}
.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}
.cookie-text {
  flex: 1;
  min-width: 250px;
  font-size: 0.875rem;
  margin: 0;
}
.cookie-actions {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.btn-cookie {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-cookie[data-cookie-choice="accept"] {
  background: var(--accent-primary);
  color: #0a0b10;
  font-weight: 600;
}
.btn-cookie[data-cookie-choice="reject"] {
  background: transparent;
  color: var(--text-main);
  border-color: var(--glass-border);
}
.btn-cookie[data-cookie-choice="preferences"] {
  background: transparent;
  color: var(--text-muted);
  text-decoration: underline;
}

/* Responsive Breakpoints */
@media (max-width: 767px) {
  .site-header {
    height: 52px;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(10, 11, 16, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: var(--space-24);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
  }
  .nav-links.is-open {
    display: flex;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 { font-size: 2rem; }
}

@media (max-width: 399px) {
  :root {
    --space-64: 40px;
    --space-40: 24px;
  }
  .hero h1 { font-size: 1.75rem; }
  .cookie-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-cookie {
    width: 100%;
    text-align: center;
  }
  .glass-overlay-card {
    height: 350px;
  }
}