@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@500&family=Jost:wght@300;400;500;600&display=swap");

:root {
  --display: Jost, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --brand: "IBM Plex Sans", "Segoe UI", sans-serif;
  --surface: #0c0e14;
  --text: #f3ebe2;
  --soft: #bdbac1;
  --muted: #a5a2ad;
  --line: #2f3039;
  --accent: #f8c9a2;
  --button-text: #241910;
  --highlight: #fbdfc8;
  --panel: #1a1a24;
  --panel-depth: #13151d;
  --good: #add8bc;
  --good-bg: #25362e;
  --glow: #a9593550;
  --wash: #33274238;
  --shadow: #06070b94;
  --depth-line: #f5d8c21c;
  color-scheme: dark;
  scroll-padding-top: 28px;
}

:root[data-theme="light"] {
  --surface: #f6f2ea;
  --text: #252123;
  --soft: #504b50;
  --muted: #655e64;
  --line: #d8d1ca;
  --accent: #8b421f;
  --button-text: #fff9f1;
  --highlight: #99512d;
  --panel: #fffcf7;
  --panel-depth: #f7f0e7;
  --good: #2d6249;
  --good-bg: #e5eee4;
  --glow: #d5965e65;
  --wash: #bc8d9c22;
  --shadow: #6342281b;
  --depth-line: #8a583923;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--display);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(780px, 100vh);
  pointer-events: none;
  background: radial-gradient(ellipse at 80% 29%, var(--wash), transparent 58%);
}

body { isolation: isolate; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.wrap { width: min(1216px, calc(100% - 100px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 2;
  inset: 8px auto auto 8px;
  transform: translateY(-150%);
  padding: 8px 16px;
  background: var(--surface);
}
.skip-link:focus { transform: none; }

.bar {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.brand img { object-fit: contain; }
[data-theme="light"] .brand img { filter: brightness(.2); }
.brand span {
  border-left: 1px solid var(--line);
  padding-left: 11px;
  font: 500 16px/1.2 var(--brand);
  letter-spacing: .19em;
  text-transform: uppercase;
}
.bar nav, .header-actions { display: flex; gap: 26px; align-items: center; }
.bar nav { font-size: 15px; color: var(--soft); }
.bar nav a { white-space: nowrap; }
.bar nav a, .footer a { transition: color .15s ease; }
.bar nav a:hover, .bar nav [aria-current="page"], .footer a:hover { color: var(--accent); }
.diagonal { font: 12px var(--mono); }
.header-actions { justify-content: end; gap: 16px; }

.theme-switch {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
}
.theme-switch:hover { border-color: var(--line); background: var(--panel-depth); }
:is(.playback-icon-button, .memory-motion-toggle, .sm-toggle) {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
:is(.playback-icon-button, .memory-motion-toggle, .sm-toggle)::before {
  content: "";
  box-sizing: border-box;
  grid-area: 1 / 1;
  width: var(--playback-size, 19px);
  aspect-ratio: 1;
  border: 1px solid var(--playback-border, var(--line));
  border-radius: 50%;
  background: var(--playback-background, var(--panel-depth));
}
:is(.playback-icon-button, .memory-motion-toggle, .sm-toggle) svg {
  position: relative;
  grid-area: 1 / 1;
  width: var(--playback-glyph-size, 8px);
  height: var(--playback-glyph-size, 8px);
}
:is(.playback-icon-button, .memory-motion-toggle, .sm-toggle):hover { color: var(--text); }
:is(.playback-icon-button, .memory-motion-toggle, .sm-toggle):hover::before {
  border-color: var(--playback-hover, var(--accent));
}
:is(.playback-icon-button, .memory-motion-toggle, .sm-toggle)[hidden],
.playback-icon-button[data-playing="true"] .play-icon,
.playback-icon-button:not([data-playing="true"]) .pause-icon { display: none; }
.theme-icon { width: 19px; height: 19px; background: center / contain no-repeat; }
[data-theme="dark"] .theme-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f8c9a2' stroke-linecap='round' stroke-width='1.1'%3E%3Ccircle cx='8' cy='8' r='3.2'/%3E%3Cpath d='M8 1v1.2m0 11.6V15M1 8h1.2m11.6 0H15M3 3l1 1m8 8 1 1m0-10-1 1m-8 8-1 1'/%3E%3C/svg%3E");
}
[data-theme="light"] .theme-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238b421f' stroke-width='1.1'%3E%3Cpath d='M7.4 2.2a5.8 5.8 0 1 0 6.4 6.4 4.8 4.8 0 0 1-6.4-6.4Z'/%3E%3C/svg%3E");
}

.button, .text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: fit-content;
  white-space: nowrap;
  font-weight: 500;
}
.button {
  min-height: 49px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--button-text);
  background: var(--accent);
  transition: box-shadow .18s ease;
}
.button:hover { box-shadow: 0 0 24px 1px var(--glow); }
.button-small { min-height: 42px; padding-inline: 13px; font-size: 14px; gap: 8px; }
.text-link { color: var(--accent); padding-block: 6px; }
.text-link:is(:hover, :focus-visible) > .text-link-label { text-decoration: underline; text-underline-offset: 5px; }

.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 400 11px/1.45 var(--mono);
  letter-spacing: .09em;
  color: var(--muted);
  text-transform: uppercase;
}
.home main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(30px, 4vw, 64px);
  padding-block: clamp(40px, 6vh, 72px);
}
h1 { font-size: clamp(48px, 6.1vw, 88px); font-weight: 300; letter-spacing: -.053em; line-height: .99; }
.hero h1 { font-size: clamp(50px, 4.94vw, 72px); line-height: 1.035; text-wrap: balance; }
.intro { color: var(--soft); font-size: clamp(17px, 1.55vw, 21px); line-height: 1.56; }
.hero .intro { max-width: 46ch; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 28px; }
.home .hero { padding-block: clamp(56px, 8vh, 104px); }

