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

:root {
  --primary: #6C63FF;
  --primary-dark: #5A52D5;
  --primary-light: #8B83FF;
  --secondary: #FF6B6B;
  --accent: #FFD93D;
  --success: #6BCB77;
  --bg: #F8F7FF;
  --bg-alt: #FFFFFF;
  --text: #2D2D3F;
  --text-light: #6E6E82;
  --text-muted: #9E9EB0;
  --border: #E8E8F0;
  --shadow-sm: 0 2px 8px rgba(108, 99, 255, 0.06);
  --shadow: 0 4px 20px rgba(108, 99, 255, 0.1);
  --shadow-lg: 0 12px 40px rgba(108, 99, 255, 0.15);
  --shadow-btn: 0 4px 16px rgba(108, 99, 255, 0.3);
  --shadow-btn-hover: 0 8px 28px rgba(108, 99, 255, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 12px auto 0;
}

/* ========== LANGUAGE TOGGLE ========== */
.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 3px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4px;
  border-radius: 50px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.04);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-light);
  letter-spacing: 0.5px;
  position: relative;
}

.lang-btn:hover {
  color: var(--primary);
  background: rgba(108, 99, 255, 0.06);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.lang-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.35);
}

.lang-btn.active:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.45);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 100px 0 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #F8F7FF 0%, #EDE9FF 50%, #FFE8E8 100%);
  z-index: -1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(108,99,255,0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -25%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,107,107,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

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

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  margin-bottom: 20px;
}

.logo-img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(67, 211, 228, 0.2);
  display: block;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.65;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: inherit;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-primary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.btn-lg {
  padding: 18px 48px;
  font-size: 1.2rem;
}

@media (max-width: 480px) {
  .btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
    width: 100%;
  }

  .use-cases-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== PHONE MOCKUP ========== */
.hero-mockup {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  width: 320px;
  background: #1A1A2E;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 22px;
  background: #1A1A2E;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone-screen {
  background: #0F0F23;
  border-radius: 28px;
  overflow: hidden;
  padding: 18px 14px;
  min-height: 480px;
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 14px;
}

.mockup-header strong {
  display: block;
  font-size: 0.9rem;
  color: #fff;
  font-weight: 700;
}

.mockup-status {
  font-size: 0.68rem;
  color: var(--success);
  opacity: 0.8;
}

.mockup-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}

.mockup-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 88%;
  animation: msgIn 0.4s ease-out;
}

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

.msg-bot {
  background: rgba(108, 99, 255, 0.15);
  color: #D0CCFF;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-user {
  background: rgba(107, 203, 119, 0.14);
  color: #A0E0AA;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-correction {
  background: rgba(255, 107, 107, 0.08);
  border-left: 3px solid var(--secondary);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #FFB0B0;
  animation: msgIn 0.4s ease-out 0.25s both;
}

.msg-correction s { opacity: 0.6; }
.msg-correction b { color: var(--success); }

.msg b { color: var(--accent); }

/* ========== FEATURES ========== */
.features {
  padding: 100px 0;
  background: var(--bg-alt);
}

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

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: block;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ========== HOW IT WORKS ========== */
.how-it-works {
  padding: 100px 0;
  background: var(--bg);
}

.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 48px;
}

.step {
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px 32px;
  transition: all var(--transition);
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.step-number {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.step-icon {
  font-size: 2.6rem;
  margin-bottom: 14px;
  display: block;
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

.step-arrow {
  font-size: 1.6rem;
  color: var(--primary-light);
  padding-top: 56px;
  font-weight: 700;
  opacity: 0.5;
}

.how-cta {
  text-align: center;
}

/* ========== REVIEWS ========== */
.reviews {
  padding: 100px 0;
  background: var(--bg-alt);
}

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

.review-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.review-stars {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 14px;
  letter-spacing: 3px;
}

.review-text {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.review-author strong {
  display: block;
  font-size: 0.92rem;
}

.review-author span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ========== FAQ ========== */
.faq {
  padding: 100px 0;
  background: var(--bg);
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: all var(--transition);
  font-family: inherit;
  line-height: 1.3;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

.faq-arrow {
  font-size: 0.75rem;
  transition: transform var(--transition);
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 24px 20px;
}

.faq-answer p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ========== USE CASES ========== */
.use-cases {
  padding: 100px 0;
  background: var(--bg);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.use-case-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
  cursor: default;
}

.use-case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.use-case-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  display: block;
}

.use-case-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

/* ========== COMPARISON ========== */
.comparison {
  padding: 100px 0;
  background: var(--bg-alt);
}

.comparison-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.comparison-col {
  border-radius: var(--radius);
  padding: 36px 28px;
  position: relative;
}

.comparison-tutor {
  background: var(--bg);
  border: 2px solid var(--border);
}

.comparison-bot {
  background: linear-gradient(135deg, rgba(108,99,255,0.06), rgba(108,99,255,0.02));
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
}

.comparison-col h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.comparison-bot h3 {
  color: var(--primary);
}

.comparison-col ul {
  list-style: none;
  padding: 0;
}

.comparison-col li {
  padding: 10px 0;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.comparison-col li:last-child {
  border-bottom: none;
}

.comparison-col li::before {
  content: '✗';
  color: var(--secondary);
  font-weight: 700;
  flex-shrink: 0;
}

.comparison-bot li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

/* ========== FINAL CTA ========== */
.final-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #1A1A2E 0%, #2D2D4F 100%);
  text-align: center;
}

.final-cta-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.25;
}

.final-cta-content p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 32px;
}

/* ========== STICKY CTA ========== */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(248,247,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 999;
}

.sticky-cta .btn {
  width: 100%;
}

/* ========== FOOTER ========== */
.footer {
  background: #1A1A2E;
  color: rgba(255,255,255,0.7);
  padding: 48px 0 28px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 20px;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all var(--transition);
  position: relative;
  padding: 2px 0;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

.footer-links a:hover {
  color: white;
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

.footer-links a:focus-visible {
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 4px;
  border-radius: 4px;
}

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
}

/* Language visibility is handled by JavaScript (script.js) */

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .features-grid,
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero .container {
    gap: 40px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 80px 0 60px;
    min-height: auto;
  }

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

  .hero-mockup {
    display: none;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    max-width: 100%;
  }

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

  .section-header h2 {
    font-size: 1.7rem;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .step-arrow {
    display: none;
  }

  .step p {
    max-width: 100%;
  }

  .comparison-table {
    grid-template-columns: 1fr;
  }

  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .final-cta-content h2 {
    font-size: 1.5rem;
  }

  .sticky-cta {
    display: block;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    gap: 16px;
  }

  .lang-toggle {
    top: 12px;
    right: 12px;
  }
}

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
