/* ============================================================
   ExamPilot AI — Welcome Page Styles
   Design language: Linear-inspired premium dark theme
   Structure: tokens → base → layout → components → responsive
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #08090a;
  --panel: #0f1011;
  --surface: #191a1b;
  --surface-2: #28282c;
  --text-1: #f7f8f8;
  --text-2: #d0d6e0;
  --text-3: #8a8f98;
  --text-4: #62666d;
  --brand: #5e6ad2;
  --accent: #7170ff;
  --accent-hover: #828fff;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --green: #27a644;
  --emerald: #10b981;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-feature-settings: 'cv01', 'ss03';
  background: var(--bg);
  color: var(--text-2);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

::selection { background: rgba(113, 112, 255, 0.3); color: #fff; }

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Ambient background ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
  pointer-events: none;
}

.glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(113, 112, 255, 0.14) 0%, rgba(113, 112, 255, 0.05) 40%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

.glow-2 {
  position: fixed;
  bottom: -30%;
  right: -10%;
  width: 700px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(94, 106, 210, 0.10) 0%, transparent 65%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

/* ---------- 3D Animated Background (Vanta.js) ---------- */
#vanta-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Navigation ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 10, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(113, 112, 255, 0.35);
}

.logo-mark svg { width: 18px; height: 18px; }

.logo-text {
  color: var(--text-1);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.logo-text span { color: var(--accent); }

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

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: none;
  font-feature-settings: 'cv01', 'ss03';
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  border: 1px solid rgb(36, 40, 44);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-1); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset, 0 4px 20px rgba(94, 106, 210, 0.25);
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-large { padding: 14px 28px; font-size: 15px; border-radius: 8px; }

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-large .btn-icon {
  width: 18px;
  height: 18px;
}

.btn-glow { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset, 0 8px 40px rgba(113, 112, 255, 0.35); }

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 100px;
  text-align: center;
  position: relative;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.hero h1 {
  font-size: 72px;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--text-1);
  max-width: 900px;
  margin: 0 auto 24px;
  font-feature-settings: 'cv01', 'ss03';
}

.hero h1 .grad {
  background: linear-gradient(120deg, #a5b4fc 0%, var(--accent) 45%, #5e6ad2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero p {
  font-size: 18px;
  color: var(--text-3);
  max-width: 640px;
  margin: 0 auto 44px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 72px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  transition: all 0.2s ease;
}

.stat-card:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border); }

.stat-num {
  font-size: 32px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.stat-num .accent { color: var(--accent); }

.stat-label {
  font-size: 13px;
  color: var(--text-4);
  font-weight: 500;
}

/* ---------- Sections ---------- */
.section {
  padding: 100px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.1;
  color: var(--text-1);
  margin-bottom: 16px;
}

.section-head p {
  font-size: 16px;
  color: var(--text-3);
  line-height: 1.6;
}

/* ---------- Feature cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(113, 112, 255, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  transform: translateY(-2px);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(113, 112, 255, 0.12);
  border: 1px solid rgba(113, 112, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg { width: 22px; height: 22px; stroke: var(--accent); }

.feature-card h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.65;
}

/* ---------- Exam preview window ---------- */
.preview-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.exam-window {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
}

.window-dot { width: 10px; height: 10px; border-radius: 50%; }
.window-dot:nth-child(1) { background: #ff5f57; }
.window-dot:nth-child(2) { background: #febc2e; }
.window-dot:nth-child(3) { background: #28c840; }

.window-title {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-4);
}

.exam-body { padding: 32px 40px 40px; }

.exam-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.exam-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 9999px;
}

.exam-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
}

.exam-timer .clock { color: var(--accent); }

.question-label {
  font-size: 12px;
  color: var(--text-4);
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.question-text {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.option:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border); }

.option-key {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  flex-shrink: 0;
}

.option.correct {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}

.option.correct .option-key {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
}

.option.correct .opt-text { color: var(--emerald); }

.exam-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

.exam-footer-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.progress {
  flex: 1;
  max-width: 260px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 42%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 2px;
}

.progress-label {
  font-size: 12px;
  color: var(--text-4);
  margin-left: 14px;
  font-weight: 500;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step {
  text-align: left;
  padding: 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  position: relative;
}

.step-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.step h3 {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
}

/* ---------- Difficulty pills ---------- */
.diff-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.diff-pill {
  padding: 8px 22px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid;
}

.pill-easy { color: var(--emerald); border-color: rgba(16, 185, 129, 0.35); background: rgba(16, 185, 129, 0.06); }
.pill-normal { color: #a5b4fc; border-color: rgba(113, 112, 255, 0.35); background: rgba(113, 112, 255, 0.06); }
.pill-hard { color: #f87171; border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.06); }

.diff-note {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-4);
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding: 120px 0;
  position: relative;
}

.cta h2 {
  font-size: 52px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.08;
  color: var(--text-1);
  margin-bottom: 20px;
}

.cta p {
  font-size: 17px;
  color: var(--text-3);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-text {
  font-size: 13px;
  color: var(--text-4);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-4);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover { color: var(--text-2); }

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

.reveal {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

.reveal-1 { animation-delay: 0.1s; }
.reveal-2 { animation-delay: 0.2s; }
.reveal-3 { animation-delay: 0.3s; }
.reveal-4 { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero h1 { font-size: 44px; }
  .section-head h2 { font-size: 34px; }
  .features-grid, .steps { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; max-width: 420px; }
  .nav-links { display: none; }
  .cta h2 { font-size: 36px; }
  .exam-body { padding: 24px 20px 28px; }
  .question-text { font-size: 17px; }
}

@media (max-width: 600px) {
  .hero { padding: 90px 0 60px; }
  .hero h1 { font-size: 36px; }
  .hero-actions { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}