.hero-art {
  width: 100%;
  aspect-ratio: 1.12;
  background: url("./hero-persona-transparent.webp") center top / cover no-repeat;
  mask-image: linear-gradient(to bottom, #000 88%, transparent);
}

[data-theme="light"] .hero-art {
  background-image: url("./hero-persona-light.webp");
}

.evidence { padding-block: clamp(56px, 7vw, 96px); border-block: 1px solid var(--line); text-align: center; }
.evidence h2 { font-size: clamp(28px, 3.6vw, 50px); font-weight: 300; line-height: 1.1; letter-spacing: -.036em; text-wrap: balance; }
.evidence-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(26px, 3.4vw, 44px); }
.evidence-item { min-height: 67px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; padding: 0 9px; }
.evidence-item + .evidence-item { border-left: 1px solid var(--line); }
.evidence-item strong { color: var(--accent); font-size: clamp(19px, 2vw, 27px); line-height: 1.18; font-weight: 400; letter-spacing: -.028em; }
.evidence-item > span { color: var(--muted); font: 400 10px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
a.evidence-item:hover strong, a.evidence-item:focus-visible strong { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

.home-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-block: clamp(64px, 8vw, 112px);
  border-bottom: 1px solid var(--line);
}
.home-paths article { container-type: inline-size; padding-right: clamp(16px, 4vw, 55px); }
.home-paths article + article { padding-inline: clamp(16px, 4vw, 55px) 0; border-left: 1px solid var(--line); }
.home-paths h2 { font-size: clamp(21px, min(3.1vw, 7.4cqi), 42px); font-weight: 400; line-height: 1.09; letter-spacing: -.036em; }
.home-paths .text-link { margin-top: 18px; }

.footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 72px; margin-top: auto; color: var(--muted); font-size: 14px; }
.footer div { display: flex; align-items: center; gap: 24px; }

.interior { padding-bottom: 28px; }
.interior + .footer { border-top: 1px solid var(--line); }
.page-hero { padding-block: clamp(52px, 7.5vw, 96px) 45px; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 24ch; font-size: clamp(46px, 5.55vw, 78px); text-wrap: balance; }
.page-deck { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-top: 20px; }
.page-deck .intro { max-width: 59ch; }
.company-uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.use { padding: 25px 24px 28px; }
.use:first-child { padding-left: 0; }
.use:last-child { padding-right: 0; }
.use + .use { border-left: 1px solid var(--line); }
.use svg { width: 28px; height: 28px; stroke: var(--accent); stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; }
.use h2 { margin-top: 13px; font-size: clamp(20px, 2.25vw, 29px); font-weight: 400; letter-spacing: -.025em; }
.use p, .result-row p { margin-top: 6px; color: var(--soft); font-size: 16px; line-height: 1.58; }
.other-uses { display: flex; align-items: baseline; gap: 14px; padding-block: 11px; border-bottom: 1px solid var(--line); color: var(--soft); font-size: 15px; }
.other-uses .kicker { flex: none; }

