/* Brand tokens, dark first; the light theme swaps ink and paper. */
:root {
  color-scheme: dark;
  --bg: #0A0A0A;
  --surface: #171717;
  --fill: #262626;
  --fg: #FFFFFF;
  --fg2: #A3A3A3;
  --fg3: #8F8F8F;
  --line: #262626;
  --line2: #3D3D3D;
  --guide: #3D3D3D;
  --guide2: #6B6B6B;
  --grid: rgba(255, 255, 255, 0.028);
  --grid2: rgba(255, 255, 255, 0.055);
  --glow: rgba(255, 255, 255, 0.075);
  --ghost: #141414;
  --wm-a: 0.045;
  --t1: #262626;
  --t2: #333333;
  --t3: #474747;
  --t4: #5C5C5C;
  --ink: #FFFFFF;
  --on-ink: #0A0A0A;

  --gutter: clamp(20px, 5vw, 80px);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F7F7;
  --surface: #FFFFFF;
  --fill: #EFEFEF;
  --fg: #0A0A0A;
  --fg2: #525252;
  --fg3: #6B6B6B;
  --line: #E3E3E3;
  --line2: #CFCFCF;
  --guide: #CFCFCF;
  --guide2: #A3A3A3;
  --grid: rgba(10, 10, 10, 0.04);
  --grid2: rgba(10, 10, 10, 0.075);
  --glow: rgba(255, 255, 255, 0.9);
  --ghost: #EAEAEA;
  --wm-a: 0.06;
  --t1: #EFEFEF;
  --t2: #E3E3E3;
  --t3: #CFCFCF;
  --t4: #B5B5B5;
  --ink: #0A0A0A;
  --on-ink: #FFFFFF;
}

:root[data-theme="light"] .only-dark,
:root:not([data-theme="light"]) .only-light { display: none; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  /* Drafting grid: 120 px over 24 px. */
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid2) 1px, transparent 1px),
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center top;
  color: var(--fg);
  font-family: var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Sections take focus after an in-page jump; no outline round the whole block. */
[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg3);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.btn svg { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: translate 0.2s ease; }
.btn:hover svg { translate: 2px -2px; }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { opacity: 0.88; }
.btn--line { border: 1px solid var(--line2); color: var(--fg); }
.btn--line:hover { border-color: var(--fg2); }

/* Header */

.site-header {
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px clamp(12px, 3vw, 24px);
}

.nav-logo {
  display: flex;
  align-items: center;
  padding: 12px 0;
}
.nav-logo img { height: clamp(20px, 1.6vw, 22px); width: auto; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px clamp(10px, 2.4vw, 32px);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  padding: 12px 0;
  color: var(--fg2);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.is-strong { color: var(--fg); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--fg2); }
.theme-toggle svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Hero */

.hero {
  position: relative;
  width: 100%;
  padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(56px, 7vw, 104px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 48px);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(1180px, 130%);
  height: 640px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.hero-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  /* Own layer, so the noise filter isn't re-run on every frame of the hero animation. */
  will-change: transform;
}

