/* ============================================
   Learny — CSS Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-primary: #4f46e5;
  --color-primary-dark: #4338ca;
  --color-primary-light: #818cf8;
  --color-accent: #f59e0b;
  --color-accent-dark: #d97706;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0f172a;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-text-inverse: #f8fafc;
  --color-border: #e2e8f0;
  --color-success: #10b981;
  --color-error: #ef4444;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  --max-width: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --transition: 0.2s ease;
}

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

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

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

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

ul {
  list-style: none;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

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

.btn-large {
  padding: 16px 36px;
  font-size: 1.125rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--color-text);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 20px;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.navbar-logo:hover {
  color: var(--color-primary-dark);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}

.navbar-links a:hover {
  color: var(--color-primary);
}

.navbar-cta {
  padding: 8px 20px;
  font-size: 0.9rem;
}

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

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 140px 20px 80px;
  text-align: center;
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 50%, #fff7ed 100%);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--color-text);
}

.hero h1 span {
  color: var(--color-primary);
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-light);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-block;
  margin-top: 24px;
  padding: 6px 16px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ============================================
   Features Section
   ============================================ */
.features {
  padding: 96px 20px;
}

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

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

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.feature-icon.voice { background: #ede9fe; }
.feature-icon.correction { background: #fef3c7; }
.feature-icon.level { background: #d1fae5; }
.feature-icon.streak { background: #fce7f3; }

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works {
  padding: 96px 20px;
  background: var(--color-bg-alt);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  text-align: center;
  padding: 24px;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

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

.step p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing {
  padding: 96px 20px;
}

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

.pricing-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  position: relative;
  transition: all var(--transition);
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 16px 0 4px;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-light);
}

.pricing-original {
  color: var(--color-text-light);
  text-decoration: line-through;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.pricing-features {
  text-align: left;
  margin: 24px 0;
}

.pricing-features li {
  padding: 6px 0;
  color: var(--color-text-light);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li::before {
  content: "\2713";
  color: var(--color-success);
  font-weight: 700;
}

.pricing-card .btn {
  width: 100%;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq {
  padding: 96px 20px;
  background: var(--color-bg-alt);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--color-bg);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-sans);
  line-height: 1.4;
}

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

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.active .faq-question::after {
  content: "\2212";
}

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

.faq-answer p {
  padding: 0 24px 20px;
  color: var(--color-text-light);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: 48px 20px 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  color: #94a3b8;
}

.footer-links a {
  display: block;
  color: var(--color-text-inverse);
  font-size: 0.9rem;
  padding: 4px 0;
}

.footer-links a:hover {
  color: var(--color-primary-light);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #64748b;
}

.footer-bottom a {
  color: #94a3b8;
}

.footer-bottom a:hover {
  color: var(--color-primary-light);
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-page {
  padding: 120px 20px 80px;
}

.legal-page .container {
  max-width: 760px;
}

.legal-page h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal-meta {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.legal-page h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 40px 0 12px;
  color: var(--color-text);
}

.legal-page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 24px 0 8px;
}

.legal-page p {
  color: var(--color-text-light);
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-page ul,
.legal-page ol {
  color: var(--color-text-light);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.8;
}

.legal-page ul {
  list-style: disc;
}

.legal-page ol {
  list-style: decimal;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page strong {
  color: var(--color-text);
}

.legal-page a {
  color: var(--color-primary);
  text-decoration: underline;
}

.legal-nav {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 40px;
}

.legal-nav p {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.legal-nav ol {
  padding-left: 20px;
  margin-bottom: 0;
}

.legal-nav li {
  margin-bottom: 2px;
}

.legal-nav a {
  text-decoration: none;
  font-size: 0.9rem;
}

.legal-nav a:hover {
  text-decoration: underline;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .navbar-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }

  .navbar-links.open {
    transform: translateY(0);
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 110px 20px 60px;
  }

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

  .hero p {
    font-size: 1.05rem;
  }

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

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

  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .legal-page h1 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.7rem;
  }

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

  .btn-large {
    width: 100%;
    max-width: 300px;
  }

  .feature-card {
    padding: 24px;
  }

  .pricing-card {
    padding: 32px 24px;
  }
}
