/* ─────────────────────────────────────────────
   Landing page — алиасы к tokens.css
   tokens.css подключается ПЕРЕД этим файлом.
   Здесь только маппинг landing-специфичных
   переменных на дизайн-токены.
───────────────────────────────────────────── */

:root {
  --bg:           var(--color-bg);
  --bg-section:   var(--color-bg-alt);
  --bg-card:      var(--color-surface);
  --bg-card-hover:var(--color-surface-2);
  --border:       var(--color-border);
  --border-hover: var(--color-border-focus);
  --text:         var(--color-text);
  --text-muted:   var(--color-text-2);
  --text-faint:   var(--color-text-3);
  --accent:       var(--color-primary);
  --accent-dark:  var(--color-primary-dark);
  --accent-glow:  var(--color-primary-glow);
  --accent2:      #8b5cf6;
  --success:      var(--color-success);
  --radius:       var(--radius-lg);
  --radius-lg:    var(--radius-xl);
  --shadow:       var(--shadow-md);
  --shadow-card:  var(--shadow-sm);
  --font:         var(--font-sans);
}

/* [data-theme="light"] — обрабатывается tokens.css */

/* ─────────────────────────────────────────────
   Reset & base
───────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ─────────────────────────────────────────────
   Utility
───────────────────────────────────────────── */

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

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

/* ─────────────────────────────────────────────
   Buttons
───────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--accent-glow);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

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

/* ─────────────────────────────────────────────
   Navigation
───────────────────────────────────────────── */

.nav-landing {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,15,22,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .nav-landing {
  background: rgba(245,247,251,0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.nav-logo span { color: var(--accent); }

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

.nav-links a {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--accent-glow);
}

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

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 7px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-hover); }

.nav-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 7px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 18px;
}

/* ─────────────────────────────────────────────
   Hero
───────────────────────────────────────────── */

.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
  letter-spacing: 0.2px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.5px;
  color: var(--text);
  max-width: 760px;
  margin: 0 auto 20px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

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

/* ─────────────────────────────────────────────
   Section base
───────────────────────────────────────────── */

.section {
  padding: 88px 0;
}

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

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

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.2;
}

.section-header p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────
   Feature cards grid
───────────────────────────────────────────── */

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--border-hover);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

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

/* ─────────────────────────────────────────────
   Steps
───────────────────────────────────────────── */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--border), var(--border), transparent);
}

.step-item {
  text-align: center;
  padding: 0 16px;
  position: relative;
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s;
}

.step-item:hover .step-num {
  background: var(--accent-glow);
  border-color: var(--border-hover);
}

.step-item h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.step-item p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────
   Role blocks (student / teacher)
───────────────────────────────────────────── */

.role-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.role-block.reverse { direction: rtl; }
.role-block.reverse > * { direction: ltr; }

.role-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 16px;
}

.role-content h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.2;
}

.role-content p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.65;
}

.role-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.role-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-muted);
}

.role-list li::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(99,102,241,0.3);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%236366f1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.role-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.mock-icon {
  font-size: 20px;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.mock-text { flex: 1; }
.mock-text strong { display: block; font-size: 14px; font-weight: 500; color: var(--text); }
.mock-text span { font-size: 12px; color: var(--text-muted); }

.mock-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent);
  flex-shrink: 0;
}

.mock-badge.green {
  background: rgba(16,185,129,0.12);
  color: var(--success);
}

/* ─────────────────────────────────────────────
   Platform capabilities
───────────────────────────────────────────── */

.caps-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cap-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.18s;
}

.cap-pill:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-card-hover);
}

.cap-pill span { font-size: 16px; }

/* ─────────────────────────────────────────────
   Final CTA
───────────────────────────────────────────── */

.cta-section {
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.cta-box h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.7px;
  color: var(--text);
  margin-bottom: 14px;
}

.cta-box p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────
   Footer
───────────────────────────────────────────── */

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

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 220px;
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

/* ─────────────────────────────────────────────
   Responsive
───────────────────────────────────────────── */

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .steps-grid::before { display: none; }
  .role-block { grid-template-columns: 1fr; gap: 32px; }
  .role-block.reverse { direction: ltr; }
  .role-visual { min-height: auto; }
}

@media (max-width: 640px) {
  .hero { padding: 72px 0 56px; }
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-actions .btn-ghost { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 40px 24px; }
  .footer-inner { flex-direction: column; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ─────────────────────────────────────────────
   Mobile nav drawer
───────────────────────────────────────────── */

.nav-drawer {
  display: none;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: 4px;
  background: var(--bg);
}

.nav-drawer.open { display: flex; }

.nav-drawer a {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}
.nav-drawer a:hover { color: var(--text); background: var(--accent-glow); }
.nav-drawer .drawer-cta { margin-top: 8px; text-align: center; }
