/* ============================================
   AI Test Generation API — Landing Page Styles
   Dark theme, developer-focused, no external deps
   ============================================ */

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

:root {
  /* Core palette — amber/orange accent on deep navy */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f35;
  --bg-card-hover: #222845;
  --bg-code: #0d1117;
  --text-primary: #e8eaf0;
  --text-secondary: #9ca3b8;
  --text-muted: #6b7280;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --accent-secondary: #3b82f6;
  --border: #2a2f45;
  --border-subtle: #1e2338;
  --success: #10b981;
  --error: #ef4444;
  --code-green: #4ade80;
  --code-blue: #60a5fa;
  --code-purple: #c084fc;
  --code-orange: #fb923c;
  --code-yellow: #fbbf24;
  --code-comment: #6b7280;
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
  --max-width: 1120px;
  --section-padding: 6rem 1.5rem;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-hover);
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo .logo-bracket {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

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

.nav-cta {
  background: var(--accent);
  color: var(--bg-primary) !important;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover {
  background: var(--accent-hover);
  color: var(--bg-primary) !important;
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
}

/* --- Hero Section --- */
.hero {
  padding: 10rem 1.5rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  background: rgba(245, 158, 11, 0.08);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 820px;
  margin: 0 auto 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.2);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

/* --- Section Headings --- */
.section-heading {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-heading .overline {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.section-heading p {
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0.75rem auto 0;
  font-size: 1.05rem;
}

/* --- Problem Section --- */
.problem {
  padding: var(--section-padding);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.2s;
}
.problem-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.problem-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.problem-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

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

/* --- Solution Section --- */
.solution {
  padding: var(--section-padding);
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  gap: 1.25rem;
  transition: border-color 0.3s, transform 0.2s;
}
.solution-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.solution-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--accent-glow);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--accent);
}

.solution-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

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

/* --- Demo Section --- */
.demo {
  padding: var(--section-padding);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.demo-container {
  max-width: 960px;
  margin: 0 auto;
}

.demo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.demo-panel {
  position: relative;
}

.demo-panel-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.demo-panel-label.input-label {
  background: rgba(59, 130, 246, 0.08);
  color: var(--code-blue);
}

.demo-panel-label.output-label {
  background: rgba(74, 222, 128, 0.08);
  color: var(--code-green);
}

.demo-arrow {
  display: none; /* shown on mobile as separator */
  text-align: center;
  padding: 1rem;
  color: var(--accent);
  font-size: 1.5rem;
}

.demo-code {
  background: var(--bg-code);
  padding: 3rem 1.25rem 1.25rem;
  overflow-x: auto;
  min-height: 320px;
}

.demo-code pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre;
  tab-size: 2;
}

/* Syntax highlighting classes */
.kw { color: var(--code-purple); }  /* keywords */
.fn { color: var(--code-blue); }    /* functions */
.st { color: var(--code-green); }   /* strings */
.cm { color: var(--code-comment); font-style: italic; } /* comments */
.nr { color: var(--code-orange); }  /* numbers */
.op { color: var(--text-secondary); } /* operators */
.ty { color: var(--code-yellow); }  /* types */
.dc { color: var(--code-blue); }    /* decorators */

/* --- Pricing Section --- */
.pricing {
  padding: var(--section-padding);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: 940px;
  margin: 0 auto;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.2s;
  position: relative;
}
.pricing-card:hover {
  transform: translateY(-2px);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.1);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
}

.pricing-tier {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pricing-price {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-price .currency {
  font-size: 1.4rem;
  vertical-align: top;
  position: relative;
  top: 0.4rem;
}

.pricing-period {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

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

.pricing-btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.pricing-btn-secondary:hover {
  border-color: var(--text-secondary);
}

/* --- CTA / Waitlist Section --- */
.waitlist {
  padding: var(--section-padding);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.waitlist-box {
  max-width: 520px;
  margin: 0 auto;
}

.waitlist-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.waitlist-input {
  flex: 1;
  padding: 0.85rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
}
.waitlist-input::placeholder {
  color: var(--text-muted);
}
.waitlist-input:focus {
  border-color: var(--accent);
}

.waitlist-submit {
  padding: 0.85rem 1.5rem;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.waitlist-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.waitlist-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.waitlist-feedback {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.5em;
}
.waitlist-feedback.success {
  color: var(--success);
}
.waitlist-feedback.error {
  color: var(--error);
}

.waitlist-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.footer {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--text-secondary);
}

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

/* --- Legal Pages --- */
.legal {
  padding: 8rem 1.5rem 4rem;
  max-width: 720px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal p, .legal li {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal a {
  color: var(--accent);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.legal-back:hover {
  color: var(--text-primary);
}

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

@media (max-width: 768px) {
  :root {
    --section-padding: 4rem 1.25rem;
  }

  /* Nav mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }

  /* Hero */
  .hero {
    padding: 7rem 1.25rem 4rem;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }

  /* Problem grid */
  .problem-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Solution grid */
  .solution-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Demo split */
  .demo-split {
    grid-template-columns: 1fr;
  }
  .demo-arrow {
    display: block;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .demo-code {
    min-height: auto;
  }

  /* Pricing */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }

  /* Waitlist */
  .waitlist-form {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero-sub {
    font-size: 1rem;
  }
}
