:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg-dark: #07070a;
  --glass-bg: rgba(20, 20, 28, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --text-main: #f4f4f8;
  --text-muted: #9ba1a6;
  --neon-accent-1: #00f3ff;
  --neon-accent-2: #bc13fe;
  --error-color: #ff4d4d;
  
  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;
  
  --z-nav: 100;
  --z-cookie: 200;
}

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

@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;
  }
}

html {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Prevent horizontal scroll from body width, not layout masking */
}

/* Base Elements */
h1, h2, h3, h4, .brand-name, nav a {
  overflow-wrap: anywhere;
  color: #ffffff;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: var(--space-24); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-16); }

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

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

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

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--neon-accent-1);
  outline-offset: 4px;
}

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

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

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

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

.grid {
  display: grid;
  gap: var(--space-40);
  min-width: 0;
}

.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

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

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

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

.brand svg {
  width: 24px;
  height: 24px;
}

.main-nav {
  display: flex;
  gap: var(--space-24);
}

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

.main-nav a:hover {
  color: var(--neon-accent-1);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  background: var(--glass-bg);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.2), rgba(188, 19, 254, 0.2));
  border-color: var(--neon-accent-1);
  color: #fff;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--neon-accent-2);
}

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

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

/* Mobile Nav */
@media (max-width: 767px) {
  .site-header { height: 52px; }
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: var(--space-24);
    border-bottom: 1px solid var(--glass-border);
    z-index: var(--z-nav);
  }
  .main-nav.is-visible {
    display: flex;
  }
  .header-cta .btn {
    display: none;
  }
}

/* Glassmorphism Background Effects */
.bg-glow {
  position: absolute;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(188,19,254,0.15) 0%, rgba(0,243,255,0.05) 50%, transparent 70%);
  top: -20vh;
  left: 20vw;
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
}

/* Card Style: Framed Canvas */
.card-framed {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: var(--space-24);
  min-width: 0;
}

.card-frame {
  position: absolute;
  top: 12px;
  left: 12px;
  right: -12px;
  bottom: -12px;
  border: 1px solid var(--neon-accent-2);
  background: linear-gradient(135deg, rgba(188,19,254,0.1), rgba(0,243,255,0.1));
  border-radius: 8px;
  z-index: 0;
  transition: opacity 0.3s;
}

.card-content {
  position: relative;
  z-index: 1;
  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-24);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  min-width: 0;
}

.card-framed:hover .card-content {
  transform: translate(-6px, -6px);
}

.card-framed:hover .card-frame {
  opacity: 0.8;
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-16);
  background: #111;
}

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

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

.tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neon-accent-1);
  margin-bottom: var(--space-8);
  font-weight: 600;
}

@media (max-width: 767px) {
  .card-frame {
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
  }
  .card-framed:hover .card-content {
    transform: none;
  }
}

/* Page Layouts */
main {
  flex: 1;
}

.hero {
  text-align: center;
  padding: 80px 0 var(--space-64) 0;
  position: relative;
}

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

/* Content Pages */
.content-page {
  max-width: 800px;
  margin: 0 auto;
}

.content-page h2 {
  margin-top: var(--space-40);
}

.content-page h3 {
  margin-top: var(--space-24);
  color: var(--text-main);
}

.stat-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: var(--space-16);
  padding: var(--space-16);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
}

.stat-val {
  font-size: 2rem;
  font-weight: 700;
  color: var(--neon-accent-1);
}

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

.feature-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: var(--space-24);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-bg);
}

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

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

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

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

label {
  display: block;
  margin-bottom: var(--space-8);
  font-size: 0.9rem;
  color: var(--text-muted);
}

input, textarea {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus, textarea:focus {
  border-color: var(--neon-accent-1);
}

input.is-invalid, textarea.is-invalid {
  border-color: var(--error-color);
}

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

.error-msg.is-visible {
  display: block;
}

.static-map {
  width: 100%;
  height: 300px;
  background: #0a0a0f;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.static-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.map-pin {
  width: 16px;
  height: 16px;
  background: var(--neon-accent-1);
  border-radius: 50%;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px var(--neon-accent-1);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: var(--space-64) 0 var(--space-40) 0;
  margin-top: auto;
  background: rgba(5, 5, 8, 0.8);
}

.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 {
  margin-bottom: var(--space-16);
  color: #fff;
}

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

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

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

.footer-col a:hover {
  color: var(--text-main);
}

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

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  padding: var(--space-16) var(--space-24);
  z-index: var(--z-cookie);
  transform: translateY(100%);
  transition: transform 0.4s ease-in-out;
}

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

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
  align-items: center;
  justify-content: space-between;
}

.cookie-text {
  flex: 1 1 300px;
  font-size: 0.9rem;
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}