/* Cosmic Color System Implementation */
:root {
  /* Deep Space Colors */
  --deep-space: #0a0a0f;
  --cosmic-dark: #0f1419;
  --void-black: #000000;

  /* Vibrant Accent Colors */
  --neon-cyan: #00f5ff;
  --aurora-purple: #bf5af2;
  --stellar-gold: #ffd700;
  --plasma-pink: #ff006e;
  --quantum-green: #8ac926;

  /* Text Colors */
  --text-primary: #e8e8e8;
  --text-secondary: #a8a8b3;
  --text-tertiary: #c0c0c8;

  /* Font System */
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  /* Spacing Scale (8px grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Shadows with cosmic glow */
  --shadow-sm: 0 1px 2px 0 rgba(0, 245, 255, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 245, 255, 0.1), 0 2px 4px -1px rgba(191, 90, 242, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 245, 255, 0.1), 0 4px 6px -2px rgba(191, 90, 242, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 245, 255, 0.1), 0 10px 10px -5px rgba(191, 90, 242, 0.04);
  --shadow-neon: 0 0 10px rgba(0, 245, 255, 0.5), 0 0 20px rgba(0, 245, 255, 0.3), 0 0 30px rgba(0, 245, 255, 0.1);

  /* Borders */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.375rem;
  --border-radius-lg: 0.5rem;
  --border-radius-xl: 0.75rem;
  --border-radius-2xl: 1rem;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* Tailwind Color Extensions */
.bg-deep-space { background-color: var(--deep-space); }
.bg-cosmic-dark { background-color: var(--cosmic-dark); }
.bg-void-black { background-color: var(--void-black); }
.bg-neon-cyan { background-color: var(--neon-cyan); }
.bg-aurora-purple { background-color: var(--aurora-purple); }
.bg-stellar-gold { background-color: var(--stellar-gold); }
.bg-plasma-pink { background-color: var(--plasma-pink); }
.bg-quantum-green { background-color: var(--quantum-green); }

.text-deep-space { color: var(--deep-space); }
.text-cosmic-dark { color: var(--cosmic-dark); }
.text-void-black { color: var(--void-black); }
.text-neon-cyan { color: var(--neon-cyan); }
.text-aurora-purple { color: var(--aurora-purple); }
.text-stellar-gold { color: var(--stellar-gold); }
.text-plasma-pink { color: var(--plasma-pink); }
.text-quantum-green { color: var(--quantum-green); }
.text-text-primary { color: var(--text-primary); }
.text-text-secondary { color: var(--text-secondary); }
.text-text-tertiary { color: var(--text-tertiary); }

.border-neon-cyan { border-color: var(--neon-cyan); }
.border-aurora-purple { border-color: var(--aurora-purple); }
.border-stellar-gold { border-color: var(--stellar-gold); }

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  line-height: 1.65;
}

body {
  font-family: var(--font-inter);
  background-color: var(--deep-space);
  color: var(--text-primary);
  font-size: var(--text-base);
  line-height: 1.65;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

/* Liquid Ether Background */
#liquid-ether-bg {
  background: linear-gradient(45deg,
    var(--deep-space) 0%,
    var(--cosmic-dark) 25%,
    var(--void-black) 50%,
    var(--cosmic-dark) 75%,
    var(--deep-space) 100%
  );
  background-size: 400% 400%;
  animation: liquidFlow 15s ease-in-out infinite;
}

#liquid-ether-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(0, 245, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(191, 90, 242, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 40% 40%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
  animation: etherFloat 20s ease-in-out infinite;
}

#liquid-ether-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 60% 60%, rgba(0, 245, 255, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 30% 20%, rgba(191, 90, 242, 0.03) 0%, transparent 40%);
  animation: etherPulse 25s ease-in-out infinite reverse;
}

@keyframes liquidFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes etherFloat {
  0%, 100% { transform: translateY(0px) scale(1); opacity: 0.6; }
  33% { transform: translateY(-20px) scale(1.05); opacity: 0.8; }
  66% { transform: translateY(20px) scale(0.95); opacity: 0.4; }
}

@keyframes etherPulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
  50% { transform: scale(1.1) rotate(180deg); opacity: 0.6; }
}

/* Section Blending */
section {
  position: relative;
  z-index: 1;
}

section::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent 0%, rgba(15, 20, 25, 0.3) 50%, rgba(15, 20, 25, 0.6) 100%);
  z-index: -1;
}

section:first-of-type::before {
  display: none;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-7xl); }
  h2 { font-size: var(--text-5xl); }
}

p {
  margin: 0 0 1rem 0;
  line-height: 1.65;
}

