/* === CSS Variables === */
:root {
  --color-bg: #ffffff;
  --color-bg-subtle: #f8f9fb;
  --color-bg-code: #1e1e2e;
  --color-surface: #ffffff;
  --color-border: #e2e5ea;
  --color-border-light: #f0f1f3;
  --color-text: #334155;
  --color-text-secondary: #64748b;
  --color-text-heading: #0f172a;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-light: #eff6ff;
  --color-accent-subtle: #dbeafe;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

/* === Global === */
html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--color-accent);
  color: #ffffff;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* === Section Labels === */
.label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

/* === Section Headers === */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 0;
}

.section-sub {
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 1.1rem;
  line-height: 1.65;
}

/* === Nav === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-light);
  padding: 1rem 0;
}

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

.brand {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--color-accent);
  letter-spacing: -0.03em;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--color-accent);
}

/* === Hero === */
.hero {
  padding: 5rem 0 6rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 40%, #fef3f2 100%);
}

.hero-glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  animation: fadeInUp 0.6s ease-out both;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--color-text-heading);
  margin-bottom: 1.25rem;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.subheadline {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Hero visual card */
.hero-visual {
  animation: fadeInUp 0.6s ease-out 0.15s both;
}

.hero-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-xl);
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-light);
}

.hero-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.hero-card-dot.green {
  background: var(--color-success);
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.4);
}

.hero-card-title {
  font-weight: 650;
  font-size: 0.925rem;
  color: var(--color-text-heading);
}

.hero-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
}

.hero-card-row + .hero-card-row {
  border-top: 1px solid var(--color-border-light);
}

.hero-card-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.hero-card-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-heading);
  font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
}

.hero-card-value.green {
  color: var(--color-success);
}

.hero-card-value.amber {
  color: #d97706;
}

/* === Signup Forms === */
.signup-form {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.signup-form input[type="email"] {
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-heading);
  width: 280px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.signup-form input[type="email"]::placeholder {
  color: #94a3b8;
}

.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.signup-form button {
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.signup-form button:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.signup-form button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.signup-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  font-size: 0.9rem;
  min-height: 1.4em;
}

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

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

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

/* === Sections === */
section {
  padding: 6rem 0;
  position: relative;
}

section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-text-heading);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* === Problem Section === */
.problem {
  background: linear-gradient(180deg, #f0f4ff 0%, var(--color-bg) 100%);
}

.pain-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pain-point {
  padding: 2rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.pain-point:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pain-number {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-accent);
  background: var(--color-accent-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
}

.pain-point h3 {
  color: var(--color-text-heading);
  margin-bottom: 0.625rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.pain-point p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* === Features === */
.features {
  background: var(--color-bg);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.feature-icon.blue {
  background: #eff6ff;
  color: #2563eb;
}

.feature-icon.violet {
  background: #f5f3ff;
  color: #7c3aed;
}

.feature-icon.teal {
  background: #f0fdfa;
  color: #0d9488;
}

.feature-icon.orange {
  background: #fff7ed;
  color: #ea580c;
}

.feature-card h3 {
  color: var(--color-text-heading);
  font-weight: 700;
  margin-bottom: 0.625rem;
  font-size: 1.15rem;
}

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

/* === Code Preview === */
.code-preview {
  background: linear-gradient(180deg, var(--color-bg-subtle) 0%, #f0f4ff 100%);
}

.code-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: center;
}

.code-text h2 {
  text-align: left;
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
}

.code-description {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.code-window {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid #2a2a3e;
}

.code-dots {
  background: #16161e;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b3b50;
}

.code-dots span:first-child { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-window pre {
  background: var(--color-bg-code);
  padding: 1.75rem 2rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 0;
}

.code-window code {
  color: #c8ccd4;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas,
    'DejaVu Sans Mono', monospace;
}

/* === Demo === */
.demo {
  text-align: center;
  background: var(--color-bg);
}

.colab-button {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #f9ab00 0%, #f59e0b 100%);
  color: #1a1a1a;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-md), 0 0 0 0 rgba(249, 171, 0, 0);
}

.colab-button:hover {
  box-shadow: var(--shadow-lg), 0 0 24px rgba(249, 171, 0, 0.25);
  transform: translateY(-1px);
}

.colab-button:active {
  transform: translateY(0);
}

/* === Pricing === */
.pricing {
  background: linear-gradient(180deg, var(--color-bg-subtle) 0%, var(--color-bg) 100%);
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.pricing-card.early-access {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 1.1rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pricing-card h3 {
  color: var(--color-text-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.price {
  font-size: 3.25rem;
  font-weight: 800;
  color: var(--color-text-heading);
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
}

.price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-secondary);
}

.pricing-card ul {
  list-style: none;
  text-align: left;
}

.pricing-card li {
  padding: 0.55rem 0;
  color: var(--color-text);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pricing-card li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* === Bottom CTA === */
.bottom-cta {
  text-align: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.bottom-cta::after {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.bottom-cta h2 {
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.bottom-cta .label {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.bottom-cta-sub {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.bottom-cta .signup-form {
  justify-content: center;
  position: relative;
  z-index: 1;
}

.bottom-cta .signup-form input[type="email"] {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.bottom-cta .signup-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.bottom-cta .signup-form input[type="email"]:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.bottom-cta .signup-form button {
  background: #ffffff;
  color: var(--color-text-heading);
}

.bottom-cta .signup-form button:hover {
  background: #f1f5f9;
  box-shadow: var(--shadow-md);
}

.bottom-cta .form-message {
  position: relative;
  z-index: 1;
}

.bottom-cta .form-message.success {
  color: #86efac;
}

.bottom-cta .form-message.error {
  color: #fca5a5;
}

.bottom-cta .waitlist-info {
  color: rgba(255, 255, 255, 0.4);
  position: relative;
  z-index: 1;
}

/* === Footer === */
footer {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Responsive === */
@media (max-width: 900px) {
  .container {
    padding: 0 1.5rem;
  }

  .hero {
    padding: 3rem 0 4rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

  .hero .signup-form {
    justify-content: center;
  }

  .hero .form-message,
  .hero .waitlist-info {
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  section {
    padding: 4rem 0;
  }

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

  .pain-points {
    grid-template-columns: 1fr;
  }

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

  .code-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .code-text .label {
    text-align: center;
    display: block;
    width: fit-content;
    margin: 0 auto 1.25rem;
  }

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

  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .code-window pre {
    padding: 1.25rem;
    font-size: 0.8rem;
  }

  .nav-links {
    gap: 1.25rem;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }

  .signup-form {
    flex-direction: column;
    align-items: stretch;
  }

  .hero .signup-form {
    align-items: center;
  }

  .signup-form input[type="email"] {
    width: 100%;
    max-width: 360px;
  }

  .signup-form button {
    width: 100%;
    max-width: 360px;
  }

  section h2 {
    font-size: 1.75rem;
  }

  .hero-card {
    padding: 1.25rem;
  }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
