/* Typography and shared document styles */

/* Match the reader's starting pose before its deferred module executes. */
@media (prefers-reduced-motion: no-preference) {
  .has-script .hero-reader:not([data-reader-ready]) .symbol-motion { transform: translate(437px, 2px); }
  .has-script .hero-reader:not([data-reader-ready]) .lettering-motion { visibility: hidden; }
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/IBM-Plex-Sans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/IBM-Plex-Sans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/IBM-Plex-Sans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* The reader alone uses continuous weights for small emphasis adjustments. */
@font-face {
  font-family: "IBM Plex Sans Reader";
  src: url("assets/IBM-Plex-Sans-Reader-Variable.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "IBM Plex Sans",sans-serif;
  font-synthesis: none;
  font-size: 17px;
  line-height: 1.6;
  color: #f0f2e9;
  background: #0c0d0f;
  --muted: #b1b9b2;
  --green: #91c3a6;
  --gutter: clamp(22px,5vw,80px);
  --section-heading-size: clamp(32px,3.5vw,56px);
  --section-heading-weight: 600;
  --section-heading-leading: 1.08;
  --section-heading-tracking: -.045em;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: .25em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #c7f464;
}

button,
a,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #91c3a6;
  outline-offset: 6px;
}

img {
  max-width: 100%;
  height: auto;
}

h2 {
  font-size: clamp(38px,4.8vw,64px);
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 400;
  text-wrap: balance;
}

h3 {
  font-size: 23px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.025em;
}

h4 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
}

p {
  max-width: 59ch;
}

section {
  scroll-margin-top: 72px;
}

.wrap {
  width: min(100% - var(--gutter)*2,1120px);
  margin-inline: auto;
}

.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
}

.text-link {
  display: inline-block;
  margin-top: 22px;
  font-size: 15px;
}

.small,
figcaption {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

figcaption {
  margin-top: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none!important;
}

.skip-link {
  position: fixed;
  z-index: 30;
  top: -100px;
  left: 20px;
  background: #fffde1;
  color: #0d1b0f;
  padding: 12px 18px;
  border-radius: 5px;
}

.skip-link:focus {
  top: 20px;
}

/* Navigation scrolls with the landing section; the enhanced brand floats independently. */
.site-header {
  position: absolute;
  top: 20px;
  inset-inline: var(--gutter);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 24px;
  border-bottom: 1px solid rgb(204 220 211 / 16%);
}

.site-brand,
.site-brand-slot {
  --brand-art-width: 184px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--brand-art-width);
  height: calc(var(--brand-art-width) * 320 / 1230);
  min-height: 44px;
  /* Match the native wordmark's side bearings in the header. */
  margin-left: -12px;
}

.site-brand,
.site-brand:hover {
  color: #fff;
  text-decoration: none;
}

.site-brand-art {
  position: relative;
  display: block;
  flex: none;
  width: var(--brand-art-width);
  height: auto;
  pointer-events: none;
}

.site-brand.is-floating {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 25;
  margin: 0;
  border-radius: 999px;
}

.site-brand.is-floating .site-brand-art {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 75%));
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: clamp(24px,3.6vw,52px);
}

.site-navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 6px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  color: #bdc6c1;
  text-decoration: none;
}

.site-navigation img {
  width: 14px;
  height: 14px;
  filter: invert(1);
  opacity: .7;
}

.site-navigation a:hover,
.site-navigation a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.site-navigation .site-docs {
  min-height: 36px;
  padding: 0 12px;
  gap: 5px;
  font-size: 13px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
}

.site-navigation .site-docs:hover,
.site-navigation .site-docs:focus-visible {
  background: #fff;
  border-color: #fff;
  color: #000;
  text-decoration: none;
}

.site-navigation .site-docs img {
  width: 12px;
  height: 12px;
  filter: none;
  opacity: 1;
}

#faq {
  scroll-margin-top: 72px;
}

@media (max-width:720px) {
  .site-header { top: 12px; min-height: 56px; gap: 16px; }
  .site-brand, .site-brand-slot { --brand-art-width: 160px; margin-left: -10px; }
  .site-navigation { gap: 20px; }
}

@media (max-width:640px) {
  .site-header { flex-wrap: wrap; gap: 0; padding-bottom: 8px; }
  .site-navigation { flex-basis: 100%; justify-content: space-between; gap: 12px; }
  .site-navigation a { font-size: 13px; }
}

/* Landing page and approved word-reader artwork */

.arrival {
  position: relative;
  isolation: isolate;
  min-height: max(560px,100svh);
  --hero-width: min(82vw,760px);
  --hero-height: clamp(100px,21.333vw,198px);
  overflow: hidden;
  background: #000;
}

.atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #080f0d url("assets/p-shader-poster.jpg") center/cover;
  opacity: var(--hero-atmosphere-opacity, 1);
  pointer-events: none;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Balance the perimeter around a clear centre, then meet the black canvas.
     Both blends also cover the static poster without dimming foreground copy. */
  background:
    radial-gradient(ellipse 70% 70% at 50% 48%, transparent 35%, rgb(0 0 0 / 12%) 52%, rgb(0 0 0 / 45%) 73%, rgb(0 0 0 / 80%) 100%),
    linear-gradient(to bottom, transparent 40%, rgb(0 0 0 / 12%) 60%, rgb(0 0 0 / 65%) 82%, #000 100%),
    rgb(0 0 0 / 46%);
  pointer-events: none;
}

.atmosphere canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* The cover-sized poster and resolution-normalized shader have different
   scales. Animated startup reveals only the correctly sized first GPU frame;
   keep the poster for no-script and failed-WebGL rendering. */
.has-script .atmosphere:not(.shader-failed) { background-image: none; }
.has-script .atmosphere canvas { opacity: 0; transition: opacity .18s ease-out; }
.has-script .atmosphere canvas[data-shader-ready] { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .has-script .atmosphere canvas { transition: none; }
}

@media (max-aspect-ratio: 1/1) {
  .atmosphere {
    background-image: url("assets/p-shader-poster-portrait.jpg");
  }
}

.shader-failed canvas {
  display: none;
}

.arrival-identity {
  width: 100%;
  max-width: 1400px;
  height: var(--hero-height);
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%,-50%);
  user-select: none;
  -webkit-user-select: none;
}

/* Keep the shadow outside the isolated morph layer so its threshold cannot harden it. */
.hero-reader {
  position: relative;
  width: 100%;
  height: 100%;
  color: #fff;
  font-family: "IBM Plex Sans",sans-serif;
  font-size: clamp(28px,6.5vw,84px);
  font-weight: 700;
  filter: drop-shadow(0 8px 20px #00000066);
  pointer-events: none;
}

.hero-reader .effect-stack {
  position: absolute;
  inset: 0;
  display: block;
  isolation: isolate;
}

.hero-reader .token {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  line-height: 1.2;
  white-space: nowrap;
}

/* The morph's em-based blur uses this scale even though the artwork is SVG. */
.hero-reader .token.brand {
  font-size: 1.45em;
}

.hero-reader .brand-art {
  display: block;
  width: var(--hero-width);
  height: auto;
  user-select: none;
  pointer-events: none;
}

.hero-reader .outgoing {
  opacity: 0;
}

/* Tiny emphasis changes preserve the focus glyph's size and fixed anchor. */
.hero-reader .focus-letter {
  -webkit-text-stroke: .002em currentColor;
}

.hero-reader .before,
.hero-reader .after {
  font-family: "IBM Plex Sans Reader","IBM Plex Sans",sans-serif;
  font-weight: 570;
  opacity: .86;
}

.hero-reader .before {
  position: absolute;
  right: 100%;
}

.hero-reader .after {
  position: absolute;
  left: 100%;
}

.filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.arrival-links {
  position: absolute;
  top: calc(48% + var(--hero-height)*.5 + 42px);
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-width: calc(100% - 32px);
  text-align: center;
}

.arrival-actions {
  display: flex;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 19px;
  border: 1px solid #10281526;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s;
}

.button img {
  flex: none;
}

.primary {
  background: #fffde1;
  color: #102815;
}

.primary:hover {
  background: #eef7cd;
  color: #102815;
}

/* Original CSS recreation of the selected Flow Hover visual reference.
   Difference blending keeps the white icon/text legible as the white fill passes. */
.arrival-actions .download-action {
  position: relative;
  isolation: isolate;
  width: 160px;
  max-width: 100%;
  height: 54px;
  min-height: 54px;
  padding: 12px 20px;
  overflow: hidden;
  border-color: #eef1f7;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.download-action::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  background: #fff;
  transform: translate(150%,150%) scale(2.5);
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}

.download-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  mix-blend-mode: difference;
}

.download-icon {
  display: block;
  width: 20px;
  height: 20px;
  filter: invert(1);
}

.arrival-actions .download-action:is(:hover,:focus-visible) {
  transform: scale(1.05);
}

.download-action:is(:hover,:focus-visible)::before {
  transform: translate(0,0) scale(2.5);
}

.arrival-actions .download-action:active {
  transform: scale(.95);
}

.arrival-actions .button:focus-visible {
  outline-color: #c7d2eb;
}

/* Quiet directional controls shared by the landing page and walkthrough. */
.section-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: #bdc6c1;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}
.section-jump:is(:hover,:focus-visible) {
  color: #f0f2e9;
}
.section-jump:focus-visible { outline: 2px solid #91c3a6; outline-offset: 5px; }
.section-jump__icon { flex: none; color: #91c3a6; transition: transform .18s ease; }
.section-jump:is(:hover,:focus-visible) .section-jump__icon { transform: translateY(2px); }
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
}

/* Explicit shortcuts crossfade past the long pinned timeline. */
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 240ms;
  animation-timing-function: ease-out;
}

