:root {
  --sky: #2ec0fb;
  --sky-deep: #0b5f86;
  --paper: #fdfeff;
  --ink: #000;
  --ink-2: #0a1116;
  --ink-line: rgba(255, 255, 255, 0.14);
  --sky-line: rgba(0, 0, 0, 0.18);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --pad: clamp(18px, 3vw, 44px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--sky); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
  font: 500 13px/1 var(--mono);
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.label {
  font: 400 12px/1.4 var(--mono);
  letter-spacing: 0;
}

/* ───────── nav ───────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  color: var(--ink);
  transition: color 0.4s var(--ease-out), opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav[data-on="ink"] { color: var(--paper); }
.nav.is-hidden { transform: translateY(-110%); opacity: 0; }
.nav__brand { display: flex; align-items: center; gap: 10px; font: 500 15px/1 var(--sans); letter-spacing: -0.01em; }
.nav__brand img { width: 28px; height: 28px; border-radius: 50%; transition: transform 0.6s var(--ease-out); }
.nav__brand:hover img { transform: rotate(-24deg); }
.nav__links { display: flex; gap: clamp(14px, 2.4vw, 32px); font: 400 13px/1 var(--mono); }
.nav__links a { position: relative; padding: 6px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { font-weight: 500; }

.is-loading .nav { opacity: 0; transform: translateY(-8px); }

/* ───────── sky canvas ───────── */
.sky {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: pan-y;
}
.sky__fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom; display: none;
}
.no-webgl .sky { display: none; }
.no-webgl .sky__fallback { display: block; }

/* ───────── hero ───────── */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden;
  background: var(--sky);
  cursor: crosshair;
  user-select: none; -webkit-user-select: none;
}
.hero__meta {
  position: absolute; left: var(--pad); top: clamp(96px, 16vh, 170px);
  display: grid; gap: 14px; pointer-events: none;
}
.hero__line {
  font: 500 clamp(22px, 2.3vw, 34px)/1.08 var(--sans);
  letter-spacing: -0.025em;
}

/* ───────── spray paint ───────── */
@media (hover: hover) and (pointer: fine) {
  .hero:has(.spray.is-on) { cursor: none; }
}
.spray { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.spray__mist { position: absolute; inset: 0; width: 100%; height: 100%; }
.spray__aim {
  position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}
.spray__aim::before {
  content: ""; position: absolute; left: -7px; top: -7px; width: 14px; height: 14px;
  border-radius: 50%; border: 1.5px solid var(--paint);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s var(--ease-out);
}
.spray.is-on .spray__aim { opacity: 1; }
.spray.is-down .spray__aim::before { transform: scale(0.55); }
.can { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.can__inner {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  opacity: 0; transform: scale(0.4) rotate(-30deg);
  transition: opacity 0.3s var(--ease-out), transform 0.55s var(--ease-out);
}
.spray.is-on .can__inner { opacity: 1; transform: none; }
.can__svg {
  position: absolute; display: block; overflow: visible;
  filter: drop-shadow(14px 22px 16px rgba(0, 38, 66, 0.32)) drop-shadow(2px 3px 2px rgba(0, 30, 50, 0.25));
}
.can__paint { fill: var(--paint); transition: fill 0.3s var(--ease-out); }
.can__label { fill: var(--paint-ink); font: 600 13px var(--sans); letter-spacing: -0.03em; }
.can__cap { transition: transform 0.12s var(--ease-out); }
.spray.is-down .can__cap { transform: translateY(1.8px); }

.spray-ui {
  position: absolute; right: var(--pad); top: clamp(96px, 16vh, 170px); z-index: 4;
  display: grid; justify-items: end; gap: 12px;
}
.spray-ui__hint {
  display: flex; align-items: center; gap: 8px; pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
}
.spray-ui__hint .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
.hero.has-sprayed .spray-ui__hint { opacity: 0; }
.spray-ui__row { display: flex; align-items: center; gap: 14px; }
.spray-ui__swatches { display: flex; gap: 8px; }
.spray-ui__swatch {
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22), inset 0 -3px 4px rgba(0, 0, 0, 0.18), inset 0 2px 2px rgba(255, 255, 255, 0.35);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.spray-ui__swatch:hover { transform: scale(1.15); }
.spray-ui__swatch[aria-checked="true"] {
  transform: scale(1.12);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22), inset 0 -3px 4px rgba(0, 0, 0, 0.18), inset 0 2px 2px rgba(255, 255, 255, 0.35), 0 0 0 2px var(--sky), 0 0 0 3.5px var(--ink);
}
.spray-ui__wipe {
  padding: 4px 0; border: 0; background: none; color: inherit; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease-out);
}
.spray-ui__wipe:hover { text-decoration: underline; text-underline-offset: 3px; }
.spray-ui.has-paint .spray-ui__wipe { opacity: 1; pointer-events: auto; }
.is-loading .spray-ui { opacity: 0; }
.spray-ui { transition: opacity 1s var(--ease-out) 0.5s; }
@keyframes pulse { 50% { transform: scale(0.45); opacity: 0.5; } }
.hero__scroll {
  position: absolute; right: var(--pad); bottom: 22px;
  writing-mode: vertical-rl; pointer-events: none; color: var(--paper);
  mix-blend-mode: difference;
}
.is-loading .hero__meta, .is-loading .hero__scroll { opacity: 0; }
.hero__meta, .hero__scroll { transition: opacity 1s var(--ease-out) 0.5s; }

