/* ==========================================================================
   Platform page · 1 — Hero  ("The Finflow platform")
   A calmer, shorter cousin of the home hero (no "Back to home" link: the
   header logo already does that): centred title, subheading,
   both buttons and an "on this page" row of pills, on the site's warm
   paper with its dot grid (previous white version: backups/platform-hero.v1-white.css). When the pills scroll away, .pp-subnav slides in under
   the header (desktop only) and its indicator follows the section in view
   (js/platform/hero.js).
   Prefixed .pp- (platform page).
   ========================================================================== */

/* Leave room for the header + sticky bar when jumping to a section */
html { scroll-padding-top: calc(var(--nav-height) + 64px); }
@media (max-width: 960px) { html { scroll-padding-top: calc(var(--nav-height) + 12px); } }

.pp-hero {
  /* the same warm paper + dot grid as home sections 7 and 11 */
  --pp-bg:  #FAF8F4;
  --pp-dot: rgba(110,92,64,0.20);

  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + clamp(56px, 8vw, 104px)) var(--page-px) clamp(56px, 7vw, 88px);
  background: var(--pp-bg);
}
:root[data-theme="dark"] .pp-hero {
  --pp-bg:  #071733;
  --pp-dot: rgba(147,190,240,0.16);
}
/* dot grid, fading only at the top and bottom edges */
.pp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--pp-dot) 1.4px, transparent 1.6px);
  background-size: 24px 24px;
  background-position: center 12px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.pp-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.pp-title {
  margin-bottom: 20px;
  font-size: clamp(40px, 5.4vw, 68px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.pp-title em { font-style: normal; color: var(--accent); }

.pp-sub {
  max-width: 640px;
  margin-bottom: 32px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--text-secondary);
  text-wrap: balance;
}

.pp-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Secondary button: an opaque face on the paper, so the dot grid doesn't
   show through it (the hover sweep still fills it as usual) */
.pp-ctas .btn-outline { background: var(--surface); }

/* ─── Sticky bar (desktop) ────────────────────────────────────────────── */
.pp-subnav {
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  z-index: calc(var(--z-header) - 2);
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease, visibility 0s linear 0.35s;
}
.pp-subnav.is-shown {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.pp-subnav-inner {
  position: relative;
  display: flex;
  gap: 4px;
  height: 48px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.pp-subnav-inner::-webkit-scrollbar { display: none; }
.pp-subnav-link {
  position: relative;
  flex-shrink: 0;
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}
.pp-subnav-link:hover { color: var(--text-primary); }
.pp-subnav-link.is-active { color: var(--accent-text); }
/* indicator under the active link, glides between links */
.pp-subnav-ind {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: var(--w, 0px);
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(var(--x, 0px));
  opacity: var(--o, 0);
  transition: transform 0.35s var(--ease-out), width 0.35s var(--ease-out), opacity 0.2s ease;
}

@media (max-width: 960px) {
  .pp-subnav { display: none; }
}

/* ─── TEMP placeholders for sections still to be built ───────────────── */
.pp-temp {
  min-height: 70vh;
  padding: 72px var(--page-px);
  border-top: 1px dashed var(--border-strong);
}
.pp-temp h2 {
  max-width: var(--container);
  margin: 0 auto;
  font-size: var(--fs-section-title);
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .pp-subnav, .pp-subnav-ind { transition: none; }
}
