/* ================================
   CSS Variables
   ================================ */
:root {
  /* Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #171717;
  --bg-card-hover: #1f1f1f;

  --accent: #22c55e;
  --accent-hover: #16a34a;
  --accent-glow: rgba(34, 197, 94, 0.15);
  --green-400: #4ade80;

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --border: #27272a;
  --border-light: #3f3f46;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --container-max: 1200px;
  --section-padding: 6rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

/* ================================
   Reset & Base
   ================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ================================
   Container
   ================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ================================
   Hero Section
   ================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
    var(--bg-primary);
}

.hero-content {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.hero-logo {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto 2rem auto;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  text-transform: lowercase;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-transform: lowercase;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ================================
   Signup Form
   ================================ */
.signup-form {
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
}

.form-group input {
  flex: 1;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--bg-primary);
  background: var(--accent);
  border-radius: var(--radius-lg);
  white-space: nowrap;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading {
  display: flex;
}

.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-message {
  margin-top: 1rem;
  font-size: 0.875rem;
  min-height: 1.25rem;
}

.form-message.success {
  color: var(--accent);
}

.form-message.error {
  color: #ef4444;
}

/* ================================
   Social Proof
   ================================ */
.social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.avatars {
  display: flex;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--border-light), var(--bg-card));
  border: 2px solid var(--bg-primary);
  margin-left: -8px;
}

.avatar:first-child {
  margin-left: 0;
}

.waitlist-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

#counter {
  font-weight: 600;
  color: var(--text-primary);
}

/* ================================
   Showcase Section
   ================================ */
.showcase {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: end;
}

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

.phone-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.5rem;
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.phone-frame:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.phone-frame img {
  border-radius: var(--radius-lg);
  width: 100%;
}

.showcase-caption {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: lowercase;
}

/* ================================
   Features Section
   ================================ */
.features {
  padding: var(--section-padding) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.feature-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: var(--radius-md);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: lowercase;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ================================
   FAQ Section
   ================================ */
.faq {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 3rem;
  text-transform: lowercase;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  text-transform: lowercase;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-weight: 600;
  color: var(--text-primary);
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ================================
   Animations
   ================================ */
.fade-up {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  transition-delay: var(--delay, 0s);
}

/* Only animate if JS has loaded and set up observer */
.js-loaded .fade-up {
  opacity: 0;
  transform: translateY(20px);
}

.js-loaded .fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   Responsive Design
   ================================ */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-padding: 4rem;
  }

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

/* Mobile Landscape */
@media (max-width: 768px) {
  .showcase-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 3rem;
    max-width: 320px;
    margin: 0 auto;
  }

  .showcase-item:nth-child(2) {
    order: -1;
  }

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

  .form-group {
    flex-direction: column;
  }

  .form-group input,
  .btn-primary {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .hero {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .faq-question {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
  }

  .faq-answer p {
    padding: 0 1.25rem 1rem;
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  font-family: monospace;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--green-400);
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
  opacity: 0;
  transform: translate(-100px, -100px);
  transition: opacity 150ms ease, transform 0ms;
  will-change: transform;
  user-select: none;
}

.custom-cursor--visible {
  opacity: 1;
  transition: opacity 150ms ease, transform 0ms;
}

.custom-cursor--click {
  transform: translate(var(--x), var(--y)) scale(0.85);
  transition: opacity 150ms ease, transform 80ms ease-out;
}

/* Hide native cursor on desktop */
@media (min-width: 769px) {
  .has-custom-cursor,
  .has-custom-cursor *:not(input):not(textarea):not(select) {
    cursor: none !important;
  }

  .has-custom-cursor input,
  .has-custom-cursor textarea,
  .has-custom-cursor select {
    cursor: text !important;
  }
}

/* Mobile Touch Ripple */
.touch-ripple {
  position: fixed;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background-color: var(--green-400);
  pointer-events: none;
  z-index: 9998;
  animation: ripple-expand 400ms ease-out forwards;
}

@keyframes ripple-expand {
  from {
    opacity: 0.35;
    transform: scale(0);
  }
  to {
    opacity: 0;
    transform: scale(1);
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .custom-cursor {
    transition: none;
  }

  .touch-ripple {
    animation: ripple-fade 400ms ease-out forwards;
  }

  @keyframes ripple-fade {
    from { opacity: 0.35; }
    to { opacity: 0; }
  }
}