.hero-row,
.hero-art,
.hero-copy {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--fg2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.replay:hover { color: var(--fg); border-color: var(--fg2); }
html:not(.js) .replay { display: none; }
.replay svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero-drawing {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.hero-drawing .fg { fill: var(--fg); }
.hero-drawing .guide { stroke: var(--guide); stroke-width: 0.5; fill: none; }
.hero-drawing .dashed { stroke-dasharray: 3 3; }
.hero-drawing .ticks line { stroke: var(--guide2); stroke-width: 0.45; opacity: 0.5; }
.hero-drawing .guides line { stroke: var(--guide); stroke-width: 0.45; }
.hero-drawing .boxes rect { fill: none; stroke: var(--guide2); stroke-width: 0.45; }
.hero-drawing .glyphs path,
.hero-drawing .parts path { fill: var(--fg); }
.hero-drawing .sparks line { stroke: var(--fg); stroke-linecap: round; }
.hero-drawing .shock { fill: none; stroke: var(--fg); }
.hero-drawing .label { font-size: 5.6px; font-weight: 500; letter-spacing: 0.12em; fill: var(--fg3); }
.hero-drawing .con { mix-blend-mode: difference; }
.hero-drawing .con-r { font-size: 11px; font-weight: 650; fill: #FFFFFF; }
.hero-drawing .con-note { font-size: 6px; font-weight: 600; fill: #CFCFCF; }
.hero-drawing .con-dim { letter-spacing: 0.02em; }

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6.2vw, 88px);
  line-height: 1.02;
  font-weight: 650;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-copy p {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.5;
  color: var(--fg2);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* hero.js fades these in once the wordmark is drawn. */
.js .hero-copy [data-reveal] { opacity: 0; }

/* Sections */

.section {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 10vw, 144px) var(--gutter);
}

.section-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 5vw, 56px);
}

.section-art {
  position: absolute;
  height: auto;
  pointer-events: none;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.title-xl {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.04;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--fg2);
}

/* Products */

.products-art {
  right: -6%;
  top: clamp(8px, 2vw, 40px);
  width: min(46%, 620px);
}

.products-title { max-width: 16ch; text-wrap: balance; }
.products-lede { max-width: 46ch; }

/* The two cards share one grid, so pictures, names, text and buttons line up. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 24px;
}

.card {
  grid-row: span 4;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.card:hover { border-color: var(--line2); }

.card-shot {
  position: relative;
  min-height: clamp(260px, 25.5vw, 368px);
  padding: clamp(20px, 3.4vw, 40px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.card-shot--list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.inv {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.inv-bar { display: block; height: 8px; border-radius: 4px; background: var(--t2); }
.inv-bar--amount { background: var(--t1); margin-left: auto; }

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.pill--draft { border: 1px dashed var(--line2); color: var(--fg3); }
.pill--sent { border: 1px solid var(--fg); color: var(--fg); }
.pill--paid { background: var(--fill); color: var(--fg2); }
.pill--overdue { background: var(--fg); color: var(--bg); }
.pill svg { display: block; }

.treemap {
  position: absolute;
  inset: clamp(20px, 3.4vw, 40px);
}
.treemap span {
  position: absolute;
  border-radius: 8px;
}
.treemap .t1 { background: var(--t1); }
.treemap .t2 { background: var(--t2); }
.treemap .t3 { background: var(--t3); }
.treemap .t4 { background: var(--t4); box-shadow: inset 0 0 0 2px var(--fg); }

.card-head {
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3vw, 36px) 0;
}

.app-icon {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: block;
}

.card-name {
  flex: 1 1 160px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-name h3 {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 650;
}
.card-name h3 span:first-child {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--fg3);
}
.card-name h3 span:last-child {
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.card-tagline { font-size: 16px; color: var(--fg2); }

.status {
  flex: 0 0 auto;
  margin-top: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.status::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status--live { border: 1px solid var(--fg); }
.status--live::before { background: var(--fg); }
.status--soon { border: 1px dashed var(--fg3); color: var(--fg2); }
.status--soon::before { border: 1.5px solid currentColor; }

.card-text {
  margin: 0;
  padding: 18px clamp(24px, 3vw, 36px) 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg2);
}

.card-actions {
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 18px clamp(24px, 3vw, 36px) clamp(24px, 3vw, 36px);
}
.card-actions .btn { padding: 0 20px; }

.next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  padding-top: 28px;
}
.next-copy {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.next h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--fg2);
}
.next p {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg3);
}

.next-tile {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 22.37%;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.next-tile svg { display: block; width: 74%; height: 74%; }
.next-tile .ours { fill: var(--fg); }
.next-tile .slot { fill: none; stroke: var(--line2); stroke-width: 0.03; stroke-dasharray: 0.08 0.06; }
.next-tile .trying { fill: var(--fg2); }
.next-tile .flash { fill: var(--fg); }

/* About */

.about-art {
  left: 0;
  bottom: 0;
  width: min(60%, 760px);
  transform: translate(-50%, 50%);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 24px clamp(28px, 4vw, 64px);
}

.about-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.about-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.about-copy .btn { margin-top: 4px; }

/* Footer */

.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 10vw, 144px) var(--gutter) clamp(120px, 16vw, 240px);
}
.site-footer--short { padding-top: clamp(56px, 7vw, 96px); }

