/* ───────────────────────────── tokens ───────────────────────────── */
:root {
  /* A darkroom is neutral, but the subject is an orange dye mask, so the
     ground carries a slight warm bias rather than the usual blue-grey. */
  --ink:        #0a0807;
  --ink-raised: #131010;
  --ink-sunk:   #060505;
  --line:       #241f1c;
  --line-soft:  #171412;

  --text:   #ede9e5;
  --text-2: #9c938c;
  --text-3: #6a615b;

  --mask:   #d2661f;   /* the base mask. Material, not decoration. */
  --mask-d: #8a3f10;

  --max:      1320px;
  --max-wide: 1320px;
  --pad:      24px;

  --ease: cubic-bezier(.22, .61, .36, 1);

  color-scheme: dark;
}

@media (min-width: 700px) { :root { --pad: 40px; } }
@media (min-width: 1100px) { :root { --pad: 56px; } }

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

::selection { background: var(--mask); color: #120a04; }

:focus-visible {
  outline: 2px solid var(--mask);
  outline-offset: 3px;
  border-radius: 3px;
}

.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--ink);
  padding: 10px 16px; border-radius: 6px; font-weight: 600;
  text-decoration: none; transition: top .15s var(--ease);
}
.skip:focus { top: 12px; }

.nb { white-space: nowrap; font-variant-ligatures: none; }

/* ─────────────────────────── layout ─────────────────────────── */
.wrap      { max-width: var(--max);      margin-inline: auto; padding-inline: var(--pad); }
.wrap-wide { max-width: var(--max-wide); margin-inline: auto; padding-inline: var(--pad); }

.section { padding-block: clamp(96px, 15vh, 180px); }

/* ─────────────────────────── type ─────────────────────────── */
.display {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(3.4rem, 12.5vw, 8.6rem);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.h1 {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(2.4rem, 7.2vw, 5rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.038em;
  text-wrap: balance;
}

.h2 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.032em;
}

.h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.026em;
}

.h4 {
  margin: 0 0 .6em;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.016em;
}

.body {
  margin: 1.1em 0 0;
  color: var(--text-2);
  font-size: 1.0625rem;
  max-width: 46ch;
  text-wrap: pretty;
}
.body.lead {
  font-size: clamp(1.125rem, 2.1vw, 1.375rem);
  color: #b6ada6;
  max-width: 34ch;
  margin-top: 1.6rem;
}

.kicker {
  margin: 0 0 1.6rem;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-3);
}

.fineprint {
  margin: 2.4rem 0 0;
  max-width: 58ch;
  font-size: .86rem;
  line-height: 1.6;
  color: var(--text-3);
}

/* ─────────────────────────── bar ─────────────────────────── */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.bar.is-scrolled { border-bottom-color: var(--line-soft); }

.bar-mark {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: auto;
}
.mark { width: 19px; height: 19px; color: var(--text); flex: none; }
.bar-name {
  font-weight: 800; font-size: .95rem; letter-spacing: -.01em;
}

.bar-nav { display: none; gap: 28px; margin-right: 8px; }
@media (min-width: 900px) { .bar-nav { display: flex; } }
.bar-nav a {
  text-decoration: none; font-size: .875rem; color: var(--text-2);
  transition: color .2s var(--ease);
}
.bar-nav a:hover { color: var(--text); }

/* ─────────────────────────── buttons ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--text); color: var(--ink);
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 650; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.btn:hover { background: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn-lg { padding: 15px 30px; font-size: 1.0625rem; }

/* ─────────────────────────── hero ─────────────────────────── */
.hero { padding-top: clamp(120px, 18vh, 190px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 2rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px 6px 11px;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mask);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mask) 20%, transparent);
}

.lede {
  margin: 2rem 0 0;
  max-width: 30ch;
  font-size: clamp(1.1875rem, 2.5vw, 1.5rem);
  line-height: 1.42;
  color: #b6ada6;
  text-wrap: pretty;
}

.platform {
  margin: 1.1rem 0 0;
  font-size: .82rem;
  color: var(--text-3);
  max-width: 44ch;
}