.pilot-model {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 11px;
  background: radial-gradient(ellipse at 17% 8%, var(--wash), transparent 67%), linear-gradient(153deg, var(--panel), var(--panel-depth));
  box-shadow: inset 0 1px var(--depth-line), 0 9px 22px var(--shadow);
}
.model-inputs, .model-outputs { min-width: 0; padding: clamp(16px, 3vw, 34px); }
.model-inputs { display: grid; align-content: start; gap: 20px; }
.model-outputs { border-left: 1px solid var(--line); }
.model-field { display: grid; gap: 7px; font-size: 15px; color: var(--soft); }
.model-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 17px; }
.pilot-model input[type="number"] {
  width: 100px;
  min-height: 36px;
  padding: 5px 9px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 14px var(--mono);
  text-align: right;
}
.pilot-model input[type="range"] { appearance: none; width: 100%; min-height: 36px; margin: 0; background: transparent; cursor: pointer; }
.pilot-model input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 99px; background: linear-gradient(to right, var(--accent) 0 var(--progress, 0%), var(--line) var(--progress, 0%) 100%); }
.pilot-model input[type="range"]::-moz-range-track { height: 5px; border-radius: 99px; background: var(--line); }
.pilot-model input[type="range"]::-moz-range-progress { height: 5px; border-radius: 99px; background: var(--accent); }
.pilot-model input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--highlight);
  border: 1px solid var(--accent);
  box-shadow: 0 0 5px var(--accent), 0 0 17px 5px var(--glow);
}
.pilot-model input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--highlight); border: 1px solid var(--accent); box-shadow: 0 0 5px var(--accent), 0 0 17px 5px var(--glow); }
.currency-field { display: inline-flex; align-items: center; gap: 6px; }
.model-result { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); color: var(--soft); font-size: 15px; }
.model-result strong, .model-result output { font: 400 15px/1.25 var(--mono); color: var(--text); overflow-wrap: anywhere; text-align: right; }
.model-net { flex-wrap: wrap; border-bottom-style: solid; }
.model-net output { margin-left: auto; color: var(--accent); font: 300 clamp(26px, 3.45vw, 46px)/1.1 var(--display); letter-spacing: -.035em; white-space: nowrap; }
.model-net output.negative { color: #fbaa9c; }
[data-theme="light"] .model-net output.negative { color: #98382b; }
.model-bars { display: grid; grid-template-columns: 74px 1fr; gap: 9px 13px; align-items: center; margin-block: 17px 13px; font: 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; }
.model-bars div { height: 5px; background: var(--line); border-radius: 5px; }
.model-bars i { display: block; height: 100%; border-radius: 5px; background: var(--accent); box-shadow: 0 0 9px var(--accent); }
.model-bars i[data-bar="net"] { background: #91b5e2; box-shadow: none; }
[data-theme="light"] .model-bars i[data-bar="net"] { background: #4d73a2; }
.model-bars i[data-bar="net"].negative { background: #dc8877; }
[data-theme="light"] .model-bars i[data-bar="net"].negative { background: #a55241; }
.model-note { color: var(--muted); font-size: 13px; line-height: 1.5; }

@media (max-width: 960px) {
  .wrap { width: calc(100% - 64px); }
  .bar { gap: 20px; }
  .bar nav { gap: 15px; }
  .hero { gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
  .hero h1 { font-size: clamp(44px, 5.4vw, 52px); }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 44px); }
  .bar { grid-template-columns: 1fr auto; gap: 0 12px; min-height: 0; padding-top: 12px; }
  .bar nav {
    grid-area: 2 / 1 / auto / -1;
    min-width: 0;
    min-height: 50px;
    gap: clamp(8px, 3vw, 22px);
    overflow-x: auto;
  }
  .bar nav a:focus-visible { outline-offset: -2px; }
  .header-actions { gap: 9px; }
  .brand span { font-size: 14px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 44px 34px; }
  .hero h1 { max-width: 16ch; font-size: clamp(42px, 8.55vw, 66px); }
  .hero .intro { margin-top: 18px; }
  .hero-actions { margin-top: 20px; }
  .hero-art { max-width: 540px; }
  .home-paths { grid-template-columns: minmax(0, 1fr); gap: 21px; }
  .home-paths article, .home-paths article + article { padding-inline: 0; }
  .home-paths article + article { padding-top: 21px; border-top: 1px solid var(--line); border-left: 0; }
  .evidence-links { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .evidence-item + .evidence-item { border-left: 0; }
  .page-hero { padding-block: 43px 30px; }
  .page-deck { flex-direction: column; align-items: start; gap: 16px; }
  .company-uses { grid-template-columns: 1fr; }
  .use, .use:first-child, .use:last-child { padding: 19px 0; }
  .use + .use { border-left: 0; border-top: 1px solid var(--line); }
  .use h2 { margin-top: 6px; font-size: 25px; }
  .other-uses { flex-direction: column; gap: 4px; }
  .pilot-model { grid-template-columns: 1fr; }
  .model-outputs { border-left: 0; border-top: 1px solid var(--line); }
  .footer {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding-block: 20px;
    gap: 12px;
  }
  .footer > div { flex-wrap: wrap; gap: 8px 18px; }
  .footer > span, .footer a, .footer button { white-space: nowrap; }
}

@media (max-width: 400px) {
  .wrap { width: calc(100% - 32px); }
  .bar nav { justify-content: space-between; gap: 8px; font-size: clamp(13px, 3.8vw, 14px); }
  .brand { gap: 7px; }
  .brand img { width: 22px; height: 22px; }
  .brand span { padding-left: 7px; letter-spacing: .12em; }
  .pilot-model input[type="number"] { width: 82px; }
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition { pointer-events: none; }
  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 360ms;
    animation-timing-function: ease-in-out;
  }

  @supports not (view-transition-name: root) {
    body { transition: color 360ms ease-in-out, background-color 360ms ease-in-out; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
