/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #09090b;
  --bg2: #111113;
  --bg3: #18181b;
  --border: #27272a;
  --text: #fafafa;
  --text2: #a1a1aa;
  --text3: #71717a;
  --primary: #a855f7;
  --primary-dark: #7c3aed;
  --primary-glow: rgba(168,85,247,.25);
  --blue: #3b82f6;
  --green: #22c55e;
  --orange: #f97316;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 32px rgba(0,0,0,.5);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

.section { padding: 96px 0; }

.section__head {
  text-align: center;
  margin-bottom: 64px;
}
.section__head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin: 16px 0 12px;
  line-height: 1.2;
}
.section__head p { color: var(--text2); font-size: 1.1rem; max-width: 540px; margin: 0 auto; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.3);
  color: var(--primary);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge--purple { background: rgba(168,85,247,.12); border-color: rgba(168,85,247,.3); color: var(--primary); }
.badge--blue   { background: rgba(59,130,246,.12);  border-color: rgba(59,130,246,.3);  color: var(--blue); }
.badge--green  { background: rgba(34,197,94,.12);   border-color: rgba(34,197,94,.3);   color: var(--green); }
.badge--orange { background: rgba(249,115,22,.12);  border-color: rgba(249,115,22,.3);  color: var(--orange); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}
.btn--primary:hover { background: #9333ea; box-shadow: 0 0 32px rgba(168,85,247,.4); transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--text2); }
.btn--ghost:hover { color: var(--text); background: var(--bg3); }

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

.btn--lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-sm); }
.btn--block { width: 100%; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(9,9,11,.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}
.nav__logo span { color: var(--primary); }
.nav__links {
  display: flex;
  gap: 32px;
  flex: 1;
}
.nav__links a { color: var(--text2); font-size: .9rem; font-weight: 500; transition: color .15s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { display: flex; gap: 10px; margin-left: auto; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 160px 0 96px;
  text-align: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(168,85,247,.2) 0%, transparent 70%);
  pointer-events: none;
}
.hero__title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 20px 0 24px;
  letter-spacing: -.02em;
}
.gradient-text {
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__sub { font-size: 1.15rem; color: var(--text2); max-width: 580px; margin: 0 auto 40px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }

.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__num { font-size: 2rem; font-weight: 800; color: var(--text); }
.stat__label { font-size: .85rem; color: var(--text3); }
.stat__sep { width: 1px; height: 48px; background: var(--border); }

/* ===== FEATURES ===== */
.features { background: var(--bg); }
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card--feature {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.card--feature:hover { border-color: var(--primary); transform: translateY(-3px); }
.card__icon { font-size: 2rem; margin-bottom: 16px; }
.card--feature h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.card--feature p { color: var(--text2); font-size: .9rem; line-height: 1.6; }

/* ===== TRAINING ===== */
.training { background: var(--bg2); }
.training__steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.step:last-child { border-bottom: none; }
.step__num {
  font-size: 3rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  min-width: 72px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.step:hover .step__num { color: var(--primary); transition: color .2s; }
.step__content h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.step__content p { color: var(--text2); font-size: .95rem; margin-bottom: 16px; }
.step__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--bg3);
  color: var(--text3);
  border: 1px solid var(--border);
}

/* ===== LANGUAGE ===== */
.language { background: var(--bg); }
.lang__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.lang__card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  transition: border-color .2s, transform .2s;
}
.lang__card:hover { border-color: var(--primary); transform: translateY(-3px); }
.lang__card--featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(168,85,247,.08), var(--bg2));
  box-shadow: 0 0 40px rgba(168,85,247,.1);
}
.lang__badge {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}
.lang__flag { font-size: 2.5rem; margin-bottom: 12px; }
.lang__card h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; }
.lang__card > p { color: var(--text2); font-size: .9rem; margin-bottom: 20px; line-height: 1.5; }
.lang__features { text-align: left; margin-bottom: 28px; display: flex; flex-direction: column; gap: 8px; }
.lang__features li { color: var(--text2); font-size: .9rem; }

/* ===== PRICING ===== */
.pricing { background: var(--bg2); }
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
.pricing__card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
}
.pricing__card--featured {
  border-color: var(--primary);
  background: linear-gradient(160deg, rgba(168,85,247,.1), var(--bg3));
  box-shadow: 0 0 40px rgba(168,85,247,.12);
  transform: scale(1.03);
}
.pricing__popular {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 999px;
  text-transform: uppercase;
}
.pricing__card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--text2); }
.price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px; }
.price__num { font-size: 2.4rem; font-weight: 900; }
.price__period { color: var(--text3); font-size: .9rem; }
.price__desc { color: var(--text3); font-size: .85rem; margin-bottom: 24px; }
.pricing__list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.pricing__list li { font-size: .9rem; color: var(--text2); }
.pricing__list li:has(✗) { color: var(--text3); }

