/* =============================================
   LANDING.CSS — Landing Page Sections
   AkalApp — Platform Pembelajaran Digital
   ============================================= */

/* ================================================
   SCROLL ANIMATIONS
   ================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 100ms; }
.animate-on-scroll.delay-2 { transition-delay: 200ms; }
.animate-on-scroll.delay-3 { transition-delay: 300ms; }
.animate-on-scroll.delay-4 { transition-delay: 400ms; }
.animate-on-scroll.delay-5 { transition-delay: 500ms; }
.animate-on-scroll.delay-6 { transition-delay: 600ms; }

/* ================================================
   LANDING NAVBAR
   ================================================ */
.landing-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-navbar);
  height: var(--navbar-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  transition: all var(--transition-base);
}

.landing-navbar.scrolled {
  background: var(--glass-bg-heavy);
  box-shadow: var(--shadow-lg);
}

.landing-navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}

.navbar-logo {
  height: 44px;
  width: auto;
}

.navbar-app-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  padding: var(--sp-2);
}

.navbar-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

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

.navbar-toggle.open span:nth-child(2) {
  opacity: 0;
}

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

/* Mobile menu panel */
.navbar-mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-bg-heavy);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  padding: var(--sp-8);
  flex-direction: column;
  gap: var(--sp-6);
  z-index: var(--z-navbar);
  opacity: 0;
  transform: translateY(-20px);
  transition: all var(--transition-base);
}

.navbar-mobile-menu.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.navbar-mobile-menu .nav-link {
  font-size: var(--text-lg);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--color-border);
}

@media (max-width: 767px) {
  .navbar-links,
  .navbar-actions {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-mobile-menu.open {
    display: flex;
  }
}

/* ================================================
   LANDING HERO
   ================================================ */
.landing-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--navbar-height) + var(--sp-16)) var(--sp-6) var(--sp-16);
  overflow: hidden;
  background: var(--gradient-hero);
}

/* Animated gradient background */
.hero-gradient-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-gradient-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 60% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  animation: heroGradientShift 15s ease-in-out infinite;
}

@keyframes heroGradientShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2%, -2%) rotate(1deg); }
  50% { transform: translate(-1%, 3%) rotate(-1deg); }
  75% { transform: translate(-3%, -1%) rotate(0.5deg); }
}

/* Floating shapes */
.hero-shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  border-radius: var(--radius-full);
  opacity: 0.06;
  animation: floatShape 20s ease-in-out infinite;
}

.hero-shape-1 {
  width: 400px;
  height: 400px;
  background: var(--color-blue);
  top: 10%;
  right: -5%;
  animation-delay: 0s;
  animation-duration: 22s;
}

.hero-shape-2 {
  width: 300px;
  height: 300px;
  background: var(--color-purple);
  bottom: 15%;
  left: -3%;
  animation-delay: 3s;
  animation-duration: 18s;
}

.hero-shape-3 {
  width: 200px;
  height: 200px;
  background: var(--color-cyan);
  top: 40%;
  left: 30%;
  animation-delay: 6s;
  animation-duration: 25s;
}

.hero-shape-4 {
  width: 150px;
  height: 150px;
  background: var(--gradient-primary);
  bottom: 30%;
  right: 20%;
  animation-delay: 9s;
  animation-duration: 20s;
  border-radius: var(--radius-xl);
  transform: rotate(45deg);
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -30px) rotate(5deg); }
  50% { transform: translate(-15px, 20px) rotate(-3deg); }
  75% { transform: translate(25px, 10px) rotate(7deg); }
}

/* Grid pattern overlay */
.hero-grid-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.5) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.5) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-blue-light);
  margin-bottom: var(--sp-6);
  animation: fadeInDown 0.8s ease forwards;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-success);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-headline {
  font-size: clamp(2.5rem, 6vw, var(--text-7xl));
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  margin-bottom: var(--sp-6);
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-headline .highlight {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subheadline {
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--sp-10);
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-cta-group .btn {
  min-width: 180px;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  animation: fadeInUp 0.8s ease 0.6s both;
}

.scroll-arrow {
  width: 24px;
  height: 38px;
  border: 2px solid var(--color-text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-arrow::after {
  content: '';
  width: 4px;
  height: 8px;
  background: var(--color-text-muted);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(12px); }
}

/* Entry animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================
   FEATURES SECTION
   ================================================ */
.features-section {
  padding: var(--sp-24) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-16);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-blue);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--sp-4);
}

.section-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--sp-4);
  line-height: var(--leading-tight);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-inline: auto;
  line-height: var(--leading-relaxed);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-6);
}

/* ================================================
   STATS SECTION
   ================================================ */
.stats-section {
  padding: var(--sp-16) 0;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-8);
  position: relative;
}

.stats-bar .stat-item {
  position: relative;
}

.stats-bar .stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: calc(-1 * var(--sp-4));
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

@media (max-width: 767px) {
  .stats-bar .stat-item:not(:last-child)::after {
    display: none;
  }

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

/* ================================================
   PRICING SECTION
   ================================================ */
.pricing-section {
  padding: var(--sp-24) 0;
  position: relative;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-6);
  align-items: start;
  max-width: 1000px;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ================================================
   TESTIMONIALS SECTION
   ================================================ */
.testimonials-section {
  padding: var(--sp-24) 0;
  position: relative;
  overflow: hidden;
}

.testimonials-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-6);
  position: relative;
}

/* ================================================
   CTA SECTION
   ================================================ */
.cta-section {
  padding: var(--sp-24) 0;
  position: relative;
}

.cta-banner {
  background: var(--gradient-cta);
  border-radius: var(--radius-2xl);
  padding: var(--sp-16) var(--sp-8);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

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

.cta-headline {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--weight-bold);
  color: #ffffff;
  margin-bottom: var(--sp-4);
  line-height: var(--leading-tight);
}

.cta-subtext {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--sp-8);
  max-width: 500px;
  margin-inline: auto;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-8);
  background: #ffffff;
  color: var(--color-blue);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  color: var(--color-purple);
}

/* ================================================
   LANDING FOOTER
   ================================================ */
.landing-footer {
  background: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--sp-16) 0 var(--sp-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-10);
  margin-bottom: var(--sp-12);
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer-brand-logo img {
  height: 32px;
}

.footer-brand-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text);
}

.footer-brand-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 300px;
}

.footer-social {
  display: flex;
  gap: var(--sp-3);
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-elevated);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.footer-social-link:hover {
  background: var(--color-blue);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-column-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--sp-4);
}

.footer-column-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-8);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-copyright {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: var(--sp-6);
}

.footer-bottom-links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--color-text);
}

/* ================================================
   SECTION DIVIDER (subtle gradient line)
   ================================================ */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-hover) 50%, transparent);
  border: none;
  margin: 0;
}

/* ================================================
   LIGHT MODE hero overrides
   ================================================ */
[data-theme='light'] .landing-hero {
  background: var(--gradient-hero);
}

[data-theme='light'] .hero-shape {
  opacity: 0.08;
}

[data-theme='light'] .hero-grid-pattern {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

[data-theme='light'] .cta-btn {
  background: #ffffff;
  color: var(--color-blue);
}
