/* ============================================
   Journeyfolio — bespoke marketing styling
   Scoped to `.jf-page` (the marketing body wrapper from
   _layouts/app-journeyfolio.html). Distinct blue, editorial identity with a
   Fraunces serif display face (loaded conditionally in default.html) that
   echoes the app's own screenshot typography. Colors reuse the shared per-app
   theme tokens (see app-themes.css). Loaded only on the Journeyfolio marketing
   page.
   ============================================ */

/* Serif display for headings; body copy stays in the site sans. */
.jf-page {
  --app-page-bg:
    linear-gradient(180deg, rgba(249, 251, 255, 0.98) 0%, rgba(236, 243, 255, 0.94) 26%, rgba(246, 250, 255, 0.98) 58%, rgba(255, 249, 236, 0.72) 100%);
}

/* Hero ("Every journey deserves a folio.") 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. */
.jf-page .marketing-hero-shell {
  isolation: isolate;
}

.jf-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;
}

.jf-page h1,
.jf-page h2,
.jf-page h3 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  letter-spacing: 0;
}

.jf-page h1:first-child {
  font-size: clamp(34px, 5vw, 39px);
  line-height: 1.08;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--app-accent-strong);
}

/* Hero lead paragraph. The layout injects the hero gallery between the <h1>
   and this intro <p>, so an `h1 + p` adjacent selector no longer matches;
   target the paragraph that follows the gallery too, so the lead keeps its
   centered, constrained styling. */
.jf-page h1:first-child + p,
.jf-page .hero-gallery + p {
  max-width: 620px;
  margin: 28px auto 24px;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  text-align: center;
  color: var(--color-text-muted);
}

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

.jf-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%, #F7FAFF 100%);
  box-shadow: 0 18px 40px rgba(27, 78, 173, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.jf-page h2 + p + ul {
  padding: 22px 24px 22px 44px;
  border: 1px solid var(--app-accent-soft);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--app-accent-soft) 0%, #FFFFFF 100%);
}

/* Centered section headings with a short accent underline. */
.jf-page h2 {
  margin-top: 56px;
  font-size: 28px;
  text-align: center;
  color: var(--app-accent-strong);
}

.jf-page h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: var(--app-accent);
}

.jf-page h3 {
  font-size: 22px;
  color: var(--app-accent-strong);
}

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

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

/* "How it works" ordered list → a blue-numbered timeline. */
.jf-page ol {
  padding-left: 0;
  list-style: none;
  counter-reset: jf-step;
}

.jf-page ol > li {
  position: relative;
  min-height: 36px;
  margin-bottom: 18px;
  padding: 18px 22px 18px 64px;
  counter-increment: jf-step;
  border: 1px solid var(--app-accent-soft);
  border-radius: 24px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
  box-shadow: 0 18px 40px rgba(27, 78, 173, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.jf-page ol > li::before {
  content: counter(jf-step);
  position: absolute;
  inset-inline-start: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--app-accent);
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
}

/* Meta-note under the hero download badge ("Free to start... iOS 18.0 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. */
.jf-page .marketing-cta-row {
  gap: 4px;
  margin-bottom: 28px;
}

@media (hover: hover) and (pointer: fine) {
  .jf-page h2 + ul li:hover,
  .jf-page ol > li:hover {
    transform: translateY(-2px);
    border-color: rgba(47, 113, 229, 0.18);
    box-shadow: 0 22px 48px rgba(27, 78, 173, 0.1);
  }
}

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

  .jf-page h2 {
    font-size: 24px;
  }

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

  .jf-page h2 + p + ul {
    padding-inline: 20px;
  }

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

/* Hero gallery: serif heading and soft blue frames. */
.hero-gallery--jf .hero-gallery-title {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  color: var(--app-accent-strong);
}

.hero-gallery--jf .hero-gallery-label {
  color: var(--app-accent-strong);
}

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

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

/* Shared marketing modules: editorial serif display and travel-journal warmth. */
.jf-page .marketing-chip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 255, 0.92) 100%);
}

.jf-page h2.marketing-section-title,
.jf-page .marketing-cta-panel h2 {
  margin-top: 0;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: clamp(30px, 4.4vw, 44px);
}

.jf-page h2.marketing-section-title::after,
.jf-page .marketing-cta-panel h2::after {
  display: none;
}

.jf-page h3.marketing-price-summary {
  font-size: 32px;
}

.jf-page .marketing-stat,
.jf-page .marketing-card,
.jf-page .marketing-step,
.jf-page .marketing-price-card,
.jf-page .marketing-story-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 255, 0.88) 100%);
}

.jf-page .marketing-band {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 244, 201, 0.88) 0%, transparent 22%),
    linear-gradient(180deg, rgba(232, 240, 254, 0.92) 0%, rgba(246, 250, 255, 0.98) 56%, rgba(255, 244, 201, 0.46) 100%);
}

.jf-page .marketing-band--plain {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 251, 255, 0.94) 100%);
}

.jf-page .marketing-card--featured,
.jf-page .marketing-price-card.is-featured {
  background: linear-gradient(155deg, rgba(47, 113, 229, 0.12) 0%, rgba(255, 244, 201, 0.2) 30%, rgba(255, 255, 255, 0.97) 78%);
}

/* CTA box keeps its blue→gold gradient. The area around it (side gutters and
   the top-margin gap above it) reads white instead of the tinted page
   background, achieved with a large white box-shadow that fills the area
   around the rounded box (clipped so it does not bleed below into the footer).
   The heading is light yellow to warm up the blue. */
.jf-page .marketing-cta-panel {
  background: linear-gradient(145deg, rgba(27, 78, 173, 0.98) 0%, rgba(47, 113, 229, 0.9) 62%, rgba(255, 196, 77, 0.78) 100%);
  box-shadow:
    0 32px 88px rgba(3, 7, 18, 0.18),
    0 0 0 100vw #FFFFFF;
  clip-path: inset(-72px -100vw 0 -100vw);
}

.jf-page .marketing-cta-panel h2,
.jf-page .marketing-cta-panel h3 {
  color: #FFF4C9;
}

/* CTA link pills ("Visit support", "Read privacy policy", contact email):
   very light (white) fill with dark accent text so the buttons read as light
   pills with dark font against the blue gradient panel. */
.jf-page .marketing-cta-panel .marketing-inline-link {
  border-color: rgba(27, 78, 173, 0.18);
  background: #FFFFFF;
  color: var(--app-accent-strong);
  text-decoration: none;
}

.jf-page .marketing-cta-panel .marketing-inline-link:not(.marketing-inline-link--static):hover {
  border-color: rgba(27, 78, 173, 0.28);
  background: #F6FAFF;
}
