:root {
  /* Unique Color System */
  --obsidian-blue: #071116;
  --deep-graphite: #10191D;
  --industrial-slate: #1C2A2F;
  --water-teal: #167D86;
  --electric-cyan: #35C7D0;
  --mist-blue: #9BD7DA;
  --frost-white: #EAF4F3;
  --steel-grey: #708087;
  --deep-aqua: #0B4F59;
  --signal-lime: #B7D85A;

  /* Glassmorphism Variables */
  --glass-bg: rgba(28, 42, 47, 0.65);
  --glass-border: rgba(155, 215, 218, 0.15);
  --glass-highlight: rgba(53, 199, 208, 0.2);
  
  /* Spacing System */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  
  /* Typography */
  --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  
  /* Layout */
  --container-width: 1200px;
  --header-height: 64px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-base);
  background-color: var(--obsidian-blue);
  color: var(--mist-blue);
  line-height: 1.6;
  font-size: 16px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scroll only at the root level, but layout must be sound */
}

/* Prevent layout issues on mobile */
html, body {
  max-width: 100%;
}

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

a {
  color: var(--electric-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover, a:focus {
  color: var(--frost-white);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--frost-white);
  line-height: 1.3;
  margin-bottom: var(--space-4);
  font-weight: 600;
  overflow-wrap: anywhere;
  max-width: 60ch;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 0;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-top: var(--space-6);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  margin-top: var(--space-5);
}

p {
  margin-bottom: var(--space-4);
  max-width: 70ch;
  line-height: 1.75;
}

ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-4);
  max-width: 70ch;
  line-height: 1.75;
}

li {
  margin-bottom: var(--space-2);
}

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

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

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
}

.text-frost { color: var(--frost-white); }
.text-steel { color: var(--steel-grey); }
.text-cyan { color: var(--electric-cyan); }
.text-lime { color: var(--signal-lime); }

.bg-graphite { background-color: var(--deep-graphite); }
.bg-obsidian { background-color: var(--obsidian-blue); }

.mt-6 { margin-top: var(--space-6); }
.mb-6 { margin-bottom: var(--space-6); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--water-teal);
  color: var(--frost-white);
  border-color: var(--deep-aqua);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--electric-cyan);
  color: var(--obsidian-blue);
  box-shadow: 0 0 16px rgba(53, 199, 208, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--electric-cyan);
  border-color: var(--electric-cyan);
}

.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--glass-highlight);
  color: var(--frost-white);
}

/* Header */
.site-header {
  position: relative;
  background-color: var(--obsidian-blue);
  border-bottom: 1px solid var(--glass-border);
  height: auto;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: 100;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--frost-white);
  font-weight: 700;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
  z-index: 101;
}

.brand svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--electric-cyan);
  stroke-width: 2;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--mist-blue);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--electric-cyan);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--frost-white);
  cursor: pointer;
  padding: var(--space-2);
  z-index: 101;
}

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

/* Mobile Menu Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--obsidian-blue);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-list {
  list-style: none;
  text-align: center;
  padding: 0;
}

.mobile-nav-list li {
  margin-bottom: var(--space-4);
}

.mobile-nav-list .nav-link {
  font-size: 1.5rem;
  color: var(--frost-white);
}

/* Hero Section */
.hero {
  position: relative;
  padding: var(--space-6) 0;
  background: radial-gradient(circle at top right, var(--industrial-slate) 0%, var(--obsidian-blue) 60%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
  position: relative;
  z-index: 2;
}

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

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--steel-grey);
  margin-bottom: var(--space-4);
  background: rgba(28, 42, 47, 0.5);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--signal-lime);
  box-shadow: 0 0 8px var(--signal-lime);
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}

/* Technical Visual */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.water-flow-line {
  stroke-dasharray: 10;
  animation: flow 20s linear infinite;
}

@keyframes flow {
  to { stroke-dashoffset: -1000; }
}

@media (prefers-reduced-motion: reduce) {
  .water-flow-line {
    animation: none;
  }
}

.hero-metadata {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  font-family: monospace;
  color: var(--electric-cyan);
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Glass Overlay Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.glass-card {
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.glass-card:hover .card-panel {
  border-color: var(--electric-cyan);
  background: rgba(28, 42, 47, 0.85);
  transform: translateY(-4px);
}

.card-image-wrap {
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background-color: var(--industrial-slate);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: var(--space-4);
  margin-top: -40px;
  margin-left: var(--space-3);
  margin-right: var(--space-3);
  position: relative;
  z-index: 2;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(16px)) {
  .card-panel {
    background: rgba(16, 25, 29, 0.95);
  }
}

.card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--electric-cyan);
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
}

