/* ================================================
   Bible Topics Homepage — Redesigned Styles
   Design System: Soft UI Evolution
   Typography: Poppins (headings) + Inter (body)
   Colors: Brand blue #1e67b9, Warm CTA #f97316
   ================================================ */

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  --color-primary: #1e67b9;
  --color-primary-dark: #1a5a9e;
  --color-primary-light: #eff6ff;
  --color-primary-glow: rgba(30, 103, 185, 0.1);
  --color-cta: #f97316;
  --color-cta-hover: #ea580c;
  --color-bg: #f8fafc;
  --color-bg-white: #ffffff;
  --color-text-heading: #0f172a;
  --color-text-body: #475569;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-star: #fbbf24;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.06);
  --shadow-card-hover:
    0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 28px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
  --transition: 250ms ease;
  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
  --max-width: 1200px;
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-body);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  line-height: 1.3;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  padding: 10px 24px;
  font-size: 0.9rem;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 103, 185, 0.3);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ---------- DOWNLOAD DROPDOWN ---------- */
.download-dropdown {
  position: relative;
}

.download-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.download-chevron {
  font-size: 0.65rem;
  transition: transform var(--transition);
}

.download-dropdown.open .download-chevron {
  transform: rotate(180deg);
}

.download-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--transition),
    visibility var(--transition),
    transform var(--transition);
  z-index: 200;
  padding: 6px;
}

.download-dropdown.open .download-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.download-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--color-text-heading);
  text-decoration: none;
  transition:
    background var(--transition),
    color var(--transition);
}

.download-option:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.download-option i {
  font-size: 1.3rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.download-option-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.download-option-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

/* ---------- HEADER ---------- */
.header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-body);
  transition: color var(--transition);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--color-text-heading);
  cursor: pointer;
  padding: 8px;
}

/* ---------- HERO ---------- */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(
    135deg,
    var(--color-primary-light) 0%,
    var(--color-bg) 60%,
    #fff 100%
  );
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(30, 103, 185, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 540px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary-glow);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  border: 1px solid rgba(30, 103, 185, 0.15);
}

.hero-badge i {
  font-size: 0.9rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-text-heading);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-body);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.store-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-badges-center {
  justify-content: center;
}

.store-badge {
  height: 48px;
  width: auto;
  transition: all var(--transition);
  border-radius: var(--radius-sm);
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-rating-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.star-rating-gold i {
  color: var(--color-star);
  font-size: 14px;
  margin: 0 1px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.12));
}

/* ---------- STATS ---------- */
.stats {
  padding: 50px 0;
  background: var(--color-bg-white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stat-number-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
}

.stat-star {
  color: var(--color-star);
  font-size: 1.4rem;
  margin-left: 4px;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- SECTION TITLES ---------- */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  text-align: center;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- SCREENSHOTS ---------- */
.screenshots {
  padding: 70px 0 50px;
  overflow: hidden;
  background: var(--color-bg-white);
}

.screenshots-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 20px 40px;
  scrollbar-width: none;
}

.screenshots-track::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex: 0 0 auto;
  width: 210px;
  scroll-snap-align: center;
  transition: transform var(--transition);
}

.screenshot-item:hover {
  transform: translateY(-4px);
}

.screenshot-item img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.swipe-hint {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.swipe-hint i {
  font-size: 0.75rem;
}

/* ---------- FEATURES ---------- */
.features {
  padding: 80px 0 90px;
  background: var(--color-bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  cursor: default;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: all var(--transition);
}

.feature-card:hover .feature-icon {
  background: var(--color-primary);
}

.feature-icon i {
  font-size: 24px;
  color: var(--color-primary);
  transition: color var(--transition);
}

.feature-card:hover .feature-icon i {
  color: #fff;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-heading);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---------- REVIEWS / TESTIMONIALS ---------- */
.reviews {
  padding: 80px 0;
  background: var(--color-bg-white);
}

.testimonial-slider {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.testimonial-slides {
  position: relative;
  min-height: 320px;
}

.testimonial-slide {
  display: none;
  animation: slideIn 0.4s ease;
}

.testimonial-slide.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testimonial-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--color-border);
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.testimonial-name {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-heading);
}

.testimonial-source {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.testimonial-card .star-rating-gold {
  margin-bottom: 14px;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-body);
  font-style: italic;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}

.testimonial-dot:hover {
  background: var(--color-text-muted);
}

.testimonial-dot:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.testimonial-dot.active {
  background: var(--color-primary);
  width: 28px;
  border-radius: var(--radius-full);
}

/* ---------- CTA ---------- */
.cta {
  padding: 80px 0 100px;
  background: var(--color-bg);
}

.cta-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2563eb 100%);
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.cta-card::after {
  content: "";
  position: absolute;
  bottom: -40%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.cta-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.cta-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.cta-card .store-badge {
  height: 52px;
  filter: brightness(1.05);
}

.cta-card .store-badges {
  position: relative;
  z-index: 1;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--color-text-heading);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo .logo-text {
  color: #fff;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 10px;
  line-height: 1.6;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
}

.footer-link {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
  margin-bottom: 10px;
}

.footer-link:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: #fff;
  color: var(--color-text-heading);
  border-color: #fff;
}

.footer-social a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- SCROLL TO TOP ---------- */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 99;
  box-shadow: 0 4px 12px rgba(30, 103, 185, 0.3);
  cursor: pointer;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.scroll-to-top:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.reveal-right {
  transform: translateX(24px);
}

.reveal.visible {
  opacity: 1;
  transform: translate(0);
}

/* ---------- RESPONSIVE ---------- */

/* Large desktop */
@media (min-width: 1440px) {
  .container {
    padding: 0 32px;
  }
}

/* Tablet landscape */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.4rem;
  }

  .hero-inner {
    gap: 40px;
  }

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

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

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

/* Tablet portrait */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-white);
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    gap: 16px;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* Mobile download: show inline store links instead of dropdown */
  .download-dropdown .download-trigger {
    display: none;
  }

  .download-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--color-border);
    min-width: 0;
    width: 100%;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .store-badges {
    justify-content: center;
  }

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

  .hero-image {
    margin-top: 16px;
  }

  .hero-image img {
    max-width: 380px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .testimonial-card {
    padding: 28px 24px;
  }

  .cta-card {
    padding: 48px 28px;
  }

  .cta-title {
    font-size: 1.6rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

/* Phone */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 40px 0 30px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-image {
    display: none;
  }

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

  .feature-card {
    padding: 24px 20px;
  }

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

  .stat-number {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 36px;
  }

  .screenshot-item {
    width: 170px;
  }

  .testimonial-slides {
    min-height: 380px;
  }

  .testimonial-text {
    font-size: 0.9rem;
  }

  .cta-card {
    padding: 40px 20px;
    border-radius: var(--radius-lg);
  }

  .cta-title {
    font-size: 1.4rem;
  }

  .cta-description {
    font-size: 1rem;
  }

  .store-badge {
    height: 42px;
  }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- LEGAL / POLICY PAGES ---------- */
.legal-page {
  padding: 60px 0 80px;
  min-height: 60vh;
  background: var(--color-bg-white);
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 30px;
}

.legal-page h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text-heading);
  margin-top: 30px;
  margin-bottom: 12px;
}

.legal-page p,
.legal-page ul {
  margin-bottom: 14px;
  color: var(--color-text-body);
}

.legal-page ul {
  padding-left: 24px;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page a {
  color: var(--color-primary);
}

.legal-page a:hover {
  text-decoration: underline;
}