/* ───────── broken glass ───────── */
.hero.is-over-pile { cursor: pointer; }
.shatter-hint {
  position: absolute; left: 50%; top: 0; z-index: 2;
  white-space: nowrap; pointer-events: none;
  color: var(--paper); mix-blend-mode: difference;
  opacity: 0; transform: translate(-50%, 8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.shatter-hint.is-on {
  opacity: 1; transform: translate(-50%, 0);
  transition-duration: 0.8s; transition-delay: 0.2s;
}

/* ───────── slice component ───────── */
.slice { position: relative; display: block; }
.slice > .slice__src { opacity: 0; }
.slice__layer {
  position: absolute; inset: 0;
  will-change: transform;
  pointer-events: none;
}
.slice__layer > * { margin: 0; }
.slice:not(.is-ready) > .slice__src { opacity: 1; }

/* ───────── about ───────── */
.about {
  position: relative;
  background: var(--ink); color: var(--paper);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 120px); align-items: center;
  padding: clamp(110px, 16vw, 220px) var(--pad);
  overflow: hidden;
}
.about__mark { display: grid; place-items: center; }
.glass-avatar { position: relative; width: min(100%, 520px); aspect-ratio: 1; cursor: grab; touch-action: pan-y; }
.glass-avatar:active { cursor: grabbing; }
.glass-avatar img, .glass-avatar canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.glass-avatar.is-live img { visibility: hidden; }
.about__copy { display: grid; gap: clamp(22px, 3vw, 40px); max-width: 860px; }
.about__copy .label { color: var(--sky); }
.statement {
  font: 500 clamp(30px, 4vw, 64px)/1.04 var(--sans);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.about__small {
  max-width: 46ch; color: rgba(253, 254, 255, 0.62);
  font-size: clamp(15px, 1.15vw, 18px); line-height: 1.55;
}

/* ───────── now / divergence ───────── */
.now {
  position: relative; overflow: hidden;
  background: var(--sky); color: var(--ink);
  cursor: crosshair;
}
.now__inner {
  position: relative; z-index: 1; pointer-events: none;
  padding: clamp(90px, 10vw, 150px) var(--pad) clamp(80px, 9vw, 140px);
  display: grid; gap: clamp(20px, 3vw, 44px);
}
.now__inner a, .now__inner .button { pointer-events: auto; }
.now__top { display: flex; justify-content: space-between; gap: 16px; }
.now__title { display: block; width: fit-content; cursor: pointer; margin-left: -0.04em; }
.slice--title { font: 600 clamp(48px, 18.2vw, 340px)/0.86 var(--sans); letter-spacing: -0.065em; }
.slice--title span { display: block; padding: 0.04em 0.08em 0.12em 0; white-space: nowrap; }
.now__grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 96px);
  border-top: 1px solid var(--sky-line); padding-top: clamp(20px, 2.4vw, 32px);
}
.now__lede { font: 500 clamp(26px, 3vw, 46px)/1.06 var(--sans); letter-spacing: -0.03em; max-width: 15ch; }
.now__body { display: grid; gap: 22px; align-content: start; font-size: clamp(15px, 1.1vw, 17px); line-height: 1.55; }
.now__body p { max-width: 48ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font: 400 12px/1 var(--mono); padding: 7px 10px;
  border: 1px solid rgba(0, 0, 0, 0.35); border-radius: 999px;
}
.button {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 28px;
  width: fit-content; padding: 16px 20px 16px 22px;
  background: var(--ink); color: var(--paper);
  font: 500 14px/1 var(--mono); border-radius: 999px;
  transition: color 0.45s var(--ease-out);
}
.button::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--paper);
  clip-path: polygon(0 0, 0 0, -30% 100%, -30% 100%);
  transition: clip-path 0.6s var(--ease-out);
}
.button:hover { color: var(--ink); }
.button:hover::before { clip-path: polygon(0 0, 130% 0, 100% 100%, -30% 100%); }
.button__arrow { display: inline-block; transition: transform 0.6s var(--ease-out); }
.button:hover .button__arrow { transform: translate(3px, -3px) rotate(45deg); }

