/* ============================================
   FormuLens — bespoke marketing styling
   Scoped to `.fl-page` (the marketing body wrapper from
   _layouts/app-formulens.html). Distinct magenta/maroon, lab-clean identity.
   Colors reuse the shared per-app theme tokens (see app-themes.css) so the
   body, app header, and nav stay in one palette. Loaded only on the FormuLens
   marketing page.
   ============================================ */

/* Hero title — magenta→maroon gradient, larger than the neutral base. */
.fl-page {
  --app-page-bg:
    linear-gradient(180deg, rgba(255, 249, 251, 0.98) 0%, rgba(251, 236, 242, 0.95) 28%, rgba(255, 243, 247, 0.96) 58%, rgba(255, 249, 251, 0.98) 100%);
}

/* Hero ("Know exactly what's in your skincare.") on a clean white surface so
   it reads distinctly from the tinted bands below it. The shell is centered at
   a max width, so a full-bleed ::before paints the band white edge to edge,
   including the left/right gutters, instead of only the centered column. */
.fl-page .marketing-hero-shell {
  isolation: isolate;
}

.fl-page .marketing-hero-shell::before {
  content: "";
  position: absolute;
  top: 0;
  /* Extend the white down through the first band's 72px top-margin gap so
     the hero flows straight into it. Without this, the tinted page
     background shows in that gap, reading as a pale band between two lines. */
  bottom: -72px;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #FFFFFF;
  z-index: -1;
}

.fl-page h1:first-child {
  font-size: clamp(32px, 4.6vw, 36px);
  line-height: 1.12;
  margin-bottom: 18px;
  background: linear-gradient(120deg, var(--app-accent) 0%, var(--app-accent-strong) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Lead subhead: the bold sentence immediately after the title. */
.fl-page h1:first-child + p {
  max-width: 640px;
  margin: 0 auto 24px;
  font-size: 18px;
  line-height: 1.65;
  text-align: center;
  color: var(--color-text-strong);
}

.fl-page h2 + ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-left: 0;
  list-style: none;
}

.fl-page h2 + ul li {
  margin-bottom: 0;
  padding: 22px 24px;
  border: 1px solid var(--app-accent-soft);
  border-radius: 24px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF7FA 100%);
  box-shadow: 0 18px 42px rgba(138, 23, 58, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

/* Section headings get a hairline accent rule above them. */
.fl-page h2 {
  padding-top: 20px;
  border-top: 2px solid var(--app-accent-soft);
  color: var(--app-accent-strong);
}

.fl-page h3 {
  color: var(--app-accent-strong);
}

.fl-page strong {
  color: var(--app-accent-strong);
}

.fl-page ul li::marker {
  color: var(--app-accent);
}

.fl-page ol {
  padding-left: 0;
  list-style: none;
  counter-reset: fl-step;
}

.fl-page ol > li {
  position: relative;
  margin-bottom: 16px;
  padding: 18px 24px 18px 70px;
  counter-increment: fl-step;
  border: 1px solid var(--app-accent-soft);
  border-radius: 24px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF8FB 100%);
  box-shadow: 0 18px 42px rgba(138, 23, 58, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.fl-page ol > li::before {
  content: counter(fl-step);
  position: absolute;
  inset-inline-start: 20px;
  top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--app-accent) 0%, var(--app-accent-strong) 100%);
  color: #FFFFFF;
  font-weight: 700;
}

/* Meta-note under the hero download badge ("Free to download... iOS 26.2 or
   later."): tighten the space above it (closer to the badge) and add more
   breathing room below it before the first band. The row lays out badges and
   note in a column with a flex gap, so reduce the gap for the space above and
   add bottom margin on the note for the space below. */
.fl-page .marketing-cta-row {
  gap: 4px;
  margin-bottom: 28px;
}

@media (hover: hover) and (pointer: fine) {
  .fl-page h2 + ul li:hover,
  .fl-page ol > li:hover {
    transform: translateY(-2px);
    border-color: rgba(138, 23, 58, 0.16);
    box-shadow: 0 22px 48px rgba(138, 23, 58, 0.1);
  }
}

@media (max-width: 768px) {
  .fl-page h1:first-child {
    font-size: 28px;
  }

  .fl-page h2 + ul {
    grid-template-columns: 1fr;
  }

  /* Match the reduced CTA top margin on phones so the white fill covers the
     gap above the box exactly. */
  .fl-page .marketing-cta-panel {
    clip-path: inset(-56px -100vw 0 -100vw);
  }
}

/* Hero gallery: soft magenta frames and eyebrow. */
.hero-gallery--fl .hero-gallery-label {
  color: var(--app-accent-strong);
}

.hero-gallery--fl .hero-gallery-track--fallback .hero-gallery-frame,
.hero-gallery--fl .hero-gallery-marquee .hero-gallery-frame {
  border-color: var(--app-accent-soft);
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF0F6 100%);
}

