/* ═══════════════════════════════════════════════════════
   Quizix Landing Page — Premium Design System
   ═══════════════════════════════════════════════════════ */
:root {
  --bg: #060612;
  --surface: #0e0e1a;
  --surface2: #16162a;
  --border: rgba(255,255,255,.06);
  --text: #f0f0f5;
  --muted: #8b8ba3;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #a855f7;
  --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --gradient2: linear-gradient(135deg, #6366f1, #3b82f6);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 30px rgba(0,0,0,.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.7; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ═══ Utilities ═══ */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header { text-align: center; max-width: 680px; margin: 0 auto 60px; }
.section-badge {
  display: inline-block; padding: 6px 18px; border-radius: 50px;
  background: rgba(99,102,241,.12); color: var(--primary-light);
  font-weight: 700; font-size: .88rem; margin-bottom: 18px;
  border: 1px solid rgba(99,102,241,.2);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900;
  line-height: 1.25; margin-bottom: 16px;
}
.section-sub { color: var(--muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

/* Scroll Reveal */
.feat-card, .step, .price-card, .faq-item {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.feat-card.revealed, .step.revealed, .price-card.revealed, .faq-item.revealed {
  opacity: 1; transform: translateY(0);
}

/* ═══════════ NAV ═══════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0; transition: all .35s ease;
}
.nav.scrolled {
  background: rgba(6,6,18,.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.25rem; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient); display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem;
}
.logo-text { letter-spacing: -.02em; }
.nav-links { display: flex; gap: 6px; flex: 1; justify-content: center; }
.nav-links a {
  padding: 8px 16px; border-radius: 8px; font-weight: 600;
  font-size: .9rem; color: var(--muted);
  transition: all .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.btn-nav-ghost {
  padding: 8px 18px; border-radius: 10px; font-weight: 700;
  font-size: .88rem; color: var(--muted); border: 1px solid var(--border);
  transition: all .2s;
}
.btn-nav-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.btn-nav-primary {
  padding: 8px 20px; border-radius: 10px; font-weight: 700;
  font-size: .88rem; background: var(--gradient); color: #fff;
  transition: transform .2s, box-shadow .2s;
}
.btn-nav-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(99,102,241,.35); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--text);
  margin: 5px 0; border-radius: 2px; transition: all .3s;
}
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ═══════════ HERO ═══════════ */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 24px 80px; position: relative;
  max-width: 1200px; margin: 0 auto;
  gap: 48px;
}
.hero-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
}
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(100px);
  animation: orbFloat 15s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: rgba(99,102,241,.15); top: -10%; right: -5%; }
.orb-2 { width: 400px; height: 400px; background: rgba(168,85,247,.1); bottom: 10%; left: -10%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: rgba(236,72,153,.08); top: 50%; left: 40%; animation-delay: -10s; }
@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-20px) scale(1.05); }
  66% { transform: translate(-20px,30px) scale(.95); }
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent);
}