/* Navigation Enhancements */
nav {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 245, 255, 0.2);
  background: rgba(15, 20, 25, 0.8);
}

/* Prevent layout shifts on mobile during load */
@media (max-width: 768px) {
  nav .flex.items-center.justify-between {
    min-height: 3rem;
    overflow: hidden;
  }

  nav .flex.items-center.space-x-3 {
    flex-shrink: 0;
    max-width: calc(100vw - 4rem - 2.5rem); /* account for padding and hamburger button */
  }

  nav .text-xl,
  nav .text-2xl {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Ensure hamburger button has fixed size to prevent layout shifts */
  nav .md\\:hidden button {
    width: 2.5rem !important;
    height: 2.5rem !important;
    flex-shrink: 0;
    min-width: 2.5rem;
  }
}

nav a {
  transition: var(--transition-base);
  font-weight: 500;
  position: relative;
}

nav a:hover {
  transform: translateY(-1px);
  text-shadow: 0 0 8px currentColor;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--aurora-purple));
  transition: width var(--transition-base);
}

nav a:hover::after {
  width: 100%;
}

/* Hero Section Animations */
#hero {
  position: relative;
}

#hero-headline {
  background: linear-gradient(135deg,
    var(--neon-cyan) 0%,
    var(--aurora-purple) 25%,
    var(--stellar-gold) 50%,
    var(--aurora-purple) 75%,
    var(--neon-cyan) 100%
  );
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: cosmicGradient 6s ease-in-out infinite;
}

@keyframes cosmicGradient {
  0%, 100% { background-position: 0% 50%; }
  33% { background-position: 100% 0%; }
  66% { background-position: 0% 100%; }
}

/* Typewriter Effect */
#hero-subheading {
  opacity: 0;
  animation: typewriter 2s ease-in-out 1s forwards;
}

@keyframes typewriter {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Value Badges Animation */
.value-badge {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: var(--shadow-neon);
  border: 1px solid;
  transition: var(--transition-base);
}

.value-badge:nth-child(1) {
  animation-delay: 2.5s;
  border-color: rgba(0, 245, 255, 0.3);
}
.value-badge:nth-child(2) {
  animation-delay: 2.7s;
  border-color: rgba(191, 90, 242, 0.3);
}
.value-badge:nth-child(3) {
  animation-delay: 2.9s;
  border-color: rgba(255, 215, 0, 0.3);
}

.value-badge:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button Enhancements */
button {
  font-family: var(--font-inter);
  font-weight: 600;
  transition: var(--transition-base);
  border: none;
  cursor: pointer;
  border-radius: var(--border-radius-lg);
  position: relative;
  overflow: hidden;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
}

button:active {
  transform: translateY(0);
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

/* Stats Counter Animation */
#hero [id^="stat-"] {
  opacity: 0;
  animation: countUp 1s ease-out 3.5s forwards;
  text-shadow: 0 0 10px currentColor;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Card Hover Effects */
.tech-logo, .tech-card, .team-card {
  transition: var(--transition-base);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
}

.tech-logo::before, .tech-card::before, .team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(0, 245, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.tech-logo:hover, .tech-card:hover, .team-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(0, 245, 255, 0.15),
    0 0 20px rgba(191, 90, 242, 0.1);
}

.tech-logo:hover::before, .tech-card:hover::before, .team-card:hover::before {
  opacity: 1;
}

/* 3D Card Effects */
.tech-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tech-card:hover {
  transform: rotateY(5deg) rotateX(5deg) translateY(-8px);
}

/* Product Tabs */
.tab-btn {
  transition: var(--transition-base);
  color: var(--text-secondary);
  position: relative;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--neon-cyan), var(--aurora-purple));
  color: var(--deep-space);
  box-shadow: var(--shadow-neon);
}

.tab-btn:not(.active):hover {
  color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

/* Product Panels */
.product-panel {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-slow);
}

.product-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: slideInFade 0.5s ease-out;
}

@keyframes slideInFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Architecture Diagram */
.arch-node {
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.arch-node:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 245, 255, 0.2);
}

/* Modal Styles */
#waitlist-modal, #demo-modal {
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

#waitlist-modal .bg-cosmic-dark, #demo-modal .bg-cosmic-dark {
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(0, 245, 255, 0.2);
}

/* Form Enhancements */
input, select, textarea {
  font-family: var(--font-inter);
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1), 0 0 10px rgba(0, 245, 255, 0.3);
}