.hero-gallery--fl .hero-gallery-track--fallback .hero-gallery-frame img,
.hero-gallery--fl .hero-gallery-marquee .hero-gallery-frame img {
  border: 1px solid var(--app-accent-soft);
}

/* Give the intro paragraph more breathing room below the hero gallery. */
.fl-page .marketing-hero-shell .hero-gallery--fl + p {
  margin-top: clamp(32px, 5vw, 56px);
}

/* Shared marketing modules: clinical-gloss surfaces, brighter magenta chips. */
.fl-page .marketing-chip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 243, 247, 0.9) 100%);
}

.fl-page h2.marketing-section-title,
.fl-page .marketing-cta-panel h2 {
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top: 0;
  border-bottom: 0;
}

.fl-page .marketing-cta-panel h2,
.fl-page .marketing-cta-panel h3,
.fl-page .marketing-cta-panel p {
  color: inherit;
}

.fl-page .marketing-stat-value {
  background: linear-gradient(135deg, var(--app-accent) 0%, var(--app-accent-strong) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fl-page .marketing-band {
  background:
    radial-gradient(circle at 84% 16%, rgba(228, 77, 141, 0.16) 0%, transparent 24%),
    linear-gradient(180deg, rgba(251, 230, 238, 0.96) 0%, rgba(255, 243, 247, 0.94) 58%, rgba(255, 255, 255, 0.98) 100%);
}

/* "Who it serves" (plain band) on solid white to set it apart from the
   tinted .marketing-band sections. */
.fl-page .marketing-band--plain {
  background: #FFFFFF;
}

.fl-page .marketing-band::after {
  background: rgba(138, 23, 58, 0.08);
}

.fl-page .marketing-card,
.fl-page .marketing-step,
.fl-page .marketing-price-card,
.fl-page .marketing-story-card {
  border-color: rgba(138, 23, 58, 0.1);
}

.fl-page .marketing-card--featured {
  border-color: rgba(138, 23, 58, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.84) 100%);
}

.fl-page .marketing-price-card.is-featured {
  background: linear-gradient(160deg, rgba(228, 77, 141, 0.16) 0%, rgba(255, 255, 255, 0.96) 76%);
}

/* CTA box keeps its magenta→maroon gradient, but the area around it (side
   gutters and the top-margin gap above it) should read white instead of the
   tinted page background, achieved with a large white box-shadow that fills
   the area around the rounded gradient box (clipped so it does not bleed below
   the box into the footer). */
.fl-page .marketing-cta-panel {
  background: linear-gradient(145deg, rgba(138, 23, 58, 0.98) 0%, rgba(228, 77, 141, 0.9) 100%);
  box-shadow:
    0 32px 88px rgba(3, 7, 18, 0.18),
    0 0 0 100vw #FFFFFF;
  clip-path: inset(-72px -100vw 0 -100vw);
}

/* CTA link pills ("Visit support", "Read privacy policy", contact email):
   very light fill with dark accent text, overriding the base white-on-dark
   style used on the gradient panel. */
.fl-page .marketing-cta-panel .marketing-inline-link {
  border-color: rgba(138, 23, 58, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--app-accent-strong);
  text-decoration: none;
}

.fl-page .marketing-cta-panel .marketing-inline-link:not(.marketing-inline-link--static):hover {
  border-color: rgba(138, 23, 58, 0.28);
  background: #FFFFFF;
}