.hero-content { flex: 1; min-width: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 50px;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  font-size: .85rem; font-weight: 700; color: var(--primary-light);
  margin-bottom: 24px;
  animation: fadeUp .8s ease;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900;
  line-height: 1.15; margin-bottom: 20px; letter-spacing: -.01em;
  animation: fadeUp .8s ease .1s both;
}
.hero-sub {
  font-size: clamp(.95rem, 1.5vw, 1.15rem); color: var(--muted);
  max-width: 520px; margin-bottom: 32px; line-height: 1.8;
  animation: fadeUp .8s ease .2s both;
}
.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px;
  animation: fadeUp .8s ease .3s both;
}
.btn-hero-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px; border-radius: 14px;
  background: var(--gradient); color: #fff;
  font-weight: 800; font-size: 1.05rem;
  transition: transform .25s, box-shadow .25s;
  box-shadow: 0 4px 25px rgba(99,102,241,.3);
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 35px rgba(99,102,241,.45); }
.btn-hero-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12); color: var(--text);
  font-weight: 700; font-size: 1rem;
  transition: all .25s;
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); }
.hero-stats {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  animation: fadeUp .8s ease .4s both;
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.8rem; font-weight: 900; color: var(--primary-light); font-variant-numeric: tabular-nums; }
.hero-stat-label { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.hero-stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Hero Visual */
.hero-visual {
  flex: 0 0 340px; position: relative;
  animation: fadeUp .8s ease .3s both;
}
.hero-phone {
  width: 280px; margin: 0 auto; padding: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 28px; box-shadow: var(--shadow), 0 0 60px rgba(99,102,241,.08);
}
.phone-screen {
  background: var(--surface2); border-radius: 18px; padding: 20px 14px;
  min-height: 320px; display: flex; flex-direction: column; gap: 12px;
}
.phone-q {
  text-align: center; font-weight: 800; font-size: 1rem;
  padding: 14px; background: rgba(255,255,255,.04); border-radius: 12px;
}
.phone-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phone-opt {
  padding: 10px 8px; border-radius: 10px; text-align: center;
  font-weight: 700; font-size: .78rem; color: #fff;
}
.phone-opt span { margin-left: 4px; opacity: .7; }
.phone-opt.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.phone-opt.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.phone-opt.yellow { background: linear-gradient(135deg, #f59e0b, #d97706); }
.phone-opt.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.phone-opt.correct { box-shadow: 0 0 0 3px rgba(34,197,94,.5), 0 0 20px rgba(34,197,94,.2); transform: scale(1.04); }
.phone-timer { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: auto; }
.phone-timer-fill {
  height: 100%; width: 65%; border-radius: 3px;
  background: var(--gradient);
  animation: timerShrink 8s linear infinite;
}
@keyframes timerShrink { from { width: 100%; } to { width: 0%; } }

.hero-float {
  position: absolute; font-size: 2rem;
  animation: heroFloat 5s ease-in-out infinite;
}
.float-1 { top: -10px; right: -20px; animation-delay: 0s; }
.float-2 { bottom: 20px; right: -30px; animation-delay: -1.2s; }
.float-3 { top: 30%; left: -30px; animation-delay: -2.5s; }
.float-4 { bottom: -10px; left: 10px; animation-delay: -3.8s; }
@keyframes heroFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(8deg); }
}

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

/* ═══════════ TRUST ═══════════ */
.trust {
  text-align: center; padding: 40px 24px 60px;
  max-width: 900px; margin: 0 auto;
  border-top: 1px solid var(--border);
}
.trust-label { color: var(--muted); font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.trust-items { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.trust-items span {
  padding: 8px 20px; border-radius: 50px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  font-size: .88rem; font-weight: 600; color: var(--muted);
  transition: all .25s;
}
.trust-items span:hover { background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.2); color: var(--text); }

/* ═══════════ FEATURES ═══════════ */
.features { padding: 100px 24px; max-width: 1200px; margin: 0 auto; }
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feat-card {
  padding: 32px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: all .35s ease; position: relative; overflow: hidden;
}
.feat-card:hover { border-color: rgba(99,102,241,.25); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.feat-card.feat-highlight {
  grid-column: span 1; background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(168,85,247,.06));
  border-color: rgba(99,102,241,.2);
}
.feat-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.feat-icon-wrap.purple { background: rgba(99,102,241,.15); }
.feat-icon-wrap.blue { background: rgba(59,130,246,.15); }
.feat-icon-wrap.green { background: rgba(34,197,94,.15); }
.feat-icon-wrap.orange { background: rgba(245,158,11,.15); }
.feat-icon-wrap.pink { background: rgba(236,72,153,.15); }
.feat-icon-wrap.cyan { background: rgba(6,182,212,.15); }
.feat-icon { font-size: 1.5rem; }
.feat-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 10px; }
.feat-card p { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.feat-tag {
  position: absolute; top: 16px; left: 16px;
  padding: 4px 12px; border-radius: 6px; font-size: .7rem;
  font-weight: 800; background: var(--gradient); color: #fff;
  letter-spacing: .03em;
}

/* ═══════════ HOW IT WORKS ═══════════ */
.how { padding: 100px 24px; max-width: 1100px; margin: 0 auto; }
.steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; flex-wrap: wrap; }
.step { flex: 1; min-width: 220px; max-width: 300px; text-align: center; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.3rem; margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(99,102,241,.3);
}
.step-visual { margin-bottom: 20px; }
.step-screen {
  width: 180px; margin: 0 auto; padding: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px;
}
.ss-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.06); margin-bottom: 10px; display: flex; gap: 3px; }
.ss-bar::before, .ss-bar::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.1); }
.ss-title { font-size: .75rem; font-weight: 800; text-align: center; margin-bottom: 8px; }
.ss-items { display: flex; flex-direction: column; gap: 5px; }
.ss-item { height: 8px; border-radius: 4px; background: rgba(99,102,241,.2); }
.ss-item.short { width: 60%; }
.ss-pin { text-align: center; font-size: .8rem; font-weight: 800; margin-bottom: 8px; color: var(--primary-light); }
.ss-qr { width: 70px; height: 70px; margin: 0 auto; background: rgba(255,255,255,.06); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.ss-qr-dots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.ss-qr-dots span { width: 8px; height: 8px; border-radius: 2px; background: rgba(99,102,241,.4); }
.ss-qr-dots span:nth-child(odd) { background: rgba(99,102,241,.7); }
.ss-podium { display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding: 8px 0; }
.ss-p { text-align: center; font-size: .9rem; border-radius: 6px 6px 0 0; }
.ss-p.g { background: rgba(250,204,21,.15); padding: 16px 10px 8px; }
.ss-p.s { background: rgba(192,192,192,.1); padding: 10px 10px 8px; }
.ss-p.b { background: rgba(205,127,50,.1); padding: 6px 10px 8px; }

.step h3 { font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .88rem; }
.step-connector {
  display: flex; align-items: center; padding-top: 120px;
  flex-shrink: 0; opacity: .4;
}

/* ═══════════ PRICING ═══════════ */
.pricing { padding: 100px 24px; max-width: 1100px; margin: 0 auto; }
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  align-items: start;
}
.price-card {
  padding: 36px 28px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  transition: all .35s; position: relative;
}
.price-card:hover { border-color: rgba(99,102,241,.2); transform: translateY(-4px); }
.price-card.popular {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(99,102,241,.08), var(--surface));
  box-shadow: 0 0 0 1px var(--primary), 0 12px 40px rgba(99,102,241,.15);
  transform: scale(1.04);
}
.price-card.popular:hover { transform: scale(1.04) translateY(-4px); }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 4px 20px; border-radius: 50px;
  background: var(--gradient); color: #fff;
  font-size: .75rem; font-weight: 800; white-space: nowrap;
}
.price-header { text-align: center; margin-bottom: 28px; }
.price-name { font-size: .9rem; font-weight: 700; color: var(--muted); }
.price-amount { margin: 12px 0 8px; display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.price-num { font-size: 3rem; font-weight: 900; line-height: 1; }
.price-currency { font-size: 1rem; font-weight: 700; color: var(--muted); }
.price-period { font-size: .85rem; color: var(--muted); }
.price-desc { font-size: .82rem; color: var(--muted); }
.price-features { list-style: none; margin-bottom: 28px; }
.price-features li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: .9rem; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.price-features li.disabled { opacity: .4; }
.pf-icon { width: 22px; text-align: center; font-size: .8rem; flex-shrink: 0; }
.price-features li .pf-icon { color: #22c55e; }
.price-features li.disabled .pf-icon { color: #ef4444; }
.btn-price {
  display: block; text-align: center;
  padding: 12px; border-radius: 12px;
  font-weight: 800; font-size: .95rem;
  border: 1px solid var(--border); color: var(--text);
  transition: all .25s;
}
.btn-price:hover { border-color: var(--primary); background: rgba(99,102,241,.08); }
.btn-price.primary {
  background: var(--gradient); border-color: transparent; color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,.25);
}
.btn-price.primary:hover { box-shadow: 0 8px 30px rgba(99,102,241,.4); transform: translateY(-2px); }

/* ═══════════ FAQ ═══════════ */
.faq { padding: 100px 24px; max-width: 720px; margin: 0 auto; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all .3s;
}
.faq-item[open] { border-color: rgba(99,102,241,.25); }
.faq-item summary {
  padding: 18px 24px; cursor: pointer; font-weight: 700;
  font-size: 1rem; list-style: none; display: flex;
  align-items: center; justify-content: space-between;
  transition: color .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 1.4rem; font-weight: 300;
  color: var(--muted); transition: transform .3s;
  flex-shrink: 0; margin-right: 12px;
}
.faq-item[open] summary::after { content: '−'; color: var(--primary); }
.faq-item summary:hover { color: var(--primary-light); }
.faq-item p {
  padding: 0 24px 18px; color: var(--muted);
  font-size: .92rem; line-height: 1.8;
  animation: fadeUp .3s ease;
}

/* ═══════════ CTA ═══════════ */
.cta {
  padding: 100px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-bg { position: absolute; inset: 0; z-index: 0; }
.cta-orb { position: absolute; border-radius: 50%; filter: blur(120px); }
.cta-orb-1 { width: 500px; height: 500px; background: rgba(99,102,241,.12); top: -30%; left: -10%; }
.cta-orb-2 { width: 400px; height: 400px; background: rgba(168,85,247,.08); bottom: -30%; right: -10%; }
.cta-content { position: relative; z-index: 1; max-width: 650px; margin: 0 auto; }
.cta h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); font-weight: 900; line-height: 1.3; margin-bottom: 16px; }
.cta p { color: var(--muted); font-size: 1.05rem; margin-bottom: 36px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-cta-primary {
  padding: 16px 36px; border-radius: 14px;
  background: var(--gradient); color: #fff;
  font-weight: 800; font-size: 1.1rem;
  transition: all .25s;
  box-shadow: 0 4px 25px rgba(99,102,241,.3);
}
.btn-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 35px rgba(99,102,241,.45); }
.btn-cta-ghost {
  padding: 16px 32px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.15); color: var(--text);
  font-weight: 700; font-size: 1rem; transition: all .25s;
}
.btn-cta-ghost:hover { background: rgba(255,255,255,.06); }

