/* ================================================
🎯 LingoLaps Landing Page Styles (Refactored)
Uses tokens.css variables and component utilities
================================================ */
@import url('/static/css/tokens.css');
@import url('/static/css/shared/buttons.css');
@import url('/static/css/shared/cards.css');

/* ===== Base ===== */
body {
  font-family: var(--font-secondary);
  margin: 0;
  padding: 0;
  background-color: var(--color-white);
  color: var(--color-secondary);
  line-height: var(--line-normal);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-md) 0;
}

/* ===== Header ===== */
header.landing-header {
  background-color: transparent;
  padding: var(--space-sm) 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s, box-shadow 0.3s;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

header.landing-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-lingo-laps);
  font-size: var(--text-xxl);
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}

header.landing-header.scrolled {
  background-color: var(--color-secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid var(--color-accent);
}

header.landing-header.scrolled .logo {
  -webkit-text-stroke: .5px var(--color-error);
}

header.landing-header.scrolled .button--primary {
  background: var(--color-white);
  color: var(--color-secondary);
  border: 2px solid var(--color-primary);
  box-shadow: 0 2px 1px var(--color-primary,
      0 0.375em 0 0 var(--color-primary));
}

/* ===== Hero Section ===== */
.hero {
  padding: calc(var(--space-xxl) + 80px) 0 var(--space-xl);
  text-align: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 750px;
  z-index: 1;
}

.hero h1 {
  font-family: var(--font-primary);
  font-size: var(--text-hero);
  line-height: var(--line-tight);
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* Animate hero text */
[class^="hero-content_"] {
  opacity: 0;
  animation: runAndStop 1.2s cubic-bezier(0.25, 0.1, 0.25, 1.5) forwards;
}

.hero-content_1 {
  animation-delay: 0.1s;
}

.hero-content_2 {
  animation-delay: 1.1s;
}

.hero-content_3 {
  animation-delay: 2.1s;
  font-family: var(--font-lingo-laps);
}

.hero .sub-headline {
  font-size: var(--text-lg);
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInFromBottom 0.8s ease-out forwards;
  animation-delay: 3.3s;
}

/* Hero background shapes */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  z-index: 0;
}

.hero::before {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
  opacity: 0.7;
}

.hero::after {
  width: 400px;
  height: 400px;
  bottom: -150px;
  right: -150px;
  opacity: 0.5;
}

/* ===== How It Works Section ===== */

.how-it-works {
  padding: var(--space-xxl) 0;
  background-color: var(--color-light-accent);
}

.how-it-works .section-title {
  text-align: center;
  font-family: var(--font-primary);
  font-size: var(--text-xxl);
  margin-bottom: var(--space-xl);
}

.laps-container {
  display: flex;
  flex-direction: row;
  gap: var(--space-lg);
}

/* ===== Final CTA Section ===== */
.cta-button {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.cta-button lottie-player {
  pointer-events: none;
}

.final-cta {
  padding: var(--space-xxl) 0;
  background-color: var(--color-white);
  text-align: center;
}

.final-cta h2 {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  margin-bottom: var(--space-lg);
}

.final-cta p {
  font-size: var(--text-md);
}

/* ===== Footer ===== */
footer.landing-footer {
  background-color: var(--color-secondary);
  color: var(--color-accent);
  padding: var(--space-sm) 0;
  text-align: center;
  font-size: var(--text-sm);
}

footer.landing-footer a {
  margin: 0 var(--space-xs);
  color: var(--color-secondary-text);
  text-decoration: none;
}

footer.landing-footer a:hover {
  transform: translateY(-2px);
}

/* ===== Responsive Typography ===== */
@media (max-width: 768px) {
  .laps-container {
    flex-wrap: wrap;
  }

  .laps-container .card {
    width: 205px;
  }

  .hero h1 {
    font-size: var(--text-xxl);
  }

  .hero .sub-headline {
    font-size: var(--text-md);
  }

  .how-it-works .section-title,
  .final-cta h2 {
    font-size: var(--text-xl);
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: var(--text-xl);
  }

  .logo {
    font-size: var(--text-lg);
  }
}

@keyframes fadeInFromBottom {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes runAndStop {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}