/* ===== CTA ===== */
.cta { background: var(--bg); }
.cta__box {
  background: linear-gradient(135deg, rgba(168,85,247,.15), rgba(59,130,246,.1));
  border: 1px solid rgba(168,85,247,.3);
  border-radius: 24px;
  padding: 72px 48px;
  text-align: center;
}
.cta__box h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 16px; }
.cta__box p { color: var(--text2); font-size: 1.1rem; margin-bottom: 36px; }

/* ===== FOOTER ===== */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 64px 0 32px; }
.footer__top { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; margin-bottom: 48px; }
.footer__brand p { color: var(--text3); font-size: .9rem; margin-top: 12px; max-width: 280px; }
.footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col h4 { font-size: .85rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .06em; }
.footer__col a { color: var(--text3); font-size: .9rem; transition: color .15s; }
.footer__col a:hover { color: var(--text); }
.footer__bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer__bottom p { color: var(--text3); font-size: .85rem; }

/* ===== MODAL ===== */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 24px; }
.modal.is-open { display: flex; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.modal__box {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
  box-shadow: var(--shadow);
}
.modal__close {
  position: absolute;
  top: 16px; right: 20px;
  background: none; border: none;
  color: var(--text3);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color .15s;
}
.modal__close:hover { color: var(--text); }

/* ===== QUIZ STYLES ===== */
.quiz__header { margin-bottom: 28px; }
.quiz__flag { font-size: 2rem; margin-bottom: 8px; }
.quiz__title { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.quiz__progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 16px 0;
  overflow: hidden;
}
.quiz__progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width .3s ease;
}
.quiz__meta { font-size: .85rem; color: var(--text3); }
.quiz__question { font-size: 1.05rem; font-weight: 600; margin-bottom: 20px; line-height: 1.5; }
.quiz__options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.quiz__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  cursor: pointer;
  transition: all .15s;
  font-size: .95rem;
}
.quiz__option:hover { border-color: var(--primary); background: rgba(168,85,247,.06); }
.quiz__option.selected { border-color: var(--primary); background: rgba(168,85,247,.12); }
.quiz__option.correct  { border-color: var(--green);   background: rgba(34,197,94,.1); }
.quiz__option.wrong    { border-color: #ef4444;        background: rgba(239,68,68,.1); }
.quiz__option-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  flex-shrink: 0;
  transition: background .15s;
}
.quiz__option.selected .quiz__option-letter { background: var(--primary); color: #fff; }
.quiz__option.correct .quiz__option-letter  { background: var(--green);   color: #fff; }
.quiz__option.wrong .quiz__option-letter    { background: #ef4444;        color: #fff; }
.quiz__nav { display: flex; justify-content: flex-end; }

/* RESULTS */
.quiz__results { text-align: center; padding: 16px 0; }
.results__score {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 40px var(--primary-glow);
}
.results__score-num { font-size: 2.2rem; font-weight: 900; }
.results__score-total { font-size: .85rem; color: var(--text3); }
.results__level {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.level-a1, .level-a2 { background: rgba(239,68,68,.15); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }
.level-b1, .level-b2 { background: rgba(249,115,22,.15); color: var(--orange); border: 1px solid rgba(249,115,22,.3); }
.level-c1, .level-c2 { background: rgba(34,197,94,.15); color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.results__desc { color: var(--text2); font-size: .95rem; margin-bottom: 28px; line-height: 1.6; }
.results__actions { display: flex; gap: 12px; justify-content: center; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .pricing__grid { grid-template-columns: 1fr; }
  .pricing__card--featured { transform: none; }
  .footer__top { grid-template-columns: 1fr; gap: 40px; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; margin-left: auto; }
}

@media (max-width: 640px) {
  .features__grid { grid-template-columns: 1fr; }
  .lang__cards { grid-template-columns: 1fr; }
  .hero__stats { gap: 24px; }
  .stat__sep { display: none; }
  .step { flex-direction: column; gap: 12px; }
  .step__num { font-size: 2rem; min-width: unset; }
  .cta__box { padding: 40px 24px; }
  .footer__links { grid-template-columns: 1fr; }
  .modal__box { padding: 28px 20px; }
}
