/* =========================================================
   Growing Minds Science: fg-base.css
   The shared primitives of the annotated-observation system, used by the
   homepage and every inner page rebuilt on it: the container and section
   rhythm, display type, one button shape, entrances, the menu rows that
   list classes with their prices, and the age-range bar. Moved out of
   home.css unchanged; scoped to the homepage and to inner pages
   (body.fg--page). Loaded after field-guide.css, before the page's own
   stylesheet. Tokens from tokens-field-guide.css.
   ========================================================= */

:is(.fg--home, .fg--page) { --hb-gutter: clamp(16px, 4vw, 56px); }
.hb-container { width: min(100% - 2 * var(--hb-gutter), 1320px); margin-inline: auto; }
.hb-section { padding-block: clamp(72px, 10vw, 150px); }
.hb-section--tight { padding-block: clamp(48px, 6vw, 88px); }

/* Type: Newsreader for display, the text face for everything else. */
.hb-display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; line-height: 1.02; text-wrap: balance; }
.hb-display--l { font-size: clamp(2.125rem, 1.4rem + 2.8vw, 3.75rem); }
.hb-display--m { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); line-height: 1.1; }
.hb-lead { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.45; max-width: 44ch; text-wrap: pretty; }
.hb-soft { color: var(--ink-soft); }
.hb-muted { color: var(--ink-muted); }
.hb-note { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }
.hb-note--clay { color: var(--clay-text); }
.hb-note--research { color: var(--research); }
:is(.fg--home, .fg--page) p { max-width: none; }

/* Controls: one shape, flat, calm corners */
.fg .hb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.25rem;
  background: var(--forest); color: var(--on-forest);
  font-weight: 500; font-size: 1rem; text-decoration: none; border-radius: var(--radius);
  transition: background-color 160ms ease, transform 160ms ease;
}
.fg .hb-btn:hover { background: var(--forest-deep); color: var(--on-forest); }
.fg .hb-btn:active { transform: translateY(1px); }
.fg .hb-btn--paper { background: var(--paper); color: var(--ink); }
.fg .hb-btn--paper:hover { background: var(--surface); color: var(--ink); }
.fg .hb-btn--quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.fg .hb-btn--quiet:hover { background: var(--sage-mist); color: var(--ink); }
:is(.fg--home, .fg--page) a { text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
:is(.fg--home, .fg--page) a:hover { color: var(--forest); }

/* Entrances: gated by html.anim; reduced motion and no-script show everything */
html.anim :is(.fg--home, .fg--page) [data-rise] { opacity: 0; transform: translateY(18px); transition: opacity 640ms cubic-bezier(.2,.7,.2,1), transform 640ms cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 70ms); }
html.anim :is(.fg--home, .fg--page) [data-rise].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.anim :is(.fg--home, .fg--page) [data-rise] { opacity: 1; transform: none; transition: none; } }

/* Menu rows: a class, its price, one line of promise, quiet rules between */
.menu { display: grid; }
.menu__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding: 22px 0; border-top: 1px solid var(--border-soft); align-items: baseline; text-decoration: none; }
.menu__item:first-child { border-top: 0; padding-top: 0; }
.menu__item h3 { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); line-height: 1.05; font-weight: 400; letter-spacing: -0.015em; }
.menu__item:hover h3 { color: var(--forest); }
.menu__item .price { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu__item .price.soon { color: var(--ink-muted); font-weight: 400; }
.menu__item p { grid-column: 1 / -1; color: var(--ink-soft); max-width: 60ch; }
.menu__item .meta { grid-column: 1 / -1; font-size: 14px; color: var(--ink-muted); }

/* The age-range bar: where a period or a class sits across birth to five */
.range { display: grid; gap: 6px; }
.range__track { height: 8px; background: var(--sage-mist); border-radius: 4px; position: relative; box-shadow: inset 0 0 0 1px var(--sage-deep); } /* the hairline draws the whole span, birth to five, on paper and on mist */
.range__track i { position: absolute; top: 0; bottom: 0; background: var(--forest); border-radius: 4px; left: var(--from); right: calc(100% - var(--to)); }
.range small { color: var(--ink-muted); font-size: 13px; display: flex; justify-content: space-between; }