/* signup */
.signup {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 2.4rem;
  max-width: 460px;
}
.signup input {
  grid-column: 1;
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit; font-size: .95rem;
  padding: 13px 20px;
  min-width: 0;
  transition: border-color .2s var(--ease);
}
.signup input::placeholder { color: var(--text-3); }
.signup input:focus { border-color: #3a322d; }
.signup button {
  grid-column: 2;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit; font-size: .95rem; font-weight: 600;
  padding: 13px 22px;
  cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.signup button:hover { background: var(--ink-raised); border-color: #3a322d; }
.signup-note {
  grid-column: 1 / -1;
  margin: .55rem 0 0 20px;
  font-size: .78rem;
  color: var(--text-3);
}
.signup.is-done button { background: var(--ink-raised); }
.signup-wide { max-width: 520px; }

@media (max-width: 480px) {
  .signup { grid-template-columns: 1fr; }
  .signup input, .signup button { grid-column: 1; }
  .signup-note { margin-left: 20px; }
}

/* the hero frame, as a strip of film */
.hero-frame { margin-top: clamp(64px, 10vh, 120px); }

.filmstrip {
  margin: 0;
  background: #050403;
  padding: 14px 0;
  border-radius: 2px;
  box-shadow: 0 40px 120px -30px rgba(0,0,0,.9),
              0 0 0 1px var(--line-soft);
  will-change: transform;
}
.filmstrip img { width: 100%; }
.filmstrip figcaption {
  margin-top: 14px; padding-inline: 16px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3);
}
.sprockets {
  height: 13px;
  margin: 0 0 12px;
  background-image: radial-gradient(circle at center,
      #17130f 0 3.2px, transparent 3.4px);
  background-size: 34px 13px;
  background-position: 8px center;
  opacity: .9;
}
.sprockets + img + .sprockets,
.filmstrip img + .sprockets { margin: 12px 0 0; }
@media (max-width: 600px) { .sprockets { display: none; } .filmstrip { padding: 8px 0; } }

/* ─────────────────── the scroll reveal ─────────────────── */
.reveal { position: relative; }
.reveal-track { height: 320vh; }
.reveal-stage {
  position: sticky; top: 0;
  min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
}
.reveal-grid {
  width: 100%;
  display: grid;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding-block: 80px;
}
@media (min-width: 940px) {
  .reveal-grid { grid-template-columns: minmax(280px, 0.8fr) 1.4fr; }
}

.reveal-copy .body { margin-top: 1.6rem; }

.readout {
  margin: 2.4rem 0 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .55em;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.readout-k { color: var(--text); font-weight: 500; }
.readout-v { color: var(--text-3); }

.reveal-figure { margin: 0; }
.reveal-images {
  position: relative;
  aspect-ratio: 1921 / 1553;
  background: #050403;
  box-shadow: 0 50px 130px -40px rgba(0,0,0,.95), 0 0 0 1px var(--line-soft);
}
.reveal-images img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.reveal-images .over {
  /* driven by --p, 0 → fully negative, 1 → fully converted */
  clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0);
}
.reveal-edge {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--p, 0) * 100%);
  width: 1px;
  background: linear-gradient(to bottom,
      transparent, color-mix(in srgb, var(--mask) 85%, #fff) 18%,
      color-mix(in srgb, var(--mask) 85%, #fff) 82%, transparent);
  box-shadow: 0 0 22px 2px color-mix(in srgb, var(--mask) 55%, transparent);
  opacity: calc(min(var(--p, 0), 1 - var(--p, 0)) * 3.4);
  pointer-events: none;
}
.reveal-figure figcaption {
  margin-top: 16px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3);
}

/* Reduced motion, or no JS: no pinning, show the converted frame outright. */
@media (prefers-reduced-motion: reduce) {
  .reveal-track { height: auto; }
  .reveal-stage { position: static; min-height: 0; }
  .reveal-images .over { clip-path: none; }
  .reveal-edge { display: none; }
}
html:not(.js) .reveal-track { height: auto; }
html:not(.js) .reveal-stage { position: static; min-height: 0; }
html:not(.js) .reveal-images .over { clip-path: none; }

/* ─────────────────────── the engine ─────────────────────── */
.formula {
  margin: 2.6rem 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  letter-spacing: .02em;
  color: var(--text);
}
.formula span { color: var(--mask); font-weight: 500; }
.formula sub { font-size: .62em; }

.compare {
  margin-top: clamp(48px, 8vh, 88px);
  display: grid; gap: clamp(20px, 3vw, 34px);
}
@media (min-width: 820px) { .compare { grid-template-columns: 1fr 1fr; } }

.compare-cell { margin: 0; will-change: transform; }
.compare-cell img {
  width: 100%;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 0 1px var(--line-soft);
}
.compare-cell figcaption {
  margin-top: 1.1rem;
  font-size: .875rem; line-height: 1.55;
  color: var(--text-2);
  max-width: 40ch;
}
.tag {
  display: block;
  margin-bottom: .5rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
}
.tag-off { color: var(--text-3); }
.tag-on  { color: var(--mask); }

/* ─────────────────────── stocks ─────────────────────── */
.chart {
  margin-top: clamp(48px, 8vh, 80px);
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(20px, 3.4vw, 34px);
  will-change: transform;
}
.chart-head {
  max-width: 900px;
  display: flex; flex-wrap: wrap; gap: 16px 28px;
  align-items: baseline; justify-content: space-between;
  margin-bottom: 22px;
}
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 20px;
  font-size: .78rem; color: var(--text-3);
}
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 11px; height: 11px; border-radius: 2px; flex: none; }
.sw-ref  { background: linear-gradient(135deg, #8f8f8f 50%, transparent 50%), #2a2522; }
.sw-film { background: linear-gradient(315deg, #c98a4d 50%, transparent 50%), #2a2522; }
.chart-name {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 700; letter-spacing: -.02em;
}

.chart-grid {
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(5px, .9vw, 10px);
}
.patch {
  aspect-ratio: 1;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  background: #1a1613;
}
.patch i {
  position: absolute; inset: 0;
  display: block;
}
/* reference on the top-left triangle, the film's rendering on the bottom-right */
.patch .ref  { clip-path: polygon(0 0, 100% 0, 0 100%); }
.patch .film { clip-path: polygon(100% 0, 100% 100%, 0 100%);
               transition: background-color .5s var(--ease); }
@media (prefers-reduced-motion: reduce) { .patch .film { transition: none; } }

.chart-picker {
  max-width: 900px;
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.chart-picker button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-3);
  font: inherit; font-size: .8rem;
  padding: 6px 13px;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background .2s var(--ease);
}
.chart-picker button:hover { color: var(--text-2); border-color: #352d28; }
.chart-picker button[aria-selected="true"] {
  color: var(--ink); background: var(--text); border-color: var(--text);
}

/* ─────────────────────── the four screens ─────────────────────── */
.screen-list { margin-top: clamp(56px, 9vh, 110px); display: grid; gap: clamp(80px, 13vh, 170px); }

.screen { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 940px) {
  .screen { grid-template-columns: minmax(240px, .72fr) 1.5fr; }
  .screen-alt .screen-copy { order: 2; }
  .screen-alt { grid-template-columns: 1.5fr minmax(240px, .72fr); }
}

.screen-n {
  margin: 0 0 1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .78rem; letter-spacing: .18em;
  color: var(--mask);
}
.screen-shot { margin: 0; will-change: transform; }
.screen-shot img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 40px 100px -34px rgba(0,0,0,.95), 0 0 0 1px var(--line-soft);
}

/* ─────────────────────── uncommon ─────────────────────── */
.rare-grid {
  margin-top: clamp(48px, 8vh, 90px);
  display: grid; gap: clamp(24px, 3vw, 34px);
}
@media (min-width: 860px) { .rare-grid { grid-template-columns: repeat(3, 1fr); } }

.rare-card {
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(22px, 2.6vw, 30px);
  display: flex; flex-direction: column;
}
.rare-card .body { font-size: .95rem; max-width: none; flex: 1; }
.rare-card figure { margin: 1.8rem 0 0; }
.rare-card img {
  width: 100%; border-radius: 6px;
  border: 1px solid var(--line-soft);
  opacity: .92;
}

/* ─────────────────────── requirements ─────────────────────── */
.spec {
  margin: clamp(40px, 6vh, 64px) 0 0;
  border-top: 1px solid var(--line);
}
.spec > div {
  display: grid; gap: 4px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 700px) { .spec > div { grid-template-columns: 200px 1fr; } }
.spec dt {
  font-size: .82rem; letter-spacing: .04em;
  color: var(--text-3);
  text-transform: uppercase;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.spec dd { margin: 0; color: var(--text-2); max-width: 56ch; }

/* ─────────────────────── notify ─────────────────────── */
.notify {
  background:
    radial-gradient(120% 80% at 50% 0%,
      color-mix(in srgb, var(--mask) 9%, transparent), transparent 62%),
    var(--ink-sunk);
  border-top: 1px solid var(--line-soft);
}
.notify .signup-wide { margin-top: clamp(32px, 5vh, 52px); }

/* honeypot field: present in the DOM for bots, invisible and unreachable
   for everyone else. Never display:none — some crawlers skip hidden fields
   on purpose, which defeats the point. */
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────── footer ─────────────────────── */
.foot {
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(56px, 8vh, 90px);
  background: var(--ink-sunk);
}
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr auto; align-items: end; }
}
.foot-word { width: clamp(120px, 16vw, 190px); height: auto; color: #3a322d; }
.foot-line { margin: 0; color: var(--text-3); font-size: .875rem; max-width: 44ch; }
.foot-meta { margin: 0; color: var(--text-3); font-size: .8rem; }

/* ───────────────── entrance, kept very quiet ───────────────── */
[data-rise] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-rise].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-rise] { opacity: 1; transform: none; transition: none; }
}

/* ─────────────────────── the library ─────────────────────── */
.lib-grid {
  margin-top: clamp(48px, 8vh, 90px);
  display: grid;
  gap: clamp(24px, 3vw, 40px);
}
@media (min-width: 860px) {
  .lib-grid { grid-template-columns: 1fr 1fr; }
  .lib-wide { grid-column: 1 / -1; }
}
.lib-grid figure { margin: 0; will-change: transform; }
.lib-grid img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 30px 80px -34px rgba(0,0,0,.95), 0 0 0 1px var(--line-soft);
}
.lib-grid figcaption {
  margin-top: 1.1rem;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 48ch;
}