.card-title {
  font-size: 1.25rem;
  color: var(--frost-white);
  margin-bottom: var(--space-2);
}

.card-panel h3 {
  margin-top: 0;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--mist-blue);
  margin-bottom: var(--space-4);
  flex-grow: 1;
  line-height: 1.6;
}

.card-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--water-teal);
  font-weight: 600;
  font-size: 0.9rem;
}

.card-cta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.3s ease;
}

.glass-card:hover .card-cta {
  color: var(--electric-cyan);
}

.glass-card:hover .card-cta svg {
  transform: translateX(4px);
}

/* Internal Pages - Article Layout */
.page-header {
  padding: var(--space-6) 0 var(--space-4) 0;
  background: linear-gradient(to bottom, var(--industrial-slate), var(--obsidian-blue));
  border-bottom: 1px solid var(--glass-border);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-6);
  padding: var(--space-6) 0;
}

.article-content {
  font-size: 1.1rem;
}

.article-content h2 {
  margin-top: var(--space-6);
}

.article-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--space-5);
  border: 1px solid var(--glass-border);
}

.article-sidebar {
  position: sticky;
  top: var(--space-6);
  height: fit-content;
}

.sidebar-widget {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.sidebar-widget h4 {
  color: var(--electric-cyan);
  margin-bottom: var(--space-3);
  margin-top: 0;
  font-size: 1.1rem;
}

.sidebar-widget p {
  margin-bottom: var(--space-3);
}

.sidebar-list {
  list-style: none;
  padding: 0;
}

.sidebar-list li {
  margin-bottom: var(--space-2);
  border-bottom: 1px solid rgba(155, 215, 218, 0.1);
  padding-bottom: var(--space-2);
}

.sidebar-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-list a {
  display: block;
  color: var(--mist-blue);
  font-size: 0.9rem;
}

.sidebar-list a:hover {
  color: var(--frost-white);
}

/* Callout Box */
.info-box {
  background: rgba(11, 79, 89, 0.2);
  border-left: 4px solid var(--water-teal);
  padding: var(--space-5);
  margin: var(--space-5) 0;
  border-radius: 0 4px 4px 0;
}

.info-box h2, .info-box h3, .info-box h4 {
  margin-top: 0;
  color: var(--electric-cyan);
}

/* Table styling for Cookie Policy */
.data-table-wrapper {
  overflow-x: auto;
  margin: var(--space-4) 0;
}

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

.data-table th, .data-table td {
  padding: var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.data-table th {
  background-color: var(--industrial-slate);
  color: var(--frost-white);
  font-weight: 600;
}

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

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--frost-white);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(16, 25, 29, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: var(--frost-white);
  font-family: var(--font-base);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--electric-cyan);
  box-shadow: 0 0 0 2px rgba(53, 199, 208, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  display: none;
  padding: var(--space-3);
  border-radius: 4px;
  margin-bottom: var(--space-4);
  font-weight: 500;
}

.form-status.is-success {
  display: block;
  background-color: rgba(183, 216, 90, 0.1);
  color: var(--signal-lime);
  border: 1px solid var(--signal-lime);
}

.form-status.is-invalid {
  display: block;
  background-color: rgba(255, 100, 100, 0.1);
  color: #ff8888;
  border: 1px solid #ff8888;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--deep-graphite);
  border-top: 1px solid var(--glass-border);
  padding: var(--space-6) 0 var(--space-4) 0;
}

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

.footer-col h3 {
  font-size: 1.1rem;
  color: var(--frost-white);
  margin-bottom: var(--space-3);
  margin-top: 0;
}

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

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--steel-grey);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--electric-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.8rem;
  color: var(--steel-grey);
}

.footer-bottom p {
  margin-bottom: 0;
}

.footer-legal-links {
  display: flex;
  gap: var(--space-3);
}

.footer-domain {
  color: var(--electric-cyan);
  font-weight: 600;
}

.footer-brand {
  font-size: 1rem;
  color: var(--mist-blue);
}

.footer-brand:hover {
  color: var(--frost-white);
}

.footer-brand svg {
  width: 20px;
  height: 20px;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  padding: var(--space-4);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}

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

.cookie-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cookie-content h3 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-size: 1.1rem;
}

.cookie-content p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--mist-blue);
}

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

/* Media Queries */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  
  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none; /* Handled by mobile menu overlay */
  }

  .header-actions .btn {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .cookie-container {
    flex-direction: column;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 400px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }

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

  .cookie-actions .btn {
    width: 100%;
  }
}