:root {
  color-scheme: dark;
  --bg: #080a0e;
  /* Read by currents.js. Keep these as r,g,b triples. */
  --rgb-bg: 8, 10, 14;
  --rgb-fg: 226, 238, 235;
  --rgb-accent: 76, 224, 197;
  --rgb-red: 255, 90, 95;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
}

body {
  position: relative;
  margin: 0;
  min-height: 400vh; /* room for the scroll-driven 1 -> 2 current story + proof */
  background: var(--bg);
}

/*
 * Absolute, not fixed: the canvas is the full document, so it scrolls with the
 * page. currents.js sets the pixel height to document.scrollHeight.
 */
.currents {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
  width: 100%;
  pointer-events: none;
  image-rendering: pixelated;
}

.current-labels {
  position: absolute;
  right: 0;
  bottom: 18vh;
  left: 0;
  z-index: 2;
  pointer-events: none;
}

.current-labels p {
  position: absolute;
  bottom: 0;
  max-width: min(9ch, 28vw);
  margin: 0;
  font-family: "Satoshi", "Inter", system-ui, sans-serif;
  font-size: clamp(1.6rem, 3.6vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-wrap: balance;
  text-shadow: 0 0 1.2em rgba(8, 10, 14, 0.95);
}

.top-label {
  position: absolute;
  top: 185vh;
  right: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
}

.top-label p {
  position: absolute;
  top: 0;
  right: 59%;
  max-width: 9ch;
  margin: 0;
  color: #e2eeeb;
  font-family: "Satoshi", "Inter", system-ui, sans-serif;
  font-size: clamp(2rem, 4.2vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-align: right;
  text-wrap: balance;
  text-shadow: 0 0 1.2em rgba(8, 10, 14, 0.95);
}

.current-labels .drop {
  left: 59%;
  max-width: min(12ch, 32vw);
  color: rgb(var(--rgb-red));
  text-align: left;
}

.output-note {
  position: absolute;
  right: 62.5%;
  bottom: 18vh;
  z-index: 2;
  max-width: min(28rem, 42vw);
  text-align: right;
  pointer-events: none;
}

.out-line {
  margin: 0;
  color: #e2eeeb;
  font-family: "Satoshi", "Inter", system-ui, sans-serif;
  font-size: clamp(1.8rem, 4.2vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
  white-space: nowrap;
  text-shadow: 0 0 1.2em rgba(8, 10, 14, 0.95);
}

.out-line strong {
  color: rgb(var(--rgb-accent));
  font-weight: 900;
}

.out-sub {
  margin: 0.1rem 0 0;
  color: rgba(226, 238, 235, 0.4);
  font-family: "Satoshi", "Inter", system-ui, sans-serif;
  font-size: clamp(1.8rem, 4.2vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
  white-space: nowrap;
}

.out-meta {
  margin: 0.55rem 0 0;
  color: rgba(226, 238, 235, 0.38);
  font: 0.68rem/1.5 var(--mono);
  letter-spacing: 0.02em;
}

.hero-install {
  position: absolute;
  top: calc(50vh + clamp(1.4rem, 7.2vw, 6.4rem) + 1.2rem);
  top: calc(50svh + clamp(1.4rem, 7.2vw, 6.4rem) + 1.2rem);
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
}

.install-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px 0 16px;
  border: 1px solid rgba(226, 238, 235, 0.12);
  border-radius: 999px;
  background: rgba(20, 20, 26, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ededef;
  font: 400 13px/20px var(--mono);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.install-pill:hover {
  border-color: rgba(226, 238, 235, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.install-pill code {
  font: inherit;
  white-space: nowrap;
}

.install-pill .copy-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: rgba(226, 238, 235, 0.55);
}

.install-pill .copy-icon svg {
  width: 100%;
  height: 100%;
}

.install-pill .copy-label {
  display: none;
  color: #3dd68c;
  font: 500 12px/16px var(--mono);
  white-space: nowrap;
}

.install-pill.is-copied {
  border-color: rgba(61, 214, 140, 0.35);
}

.install-pill.is-copied .copy-icon {
  display: none;
}

.install-pill.is-copied .copy-label {
  display: inline;
}

.footer-install {
  height: 34px;
  padding: 0 10px 0 14px;
  gap: 8px;
  font-size: 12px;
}

.footer-install .copy-label {
  font-size: 11px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(226, 238, 235, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ededef;
  font: 500 13px/20px "Satoshi", "Inter", system-ui, sans-serif;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.source-pill:hover {
  border-color: rgba(226, 238, 235, 0.16);
  background: rgba(255, 255, 255, 0.12);
}

.source-icon {
  width: 16px;
  height: 16px;
}

.install-pill:focus-visible,
.source-pill:focus-visible {
  outline: 1px solid rgb(var(--rgb-accent));
  outline-offset: 3px;
}

.site-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 12vh;
  padding: 1.5vh 4vw;
  border-top: 1px solid rgba(226, 238, 235, 0.16);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 100%;
}

.footer-wordmark {
  color: #e2eeeb;
  font-family: "Satoshi", "Inter", system-ui, sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.8;
  white-space: nowrap;
  user-select: none;
  transform-origin: 50% 60%;
  transform: perspective(600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.18s ease, text-shadow 0.2s ease;
  will-change: transform;
}

.footer-wordmark:hover {
  text-shadow: 0 0 28px rgba(76, 224, 197, 0.35);
}

.footer-wordmark span {
  display: inline-block;
}

.footer-wordmark span:nth-child(2) { margin-left: -0.132em; }
.footer-wordmark span:nth-child(3) { margin-left: -0.1334em; }
.footer-wordmark span:nth-child(4) { margin-left: -0.1114em; }
.footer-wordmark span:nth-child(5) { margin-left: -0.1125em; }
.footer-wordmark span:nth-child(6) { margin-left: -0.0844em; }
.footer-wordmark span:nth-child(7) { margin-left: -0.1114em; }

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 760px) {
  .site-footer {
    padding: 1vh 5vw;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
  }

  .footer-wordmark {
    font-size: 2rem;
  }

  .top-label p {
    left: 5vw;
    right: auto;
    max-width: 33vw;
    font-size: 1.6rem;
    text-align: left;
  }

  .output-note {
    max-width: 36vw;
  }

  .out-line,
  .out-sub {
    font-size: 1.15rem;
  }

  .out-meta {
    font-size: 0.64rem;
  }

  .footer-links {
    justify-content: space-between;
    gap: 6px;
    width: 100%;
  }

  .footer-install {
    font-size: 11px;
    padding: 0 8px 0 12px;
  }
}