/* Scroll Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: var(--transition-slow);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Progress Bars */
.progress-bar {
  overflow: hidden;
  border-radius: var(--border-radius-sm);
  background-color: var(--cosmic-dark);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--aurora-purple), var(--stellar-gold));
  border-radius: var(--border-radius-sm);
  transition: width 1s ease-out;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* Cosmic Particle Effects */
.cosmic-particle {
  position: absolute;
  background: var(--neon-cyan);
  border-radius: 50%;
  opacity: 0.6;
  animation: cosmicFloat 8s ease-in-out infinite;
  box-shadow: 0 0 6px currentColor;
}

@keyframes cosmicFloat {
  0%, 100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-30px) translateX(20px) rotate(90deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-10px) translateX(-20px) rotate(180deg);
    opacity: 0.8;
  }
  75% {
    transform: translateY(20px) translateX(10px) rotate(270deg);
    opacity: 0.4;
  }
}


/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.3), transparent);
  animation: cosmicShimmer 2s infinite;
}

@keyframes cosmicShimmer {
  100% {
    left: 100%;
  }
}

/* Enhanced Responsive Design */

/* Large tablets and small laptops: 1024px - 1280px */
@media (min-width: 1024px) and (max-width: 1280px) {
  .max-w-7xl {
    max-width: 95%;
  }

  /* Optimize spacing for medium screens */
  section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  /* Hero section adjustments */
  #hero .text-center.max-w-6xl {
    max-width: 90%;
  }

  /* Product section optimization */
  .grid.md\\:grid-cols-2.gap-12 {
    gap: 3rem;
  }

  /* Beta program optimization */
  .grid.md\\:grid-cols-3 {
    gap: 2rem;
  }
}

/* Tablet Portrait: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --text-7xl: 3.5rem;
    --text-5xl: 2.75rem;
    --text-4xl: 2.25rem;
    --text-3xl: 1.75rem;
  }

  .max-w-7xl {
    max-width: 90%;
  }

  /* Navigation adjustments for tablets */
  nav .flex.space-x-4 {
    gap: 0.75rem;
  }

  nav button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  /* Hero section tablet optimization */
  #hero {
    padding-top: 8rem; /* Increased padding to clear 80px navbar + extra spacing */
  }

  #hero .max-w-6xl {
    max-width: 85%;
  }

  .flex.flex-wrap.justify-center.gap-4 {
    gap: 1rem;
  }

  .flex.flex-wrap.justify-center.gap-4 button {
    min-width: 180px;
  }

  /* Product tabs for tablets */
  .tab-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  /* Beta program cards for tablets */
  .grid.md\\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Modal optimization for tablets */
  #waitlist-modal .max-w-md,
  #demo-modal .max-w-4xl {
    max-width: 85%;
  }
}

