:root {
  /* Colors */
  --primary: #e559f9;
  --primary-dark: #e559f9;
  --secondary: #f43f5e;
  --accent: #22c55e;
  --background: #0a0a0a;
  --surface: #1a1a1a;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-display: "Space Grotesk", sans-serif;
  --font-mono: "Space Mono", monospace;
  --font-body: "Inter", sans-serif;
}

a,
u {
  text-decoration: none;
  color: white;
}

a:hover {
  color: rgb(233, 233, 233);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.navbar {
  position: fixed;
  height: 4rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  z-index: var(--z-navigation);
}

/* Mobile Menu */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 4rem;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
  }
}

/* Other existing nav styles you have */

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: rgb(222, 219, 219);
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 1.5rem;
}

.typewriter {
  color: var(--primary);
  border-right: 4px solid var(--primary);
  padding-right: 8px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.hero-subtitle {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 600px;
}

/* Animated Sun/Circle Canvas */
.pen-line-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-background);
  opacity: 0.9; /* Slightly transparent to blend with background */
  mix-blend-mode: screen; /* Makes the glow effect more vibrant */
}

/* Z-index layers - main stacking context */
:root {
  --z-background: 1; /* Background elements like floating comments */
  --z-content: 10; /* Main content, sections */
  --z-navigation: 100; /* Navigation, header */
  --z-overlay: 1000; /* Modals, tooltips */
}

/* Floating Comments - Background Animation Layer */
.floating-comments {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Ensures clicks pass through to content */
  z-index: var(--z-background);
  overflow: hidden; /* Contain animations */
}

.floating-comment {
  position: absolute;
  pointer-events: none; /* Double ensure no interaction */
  opacity: 0; /* Start invisible */
  will-change: transform, opacity; /* Optimize animations */
  animation: float-up 3s ease-in-out forwards;
}

.floating-comment-inner {
  background: rgba(255, 255, 255, 0.08); /* Subtle background */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

/* Smooth float-up animation */
@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  15% {
    opacity: 0.7;
    transform: translateY(0) scale(1);
  }
  85% {
    opacity: 0.7;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
}

/* Ensure main UI elements are above floating comments */
.nav {
  z-index: var(--z-navigation);
  position: relative;
}

.hero,
.features,
.about,
.cta {
  position: relative;
  z-index: var(--z-content);
}

.modal {
  z-index: var(--z-overlay);
}

/* Form elements should always be clickable */
.waitlist-form {
  position: relative;
  z-index: var(--z-content);
}

/* Waitlist Form */
.waitlist-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

input[type="email"] {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s;
}

input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 89, 249, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 100px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-style: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: translateX(-100%);
  transition: none;
}

.btn:hover .btn-shine {
  transform: translateX(100%);
  transition: transform 0.5s;
  color: white;
}

/* Features Section */
.features {
  padding: 8rem 0;
  background: var(--surface);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  background: var(--background);
  border-radius: 1rem;
  text-align: center;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

/* About Section */
.about {
  padding: 8rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-list {
  list-style: none;
  margin-top: 2rem;
}

.about-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phone-mockup {
  width: 300px;
  height: 600px;
  background: var(--surface);
  border-radius: 3rem;
  padding: 1rem;
  margin: 0 auto;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--background);
  border-radius: 2.5rem;
  overflow: hidden;
}

/* CTA Section */
.cta {
  padding: 8rem 0;
  background: var(--surface);
  text-align: center;
}

.cta-text {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* Why Section */
#why {
  padding: 8rem 0;
  background: var(
    --surface
  ); /* Matches similar to .about and .cta backgrounds */
  text-align: center; /* Center content text */
}

#why .container {
  max-width: 800px; /* Limit width for readability */
  margin: 0 auto;
  padding: 0 2rem; /* Same as your general container padding */
}

#why .section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
  color: var(--text);
}

#why .about-text {
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* Buttons or forms inside #why can reuse existing styles,
   e.g., .btn-primary for consistency */

/* Footer */
.footer {
  padding: 4rem 0;
  text-align: center;
}

.footer-text {
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.modal-content h3 {
  margin-bottom: 1rem;
}

.modal-content p {
  margin-bottom: 2rem;
  color: var(--text-muted);
}

/* Scroll Animation */
[data-scroll] {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s;
}

[data-scroll].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Form Stats */
.form-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.stat span {
  color: var(--primary);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .form-group {
    flex-direction: column;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-list li {
    justify-content: center;
  }

  .phone-mockup {
    width: 250px;
    height: 500px;
  }
}

/* Background Animated Text */
.background-text {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-background);
  overflow: hidden;
  opacity: 0.5; /* Subtle transparency */
}

.background-text-inner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  opacity: 0.6;

  /* Position text for scrolling */
  top: 20%;
  left: 100%;
  transform: translateY(-50%);

  /* Text glow effect */
  text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary),
    0 0 30px rgba(229, 89, 249, 0.3);

  /* Infinite scroll animation */
  animation: scrollText 30s linear infinite;
}

/* Typewriter cursor effect */
.background-text-inner::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 70%;
  background-color: var(--primary);
  animation: blink 1s step-end infinite;
}

/* Scrolling text animation */
@keyframes scrollText {
  0% {
    transform: translate(0, -50%);
  }
  100% {
    transform: translate(-200%, -50%);
  }
}

/* Subtle vertical bobbing */
@keyframes floatVertical {
  0%,
  100% {
    margin-top: -10px;
  }
  50% {
    margin-top: 10px;
  }
}

/* Subtle opacity pulsing */
@keyframes pulseOpacity {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.4;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .background-text-inner {
    /* Static positioning for reduced motion */
    transform: translateX(-50%) translateY(-50%);
    opacity: 0.5;
  }
}