.footer-wordmark {
  position: absolute;
  left: 50%;
  bottom: calc(-0.06 * min(96vw, 1400px));
  width: min(96vw, 1400px);
  transform: translateX(-50%);
  opacity: var(--wm-a);
  pointer-events: none;
}
.footer-wordmark img { width: 100%; height: auto; }

.footer-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 8vw, 112px);
}

.say-hello {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.say-hello a {
  align-self: flex-start;
  font-size: clamp(26px, 4.2vw, 56px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
.say-hello a:hover { color: var(--fg); }

.footer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px 64px;
}
.say-hello + .footer-main {
  padding-top: 40px;
}

.footer-logo { flex: 0 0 auto; }
.footer-logo img { height: 40px; width: auto; }

.footer-cols {
  flex: 1 1 520px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 28px 32px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg2);
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-col .eyebrow { margin-bottom: 6px; }
.footer-col a { color: var(--fg2); text-decoration: none; }
.footer-col a:hover { color: var(--fg); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  font-size: 13px;
  color: var(--fg3);
}
.footer-domain {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.footer-domain::after {
  content: "";
  display: block;
  width: 2px;
  height: 16px;
  background: var(--fg);
}

/* Legal */

.legal {
  padding: clamp(64px, 8vw, 120px) var(--gutter) clamp(56px, 7vw, 96px);
}

.legal-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 72px);
}

.legal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px clamp(28px, 4vw, 64px);
}
.legal-head h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1.02;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.legal-head p { max-width: 52ch; }

.doc-group {
  display: flex;
  flex-wrap: wrap;
  gap: 24px clamp(28px, 4vw, 64px);
  padding: clamp(32px, 4vw, 48px) 0;
  scroll-margin-top: 24px;
}

.doc-owner {
  flex: 1 1 300px;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.doc-owner svg { flex: 0 0 48px; width: 48px; height: 48px; display: block; }
.doc-owner div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.doc-owner h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.doc-owner span {
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg3);
}

.doc-list {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.doc {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
}
.doc-text {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.doc-title {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.doc-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg2);
}
.doc-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--fg3);
  white-space: nowrap;
}
.doc-meta svg { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s ease; }
.doc:hover .doc-title { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.doc:hover .doc-meta svg { transform: translateX(3px); }

.legal-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.legal-contact div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.legal-contact strong {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
}
.legal-contact span {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg2);
}

/* 404 */

.not-found {
  padding: clamp(80px, 12vw, 176px) var(--gutter);
}
.not-found .section-inner { gap: 28px; align-items: flex-start; }
.not-found h1 { max-width: 14ch; }

.ink { fill: var(--ink); }
.on-ink { fill: var(--on-ink); }

/* Hairlines between blocks; drawn on as a pseudo-element so they can animate in. */
.rule { position: relative; }
.rule::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left center;
  pointer-events: none;
}
.footer-main.rule:first-child::before { display: none; }

/* Motion. Each block plays its entrance once as it scrolls into view (motion.js adds .is-in).
   All of it hangs off .anim, which the head script only sets when the visitor allows motion. */

