:root {
  --bg-dark: #0a0a0f;
  --bg-darker: #050508;
  --panel-bg: rgba(255, 255, 255, 0.03);
  --panel-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(10, 10, 15, 0.65);
  --neon-1: #00f0ff;
  --neon-2: #ff00cc;
  --text-main: #f0f0f5;
  --text-muted: #9ba1a6;
  --text-dark: #0a0a0f;
  
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-40: 40px;
  --sp-64: 64px;

  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .brand-name, .nav-link {
  overflow-wrap: anywhere;
}

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

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

a:hover {
  color: var(--neon-2);
}

:focus-visible {
  outline: 2px solid var(--neon-1);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Header */
.site-header {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-24);
  background: var(--bg-darker);
  border-bottom: 1px solid var(--panel-border);
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.brand-icon {
  width: 24px;
  height: 24px;
  fill: var(--neon-1);
}

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

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

.nav-link:hover {
  color: var(--neon-1);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-16);
  background: linear-gradient(45deg, var(--neon-1), var(--neon-2));
  color: var(--text-dark);
  font-weight: 700;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  opacity: 0.9;
  color: var(--text-dark);
}

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

.menu-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

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

.content-grid, .flex-row {
  min-width: 0;
}

/* Sections */
.section {
  padding: var(--sp-64) 0;
}

.hero {
  text-align: center;
  padding: calc(var(--sp-64) * 1.5) var(--sp-24);
  background: radial-gradient(circle at top center, rgba(0, 240, 255, 0.1), transparent 50%);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  margin-top: 0;
  margin-bottom: var(--sp-24);
  line-height: 1.1;
  background: linear-gradient(to right, var(--text-main), var(--neon-1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text-main);
}

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

/* Cards (Glass Overlay Style) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-40);
  min-width: 0;
}

.glass-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: var(--panel-bg);
  min-width: 0;
  border: 1px solid var(--panel-border);
  transition: transform 0.3s ease;
}

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

.glass-card:hover .card-overlay {
  background: rgba(10, 10, 15, 0.85);
}

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

.card-overlay {
  position: relative;
  z-index: 2;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  padding: var(--sp-24);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.card-title {
  font-size: 1.25rem;
  color: var(--text-main);
  margin: 0 0 var(--sp-8);
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 var(--sp-16);
}

.card-cta {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--neon-1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Stats / Supporting */
.stats-block {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: var(--sp-40);
  margin-top: var(--sp-64);
}

.stat-item {
  margin-bottom: var(--sp-24);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--neon-2);
  margin-bottom: var(--sp-12);
}

.stat-label {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Articles (Sub-pages & Legal) */
.article-header {
  padding: var(--sp-64) 0 var(--sp-40);
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: var(--sp-40);
}

.article-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 var(--sp-16);
  color: var(--text-main);
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.article-content h2 {
  font-size: 1.75rem;
  margin: var(--sp-64) 0 var(--sp-24);
  color: var(--neon-1);
}

.article-content h3 {
  font-size: 1.35rem;
  margin: var(--sp-40) 0 var(--sp-16);
  color: var(--text-main);
}

.article-content p {
  margin: 0 0 var(--sp-24);
  color: var(--text-muted);
  font-size: 1.125rem;
}

.article-content ul, .article-content ol {
  margin: 0 0 var(--sp-24);
  padding-left: var(--sp-24);
  color: var(--text-muted);
  font-size: 1.125rem;
}

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

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-40) 0;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: var(--sp-24);
}

.article-content th, .article-content td {
  border: 1px solid var(--panel-border);
  padding: var(--sp-16);
  text-align: left;
}

.article-content th {
  background: var(--panel-bg);
  color: var(--neon-1);
}

/* Forms */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--panel-bg);
  padding: var(--sp-40);
  border-radius: 12px;
  border: 1px solid var(--panel-border);
}

.form-group {
  margin-bottom: var(--sp-24);
}

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

.form-control {
  width: 100%;
  padding: var(--sp-16);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--neon-1);
}

.form-control.is-invalid {
  border-color: var(--neon-2);
}

.error-message {
  display: none;
  color: var(--neon-2);
  font-size: 0.875rem;
  margin-top: var(--sp-4);
}

.form-control.is-invalid + .error-message {
  display: block;
}

.form-submit {
  width: 100%;
  padding: var(--sp-16);
  background: linear-gradient(45deg, var(--neon-1), var(--neon-2));
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.125rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.form-submit:hover {
  opacity: 0.9;
}

.map-block {
  width: 100%;
  height: 300px;
  background: var(--bg-darker);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--sp-40);
  position: relative;
  overflow: hidden;
}

.map-svg {
  width: 100%;
  height: 100%;
  opacity: 0.2;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.map-text {
  position: relative;
  z-index: 2;
  font-weight: 700;
  color: var(--neon-1);
  background: rgba(10, 10, 15, 0.8);
  padding: var(--sp-16) var(--sp-24);
  border-radius: 4px;
}

/* Footer */
.site-footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--panel-border);
  padding: var(--sp-64) 0 var(--sp-24);
  margin-top: var(--sp-64);
}

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

.footer-title {
  color: var(--text-main);
  font-size: 1.125rem;
  margin: 0 0 var(--sp-16);
}

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

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

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--neon-1);
}

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

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--neon-1);
  padding: var(--sp-24);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

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

.cookie-text {
  color: var(--text-main);
  font-size: 0.95rem;
  margin: 0;
}

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

.cookie-btn {
  padding: var(--sp-8) var(--sp-16);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

.cookie-btn:hover {
  background: var(--panel-border);
}

.cookie-btn.primary {
  background: var(--neon-1);
  color: var(--text-dark);
  border-color: var(--neon-1);
}

.cookie-btn.primary:hover {
  background: var(--text-main);
}

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

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-darker);
    flex-direction: column;
    padding: var(--sp-24);
    border-bottom: 1px solid var(--panel-border);
  }

  [data-menu-state="open"] .main-nav {
    display: flex;
  }

  .cookie-banner {
    flex-direction: column;
  }

  .cookie-actions {
    justify-content: flex-start;
  }
  
  /* Disable negative offsets if they were present */
  .glass-card {
    border-radius: 8px;
  }
}

@media (max-width: 399px) {
  .site-header {
    height: 48px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2rem;
  }
  .stat-value {
    font-size: 2rem;
  }
}

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