/* ===================================================================
   Osiris Inc — design system v2.
   Applied to index.html first; intended to roll out across the site.
   Standalone: this file does NOT depend on Tailwind. Pages using it
   should not also load the Play CDN.

   Tokens carry both themes. Components style through tokens only —
   never inside a media query — so light and dark stay in sync.
   =================================================================== */

:root {
  --paper:      #FBFAF8;
  --surface:    #FFFFFF;
  --surface-2:  #F3F1EC;
  --ink:        #16150F;
  --ink-2:      #43413A;
  --mid:        #6E6B60;
  --rule:       #E4E1D8;
  --accent:     #1F6B45;   /* 6.2:1 on --paper */
  --accent-ink: #1F6B45;
  --coffee:     #8A6A4B;   /* borders, chips, marks */
  /* Coffee TEXT sits on a coffee-tinted ground (8% over --surface-2 = #EBE6DF)
     where #8A6A4B is only 4.0:1. This darker step is 4.8:1 there, 5.7:1 on paper. */
  --coffee-ink: #7B5E44;

  /* The governed-core panel, the CTA and the footer are deliberately the
     same dark material in BOTH themes — a heavier material marking a
     structural region. Fixed, not themed: --ink flips with the theme and
     would invert these to cream, stranding the accent at ~2.4:1 on them. */
  --panel:           #16150F;
  --panel-fg:        #FBFAF8;
  --accent-on-panel: #4FA872;   /* 6.3:1 on --panel */

  --chrome:    rgba(251,250,248,.72);
  --shadow:    0 1px 2px rgba(22,21,15,.05), 0 12px 32px -12px rgba(22,21,15,.16);
  --shadow-lg: 0 2px 4px rgba(22,21,15,.06), 0 28px 60px -20px rgba(22,21,15,.28);

  --step-0: clamp(1rem, .97rem + .16vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.13rem + .35vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.36rem + .7vw, 1.95rem);
  --step-3: clamp(2rem, 1.72rem + 1.4vw, 2.9rem);
  --step-4: clamp(2.6rem, 2rem + 3vw, 4.4rem);

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:#111310; --surface:#191C18; --surface-2:#1F231E; --ink:#EDEBE4;
    --ink-2:#C3C0B6; --mid:#918D82; --rule:#2B2F2A;
    --accent:#4FA872; --accent-ink:#6FBE8C; --coffee:#BE9770; --coffee-ink:#D4AE87;
    --chrome:rgba(17,19,16,.72);
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6);
    --shadow-lg:0 2px 4px rgba(0,0,0,.5), 0 28px 60px -20px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --paper:#111310; --surface:#191C18; --surface-2:#1F231E; --ink:#EDEBE4;
  --ink-2:#C3C0B6; --mid:#918D82; --rule:#2B2F2A;
  --accent:#4FA872; --accent-ink:#6FBE8C; --coffee:#BE9770; --coffee-ink:#D4AE87;
  --chrome:rgba(17,19,16,.72);
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6);
  --shadow-lg:0 2px 4px rgba(0,0,0,.5), 0 28px 60px -20px rgba(0,0,0,.7);
}
:root[data-theme="light"] {
  --paper:#FBFAF8; --surface:#FFFFFF; --surface-2:#F3F1EC; --ink:#16150F;
  --ink-2:#43413A; --mid:#6E6B60; --rule:#E4E1D8;
  --accent:#1F6B45; --accent-ink:#1F6B45; --coffee:#8A6A4B; --coffee-ink:#7B5E44;
  --chrome:rgba(251,250,248,.72);
  --shadow:0 1px 2px rgba(22,21,15,.05), 0 12px 32px -12px rgba(22,21,15,.16);
  --shadow-lg:0 2px 4px rgba(22,21,15,.06), 0 28px 60px -20px rgba(22,21,15,.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--step-0); line-height: 1.6;
  font-synthesis-weight: none; -webkit-font-smoothing: antialiased;
}

/* Tracking tightens as type grows; leading loosens as it shrinks. */
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 640; }
h1 { font-size: var(--step-4); line-height: 1.02; letter-spacing: -.032em; }
h2 { font-size: var(--step-3); line-height: 1.08; letter-spacing: -.024em; }
h3 { font-size: var(--step-1); line-height: 1.22; letter-spacing: -.012em; }
h4 { font-size: var(--step-0); line-height: 1.3;  letter-spacing: -.008em; }
p, ul, ol { margin: 0; }

