/* ============================================
   RideLog — Homepage Styles
   ============================================ */

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

/* Hero background photo — very subtle, atmospheric */
.hero-bg {
  position: absolute;
  inset: -5%;
  background-size: cover;
  background-position: center center;
  filter: blur(2px);
  opacity: 0.1;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 154, 70, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(232, 168, 56, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Hero Glow Orb */
.hero-glow-orb {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 154, 70, 0.15) 0%, rgba(139, 154, 70, 0.05) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: orb-pulse 6s ease-in-out infinite;
  z-index: 0;
}

/* Hero Dot Grid */
.hero-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: var(--font-size-hero);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.1;
}

.hero-content .hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Hero Trust Badge */
.hero-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-sm);
  padding: 0.5rem 1rem;
  background: rgba(139, 154, 70, 0.1);
  border: 1px solid rgba(139, 154, 70, 0.2);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-trust-badge .icon {
  color: var(--accent-orange);
}

.hero-mockup {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.hero-mockup img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 40px rgba(139, 154, 70, 0.15));
}

/* Particles — enhanced */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.hero-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(139, 154, 70, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(139, 154, 70, 0.3);
  animation: particle-drift 12s linear infinite;
}

.hero-particles span:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 14s; }
.hero-particles span:nth-child(2) { left: 25%; animation-delay: 2s; animation-duration: 10s; }
.hero-particles span:nth-child(3) { left: 40%; animation-delay: 4s; animation-duration: 16s; }
.hero-particles span:nth-child(4) { left: 55%; animation-delay: 1s; animation-duration: 12s; }
.hero-particles span:nth-child(5) { left: 70%; animation-delay: 3s; animation-duration: 11s; }
.hero-particles span:nth-child(6) { left: 85%; animation-delay: 5s; animation-duration: 13s; }
.hero-particles span:nth-child(7) { left: 15%; animation-delay: 6s; animation-duration: 15s; }
.hero-particles span:nth-child(8) { left: 60%; animation-delay: 7s; animation-duration: 10s; }

/* --- Brand Bar --- */
.brand-bar {
  padding: var(--space-lg) 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.brand-bar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  text-align: center;
}

.brand-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: background 0.3s ease;
}

.brand-stat:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Brand stat dividers */
.brand-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: calc(var(--space-md) / -2);
  top: 20%;
  height: 60%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(139, 154, 70, 0.3), transparent);
}

.brand-stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(139, 154, 70, 0.1);
  color: var(--accent-green-light);
  margin-bottom: 0.25rem;
}

.brand-stat-number {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

/* Counter glow effect */
.brand-stat-number.glow {
  animation: counter-glow 1s ease-out;
}

.brand-stat-label {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Top accent bar */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Mouse spotlight overlay */
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    300px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    rgba(139, 154, 70, 0.08),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: inherit;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(139, 154, 70, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(139, 154, 70, 0.1);
  color: var(--accent-green-light);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(139, 154, 70, 0.3);
  background: rgba(139, 154, 70, 0.15);
}

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

.feature-card p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --- Route Sharing / Discover — Feature Highlight --- */
.feature-highlight {
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.feature-highlight-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.feature-highlight-inner.reverse {
  direction: rtl;
}

.feature-highlight-inner.reverse > * {
  direction: ltr;
}

.feature-highlight-content h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-sm);
}

.feature-highlight-content p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-md);
}

.feature-highlight-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-highlight-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: var(--font-size-base);
}

.feature-highlight-list .check-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(139, 154, 70, 0.15);
  color: var(--accent-green-light);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.feature-highlight-mockup {
  display: flex;
  justify-content: center;
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

.feature-highlight-mockup img {
  max-width: 350px;
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 154, 70, 0.12);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* Tilt — opposite directions for visual variety */
.mockup-tilt-left {
  transform: perspective(800px) rotateY(4deg) rotateX(1deg);
  transition: transform 0.5s ease;
}

.mockup-tilt-right {
  transform: perspective(800px) rotateY(-4deg) rotateX(1deg);
  transition: transform 0.5s ease;
}

.mockup-tilt-left:hover,
.mockup-tilt-right:hover {
  transform: perspective(800px) rotateY(0deg) rotateX(0deg);
}

.mockup-tilt-left:hover img,
.mockup-tilt-right:hover img {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 50px rgba(139, 154, 70, 0.2);
}

/* Shine reflection sweep */
.mockup-shine {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.mockup-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 45%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 55%,
    transparent 60%
  );
  transform: skewX(-15deg);
  transition: left 0.8s ease;
}

.feature-highlight-mockup:hover .mockup-shine::after {
  left: 130%;
}

/* Route Sharing bg glow — enhanced */
.section-route-sharing::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -10%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 154, 70, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glow-pulse 5s ease-in-out infinite;
}

/* Discover bg glow — enhanced */
.section-discover::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -10%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232, 168, 56, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glow-pulse 5s ease-in-out infinite 1s;
}

/* --- Privacy Section --- */
.privacy-section {
  padding: var(--space-xl) 0;
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(139, 154, 70, 0.03) 50%, var(--bg-primary) 100%);
}

.privacy-inner {
  max-width: 700px;
  margin: 0 auto;
}

.privacy-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(139, 154, 70, 0.1);
  border: 2px solid rgba(139, 154, 70, 0.3);
  color: var(--accent-green-light);
  font-size: 2.5rem;
  position: relative;
}

