/* "calm": a soft child theme on the Fluid base v2, for wellness, yoga and
   therapy. A soft-cornered old-style serif at a light weight, a gentle sans
   for text, a sage action colour on sand; rounded pills and cards with a
   soft shadow; slow motion and generous room. Fonts: themes/fonts/calm.css.
   Link after the base: fluid.min.css, then this file. */
@layer reset, tokens, base, layouts, components, themes, utilities;

@layer themes {
  :root {
    --font-heading: "Fraunces Variable", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --font-body: "Nunito Sans Variable", "Avenir Next", Avenir, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --accent: oklch(45% 0.07 158);          /* sage; white on it ≈ 7:1 */
    --neutral-tint: oklch(50% 0.016 75);    /* sand */
    --type-ratio: 1.333;
    --weight-display: 400;
    --weight-heading: 450;
    --display-max: 9rem;
    --measure: 60ch;
    --radius-card: 1.25rem;
    --radius-control: 0.75rem;              /* fields, tabs: soft corners; buttons are pills (below) */
    --shadow-style: 1;                      /* soft, on elevated cards */
    --container-content: 80rem;
    --space-section: clamp(5rem, 3.4rem + 7.111vi, 10rem);    /* 80 → 160 */
    --motion-base: 480ms;
    --toc-font: var(--font-body);
    --toc-dock-font: var(--font-body);
    --nav-tracking: 0.02em;
    --section-rule: 0;                      /* no rules over the section heads: room instead */
  }

  /* Fraunces's soft axis rounds every corner; WONK off keeps it calm. Set
     once and inherited (Nunito ignores the axes); the display keeps the
     base's optical size. */
  :root { font-variation-settings: "SOFT" 100, "WONK" 0; }
  .display, .hero__headline, h1 {
    line-height: 1.04;
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 0;
  }

  /* Labels: sentence case, a little tracked, one step larger than the base's
     capitals so they still read; nothing shouts. */
  :is(.eyebrow, h5, h6, thead th, .plate, cite, legend, dt, .toc__label, .stat__label, .site-footer__title) {
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: var(--step--1);
  }
  .eyebrow { font-weight: calc(600 + var(--_dark-weight)); }
  :is(h5, h6, thead th, .plate, cite, legend, dt, .toc__label, .stat__label, .site-footer__title) { color: var(--color-text-muted); }
  :is(button, .button, .nav__cta) {
    font-weight: calc(600 + var(--_dark-weight));
    letter-spacing: 0.01em;
    padding-inline: 1.6em;
  }
  /* Pills, except inside a button group, which keeps its joined corners. */
  :is(button, .button, .nav__cta):not(.button-group > *) { border-radius: var(--radius-pill); }
  :is(code, kbd) { border-radius: 0.4em; }
  .nav__brand { font-family: var(--font-heading); font-weight: calc(500 + var(--_dark-weight)); }

  .lede { font-weight: calc(400 + var(--_dark-weight)); }   /* Fraunces under 400 thins out on a 1x screen */
  blockquote:not(.testimonial__quote) {
    font: italic calc(400 + var(--_dark-weight)) var(--step-2) / 1.35 var(--font-heading);
    border: 0;
    padding: var(--space-l);
    border-radius: var(--radius-card);
    background: var(--color-surface);
  }
  @media (max-width: 40rem) {
    blockquote:not(.testimonial__quote) { font-size: var(--step-1); padding: var(--space-m); }
  }
  /* Soft corners on pictures in the reading column and on cards; avatars stay
     round and the full-bleed hero plate stays square to the screen edge. */
  :is(figure:not(.hero__plate) > img, .card__media) { border-radius: 1rem; }

  /* ---------- Layout signature (_docs/plans/2026-11-22-theme-differentiation.md) ----------
     The theme recomposes the default hero (one with no data-layout; an author's
     data-layout wins) and the bar; the markup stays the core's. */
  /* A light bar in the page's own colours, a hairline under it. */
  :root { --nav-bg: var(--color-background); --nav-ink: var(--color-text); }
  .nav:not([data-bg], [data-variant]) {
    color-scheme: inherit;
    --_dark-weight: inherit;
    border-block-end: 1px solid var(--color-border);
  }
  /* Unhurried and centred: a narrow column, the photo in a soft arch below it. */
  .hero:not([data-layout]) { text-align: center; }
  .hero:not([data-layout]) > :is(.eyebrow, .hero__headline, .hero__subheadline, .lede) { margin-inline: auto; }
  .hero:not([data-layout]) .hero__actions { justify-content: center; }
  .hero:not([data-layout]) > .hero__plate {
    inline-size: min(100%, 34rem);
    margin-inline: auto;
    margin-block-end: 0;
  }
  .hero:not([data-layout]) > .hero__plate img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px 1.5rem 1.5rem; }
  .hero:not([data-layout]) > .hero__plate figcaption { margin-inline: 0; text-align: center; }
  :is(.section__head, .features__header, .stats__header, .team__header, .testimonials__header) { text-align: center; }
  :is(.section__head, .features__header, .stats__header, .team__header, .testimonials__header) > * { margin-inline: auto; }
}