:root {
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Only "from" frames, so each one settles on the element's own values (the footer wordmark keeps its low opacity). */
@keyframes rise { from { opacity: 0; translate: 0 var(--rise, 24px); } }
@keyframes slide-in { from { opacity: 0; translate: -18px 0; } }
@keyframes pop { from { opacity: 0; scale: 0.6; } }
@keyframes grow { from { opacity: 0; scale: 0.82; } }
@keyframes rule-draw { from { transform: scaleX(0); } }
@keyframes draw-on { from { stroke-dashoffset: 1; } }
@keyframes art-left { from { opacity: 0; translate: -8px 0; } }
@keyframes art-right { from { opacity: 0; translate: 8px 0; } }
@keyframes art-spin { from { opacity: 0; rotate: -60deg; } }
@keyframes creep { to { stroke-dashoffset: var(--creep, -30); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes drift { from { translate: 0 12%; } to { translate: 0 -12%; } }
@keyframes hero-exit { to { opacity: 0.2; translate: 0 -14%; } }

[data-anim~="stagger"] > :nth-child(2), .inv:nth-child(2), .treemap span:nth-child(2) { --n: 1; }
[data-anim~="stagger"] > :nth-child(3), .inv:nth-child(3), .treemap span:nth-child(3) { --n: 2; }
[data-anim~="stagger"] > :nth-child(4), .inv:nth-child(4), .treemap span:nth-child(4) { --n: 3; }
[data-anim~="stagger"] > :nth-child(5), .inv:nth-child(5), .treemap span:nth-child(5) { --n: 4; }
[data-anim~="stagger"] > :nth-child(6), .treemap span:nth-child(6) { --n: 5; }
[data-anim~="stagger"] > :nth-child(7), .treemap span:nth-child(7) { --n: 6; }
[data-anim~="stagger"] > :nth-child(8), .treemap span:nth-child(8) { --n: 7; }
.treemap span:nth-child(9) { --n: 8; }

/* waiting to come into view */
.anim [data-anim~="rise"]:not(.is-in),
.anim [data-anim~="stagger"]:not(.is-in) > *,
.anim [data-anim~="shot"]:not(.is-in) :is(.inv, .pill, .treemap span),
.anim [data-anim~="draw"]:not(.is-in) :is(.art-left, .art-right, .art-spin) { opacity: 0; }
.anim [data-anim~="draw"] .draw { stroke-dasharray: 1; }
.anim [data-anim~="draw"]:not(.is-in) .draw { stroke-dashoffset: 1; }
.anim .rule[data-anim]:not(.is-in)::before { transform: scaleX(0); }

/* entrances; "backwards" fill only, so hover styles still apply once they finish */
.anim [data-anim~="rise"].is-in { animation: rise 0.9s var(--ease) backwards; }
.anim [data-anim~="stagger"].is-in > * { animation: rise 0.9s var(--ease) backwards; animation-delay: calc(var(--n, 0) * 90ms); }
.anim .rule.is-in::before { animation: rule-draw 1.4s var(--ease) backwards; }

.anim [data-anim~="shot"].is-in .inv { animation: slide-in 0.8s var(--ease) backwards; animation-delay: calc(200ms + var(--n, 0) * 90ms); }
.anim [data-anim~="shot"].is-in .pill { animation: pop 0.5s var(--pop) backwards; animation-delay: calc(560ms + var(--n, 0) * 90ms); }
.anim [data-anim~="shot"].is-in .treemap span { transform-origin: 0 0; animation: grow 0.9s var(--ease) backwards; animation-delay: calc(200ms + var(--n, 0) * 70ms); }

.anim [data-anim~="draw"].is-in .draw { animation: draw-on 1.8s var(--ease) backwards; animation-delay: calc(var(--n, 0) * 140ms); }
.anim [data-anim~="draw"].is-in .art-left { animation: art-left 1.4s var(--ease) backwards; }
.anim [data-anim~="draw"].is-in .art-right { animation: art-right 1.4s var(--ease) backwards, creep 40s linear 1.4s infinite; }
.anim [data-anim~="draw"].is-in .art-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: art-spin 2s var(--ease) backwards, creep 60s linear 2s infinite;
}

.anim .footer-wordmark { --rise: 30%; }
.anim .footer-wordmark.is-in { animation-duration: 1.8s; }
.anim .footer-domain::after { animation: blink 1s steps(1) infinite; }

/* Scroll-linked depth where the browser supports it: the drawings drift, the hero recedes. */
@supports (animation-timeline: view()) {
  .anim .section-art {
    animation: drift linear both;
    animation-timeline: view();
  }
  .anim .hero-art {
    animation: hero-exit linear both;
    animation-timeline: view();
    animation-range: exit;
  }
}
