/* ==========================================================================
   Landing Page — AlleProfit
   Hero, Features, Pricing, FAQ, Footer
   ========================================================================== */

/* ==========================================================================
   LANDING TOPBAR (transparent override)
   ========================================================================== */

.landing-topbar {
  background: rgba(248, 250, 252, 0.7);
}

[data-theme="dark"] .landing-topbar {
  background: rgba(11, 17, 33, 0.7);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  padding: var(--space-5xl) 0 var(--space-4xl);
  overflow: hidden;
  text-align: center;
}

/* Hero particles canvas */
#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 90, 0, 0.08) 0%,
    rgba(212, 160, 23, 0.05) 40%,
    transparent 70%
  );
  background-size: 200% 200%;
  animation: heroGradientShift 8s ease-in-out infinite;
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(
    circle,
    rgba(255, 133, 51, 0.12) 0%,
    rgba(232, 184, 48, 0.06) 40%,
    transparent 70%
  );
  background-size: 200% 200%;
  animation: heroGradientShift 8s ease-in-out infinite;
}

/* Subtle grid pattern */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 90, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 90, 0, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.35rem 1rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  background: var(--color-primary-light);
  border: 1px solid rgba(255, 90, 0, 0.15);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xl);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, #FF5A00 0%, #D4A017 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-cta .btn-primary {
  padding: 0.875rem 2rem;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.hero-cta .btn-secondary {
  padding: 0.875rem 2rem;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

/* Trust badges */
.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.hero-trust-icons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: var(--weight-medium);
}

/* Hero line animations — staggered entrance */
.hero-line {
  display: inline-block;
  opacity: 0;
  transform: translateY(25px);
  animation: heroLineIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-line-1 { animation-delay: 0.1s; }
.hero-line-2 {
  animation-delay: 0.35s;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-gold, #D4A017) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}
.hero-line-3 { animation-delay: 0.6s; }

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

@media (max-width: 639px) {
  .hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }

  .hero-trust {
    flex-direction: column;
    gap: var(--space-md);
  }

  .hero-cta {
    flex-direction: column;
  }

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

/* ==========================================================================
   SECTION COMMON
   ========================================================================== */

.section {
  padding: var(--space-5xl) 0;
}

.section-alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 639px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  transition: box-shadow var(--transition-slow), border-color var(--transition-slow), transform 0.3s ease;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 90, 0, 0.2);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.feature-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  position: relative;
}

/* Connecting line between steps */
.steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(16.67% + 20px);
  right: calc(16.67% + 20px);
  height: 2px;
  background: var(--color-border);
}

@media (max-width: 639px) {
  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .steps::before {
    display: none;
  }
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-primary-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.step h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.step p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  max-width: 280px;
  margin: 0 auto;
}

/* ==========================================================================
   PRICING SECTION
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 1023px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }

  .pricing-card--featured {
    transform: none;
  }

  .pricing-card--featured:hover {
    transform: translateY(-4px);
  }
}

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.pricing-toggle-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.pricing-toggle-label.active {
  color: var(--color-text);
}

.pricing-save-badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-success);
  background: var(--color-success-light);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

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

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  overflow: hidden;
  background: var(--color-surface);
  transition: box-shadow var(--transition);
}

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

.faq-question {
  width: 100%;
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
}

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

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--transition);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 var(--space-xl) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */

.cta-section {
  padding: var(--space-4xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, transparent 60%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

.cta-content h2 {
  margin-bottom: var(--space-md);
}

.cta-content p {
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 639px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

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

.footer-brand-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-brand-name span {
  color: var(--color-primary);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.footer-column h4 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition);
}

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

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

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

.footer-bottom-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.footer-bottom-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition);
}

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

/* ==========================================================================
   TOGGLE SWITCH (for theme and pricing)
   ========================================================================== */

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */

.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--color-surface-hover);
  border-radius: var(--radius-full);
  padding: 2px;
  gap: 2px;
}

.lang-switcher button {
  padding: 0.3rem 0.6rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  background: transparent;
  border: none;
  cursor: pointer;
}

.lang-switcher button.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.lang-switcher button:hover:not(.active) {
  color: var(--color-text-secondary);
}

/* ==========================================================================
   THEME TOGGLE BUTTON
   ========================================================================== */

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  border: none;
}

.theme-toggle:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-sun {
  display: block;
}

/* ==========================================================================
   CTA GLOW PULSE
   ========================================================================== */

.hero-cta .btn-primary,
.cta-content .btn-primary {
  position: relative;
  z-index: 1;
  overflow: visible;
}

.hero-cta .btn-primary::after,
.cta-content .btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #FF5A00;
  opacity: 0;
  z-index: -1;
  filter: blur(14px);
  animation: glowPulse 3s ease-in-out infinite;
  pointer-events: none;
}

/* ==========================================================================
   COUNTER ANIMATION STATE
   ========================================================================== */

.hero-stat-value[data-count-target] {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   TRUSTED BY / SOCIAL PROOF
   ========================================================================== */

.social-proof {
  text-align: center;
  padding: var(--space-2xl) 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
