/* ============================================
   TRADESEAL.CA — Red Seal Exam Prep
   ============================================ */

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a25;
  --bg-card-hover: #22222f;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-muted: #6a6a7a;
  --accent: #e67e22;
  --accent-hover: #f39c12;
  --accent-glow: rgba(230, 126, 34, 0.15);
  --success: #27ae60;
  --danger: #e74c3c;
  --border: #2a2a35;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --transition: 0.2s ease;
  --max-width: 1200px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.3rem; font-weight: 800;
  color: var(--text-primary);
}
.nav-logo .logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}
.nav-cta:hover { background: var(--accent-hover) !important; transform: translateY(-1px); }

.mobile-toggle {
  display: none;
  background: none; border: none; color: var(--text-primary);
  font-size: 1.5rem; cursor: pointer;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 140px 0 100px;
  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-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero h1 {
  margin-bottom: 20px;
  position: relative;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 64px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}
.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(230, 126, 34, 0.3);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230, 126, 34, 0.4);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ============================================
   TRADES GRID
   ============================================ */
.trades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.trade-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.trade-card.available:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.trade-card .trade-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}
.trade-card .trade-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.trade-card .trade-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.trade-card .trade-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-live { background: rgba(39, 174, 96, 0.15); color: var(--success); }
.tag-soon { background: rgba(160, 160, 176, 0.15); color: var(--text-muted); }

.trade-card.coming-soon {
  opacity: 0.6;
}
.trade-card.coming-soon .trade-name::after {
  content: 'Coming Soon';
  display: inline-block;
  margin-left: 8px;
  font-size: 0.7rem;
  background: rgba(160, 160, 176, 0.15);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 50px;
  vertical-align: middle;
}

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.feature-icon {
  width: 48px; height: 48px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* ============================================
   PRICING
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
}
.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 4px 16px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}
.pricing-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 8px;
}
.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }
.pricing-features { list-style: none; margin-bottom: 24px; }
.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}
.pricing-features li.disabled {
  color: var(--text-muted);
  text-decoration: line-through;
}
.pricing-features li.disabled::before {
  content: '—';
  color: var(--text-muted);
}

/* ============================================
   MOCK TEST ENGINE
   ============================================ */
.test-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}
.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.test-progress {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  margin-bottom: 32px;
  overflow: hidden;
}
.test-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}
.question-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 12px;
}
.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 24px;
  line-height: 1.5;
}
.option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-primary);
}
.option:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}
.option.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.option.correct {
  border-color: var(--success);
  background: rgba(39, 174, 96, 0.1);
}
.option.incorrect {
  border-color: var(--danger);
  background: rgba(231, 76, 60, 0.1);
}
.option .option-label {
  font-weight: 700;
  margin-right: 12px;
  color: var(--accent);
}
.explanation {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin-top: 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.explanation strong { color: var(--text-primary); }

.test-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.results-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.results-score {
  font-size: 4rem;
  font-weight: 800;
  margin: 16px 0;
}
.results-score.pass { color: var(--success); }
.results-score.fail { color: var(--danger); }
.results-breakdown {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 24px 0;
}
.results-item { text-align: center; }
.results-item .num { font-size: 1.5rem; font-weight: 700; }
.results-item .label { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-secondary); max-width: 600px; margin: 0 auto; }
.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 60px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy { color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--text-primary); }

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 { margin-bottom: 12px; position: relative; }
.cta-section p { color: var(--text-secondary); margin-bottom: 24px; position: relative; }

/* ============================================
   EMAIL CAPTURE
   ============================================ */
.email-capture {
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
  position: relative;
}
.email-capture input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.email-capture input:focus { border-color: var(--accent); }
.email-capture input::placeholder { color: var(--text-muted); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }
  .hero { padding: 120px 0 60px; }
  .hero-stats { gap: 24px; }
  .section { padding: 60px 0; }
  .pricing-grid { grid-template-columns: 1fr; }
  .cta-section { padding: 32px 24px; }
  .test-container { padding: 80px 16px 40px; }
  .email-capture { flex-direction: column; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   STUDY GUIDE
   ============================================ */
.study-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}
.study-sidebar {
  position: sticky;
  top: 80px;
}
.study-nav { list-style: none; }
.study-nav li { margin-bottom: 4px; }
.study-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.study-nav a:hover, .study-nav a.active {
  background: var(--bg-card);
  color: var(--text-primary);
}
.study-content h2 {
  margin: 40px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.study-content h2:first-child { border-top: none; margin-top: 0; }
.study-content p { color: var(--text-secondary); margin-bottom: 16px; }
.study-content ul { 
  color: var(--text-secondary); 
  margin: 0 0 16px 20px; 
}
.study-content li { margin-bottom: 8px; }
.study-callout {
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
}
.study-callout p { margin-bottom: 0; }