/* ═══════════ FOOTER ═══════════ */
.footer {
  padding: 48px 24px 28px; border-top: 1px solid var(--border);
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.footer-brand .logo-icon { width: 30px; height: 30px; font-size: .9rem; border-radius: 8px; }
.footer-brand .logo-text { font-weight: 900; font-size: 1.1rem; }
.footer-brand p { font-size: .82rem; color: var(--muted); margin-right: 16px; }
.footer-links { display: flex; gap: 20px; margin: 16px 0 24px; }
.footer-links a { font-size: .88rem; color: var(--muted); font-weight: 600; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; }
.footer-bottom p { font-size: .8rem; color: var(--muted); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 960px) {
  .hero { flex-direction: column; text-align: center; padding-top: 100px; min-height: auto; }
  .hero-sub { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { flex: none; order: -1; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .price-card.popular { transform: none; }
  .price-card.popular:hover { transform: translateY(-4px); }
  .steps { flex-direction: column; align-items: center; }
  .step-connector { transform: rotate(90deg); padding: 10px 0; }
}

@media (max-width: 768px) {
  .nav-links { 
    display: none; position: absolute; top: 100%; right: 0; left: 0;
    background: rgba(6,6,18,.96); backdrop-filter: blur(20px);
    flex-direction: column; padding: 16px; gap: 4px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-actions { display: none; }
  .nav-burger { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-phone { width: 240px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .btn-hero-primary, .btn-hero-ghost { width: 100%; justify-content: center; }
  .hero-stats { gap: 16px; }
  .hero-stat-divider { display: none; }
}