/* Radar rings */
.privacy-icon .ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(139, 154, 70, 0.4);
  animation: ring-expand 3s ease-out infinite;
  pointer-events: none;
}

.privacy-icon .ring:nth-child(2) {
  animation-delay: 1s;
}

.privacy-icon .ring:nth-child(3) {
  animation-delay: 2s;
}

.privacy-section h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-sm);
}

.privacy-section p {
  font-size: var(--font-size-lg);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Screenshots Carousel (Apple-style) --- */
.screenshots-section {
  padding: var(--space-xl) 0;
  overflow: hidden;
}

.screenshots-swiper {
  padding: var(--space-sm) 0 var(--space-lg);
  position: relative;
}

.screenshots-swiper .swiper-slide {
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  opacity: 0.35;
  transform: scale(0.88);
}

.screenshots-swiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
}

.screenshots-swiper .swiper-slide-prev,
.screenshots-swiper .swiper-slide-next {
  opacity: 0.65;
  transform: scale(0.94);
}

.screenshots-swiper .swiper-slide img {
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  display: block;
  transition: box-shadow 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.screenshots-swiper .swiper-slide-active img {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* Navigation arrows — appear on hover */
.screenshots-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.3s ease, background 0.3s ease;
  opacity: 0;
}

.screenshots-swiper:hover .screenshots-nav {
  opacity: 1;
}

.screenshots-nav:hover {
  background: rgba(255, 255, 255, 0.15);
}

.screenshots-nav.swiper-button-disabled {
  opacity: 0 !important;
  pointer-events: none;
}

.screenshots-nav .icon {
  width: 20px;
  height: 20px;
}

.screenshots-nav-prev {
  left: var(--space-md);
}

.screenshots-nav-next {
  right: var(--space-md);
}

@media (max-width: 768px) {
  .screenshots-nav {
    display: none;
  }

  .screenshots-swiper .swiper-slide img {
    border-radius: 18px;
  }
}

/* --- Testimonials / App Store Rating --- */
.testimonials-section {
  padding: var(--space-xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Background photo overlay */
.testimonials-bg {
  position: absolute;
  inset: -20% 0;
  background-size: cover;
  background-position: center;
  filter: blur(3px) brightness(0.25) saturate(0.4);
}

.testimonials-section .container {
  position: relative;
  z-index: 2;
}

.rating-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.rating-stars {
  display: flex;
  gap: 0.25rem;
  color: var(--accent-orange);
  font-size: 1.5rem;
}

/* Star pop animation */
.rating-stars .icon {
  opacity: 0;
  transform: scale(0) rotate(-45deg);
  animation: star-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-play-state: paused;
}

.rating-display.animated .rating-stars .icon {
  animation-play-state: running;
}

.rating-stars .icon:nth-child(1) { animation-delay: 0.1s; }
.rating-stars .icon:nth-child(2) { animation-delay: 0.2s; }
.rating-stars .icon:nth-child(3) { animation-delay: 0.3s; }
.rating-stars .icon:nth-child(4) { animation-delay: 0.4s; }
.rating-stars .icon:nth-child(5) { animation-delay: 0.5s; }

.rating-number {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
}

.rating-meta {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --- FAQ Section --- */
.faq-section {
  padding: var(--space-xl) 0;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
  position: relative;
}

/* Left accent border */
.faq-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--gradient-brand);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  transition: width 0.3s ease;
}

.faq-item.active {
  border-color: rgba(139, 154, 70, 0.3);
  background: rgba(139, 154, 70, 0.04);
}

.faq-item.active::before {
  width: 3px;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem var(--space-md);
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--accent-green-light);
}

.faq-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-green-light);
}

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

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

.faq-answer-inner {
  padding: 0 var(--space-md) 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-more-link {
  text-align: center;
  margin-top: var(--space-md);
}

/* --- CTA Section --- */
.cta-section {
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 15, 26, 0.7) 0%, rgba(26, 26, 46, 0.5) 50%, rgba(15, 15, 26, 0.8) 100%);
  z-index: 1;
}

.cta-bg {
  position: absolute;
  inset: -20% 0;
  background-size: cover;
  background-position: center;
  filter: blur(2px) brightness(0.5);
}

.cta-inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: var(--font-size-hero);
  margin-bottom: var(--space-sm);
}

.cta-section p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-md);
}

/* CTA button glow pulse */
.cta-section .btn--primary {
  animation: button-glow 3s ease-in-out infinite;
}

/* --- Responsive Overrides --- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-md);
  }

  .hero-content .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-trust-badge {
    justify-content: center;
  }

  /* Reduce hero glow orb on mobile */
  .hero-glow-orb {
    width: 300px;
    height: 300px;
  }

  /* Hide dot grid on mobile */
  .hero-dot-grid {
    display: none;
  }

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

  .feature-highlight-inner,
  .feature-highlight-inner.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    text-align: center;
  }

  .feature-highlight-mockup {
    order: -1;
  }

  .feature-highlight-mockup img {
    max-width: 280px;
  }

  /* Remove tilt on mobile — no hover */
  .mockup-tilt-left,
  .mockup-tilt-right {
    transform: none;
  }

  .feature-highlight-list {
    align-items: center;
  }

  .brand-bar-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  /* Hide dividers on mobile stacked layout */
  .brand-stat:not(:last-child)::after {
    display: none;
  }

}
