/* "studio": a quiet portfolio child theme on the Fluid base v2, for
   architects and designers. One grotesk at its regular weight, a little
   narrow in the display; small, muted labels; a graphite action colour; the
   column set off-centre on a wide start rail, with room around everything.
   The work carries the page. Fonts: themes/fonts/studio.css. Link after the
   base: fluid.min.css, then this file. */
@layer reset, tokens, base, layouts, components, themes, utilities;

@layer themes {
  :root {
    --font-heading: "Instrument Sans Variable", "Helvetica Neue", "Segoe UI Variable Display", "Segoe UI", Roboto, Arial, sans-serif;
    --font-body: var(--font-heading);
    --accent: oklch(33% 0.012 95);          /* graphite with a breath of olive; white on it ≈ 12:1 */
    --neutral-tint: oklch(50% 0.006 90);    /* drafting paper */
    --text-max: 1.1875;                     /* 19px at 1440: a smaller voice */
    --type-ratio: 1.3;
    --weight-display: 400;
    --weight-heading: 500;
    --display-max: 7rem;
    --measure: 56ch;
    --container-content: 96rem;
    --rail: 16rem;                          /* the column sits off-centre; labels hang in the rail */
    --space-section: clamp(5rem, 2.8rem + 9.778vi, 12rem);     /* 80 → 192 */
    --space-gutter: clamp(2.5rem, 0.667rem + 8.148vi, 8rem);   /* both sides: 20 → 64px a side */
    --toc-marker: decimal-leading-zero;
    --toc-font: var(--font-body);
    --toc-dock-font: var(--font-body);
    --nav-tracking: 0.02em;
    --section-rule: 1px;                    /* a hairline over each section head */
  }

  .display, .hero__headline, h1 {
    line-height: 1;
    letter-spacing: -0.035em;
    font-variation-settings: "wdth" 88;
  }
  h2 { letter-spacing: -0.02em; }
  :is(h1, h2, h3, .display) em { font-style: normal; color: var(--color-text-muted); }   /* emphasis as a quieter grey */

  /* Small, muted labels: nothing on the page competes with the images. */
  :is(.eyebrow, h5, h6, thead th, .plate, cite, legend, dt, .toc__label, .stat__label) {
    color: var(--color-text-muted);
    font-weight: calc(500 + var(--_dark-weight));
    letter-spacing: 0.04em;
    text-transform: none;
  }
  .lede { font-family: var(--font-body); font-weight: calc(400 + var(--_dark-weight)); color: var(--color-text-muted); }
  .nav__brand { font-weight: calc(500 + var(--_dark-weight)); letter-spacing: -0.01em; }

  blockquote {
    font: calc(400 + var(--_dark-weight)) var(--step-2) / 1.3 var(--font-heading);
    letter-spacing: -0.015em;
    border: 0;
    padding: 0;
  }
  .stat__value { font-weight: calc(400 + var(--_dark-weight)); letter-spacing: -0.03em; }

  /* In dark mode the base lifts a dark accent to a mid grey, which reads as
     disabled: the primary action turns to paper with ink on it instead. */
  :root {
    --accent-fill: light-dark(var(--accent), oklch(from var(--neutral-tint) 0.93 c h));
    --on-accent-fill: light-dark(var(--on-accent), oklch(from var(--neutral-tint) 0.17 c h));
  }

  /* ---------- 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);
  }
  /* The work first: the photo full bleed at the top, the words small under it. */
  .hero:not([data-layout]):has(> .hero__plate) { display: flex; flex-direction: column; align-items: flex-start; }
  .hero:not([data-layout]) > .hero__plate {
    order: -1;
    align-self: stretch;
    margin-block: calc(-1 * min(var(--space-xl), var(--space-section))) var(--space-l);
  }
  .hero:not([data-layout]):has(> .hero__plate) .hero__headline { font-size: clamp(2.25rem, 1.5rem + 3vi, 4.5rem); }
}