/* the uncommon grid, now a masonry-ish set of cards */
@media (min-width: 640px) and (max-width: 1023px) {
  .rare-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .rare-grid { grid-template-columns: repeat(3, 1fr); }
  .rare-card-lead { grid-column: span 2; }
}
.rare-card-lead .body { font-size: 1.0625rem; max-width: 52ch; }

/* ─────────────────────── what is missing ─────────────────────── */
.next-list {
  margin: clamp(32px, 5vh, 52px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  max-width: 62ch;
}
.next-list li {
  padding: 18px 0 18px 26px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  position: relative;
}
.next-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 1.55em;
  width: 10px; height: 1px;
  background: var(--mask);
}

/* ─────────────────────── beta ─────────────────────── */
/* On the bar, so the state travels with the name rather than living only
   in the hero, which a reader scrolls past once. */
.chip {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mask);
  border: 1px solid color-mix(in srgb, var(--mask) 38%, transparent);
  border-radius: 999px;
  padding: 3px 7px 2px;
  line-height: 1;
  align-self: center;
}

.beta {
  margin: clamp(36px, 5vh, 56px) 0 0;
  border-top: 1px solid var(--line);
  max-width: 68ch;
}
.beta > div {
  display: grid;
  gap: 4px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 700px) { .beta > div { grid-template-columns: 190px 1fr; } }
.beta dt {
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--text-3);
}
.beta dd { margin: 0; color: var(--text-2); max-width: 54ch; }
