/* 
  PREMIUM DESIGN SYSTEM
  Inspired by Elephant Skin, Voxelo, SpaceX, Starmind
*/

:root {
  --bg-color: #030303;
  --bg-secondary: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --accent: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glow: rgba(255, 255, 255, 0.15);
  
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

h1 { font-size: clamp(2rem, 6vw, 6.5rem); }
h2 { font-size: clamp(1.5rem, 5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
p { font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; }

/* Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}

.section {
  padding: 8rem 0;
  position: relative;
}

.text-center { text-align: center; margin-inline: auto; }

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 100;
  background: rgba(3, 3, 3, 0.5);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255,255,255,0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--glass-border);
}

.btn-secondary:hover {
  background: var(--glass-bg);
  border-color: rgba(255,255,255,0.2);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 100px 5% 0 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  gap: 40px;
}

#three-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1; /* Below text */
  pointer-events: none; /* Let clicks pass through to buttons */
}

/* Empty placeholder box to force 50/50 flex layout */
.hero-visual {
  flex: 1;
}

.hero-content {
  flex: 1;
  text-align: left;
  z-index: 2;
  
  /* Initial state: pushed right (centered visually) and invisible */
  transform: translateX(50%);
  opacity: 0;
  transition: transform 1.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1.5s ease;
}

/* Loaded state: slides left into position and fades in */
.hero.is-loaded .hero-content {
  transform: translateX(0);
  opacity: 1;
}

/* Mobile responsive layout */
@media (max-width: 960px) {
  .hero {
    padding-top: 120px;
  }
  .hero-split {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    text-align: center;
    order: 2; /* Text below image on mobile */
    /* Mobile doesn't need the massive horizontal slide, just a vertical fade up */
    transform: translateY(30px);
  }
  
  .hero.is-loaded .hero-content {
    transform: translateY(0);
  }
  .hero-visual {
    width: 100%;
    height: 400px;
    order: 1; /* Image above text on mobile */
  }
  .hero-cta-group {
    justify-content: center;
  }
}

.hero-tagline {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  margin-left: -8px; /* Force left to overcome font bounding box */
  color: var(--text-secondary); /* Muted on desktop */
}

@media (max-width: 768px) {
  .hero-tagline {
    color: var(--primary); /* Bright electric teal on mobile */
  }
}

.hero-title {
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 3rem;
  margin-left: -8px; /* Force left to overcome font bounding box */
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  gap: 1.5rem;
}



.hero-content {
  max-width: 1200px;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.4) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  margin: 0 auto 3rem auto;
  max-width: 800px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Products Showcase */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 4rem;
}

@media (min-width: 1024px) {
  .products-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3rem;
  }
  
  .product-card:nth-child(1) { 
    grid-column: span 12; 
    min-height: 600px; 
    flex-direction: row; 
    align-items: center;
    gap: 4rem; /* Division between text and visual */
  } 
  .product-card:nth-child(2) { grid-column: span 6; }
  .product-card:nth-child(3) { grid-column: span 6; }
}

.product-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 4rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-card:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transform: translateY(-5px);
}

.product-content {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 500px;
}

.product-card h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.product-card p {
  margin-bottom: 2rem;
}

.product-visual {
  position: relative;
  width: 100%;
  height: 300px;
  margin-top: 3rem;
  border-radius: 12px;
  z-index: 1;
}

@media (min-width: 1024px) {
  .product-card:nth-child(1) .product-content {
    flex: 1;
    max-width: 50%; /* Prevent overlapping the image */
  }

  .product-card:nth-child(1) .product-visual {
    flex: 1;
    width: auto;
    height: 100%;
    min-height: 400px;
    margin-top: 0;
    position: relative; /* Replaced absolute with relative for flex layout */
    border-radius: 12px;
  }
}

/* Stats Section */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4rem;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  padding: 5rem 0;
  margin-top: 5rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* Mission & Tech Bento */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.bento-item {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3rem;
  /* Fix: Do NOT use transition: all, as it intercepts and breaks GSAP animations! */
  transition: background-color 0.6s ease, border-color 0.6s ease;
}

.bento-item:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.02);
}

.bento-icon {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.bento-item h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Call to action */
.cta-section {
  text-align: center;
  padding: 10rem 0;
}

.cta-section h2 {
  margin-bottom: 1.5rem;
}

.waitlist-form {
  max-width: 500px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.waitlist-form input, 
.waitlist-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  padding: 1.2rem;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.waitlist-form input:focus, 
.waitlist-form textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
}

/* Footer */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.footer-col h5 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

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

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--glass-border);
  padding-top: 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Utility classes for GSAP */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* Mobile Menu Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(3, 3, 3, 0.95);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

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

.mobile-nav-overlay a {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 2rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 101; /* Keep it above the overlay */
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-menu-btn { display: block; }
  
  .product-card {
    padding: 1.5rem; /* further reduced padding for mobile */
  }
  
  .section {
    padding: 3rem 0; /* further reduced section padding for mobile */
  }
  
  .bento-item {
    padding: 1.5rem;
  }
}
