/* The homepage's language on every page: light pages, one type system, one
   signal colour, and a dawn horizon of accounts behind each page title. */
:root {
  --ax-ink: #1b1e26;
  --ax-soft: #4f5562;
  --ax-faint: #5f646d;
  --ax-signal: #3045b5;
  --ax-paper: #f7f6f2;
  --ax-rule: #dcdcd6;
}

/* The horizon: a full-width scene behind the page header. */
.ax-hero-host { position: relative; isolation: isolate; }
.ax-hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(247, 246, 242, 0) 0%, rgba(240, 230, 218, .9) 58%, rgba(247, 246, 242, 0) 100%),
    var(--ax-paper);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 80%, transparent 100%);
}
.ax-hero-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s ease; }
.ax-hero-host.is-live .ax-hero-scene canvas { opacity: 1; }
/* Without WebGL: the same horizon, drawn as quiet lines. */
.ax-hero-host.is-static .ax-hero-scene::before,
.ax-hero-host:not(.is-live) .ax-hero-scene::before {
  content: "";
  position: absolute;
  inset: 52% -20% -20%;
  background-image: radial-gradient(ellipse at center, rgba(48, 69, 181, .16) 0 1.4px, transparent 1.6px);
  background-size: 22px 14px;
  transform: perspective(500px) rotateX(64deg);
  transform-origin: top;
}
/* A paper wash behind the title keeps the type crisp over the horizon. */
.ax-hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 246, 242, .9) 0%, rgba(247, 246, 242, .78) 30%, rgba(247, 246, 242, .3) 48%, rgba(247, 246, 242, 0) 62%),
    radial-gradient(68% 62% at 24% 40%, rgba(247, 246, 242, .6) 0%, rgba(247, 246, 242, 0) 70%);
}
.ax-hero-host.is-slim { height: clamp(150px, 20vw, 250px); margin-bottom: clamp(-40px, -3vw, -20px); }
.ax-hero-host.is-slim .ax-hero-scene { background: linear-gradient(180deg, var(--ax-paper) 0%, #f2ebe1 70%, var(--ax-paper) 100%); }
.ax-hero-host.is-slim .ax-hero-scene::after { background: linear-gradient(180deg, rgba(247, 246, 242, .5), rgba(247, 246, 242, 0) 40%); }

/* Titles rise line by line. */
.ax-hero-host .ax-line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; }
.ax-hero-host .ax-line > span { display: inline-block; transform: translateY(108%); transition: transform 1.15s cubic-bezier(.16, 1, .3, 1); }
.ax-hero-host .ax-line:nth-child(2) > span { transition-delay: .1s; }
.ax-hero-host .ax-line:nth-child(3) > span { transition-delay: .2s; }
.ax-hero-host.is-in .ax-line > span { transform: none; }

/* Panels in front of the horizon read as printed instruments. */
body.editorial-site .ax-hero-host .at-stage {
  padding: 22px 24px 18px;
  border: 1px solid var(--ax-rule);
  border-radius: 4px;
  background: #fbfaf7;
  box-shadow: 0 30px 70px -40px rgba(27, 30, 38, .38);
}
body.editorial-site .ax-hero-host .at-identity { background: rgba(247, 246, 242, .92); }

/* One type system: mono kickers, light tight headlines, the signal accent. */
body.editorial-site :is(.at-kicker, .reform-eyebrow, .editorial-label, .eyebrow, .kicker, .sec-kicker, .reform-article-breadcrumb, .meeting-eyebrow, .pilot-eyebrow, .q-eyebrow, .discovery-kicker, .di-eyebrow) {
  font: 500 11px/1.6 'JetBrains Mono', ui-monospace, Menlo, monospace !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
  color: var(--ax-faint) !important;
}
body.editorial-site .atelier .at-section .at-kicker { font: 500 11px/1.6 'JetBrains Mono', ui-monospace, Menlo, monospace !important; }
body.editorial-site main h1 { font-weight: 400 !important; letter-spacing: -.05em !important; color: var(--ax-ink); }
body.editorial-site main h2 { font-weight: 400; letter-spacing: -.04em; }
body.editorial-site main :is(h1, h2) em { font-style: normal; color: var(--ax-signal) !important; }
body.editorial-site .ax-hero-host .at-intro,
body.editorial-site .ax-hero-host .lede { color: var(--ax-soft); }

/* Buttons and links: ink, turning to signal. */
body.editorial-site :is(.atelier .at-primary, .bench-action, .btn-primary) {
  background: var(--ax-ink) !important;
  border-color: var(--ax-ink) !important;
  border-radius: 3px !important;
  color: #fff !important;
  transition: background-color .2s ease, border-color .2s ease;
}
body.editorial-site :is(.atelier .at-primary, .bench-action, .btn-primary):hover { background: var(--ax-signal) !important; border-color: var(--ax-signal) !important; }
body.editorial-site .atelier .at-link:not(.at-primary):hover { border-color: var(--ax-signal); color: var(--ax-signal); }
body.editorial-site .site-links > a:hover, body.editorial-site .site-links > a[aria-current] { color: var(--ax-signal) !important; }

/* Keyboard focus: one signal ring, unless a component draws its own. */
:where(body.editorial-site) :where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--ax-signal);
  outline-offset: 3px;
}

/* Diagrams that play themselves: their switches leave the page, and labels
   that remain only show which state is on screen. */
.ax-auto-hide { display: none !important; }
.ax-auto-passive, .ax-auto-passive * { pointer-events: none !important; cursor: default !important; }
button.ax-auto-passive[aria-pressed="true"], button.ax-auto-passive[aria-selected="true"] { color: var(--ax-signal) !important; }
.dt-api-tabs.ax-auto-passive button { background: none !important; border-color: transparent !important; }
.dt-api-tabs.ax-auto-passive button[aria-pressed="true"] { box-shadow: inset 0 -1px 0 var(--ax-signal); }
.hh-tablist.ax-auto-passive [role=tab][aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--ax-signal); }

/* Journal articles sit under a slim horizon. */
body.reform-journal .ax-hero-host.is-slim + .shell .article { position: relative; }
body.editorial-site.reform-journal .article h1 { letter-spacing: -.045em !important; }

@media (max-width: 760px) {
  .ax-hero-scene::after { background: linear-gradient(180deg, rgba(247, 246, 242, .93) 0%, rgba(247, 246, 242, .86) 62%, rgba(247, 246, 242, .35) 88%); }
  .ax-hero-host.is-slim { height: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  .ax-hero-host .ax-line > span { transform: none; transition: none; }
  .ax-hero-scene canvas { transition: none; }
}
