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

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

  /* Color Palette - Dark Glassmorphism */
  --bg-color: #0b0d17;
  --bg-gradient: radial-gradient(circle at top right, #11152a 0%, #0b0d17 100%);
  --text-main: #f0f2f8;
  --text-muted: #a4adc5;
  --accent-cyan: #00f3ff;
  --accent-cyan-glow: rgba(0, 243, 255, 0.4);
  --accent-magenta: #ff00ea;
  --glass-panel: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --error-color: #ff4a4a;

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

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography & Flow */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-24);
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: anywhere;
  color: #ffffff;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
  margin-top: 0;
  margin-bottom: var(--space-16);
}

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

a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px var(--accent-cyan-glow);
}

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

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

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

main {
  flex: 1;
}

section {
  padding: var(--space-64) 0;
}

/* Header & Nav */
.site-header {
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(11, 13, 23, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  overflow-wrap: anywhere;
}

.brand svg {
  width: 32px;
  height: 32px;
  fill: var(--accent-cyan);
}

.site-nav {
  display: flex;
  gap: var(--space-24);
  align-items: center;
  overflow-wrap: anywhere;
}

.nav-link {
  color: var(--text-main);
  font-weight: 500;
}

.btn {
  display: inline-block;
  padding: var(--space-12) var(--space-24);
  background: var(--glass-panel);
  border: 1px solid var(--glass-border);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:hover {
  background: var(--glass-hover);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
  color: #fff;
}

.btn-primary {
  background: transparent;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-primary:hover {
  background: var(--accent-cyan);
  color: var(--bg-color);
  box-shadow: 0 0 20px var(--accent-cyan-glow);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--space-8);
}

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

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
  z-index: -1;
  opacity: 0.5;
}

.hero-subtitle {
  color: var(--accent-magenta);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.875rem;
  margin-bottom: var(--space-16);
  display: block;
}

.hero-text {
  max-width: 600px;
  margin: 0 auto var(--space-40);
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* Glass Overlay Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-40);
}

.glass-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 400px;
  text-decoration: none;
  border: 1px solid var(--glass-border);
  min-width: 0;
}

.glass-card:hover {
  border-color: var(--accent-magenta);
  box-shadow: 0 0 20px rgba(255, 0, 234, 0.2);
}

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

.glass-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.5s ease;
}

.glass-card-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--space-24);
  background: rgba(11, 13, 23, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.glass-card-title {
  margin: 0;
  color: #fff;
  font-size: 1.25rem;
}

.glass-card-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.glass-card-cta {
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* Supporting Content & Statistics */
.content-block {
  background: var(--glass-panel);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: var(--space-40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: var(--space-64);
}

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

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

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

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

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

.article-body {
  max-width: 800px;
  margin: 0 auto;
}

.article-body h2 {
  margin-top: var(--space-40);
  color: var(--accent-cyan);
  font-size: 1.75rem;
}

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

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

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

.article-body p {
  margin-bottom: var(--space-24);
}

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

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

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

th {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 600;
}

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

label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: 500;
  color: #fff;
}

input, textarea {
  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-sans);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
}

input.is-invalid, textarea.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;
}

.map-placeholder {
  width: 100%;
  height: 300px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-top: var(--space-40);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 2px, transparent 2px, transparent 10px);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: var(--space-64) 0 var(--space-24);
  background: rgba(11, 13, 23, 0.95);
  margin-top: auto;
}

.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: 1.125rem;
}

.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);
}

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

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

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(11, 13, 23, 0.95);
  border-top: 1px solid var(--accent-magenta);
  padding: var(--space-24);
  z-index: 9999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.cookie-banner[hidden] {
  display: none;
}

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

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

/* Responsive Media Queries */
@media (max-width: 768px) {
  .site-header {
    height: 52px;
  }
  
  .mobile-menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    background: rgba(11, 13, 23, 0.98);
    flex-direction: column;
    padding: var(--space-24);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
  }

  .site-nav.is-visible {
    display: flex;
  }
  
  .header-cta {
    display: none;
  }

  .cookie-banner {
    padding: var(--space-16);
  }
  
  .cookie-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 399px) {
  .container {
    padding: 0 var(--space-16);
  }
  
  section {
    padding: var(--space-40) 0;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .content-block {
    padding: var(--space-24);
  }
  
  .stat-grid {
    grid-template-columns: 1fr;
  }
}