/* Footer and credits */

.site-footer {
  background: #030405;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-inline: var(--gutter);
  padding-block: 20px 24px;
  border-top: 1px solid rgb(204 220 211 / 16%);
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  color: #f0f2e9;
}

.site-footer__brand img {
  display: block;
  width: 140px;
  height: auto;
  filter: brightness(0) invert(1);
}

.site-footer__brand-name {
  display: none;
  font-size: 24px;
  font-weight: 600;
}

.site-footer__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 28px;
  font-size: 13px;
  color: #aebdb2;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
}

.site-footer__links a:is(:hover, :focus-visible) {
  color: #f0f2e9;
  text-decoration: underline;
}

@media (max-width:600px) {
  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-footer__links {
    width: 100%;
    justify-content: space-between;
    column-gap: 16px;
  }
}

.credits-page {
  padding-block: 70px;
  max-width: 820px;
}

.credits-page h1 {
  font-size: 52px;
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin: 45px 0 35px;
}

.credits-page h2 {
  font-size: 26px;
  margin: 35px 0 16px;
}

.credits-page p {
  margin-top: 16px;
  color: var(--muted);
}

.credits-page li {
  margin: 12px 0;
}

.credits-page a {
  overflow-wrap: anywhere;
}

@media (max-width:650px) {
  :root {
    font-size: 16px;
    --gutter: 24px;
  }

.lead {
    font-size: 18px;
  }

  h2 {
    font-size: 40px;
  }

  .arrival-links {
    top: calc(48% + var(--hero-height)*.5 + 32px);
  }

  .button {
    font-size: 13px;
    padding-inline: 14px;
  }

  .credits-page h1 {
    font-size: 42px;
  }

}

@media (max-width:360px) {
  :root {
    --gutter: 20px;
  }

  .button {
    font-size: 12px;
    padding-inline: 11px;
    gap: 7px;
  }

  h2 {
    font-size: 35px;
  }

}

@media (max-height:650px) {
  .arrival {
    min-height: max(440px,100svh);
    --hero-width: min(82vw,500px);
    --hero-height: 130px;
  }

  .arrival-links {
    top: calc(48% + var(--hero-height)*.5 + 24px);
  }

  .scroll-hint {
    bottom: 4px;
  }
}

@media (max-height:500px) {
  .arrival-links {
    top: calc(48% + var(--hero-height)*.5 + 20px);
  }

}

@media (max-width:420px) {
  .hero-reader {
    font-size: 6.5vw;
  }
}

@media (prefers-reduced-motion:reduce) {
  .arrival-actions .download-action:is(:hover,:focus-visible,:active) {
    transform: none;
  }

  *,*:before,*:after {
    scroll-behavior: auto!important;
    animation: none!important;
    transition: none!important;
  }

}

@media (forced-colors:active) {
  .download-action::before,
  .download-action .download-icon {
    display: none;
  }

  .download-action .download-content {
    color: ButtonText;
    mix-blend-mode: normal;
  }

  .arrival-actions .download-action:is(:hover,:focus-visible,:active) {
    transform: none;
  }

  .site-navigation .site-docs,
  .site-navigation .site-docs:hover,
  .site-navigation .site-docs:focus-visible {
    background: ButtonFace;
    color: ButtonText;
    border-color: ButtonText;
  }

  .site-header,
  .site-footer__inner {
    border-color: CanvasText;
  }

  .site-footer {
    background: Canvas;
  }

  .site-footer__brand img {
    display: none;
  }

  .site-footer__brand-name {
    display: inline;
  }

  .site-footer__brand,
  .site-footer__links a,
  .site-footer__links a:is(:hover, :focus-visible) {
    color: LinkText;
  }

  .site-brand,
  .site-brand:hover {
    color: ButtonText;
  }

  .site-brand.is-floating .site-brand-art {
    filter: none;
  }

  .site-navigation img {
    display: none;
  }

  .site-navigation a {
    color: LinkText;
  }

  .hero-reader .focus-letter {
    -webkit-text-stroke: 0;
  }

  .hero-reader .before,
  .hero-reader .after {
    opacity: 1;
  }

  .atmosphere {
    display: none;
  }

  .arrival {
    background: Canvas;
    color: CanvasText;
  }

  .button,
  .arrival-actions .button,
  .arrival-actions .button:hover,
  .arrival-actions .download-action:focus-visible {
    background: ButtonFace;
    color: ButtonText;
    border-color: ButtonText;
  }

  .hero-reader {
    filter: none;
    color: CanvasText;
  }

  .hero-reader .logo-shine {
    display: none;
  }

  .section-jump,
  .section-jump:is(:hover,:focus-visible) {
    background: transparent;
    color: CanvasText;
  }
  .section-jump__icon { color: LinkText; }

  .arrival-actions .button:focus-visible,
  .section-jump:focus-visible {
    outline-color: Highlight;
  }
}