/* ───────── footer ───────── */
.foot {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--paper);
  padding: clamp(100px, 12vw, 180px) var(--pad) 0;
}
.foot__top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 120px); }
.foot__top .label { color: var(--sky); }
.links { border-top: 1px solid var(--ink-line); }
.links li { border-bottom: 1px solid var(--ink-line); }
.links a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: clamp(16px, 1.8vw, 26px) 0;
  font: 500 clamp(28px, 3.6vw, 56px)/1 var(--sans); letter-spacing: -0.035em;
  transition: color 0.4s var(--ease-out), padding 0.6s var(--ease-out);
}
.links__meta { font: 400 12px/1 var(--mono); letter-spacing: 0; color: rgba(253, 254, 255, 0.55); transition: color 0.4s; }
.links a:hover { color: var(--sky); padding-left: 14px; }
.links a:hover .links__meta { color: var(--sky); }
.foot__mark { margin: clamp(80px, 10vw, 150px) auto 0; width: min(100%, 1240px); }
.wordmark {
  width: 100%; aspect-ratio: 2866 / 740;
  background: var(--grain, none) 0 0 / 96px 96px, var(--sky);
  -webkit-mask: url("assets/wordmark.png") center bottom / 100% 100% no-repeat;
  mask: url("assets/wordmark.png") center bottom / 100% 100% no-repeat;
}
.slice--wordmark { cursor: crosshair; }
.foot__base {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: clamp(28px, 4vw, 56px);
  color: rgba(253, 254, 255, 0.55);
}
.foot__base a:hover { color: var(--sky); }

/* ───────── reveal ───────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ───────── responsive ───────── */
@media (max-width: 860px) {
  .about, .foot__top, .now__grid { grid-template-columns: 1fr; }
  .glass-avatar { width: min(78vw, 420px); }
  .nav__links a:not(.nav__cta) { display: none; }
  .spray-ui { top: auto; bottom: calc(var(--mark-h, 120px) + 18px); left: var(--pad); right: auto; justify-items: start; }
  .now__top { flex-direction: column; gap: 4px; }
  .hero__scroll { display: none; }
}
@media (max-aspect-ratio: 3/4) {
  .hero { height: 74svh; min-height: 520px; }
}
/* The sky takes every swipe for spraying, so on touch screens leave some page below it to scroll from. */
@media (pointer: coarse) {
  .hero { min-height: min(520px, 80svh); max-height: 80svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .spray-ui__hint .dot { animation: none; }
  .shatter-hint, .shatter-hint.is-on { transform: translate(-50%, 0); transition: none; }
}