.wrap { width: min(100% - var(--gutter) * 2, 1180px); margin-inline: auto; }
.label {
  font-family: var(--mono); font-size: .69rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--mid);
}
a { color: inherit; }
:where(a, button, summary, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}
:target { scroll-margin-top: 5rem; }

.skip-link {
  position: absolute; left: .75rem; top: .75rem; z-index: 100;
  transform: translateY(-160%); background: var(--panel); color: var(--panel-fg);
  padding: .7rem 1.1rem; border-radius: 10px; text-decoration: none;
  font-size: .9rem; font-weight: 600; transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- translucent chrome: content scrolls under ---------- */
.chrome {
  position: sticky; top: 0; z-index: 60; background: var(--chrome);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}
.chrome-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 58px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 620; letter-spacing: -.02em; text-decoration: none; }
/* The wordmark is "Osiris" + "Inc", the "Inc" carried in the accent — that is
   the brand's own lockup (see assets/logo-lockup.svg and og-image.jpg). The
   v2 rebuild dropped "Inc" entirely. */
.brand .brand-word { color: var(--ink); }
.brand .brand-inc { color: var(--accent-ink); }
/* The mark is a two-tone "horizon": a teal dome over a dark arc. On a dark
   ground that arc (#141210) vanishes into the page and the mark reads as a
   plain half-circle. assets/logo-reversed.svg is the brand's own dark-ground
   variant — swap the whole asset rather than recolouring their mark. */
.brand .mark { display: block; width: 24px; height: 24px; }
/* NOTE: every variant rule below must carry img in the selector. A bare
   `.brand .mark-d` (0,2,0) loses to `.brand .mark img` (0,2,1) and both
   variants render stacked. */
.brand .mark img { width: 24px; height: 24px; display: block; }
.brand .mark img.mark-d { display: none; }
@media (prefers-color-scheme: dark) {
  .brand .mark img.mark-l { display: none; }
  .brand .mark img.mark-d { display: block; }
}
:root[data-theme="dark"] .brand .mark img.mark-l { display: none; }
:root[data-theme="dark"] .brand .mark img.mark-d { display: block; }
:root[data-theme="light"] .brand .mark img.mark-l { display: block; }
:root[data-theme="light"] .brand .mark img.mark-d { display: none; }
.chrome nav { display: flex; gap: .2rem; align-items: center; }
.chrome nav a {
  font-size: .87rem; text-decoration: none; color: var(--ink-2);
  padding: .45rem .6rem; border-radius: 7px;
}
.chrome nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.chrome nav a[aria-current="page"] { color: var(--ink); font-weight: 560; }
/* Must out-specify `.chrome nav a` (0,2,1) — as plain `.chrome-cta` (0,1,0) it
   lost the cascade and inherited body text colour (1.58:1 on the green) on any
   page where no theme had been stored yet, i.e. every first visit. */
