/* ═══════════════════════════════════════════════════════════════════════════
   QuizLok Website — iOS-inspired design system
   Colors match the React Native app exactly
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables (Dark mode by default) ── */
:root {
  --bg: #000000;
  --bg-secondary: #1C1C1E;
  --text: #FFFFFF;
  --text-secondary: #EBEBF5;
  --text-caption: #8E8E93;
  --accent: #0A84FF;
  --success: #30D158;
  --danger: #FF453A;
  --border: #38383A;
  --separator: #38383A;
  --card: #1C1C1E;
  --nav-bg: rgba(0, 0, 0, 0.85);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

/* ── Container ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: var(--bg-secondary);
}

/* ═══════════════════════════════════════════════ NAV ═══════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

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


.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
}

/* ═══════════════════════════════════════════════ HERO ═══════════════════════════════════════════════ */

.hero {
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-caption);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-accent {
  background: linear-gradient(135deg, var(--accent), var(--success));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-caption);
}

/* ── Phone Mockup ── */
.phone-frame {
  width: 280px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 12px;
  position: relative;
}

.phone-screen {
  background: var(--bg-secondary);
  border-radius: 26px;
  padding: 20px 16px;
  min-height: 520px;
}

.mock-status-bar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-caption);
  margin-bottom: 20px;
  padding: 0 4px;
}

.mock-header {
  margin-bottom: 20px;
}

.mock-greeting {
  font-size: 14px;
  color: var(--text-caption);
  margin-bottom: 2px;
}

.mock-name {
  font-size: 22px;
  font-weight: 700;
}

.mock-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.mock-card-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.mock-card-content {
  flex: 1;
}

.mock-card-title {
  font-size: 14px;
  font-weight: 600;
}

.mock-card-sub {
  font-size: 12px;
  color: var(--text-caption);
}

.mock-card-arrow {
  color: var(--text-caption);
  font-size: 18px;
}

.mock-card-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
}

.mock-card-badge.fire {
  background: transparent;
  border: none;
  font-size: 20px;
  padding: 0;
}

.mock-progress {
  margin-top: 16px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mock-progress-label {
  font-size: 12px;
  color: var(--text-caption);
  margin-bottom: 8px;
}

.mock-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.mock-progress-fill {
  width: 87%;
  height: 100%;
  background: var(--success);
  border-radius: 3px;
}

.mock-progress-pct {
  font-size: 20px;
  font-weight: 700;
  color: var(--success);
}

/* ═══════════════════════════════════════════════ SECTIONS ═══════════════════════════════════════════════ */

.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-caption);
}

/* ═══════════════════════════════════════════════ HOW IT WORKS ═══════════════════════════════════════════════ */

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.step {
  flex: 1;
  max-width: 260px;
  min-height: 220px;
  text-align: center;
  padding: 32px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--text);
  color: var(--bg);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.step-arrow {
  display: flex;
  align-items: center;
  font-size: 24px;
  color: var(--text-caption);
  padding-top: 60px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════ FEATURES ═══════════════════════════════════════════════ */

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

.feature-card {
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--text-caption);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ═══════════════════════════════════════════════ PRICING ═══════════════════════════════════════════════ */

.plan-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

[data-theme="dark"] .plan-toggle {
  background: var(--bg-secondary);
}

.toggle-btn {
  padding: 10px 28px;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-caption);
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--text);
  color: var(--bg);
}

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

.price-card {
  padding: 32px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.price-card-featured {
  border-color: var(--text);
  border-width: 2px;
}

.price-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--success);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 8px;
}

.price-card-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
}

.price-caption {
  font-size: 13px;
  color: var(--text-caption);
  margin-bottom: 20px;
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 4px;
}

.price-dollar {
  font-size: 22px;
  font-weight: 700;
}

.price-value {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.price-period {
  font-size: 15px;
  color: var(--text-caption);
  margin-left: 4px;
}

.price-monthly-equiv {
  font-size: 13px;
  color: var(--text-caption);
  margin-bottom: 20px;
  margin-top: 4px;
}

.price-features {
  list-style: none;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-features li {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.pricing-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-caption);
  margin-top: 24px;
}

/* ═══════════════════════════════════════════════ FAQ ═══════════════════════════════════════════════ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.faq-chevron {
  font-size: 20px;
  font-weight: 300;
  color: var(--text-caption);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-chevron {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════ CTA ═══════════════════════════════════════════════ */

.section-cta {
  text-align: center;
  background: var(--bg-secondary);
  padding: 80px 0;
}

.section-cta h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-cta p {
  font-size: 17px;
  color: var(--text-caption);
  margin-bottom: 28px;
}

.cta-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-caption);
}

/* ═══════════════════════════════════════════════ FOOTER ═══════════════════════════════════════════════ */

.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-caption);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-caption);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

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

/* ═══════════════════════════════════════════════ RESPONSIVE ═══════════════════════════════════════════════ */

@media (max-width: 900px) {
  .nav-links, .nav-cta {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    order: -1;
  }

  .hero-visual {
    order: 1;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-sub {
    margin: 0 auto 32px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .phone-frame {
    width: 240px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step {
    max-width: 100%;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding-top: 0;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .section-header h2 {
    font-size: 32px;
  }

  .section-cta h2 {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-sub {
    font-size: 16px;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 15px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .section {
    padding: 60px 0;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .features-grid {
    gap: 12px;
  }

  .price-value {
    font-size: 36px;
  }

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

/* ── Animations ── */
@media (prefers-reduced-motion: no-preference) {
  .feature-card,
  .step,
  .price-card,
  .faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s;
  }

  .feature-card.visible,
  .step.visible,
  .price-card.visible,
  .faq-item.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

