/* Modern Reset & Base Styles */
:root {
  --bg-primary: #050505;
  --bg-secondary: #0F0F11;
  --bg-tertiary: #1A1A1D;
  --text-primary: #EDEDED;
  --text-secondary: #A1A1A3;
  --accent-teal: #2491a1;
  --accent-purple: #735bbb;
  --accent-gradient: linear-gradient(135deg, #2491a1 0%, #735bbb 100%);
  --border-color: #2A2A2E;
  --max-width: 1200px;
  --header-height: 80px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Smooth scrolling on mobile */
  -webkit-overflow-scrolling: touch;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: 3.5rem;
  background: linear-gradient(to bottom, #fff, #A1A1A3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

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

.section {
  padding: 6rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.flex {
  display: flex;
  gap: 1rem;
}

.flex-center {
  justify-content: center;
  align-items: center;
}

.flex-col {
  flex-direction: column;
}

.text-center {
  text-align: center;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

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

.btn-primary:hover, .btn--primary:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--block {
  width: 100%;
  display: flex;
}

.btn-waitlist-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent-gradient);
  color: white;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(36, 145, 161, 0.3);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.5s forwards 1s;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(36, 145, 161, 0.1);
  color: var(--accent-teal);
  border: 1px solid rgba(36, 145, 161, 0.2);
  margin-bottom: 1rem;
}

/* Form Styles */
.email-form {
  max-width: 400px;
  margin: 0 auto;
}

.email-form__group {
  display: flex;
  gap: 0.5rem;
}

.email-form__group--vertical {
  flex-direction: column;
}

.email-form__input {
  width: 100%;
  padding: 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: white;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.email-form__input:focus {
  border-color: var(--accent-teal);
}

.email-form__privacy {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  margin-bottom: 0;
  opacity: 0.7;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
  height: 32px;
  width: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

/* Ensure desktop nav is visible on desktop */
@media (min-width: 769px) {
  .nav-links {
    display: flex !important;
  }
  
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .mobile-nav {
    display: none !important;
  }
  
  .header-actions .btn-secondary {
    display: inline-flex !important;
  }
}

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

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

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
.mobile-nav {
  display: none !important;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 1000;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  border-top: 1px solid var(--border-color);
}

.mobile-nav[aria-hidden="false"] {
  transform: translateX(0);
}

.mobile-nav-links {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-links li {
  list-style: none;
}

.mobile-nav-links a {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 500;
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-links a.btn {
  border: none;
  text-align: center;
  margin-top: 1rem;
}

/* Hero */
.hero {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 4rem;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto 4rem;
}

.hero-image-container {
  position: relative;
  margin: 0 auto;
  max-width: 1100px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 80px rgba(36, 145, 161, 0.15);
  transform: perspective(1000px) rotateX(2deg);
  transition: transform 0.5s ease;
}

.hero-image-container:hover {
  transform: perspective(1000px) rotateX(0deg);
}

/* Feature Blocks */
.feature-block {
  display: flex;
  align-items: center;
  gap: 4rem;
  margin-bottom: 4rem;
}

.feature-block.reverse {
  flex-direction: row-reverse;
}

.feature-content {
  flex: 1;
}

.feature-image {
  flex: 1.2;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  /* Position relative for slideshow */
  position: relative;
  max-width: 100%; /* Ensure it doesn't overflow parent */
}

/* Slideshow Styles */
.slideshow {
  position: relative;
  width: 100%;
  /* Aspect ratio hack (assuming roughly 16:10 or fitting content) */
  /* We'll let the first image dictate height or use a fixed ratio if needed.
     For simplicity, we'll stack images. */
  display: grid;
  place-items: center;
  cursor: pointer;
  min-height: 200px; /* Ensure container has height */
  overflow: hidden; /* Prevent images from overflowing */
}

.slide {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  /* Grid stacking - all slides occupy same grid cell */
  grid-area: 1 / 1;
  /* Hardware acceleration for smoother transitions */
  will-change: opacity;
  transform: translateZ(0);
  position: relative;
  object-fit: contain; /* Ensure images fit within container */
}

.slide.active {
  opacity: 1 !important;
  z-index: 1;
}

.feature-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.feature-list li::before {
  content: "✓";
  color: var(--accent-teal);
  font-weight: bold;
}

/* Cards Grid */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--accent-teal);
  transform: translateY(-4px);
}

.card-image {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
}

/* Pricing */
.pricing-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
}

.pricing-table th, .pricing-table td {
  padding: 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.pricing-table th {
  color: var(--text-primary);
  font-size: 1.25rem;
}

.pricing-table td {
  color: var(--text-secondary);
}

.check {
  color: var(--accent-teal);
}

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

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-logo {
  height: 24px;
  opacity: 0.8;
}

.footer-bottom {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 1.25rem;
  }

  h1 { 
    font-size: 2.25rem; 
    margin-bottom: 1rem;
  }
  
  h2 { 
    font-size: 1.75rem; 
    margin-bottom: 0.75rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  p {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .section {
    padding: 3rem 0;
  }

  /* Header */
  .mobile-menu-toggle {
    display: flex !important;
  }

  .nav-links { 
    display: none !important; 
  }

  .mobile-nav {
    display: block !important;
  }

  .header-actions .btn-secondary {
    display: none !important;
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 2rem;
  }

  .hero-content {
    margin-bottom: 2.5rem;
  }

  .hero-image-container {
    transform: none;
    border-radius: 8px;
  }

  .hero-image-container:hover {
    transform: none;
  }

  /* Buttons */
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    min-height: 44px; /* Better touch target */
  }

  .flex.flex-center {
    flex-direction: column;
    gap: 0.75rem;
  }

  .flex.flex-center .btn {
    width: 100%;
    max-width: 300px;
  }

  /* Feature Blocks */
  .feature-block, .feature-block.reverse {
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
  }

  .feature-content {
    order: 1;
  }

  .feature-image {
    order: 2;
    flex: 1;
  }

  /* Cards */
  .card {
    padding: 1.5rem;
  }

  .card-image {
    margin-bottom: 1rem;
  }

  /* Grids */
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Pricing Table */
  .pricing-table {
    font-size: 0.875rem;
  }

  .pricing-table th, 
  .pricing-table td {
    padding: 1rem 0.75rem;
  }

  .pricing-table th {
    font-size: 1rem;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }

  /* Floating Button */
  .btn-waitlist-float {
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(36, 145, 161, 0.4);
  }

  /* Email Form */
  .email-form {
    max-width: 100%;
  }

  .email-form__input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 1rem;
    min-height: 44px;
  }

  /* Images */
  .hero-image-container img,
  .feature-image img {
    width: 100%;
    height: auto;
  }

  /* Badge */
  .badge {
    font-size: 0.8125rem;
    padding: 0.375rem 0.875rem;
  }

  /* Text Center Sections */
  .text-center {
    text-align: left;
  }

  .text-center h2,
  .text-center p {
    text-align: center;
  }

  /* Prevent horizontal scroll */
  body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Smooth anchor scrolling */
  html {
    scroll-padding-top: calc(var(--header-height) + 1rem);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  h1 { 
    font-size: 2rem; 
  }
  
  h2 { 
    font-size: 1.5rem; 
  }

  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .btn-waitlist-float {
    bottom: 1rem;
    right: 1rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.8125rem;
  }

  /* Even tighter spacing for very small screens */
  .hero-content {
    margin-bottom: 2rem;
  }

  .feature-block {
    margin-bottom: 2.5rem;
  }
}
