/* ==========================================================================
   The Berean Library — App Landing Page
   Page-specific styles for /app/
   ========================================================================== */


/* ==========================================================================
   HERO — static designed hero image (headline, features, phone mockup are
   all baked into the image itself).
   ========================================================================== */

.app-hero {
  position: relative;
  background-color: var(--color-black);
  text-align: center;
  padding-block: var(--sp-8);
}

.app-hero__image {
  display: block;
  width: 100%;
  height: auto;
}

.app-hero__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  margin-top: var(--sp-8);
}

.app-hero__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gold);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.app-hero__link:hover {
  color: var(--color-gold-dark);
}

@media (max-width: 900px) {
  .app-hero {
    padding-block: var(--sp-6);
  }
}


/* ==========================================================================
   PERSISTENT / STICKY CTA — hidden until the visitor scrolls past the hero,
   then stays available so a buy action is never more than one tap away.
   ========================================================================== */

.app-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-dropdown, 500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  padding: var(--sp-3) var(--sp-6);
  background: rgba(23, 21, 21, 0.96);
  border-top: 1px solid rgba(201, 157, 69, 0.25);
  backdrop-filter: blur(6px);
  transform: translateY(100%);
  transition: transform var(--ease-base);
}

.app-sticky-cta.is-visible {
  transform: translateY(0);
}

.app-sticky-cta__text {
  margin: 0;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 640px) {
  .app-sticky-cta__text {
    display: none;
  }
  .app-sticky-cta {
    justify-content: center;
  }
}



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

.app-features {
  background-color: var(--color-black);
  padding-block: var(--sp-20);
}

/* These sections sit on dark/black backgrounds site-wide, so their
   section headings must always render white (not the default
   light-page heading color from .section-title { color: inherit; }). */
.app-features .section-title,
.app-how .section-title,
.app-buttons .section-title,
.app-faq .section-title,
.app-pricing .section-title {
  color: var(--color-white);
}


.app-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-12);
}

.app-feature {
  background: rgba(255, 255, 255, 0.05);
  border-top: 3px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  transition: background 0.2s ease, transform var(--ease-base);
}

.app-feature:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-4px);
}

.app-feature__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 157, 69, 0.12);
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-4);
}

.app-feature__icon svg {
  width: 22px;
  height: 22px;
  fill: var(--color-gold);
}

.app-feature__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-white);
  margin: 0 0 var(--sp-2);
}

.app-feature__text {
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

@media (max-width: 1024px) {
  .app-features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .app-features__grid {
    grid-template-columns: 1fr;
  }
}


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

.app-how {
  background-color: var(--color-warm);
  padding-block: var(--sp-20);
}

.app-how__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-8);
  margin-top: var(--sp-12);
  counter-reset: step;
}

.app-step {
  text-align: center;
}

.app-step__number {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-full);
  color: var(--color-gold);
  font-size: var(--text-xl);
  font-weight: 700;
}

.app-step__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-white);
  margin: 0 0 var(--sp-2);
}

.app-step__text {
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

@media (max-width: 900px) {
  .app-how__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-10) var(--sp-6);
  }
}

@media (max-width: 480px) {
  .app-how__steps {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
  }
}


/* ==========================================================================
   BUTTONS EXPLAINED
   ========================================================================== */

.app-buttons {
  background-color: var(--color-black);
  padding-block: var(--sp-20);
}

.app-buttons__layout {
  display: grid;
  grid-template-columns: minmax(0, 340px) 1fr;
  gap: var(--sp-12);
  align-items: center;
  margin-top: var(--sp-12);
}

.app-buttons__image {
  justify-self: center;
}

.app-buttons__image img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: var(--radius-md);
}

.app-buttons__list {
  list-style: none;
  counter-reset: btn-step;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.app-buttons__list li {
  counter-increment: btn-step;
  position: relative;
  padding-left: var(--sp-10);
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: rgba(255, 255, 255, 0.75);
}

.app-buttons__list li::before {
  content: counter(btn-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-full);
  color: var(--color-gold);
  font-size: var(--text-xs);
  font-weight: 700;
}

.app-buttons__list strong {
  color: var(--color-white);
}

@media (max-width: 800px) {
  .app-buttons__layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }

  .app-buttons__list {
    max-width: 420px;
  }
}


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

.app-pricing {
  background-color: var(--color-dark);
  padding-block: var(--sp-20);
}

.app-pricing__anchor {
  max-width: 720px;
  margin: var(--sp-10) auto 0;
  padding: var(--sp-6) var(--sp-8);
  border-left: 3px solid var(--color-gold);
  background: rgba(201, 157, 69, 0.07);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.app-pricing__anchor p {
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.app-pricing__anchor strong {
  color: var(--color-gold);
}

.app-pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-12);
  align-items: stretch;
}

.app-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 157, 69, 0.18);
  border-radius: var(--radius-md);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  transition: background 0.2s ease, transform var(--ease-base);
}

.app-plan:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
}

/* Emphasized (recommended) plan */
.app-plan--featured {
  border: 2px solid var(--color-gold);
  background: rgba(201, 157, 69, 0.09);
  box-shadow: 0 0 48px rgba(201, 157, 69, 0.15);
}

.app-plan__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gold);
  color: var(--color-black);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.app-plan__name {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 var(--sp-3);
}

.app-plan__compare {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 var(--sp-1);
}

.app-plan__compare s {
  color: rgba(255, 255, 255, 0.35);
}

.app-plan__price {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-white);
  margin: 0 0 var(--sp-1);
}

.app-plan__price-note {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 var(--sp-6);
}

.app-plan__includes {
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 var(--sp-4);
  flex: 1;
}

.app-plan__best-for {
  font-size: var(--text-xs);
  font-style: italic;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 var(--sp-6);
}

.app-plan__addon {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-gold);
  margin: 0 0 var(--sp-3);
}

.app-pricing__reassurance {
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.45);
  margin: var(--sp-8) 0 0;
}

.app-pricing__note {
  text-align: center;
  max-width: 560px;
  margin: var(--sp-8) auto 0;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile fix: the uppercase, letter-spaced button labels (e.g.
   "Get Lifetime — R980") are wider than a small phone viewport, and
   .btn { white-space: nowrap } forces each card's min-content width
   past its grid column — making the cards bleed off the right edge.
   Let the grid column shrink (min-width: 0) and, once the grid
   collapses to a single column, let the button labels wrap. */
.app-plan {
  min-width: 0;
}

@media (max-width: 900px) {
  .app-pricing__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
    margin-top: var(--sp-12);
  }
  .app-plan--featured {
    order: -1;
  }
  .app-plan .btn {
    white-space: normal;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .app-plan {
    padding: var(--sp-6) var(--sp-4);
  }
  .app-plan .btn {
    width: 100%;
    padding-inline: var(--sp-4);
  }
}


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

.app-faq {
  background-color: var(--color-warm);
  padding-block: var(--sp-20);
}

.app-faq__list {
  max-width: 760px;
  margin: var(--sp-12) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.app-faq__item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 157, 69, 0.18);
  border-radius: var(--radius-md);
  padding: var(--sp-5) var(--sp-6);
}

.app-faq__item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-white);
  list-style: none;
  position: relative;
  padding-right: var(--sp-8);
}

.app-faq__item summary::-webkit-details-marker {
  display: none;
}

.app-faq__item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  color: var(--color-gold);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1;
}

.app-faq__item[open] summary::after {
  content: '−';
}

.app-faq__item p {
  margin: var(--sp-3) 0 0;
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: rgba(255, 255, 255, 0.7);
}
