/*
 * Landing Page Styles - Academic Precision Aesthetic
 * Shared styles for marketing/public pages (index, pricing, educators, etc.)
 * Uses CSS variables from styles.css for theming
 */

/* === PAGE STRUCTURE === */

/* Page Container */
.landing-container {
  position: relative;
  overflow-x: hidden;
}

/* Decorative background grid */
.landing-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* === HERO SECTION === */

.hero {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 40px 100px;
  text-align: center;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 24px 0;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.hero h2 {
  font-size: 64px;
  font-weight: 800;
  margin: 0 0 28px 0;
  color: var(--fg);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero .subtitle {
  font-size: 21px;
  color: var(--muted);
  margin: 0 0 48px 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  font-weight: 400;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.hero-cta-container {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === SECTION HEADERS === */

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px 0;
}

.section-title {
  font-size: 42px;
  font-weight: 800;
  margin: 0 0 16px 0;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* === FEATURES SECTION === */

.features {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 40px;
  z-index: 1;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.feature-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--accent);
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

.feature-card:hover::before {
  height: 100%;
}

[data-theme="dark"] .feature-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .feature-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--accent));
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.05);
}

.feature-card h4 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* === CONTENT SECTIONS === */

.content-section {
  position: relative;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 100px 40px;
  margin: 60px 0;
  z-index: 1;
}

.content-section-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* === TOOLS/CATEGORY GRID === */

.tool-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.tool-category {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: all 0.3s ease;
}

.tool-category:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .tool-category:hover {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.tool-category h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.tool-category h4 i {
  font-size: 20px;
}

.tool-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-category li {
  padding: 10px 0;
  color: var(--fg);
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s ease, color 0.2s ease;
  position: relative;
}

.tool-category li::before {
  content: '→';
  position: absolute;
  left: 0;
  opacity: 0;
  color: var(--accent);
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-8px);
}

.tool-category li:hover {
  padding-left: 20px;
  color: var(--accent);
}

.tool-category li:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.tool-category li:last-child {
  border-bottom: none;
}

/* === PRICING CARDS === */

.pricing-content {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto 48px;
}

.pricing-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .pricing-card.popular {
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.pricing-card h4 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--fg);
}

.pricing-price {
  font-size: 48px;
  font-weight: 800;
  margin: 16px 0;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.pricing-description {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 28px 0;
}

.pricing-cta {
  display: block;
  padding: 14px 28px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s ease;
}

.pricing-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.pricing-cta.secondary {
  background: var(--button-bg);
  color: var(--fg);
  border: 1px solid var(--border);
}

.pricing-cta.secondary:hover {
  background: var(--button-hover);
  box-shadow: none;
}

.pricing-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.pricing-link:hover {
  gap: 10px;
}

/* === CTA SECTIONS === */

.cta-section {
  position: relative;
  max-width: 900px;
  margin: 100px auto 120px;
  padding: 60px 40px;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  z-index: 1;
}

[data-theme="dark"] .cta-section {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.cta-section h3 {
  font-size: 38px;
  font-weight: 800;
  margin: 0 0 16px 0;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.cta-section p {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 36px 0;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  padding: 16px 36px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .cta-button {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .cta-button:hover {
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

/* === PROGRESS CTA BUTTON === */

.progress-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: white;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  min-height: 60px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .progress-cta {
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .progress-cta:hover {
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.progress-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.progress-cta__fill,
.progress-cta__success {
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
  transition: opacity 0.3s ease;
}

.progress-cta__fill {
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
  z-index: 0;
  transition: width 1.6s ease;
}

.progress-cta.is-loading .progress-cta__fill {
  width: 100%;
}

.progress-cta__success {
  inset: 0;
  background: rgba(34, 197, 94, 0.9);
  opacity: 0;
  z-index: 1;
}

.progress-cta.is-success .progress-cta__success {
  animation: successFlash 0.6s forwards;
}

.progress-cta__content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.progress-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  transition: transform 0.3s ease;
}

.progress-cta:hover .progress-cta__icon {
  animation: rocketBounce 1.2s ease-in-out infinite;
}

.progress-cta__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.progress-cta__label {
  font-size: 17px;
}

.progress-cta__status-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  transition: color 0.2s ease;
}

.progress-cta.is-loading {
  pointer-events: none;
}

@keyframes rocketBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes successFlash {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 0; }
}

/* === RESPONSIVE === */

@media (max-width: 1024px) {
  .hero h2 {
    font-size: 48px;
  }

  .section-title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 80px 24px 60px;
  }

  .hero h2 {
    font-size: 40px;
  }

  .hero .subtitle {
    font-size: 18px;
  }

  .features,
  .content-section {
    padding: 60px 24px;
  }

  .section-title {
    font-size: 32px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .tool-categories {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .cta-section {
    margin: 60px 24px 80px;
    padding: 40px 24px;
  }

  .cta-section h3 {
    font-size: 32px;
  }
}
