/* ============================================================================
   DISCOVER SAINT LUCIA WELL — BASE
   ----------------------------------------------------------------------------
   The part of the consumer stylesheet that the professional pages need too:
   element defaults, the ambient-video fade, the coordinates line, the
   reading thread and the context band's phone scroll. Moved out of
   css/site.css (28 Nov 2026) so /advisors can load this instead of all of
   site.css, of which it used about 1% (140 KB raw, 35 KB on the wire,
   render-blocking).

   Loaded right before site.css on every consumer page (lib/page.js), so the
   cascade there is unchanged: the BASE block was the top of site.css, and
   none of the other rules has an equal-specificity rival in site.css.
   NOT loaded by Foundations, which brings its own page styles.
   ========================================================================== */

/* ══════════════════════════════════════════════════════════════════════════
   BASE — consumer pages only (Foundations brings its own)
   ══════════════════════════════════════════════════════════════════════════ */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ivory-ink);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif-display);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

h1 em, h2 em, .lead em {
  font-style: italic;
  font-family: var(--serif);
}

p { margin: 0 0 1.1em; }
/* No one-word last lines in running copy. Headings already balance (above). */
p, li, figcaption { text-wrap: pretty; }
/* Short passages wrap to even lines rather than leaving a stub ("several." at the start
   of a line, "personal." alone at the end). Where sentences are the natural unit, the
   build (lib/page.js sentenceLines) puts each on its own line: .lines is the passage,
   .s the sentence. Long passages keep text-wrap: pretty, below. */
.lead, .section-footnote, .cta-note, .pullquote { text-wrap: balance; }
.lines .s { display: block; text-wrap: balance; }
.pullquote.lines { max-width: min(44rem, 100%); }
.pullquote--center.lines { max-width: min(48rem, 100%); }
/* The last two words of a split headline travel together (js/motion.js). */
.nb { white-space: nowrap; }
.scroll-cue { text-wrap: balance; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

img, picture, video, svg { max-width: 100%; display: block; }
img, video { height: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--gold); color: var(--ink); }

/* Focus rings and the skip link live in chrome.css — they are universal. */

/* Ambient cinemagraphs sit ON TOP of an always-present still and fade in only
   once they can actually play. The image is the real LCP element and the whole
   experience for anyone the loader skips. */
.ambient-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s var(--ease-out-quint);
  pointer-events: none;
}
.ambient-video.is-ready { opacity: 1; }

.coords {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
  margin: 0;
}

/* ── Reading-progress thread ──────────────────────────────────────────── */
.read-thread {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--teal-bright), var(--gold));
  pointer-events: none;
}

/* ── Context band: one row that scrolls sideways on a phone ───────────────
   Used by /practitioners (brief §01) and, since 3 Nov 2026, /advisors, whose
   band wrapped to three lines on a phone and pushed its button down. Off unless the page asks (`professionalContext.scroll`). */
@media (max-width: 760px) {
  .pro-context--scroll .pro-context-inner { gap: 0.4rem; padding-block: 0.7rem 0.3rem; }
  .pro-context--scroll .pro-context-nav {
    flex-wrap: nowrap;
    width: 100%;
    gap: 0.25rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    /* A soft edge says "there is more" without a scrollbar. */
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
            mask-image: linear-gradient(90deg, #000 88%, transparent);
    padding-right: 2rem;
  }
  .pro-context--scroll .pro-context-nav::-webkit-scrollbar { display: none; }
  .pro-context--scroll .pro-context-nav a {
    flex: none;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 0.75rem;
    white-space: nowrap;
  }
}
.pro-context--scroll .pro-context-nav a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  color: var(--paper);
}