.chrome nav a.chrome-cta {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 1rem;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: .87rem; font-weight: 560; text-decoration: none;
}
.chrome nav a.chrome-cta:hover { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) {
  .chrome nav a.chrome-cta, .chrome nav a.chrome-cta:hover { color: #08150E; }
}
:root[data-theme="dark"] .chrome nav a.chrome-cta,
:root[data-theme="dark"] .chrome nav a.chrome-cta:hover { color: #08150E; }
:root[data-theme="light"] .chrome nav a.chrome-cta,
:root[data-theme="light"] .chrome nav a.chrome-cta:hover { color: #fff; }

.menu-btn {
  display: none; min-width: 44px; min-height: 44px; align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: 10px; background: transparent;
  color: var(--ink); cursor: pointer;
}
@media (max-width: 860px) {
  .chrome nav { display: none; }
  .menu-btn { display: inline-flex; }
  .chrome nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: .5rem var(--gutter) 1rem; gap: .1rem;
  }
  .chrome nav.open a { min-height: 44px; display: flex; align-items: center; }
  .chrome nav.open .chrome-cta { justify-content: center; margin-top: .5rem; }
}

/* ---------- sections ---------- */
.sec { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.sec--inset { background: var(--surface-2); }
.sec-head { display: flex; flex-direction: column; gap: .8rem; max-width: 54ch; }
.sec-head p { color: var(--ink-2); }

.hero { padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero h1 { margin-top: 1.1rem; }
.lede {
  margin-top: 1.4rem; font-size: var(--step-1); line-height: 1.45;
  letter-spacing: -.008em; color: var(--ink-2); max-width: 54ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 46px;
  padding: 0 1.4rem; border-radius: 999px; border: 0; background: var(--accent);
  color: #fff; font: inherit; font-weight: 560; text-decoration: none; cursor: pointer;
  transition: transform 100ms ease-out;
}
:root[data-theme="dark"] .btn { color: #08150E; }
@media (prefers-color-scheme: dark) { .btn { color: #08150E; } }
:root[data-theme="light"] .btn { color: #fff; }
.btn:active { transform: scale(.975); }
/* The old .btn--ghost is gone. Its 1px --rule border was 1.25:1 against the
   page in light and 1.37:1 in dark, where a UI boundary needs 3:1 — it read as
   floating text beside a solid pill. A secondary action is now a text link,
   which needs no boundary to be legible, and the primary is the conversion.
   Keeps a 46px target height so it stays a comfortable tap. */
.btn-link {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 46px; padding: 0 .25rem;
  font-weight: 560; color: var(--accent-ink); text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color .15s ease;
}
.btn-link:hover { border-bottom-color: var(--accent-ink); }
.btn--on-panel { background: var(--accent-on-panel); color: #08150E; }

/* ---------- provenance claim (the thesis device) ---------- */
.claim {
  margin-top: clamp(2.5rem, 5vw, 3.5rem); padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 18px; box-shadow: var(--shadow); max-width: 64ch;
}
.claim-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.claim-body { margin-top: .8rem; font-size: var(--step-1); line-height: 1.5; letter-spacing: -.01em; }
.cite {
  font: inherit; font-size: .72em; font-family: var(--mono); vertical-align: .35em;
  margin-left: .12em; padding: .12em .42em; border-radius: 5px; cursor: pointer; line-height: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 11%, transparent); color: var(--accent-ink);
}
.cite:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.cite[aria-expanded="true"] { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.prov { margin-top: 1.1rem; overflow: hidden; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface-2); }
.prov-in { padding: .9rem 1.05rem; display: grid; gap: .5rem; }
.prov-row { display: flex; gap: .8rem; align-items: baseline; font-family: var(--mono); font-size: .76rem; }
.prov-k { color: var(--mid); min-width: 9ch; flex: none; }
.prov-v { color: var(--ink-2); }
.prov-v b { color: var(--ink); font-weight: 600; }
.hint { margin-top: .9rem; font-size: .82rem; color: var(--mid); }

.scenario-tag {
  display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--coffee) 40%, transparent);
  background: color-mix(in srgb, var(--coffee) 10%, transparent); color: var(--coffee-ink);
  font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; text-decoration: none;
}
a.scenario-tag:hover { background: color-mix(in srgb, var(--coffee) 18%, transparent); }

/* ---------- capability list ---------- */
.caps { margin-top: clamp(1.8rem, 4vw, 2.8rem); border-top: 1px solid var(--rule); }
.cap {
  display: grid; grid-template-columns: 3.2ch 1fr auto; gap: 1rem; align-items: baseline;
  padding: 1.05rem .5rem 1.05rem 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; transition: background 140ms ease, padding-left 140ms ease;
}
.cap:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); padding-left: .55rem; }
.cap-n { font-family: var(--mono); font-size: .76rem; color: var(--mid); }
.cap-t { font-weight: 560; letter-spacing: -.012em; }
.cap-d { display: block; margin-top: .25rem; font-size: .89rem; color: var(--mid); font-weight: 400; letter-spacing: 0; }
.cap-go { font-family: var(--mono); font-size: .78rem; color: var(--accent-ink); opacity: 0; transition: opacity 140ms ease; }
.cap:hover .cap-go, .cap:focus-visible .cap-go { opacity: 1; }
@media (max-width: 620px) { .cap { grid-template-columns: 3ch 1fr; } .cap-go { display: none; } }

/* ---------- governed core ---------- */
.core { margin-top: clamp(1.8rem, 4vw, 2.6rem); display: grid; gap: 1rem; grid-template-columns: 1fr minmax(0,1.15fr) 1fr; align-items: stretch; }
@media (max-width: 880px) { .core { grid-template-columns: 1fr; } }
.core-col { display: flex; flex-direction: column; gap: .5rem; }
.pill { padding: .6rem .8rem; border-radius: 9px; font-size: .85rem; background: var(--surface); border: 1px solid var(--rule); color: var(--ink-2); }
.pill--out { border-color: color-mix(in srgb, var(--accent) 38%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.core-mid {
  padding: 1.4rem; border-radius: 16px; background: var(--panel); color: var(--panel-fg);
  border: 1px solid rgba(255,255,255,.09); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: .75rem;
}
.core-mid h3 { color: var(--panel-fg); }
.core-mid .label { color: color-mix(in srgb, var(--panel-fg) 62%, transparent); }
.core-mid ul { padding: 0; list-style: none; display: grid; gap: .45rem; font-size: .87rem; }
.core-mid li { display: flex; gap: .55rem; color: color-mix(in srgb, var(--panel-fg) 84%, transparent); }
.core-mid li::before { content: "✓"; color: var(--accent-on-panel); font-weight: 700; }

/* ---------- figures ---------- */
.figs { margin-top: 2rem; display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.fig-v { font-size: var(--step-2); font-weight: 660; letter-spacing: -.028em; line-height: 1; font-variant-numeric: tabular-nums; }
.fig-l { margin-top: .5rem; font-size: .87rem; color: var(--mid); }

/* ---------- study cards ---------- */
.studies { margin-top: 2rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.study {
  display: flex; flex-direction: column; gap: .55rem; padding: 1.2rem;
  border-radius: 14px; border: 1px solid var(--rule); background: var(--surface);
  text-decoration: none; transition: transform 140ms ease, box-shadow 140ms ease;
}
.study:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.study h3 { font-size: 1.02rem; }
.study p { font-size: .89rem; color: var(--mid); }
.study .go { margin-top: auto; font-family: var(--mono); font-size: .76rem; color: var(--accent-ink); }

/* ---------- CTA + footer ---------- */
/* The button used to be a bare sibling of the copy with margin-top: 0, so it
   sat flush against the paragraph — zero gap — at the bottom-left of a very
   wide panel. Now the panel is a two-column band: copy left, action right and
   vertically centred, which both separates them and gives the button the
   presence the widest element on the page should have. */
.cta {
  margin-top: clamp(2rem, 5vw, 3rem); padding: clamp(1.8rem, 5vw, 3rem); border-radius: 20px;
  background: var(--panel); color: var(--panel-fg); border: 1px solid rgba(255,255,255,.09);
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.75rem, 4vw, 3.5rem); align-items: center;
}
.cta h2 { color: var(--panel-fg); }
.cta p { margin-top: .9rem; color: color-mix(in srgb, var(--panel-fg) 76%, transparent); max-width: 46ch; }
.cta .btn { flex: none; }
@media (max-width: 760px) {
  .cta { grid-template-columns: 1fr; gap: 1.75rem; }
  .cta .btn { justify-self: start; }
}

.site-foot { margin-top: clamp(3rem,7vw,5rem); border-top: 1px solid var(--rule); padding: 3rem 0 3.5rem; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.foot-grid h4 { font-family: var(--mono); font-size: .69rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--mid); }
.foot-grid ul { list-style: none; padding: 0; margin-top: .9rem; display: grid; gap: .5rem; font-size: .9rem; }
.foot-grid a { color: var(--ink-2); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); }
.foot-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .84rem; color: var(--mid); }

@media (prefers-reduced-transparency: reduce) {
  .chrome { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .chrome { background: var(--paper); backdrop-filter: none; }
  .pill, .study, .claim, .prov { border-color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cap, .cite, .cap-go, .study, .skip-link { transition-duration: 1ms; }
  .btn:active { transform: none; }
}

/* ===================================================================
   Forms (contact)
   =================================================================== */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--rule); border-radius: 10px;
  padding: .75rem 1rem;            /* ~46px tall — clears the 44px target */
  font: inherit; font-size: 1rem;  /* 16px stops iOS zooming on focus */
  color: var(--ink); background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--ink) 40%, transparent); }
.field input:hover, .field textarea:hover { border-color: var(--mid); }
.field input:focus, .field textarea:focus {
  outline: none;                   /* replaced by the ring below, never removed outright */
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
/* :user-invalid, not :invalid — an untouched required field is not an error yet. */
.field input:user-invalid, .field textarea:user-invalid {
  border-color: #B42318; box-shadow: 0 0 0 3px rgba(180,35,24,.15);
}
.field-error { display: none; font-size: .8rem; font-weight: 500; color: #B42318; }
.field input:user-invalid ~ .field-error,
.field textarea:user-invalid ~ .field-error { display: block; }
/* After a submit attempt, flag required fields the user never touched too. */
.was-submitted .field input:invalid, .was-submitted .field textarea:invalid {
  border-color: #B42318; box-shadow: 0 0 0 3px rgba(180,35,24,.15);
}
.was-submitted .field input:invalid ~ .field-error,
.was-submitted .field textarea:invalid ~ .field-error { display: block; }
.field-hint { font-size: .8rem; color: var(--mid); }

.btn:disabled { opacity: .65; cursor: not-allowed; }
.btn-spinner {
  height: 1rem; width: 1rem; flex: none; border-radius: 999px;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor; animation: osp .7s linear infinite;
}
@keyframes osp { to { transform: rotate(360deg); } }
.form-status { font-size: .9rem; font-weight: 500; }
.form-status[data-state="ok"]  { color: var(--accent-ink); }
.form-status[data-state="err"] { color: #B42318; }
@media (prefers-color-scheme: dark) { .form-status[data-state="err"] { color: #F0857D; } }
:root[data-theme="dark"] .form-status[data-state="err"] { color: #F0857D; }
:root[data-theme="light"] .form-status[data-state="err"] { color: #B42318; }
@media (prefers-reduced-motion: reduce) { .btn-spinner { animation-duration: 2s; } }

/* Contact two-column collapses; the form grid collapses earlier than the page. */
.contact-grid { display: grid; gap: 3rem; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { #contactForm { grid-template-columns: 1fr !important; } }

/* ===================================================================
   Scroll motion
   One system, deliberately restrained: content rises into place as it
   enters, the chrome responds to being scrolled under, and chart bars
   grow from their baseline so the "what changed" reads as a change.
   Only transform and opacity animate — both compositor-friendly.
   =================================================================== */

/* The hidden state is applied by SELECTOR here, not by a class added in JS.
   If JS added it, the browser could paint the content first and then hide it —
   a visible flicker. Gated on html.js (set inline in <head>), so with JS off
   nothing is ever hidden. This list must stay in sync with GROUPS in
   js/osiris.js, which adds .in to the same elements. */
.js :is(
  .hero > .wrap > *,
  .sec-head,
  .caps .cap,
  .core > *,
  .studies > *,
  .figs > *,
  .cta,
  figure,
  .site-foot .foot-grid > *
) {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s cubic-bezier(.2,.8,.2,1),
              transform .55s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(var(--i, 0) * 55ms);
  will-change: opacity, transform;
}
.js .reveal.in { opacity: 1; transform: none; }
/* Drop the hint once it has played so nothing holds a compositor layer. */
.js .reveal.done { will-change: auto; transition: none; }

/* Chrome gains weight once content is behind it rather than sitting on a
   permanent border — the material responds to what is under it. */
.chrome { transition: box-shadow .25s ease, border-color .25s ease; }
.chrome.scrolled {
  box-shadow: 0 1px 0 color-mix(in srgb, var(--rule) 60%, transparent),
              0 8px 28px -18px rgba(0,0,0,.45);
}

/* Chart bars grow from their own baseline when the figure enters view. */
.gbar-v, .gbar-h { transform-box: fill-box; }
.gbar-v { transform-origin: bottom; }
.gbar-h { transform-origin: left; }
.js .reveal .gbar-v { transform: scaleY(.02); }
.js .reveal .gbar-h { transform: scaleX(.02); }
.js .reveal .gbar-v, .js .reveal .gbar-h {
  transition: transform .65s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(var(--b, 0) * 70ms + 120ms);
}
.js .reveal.in .gbar-v, .js .reveal.in .gbar-h { transform: none; }

@media (prefers-reduced-motion: reduce) {
  /* Not "no feedback" — a short cross-fade with no vestibular movement. */
  .js :is(.hero > .wrap > *, .sec-head, .caps .cap, .core > *, .studies > *,
          .figs > *, .cta, figure, .site-foot .foot-grid > *) {
    transform: none; transition: opacity .2s ease; transition-delay: 0ms;
  }
  .js .reveal.in { transform: none; }
  .js .reveal .gbar-v, .js .reveal .gbar-h { transform: none; transition: none; }
  .chrome { transition: none; }
}