/* Mobile Landscape: 568px - 767px */
@media (min-width: 568px) and (max-width: 767px) {
  :root {
    --text-7xl: 3rem;
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
  }

  /* Navigation for mobile landscape */
  nav .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  nav .flex.items-center.space-x-8 {
    gap: 1rem;
  }

  nav .flex.space-x-4 {
    gap: 0.5rem;
  }

  nav button {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Hero adjustments */
  #hero {
    padding-top: 8rem; /* Increased padding to clear 80px navbar + extra spacing */
  }

  #hero .text-center.max-w-6xl {
    max-width: 90%;
  }

  .flex.flex-wrap.justify-center.gap-6 {
    gap: 1rem;
  }

  .value-badge {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  /* Stats section */
  .flex.flex-wrap.justify-center.gap-8 {
    gap: 2rem;
  }

  /* Company section */
  .grid.md\\:grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .grid.grid-cols-2.gap-6 {
    gap: 1rem;
  }

  /* Products section */
  .grid.md\\:grid-cols-2.gap-12 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Beta program */
  .grid.md\\:grid-cols-2.lg\\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .grid.md\\:grid-cols-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Mobile Portrait: up to 567px */
@media (max-width: 567px) {
  :root {
    --text-7xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.375rem;
    --text-2xl: 1.25rem;
    --text-xl: 1.125rem;
  }

  /* Base spacing adjustments */
  .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Navigation mobile */
  nav .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  /* Ensure proper flex layout on mobile */
  nav .flex.items-center.justify-between {
    flex-direction: row;
    gap: 0;
    align-items: center;
  }

  /* Remove margin that causes layout shift */
  nav .flex.items-center.space-x-3 {
    margin-bottom: 0;
  }

  /* Only target desktop nav buttons, not mobile hamburger */
  nav .hidden.md\\:flex.space-x-4 {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
  }

  /* Only style desktop nav buttons */
  nav .hidden.md\\:flex button {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.75rem;
    min-width: 0;
  }

  /* Hero section mobile */
  #hero {
    padding-top: 8rem;
    min-height: auto;
    padding-bottom: 3rem;
  }

  #hero .text-center.max-w-6xl {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  #hero h1 {
    line-height: 1.1;
    margin-bottom: 1.5rem;
  }

  #hero p {
    font-size: 1.125rem;
    line-height: 1.5;
    margin-bottom: 2rem;
  }

  /* Value badges mobile */
  .flex.flex-wrap.justify-center.gap-6 {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .value-badge {
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  /* CTA buttons mobile */
  .flex.flex-wrap.justify-center.gap-4 {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
  }

  .flex.flex-wrap.justify-center.gap-4 button {
    width: 100%;
    max-width: 280px;
    padding: 1rem;
    font-size: 1rem;
  }

  /* Stats mobile */
  .flex.flex-wrap.justify-center.gap-8 {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  /* Company section mobile */
  .grid.md\\:grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .grid.grid-cols-2.gap-6 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Products section mobile */
  .grid.md\\:grid-cols-2.gap-12 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .flex.items-center.mb-6 {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .flex.items-center.mb-6 h3 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .flex.flex-wrap.gap-3 {
    justify-content: center;
    gap: 0.5rem;
  }

  .flex.flex-wrap.gap-3 span {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }

  /* Product tabs mobile */
  .flex.justify-center.mb-12 {
    margin-bottom: 2rem;
  }

  .bg-cosmic-dark\\/50.rounded-lg.p-2.flex {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }

  .tab-btn {
    width: 100%;
    padding: 0.75rem;
    text-align: center;
  }

  /* Beta program mobile */
  .grid.md\\:grid-cols-2.lg\\:grid-cols-4 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .grid.md\\:grid-cols-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Modal mobile */
  #waitlist-modal,
  #demo-modal {
    padding: 1rem;
  }

  #waitlist-modal .max-w-md,
  #demo-modal .max-w-4xl {
    max-width: 100%;
    margin: 0;
  }

  #waitlist-modal .p-8,
  #demo-modal .p-8 {
    padding: 1.5rem;
  }

  /* Form elements mobile */
  input, select, textarea {
    font-size: 1rem; /* Prevent zoom on iOS */
  }

  /* Footer mobile */
  footer .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Very small devices: up to 320px */
@media (max-width: 320px) {
  :root {
    --text-7xl: 2rem;
    --text-5xl: 1.75rem;
    --text-4xl: 1.5rem;
    --text-3xl: 1.25rem;
  }

  .max-w-7xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  nav .max-w-7xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .value-badge {
    max-width: 240px;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  .flex.flex-wrap.justify-center.gap-4 button {
    max-width: 240px;
    padding: 0.875rem;
    font-size: 0.875rem;
  }

  nav button {
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
  }

  .flex.flex-wrap.gap-3 span {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  #hero {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 2rem;
  }

  nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .cosmic-particle,
  .tech-logo img,
  nav img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #hero-headline {
    animation: none;
    background: var(--neon-cyan);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  #liquid-ether-bg,
  #liquid-ether-bg::before,
  #liquid-ether-bg::after {
    animation: none;
  }
}

/* Focus Management */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --text-secondary: #ffffff;
    --text-tertiary: #ffffff;
    --neon-cyan: #00ffff;
    --aurora-purple: #ff00ff;
    --stellar-gold: #ffff00;
  }
}

/* Print Styles */
@media print {
  #liquid-ether-bg,
  nav,
  #waitlist-modal,
  #demo-modal {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, var(--neon-cyan), var(--aurora-purple), var(--stellar-gold));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.backdrop-blur {
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.glass-effect {
  background: rgba(15, 20, 25, 0.7);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(0, 245, 255, 0.2);
}

.hover-lift {
  transition: var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-neon);
}

.cosmic-glow {
  box-shadow:
    0 0 10px rgba(0, 245, 255, 0.3),
    0 0 20px rgba(191, 90, 242, 0.2),
    0 0 30px rgba(255, 215, 0, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--deep-space);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--neon-cyan), var(--aurora-purple));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--aurora-purple), var(--stellar-gold));
}

/* Selection Styling */
::selection {
  background: var(--neon-cyan);
  color: var(--deep-space);
}

::-moz-selection {
  background: var(--neon-cyan);
  color: var(--deep-space);
}

/* Mobile Menu Animation */
.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Navigation Responsive Adjustments */
@media (max-width: 768px) {
  nav {
    padding-bottom: 0;
  }

  nav #mobile-menu {
    border-top: 1px solid rgba(0, 245, 255, 0.1);
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}