/* ben.j.ads concept 2: unrestrained.
   Kept from the brand: the colours, the fonts (Bricolage condensed, Archivo), the lime data points,
   and the redaction bar. Everything else is open: motion, scale, layout, icons, interaction. */

:root {
  --paper: #17180d;
  --paper-2: #1f2014;
  --ink: #eef0e4;
  --ink-muted: #a6a98f;
  --ink-faint: #4a4c38;
  --rule: #3d3f2e;
  --lime: #dcf04a;
  --redact: #0a0b05;
  --display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: Archivo, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(16px, 4vw, 64px);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0; }
html { background: var(--paper); }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--lime); color: var(--paper); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
a { color: inherit; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--pad); top: 12px; background: var(--lime); color: var(--paper); padding: 8px 12px; z-index: 50; }

/* Display type: Bricolage, condensed, lowercase. Used for everything big. */
.display, h1, h2, h3, .wordmark, .sign-line, .line {
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

/* Lime data points. The wordmark's periods, and anything else that needs a dot. */
.pt { display: inline-block; width: .16em; height: .16em; background: var(--lime); margin: 0 .04em; vertical-align: baseline; font-style: normal; }
.pt-big { width: .14em; height: .14em; margin: 0 .05em; }

/* Scroll progress: a lime line along the top. */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--lime); }

/* ---------- top bar ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad);
  mix-blend-mode: difference;
  color: var(--ink);
}
.wordmark { font-size: 20px; text-decoration: none; }
.top nav { display: flex; gap: 24px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* ---------- 1. cover ---------- */
.cover {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 80px;
  overflow: hidden;
}
.cover::before {
  /* the notebook grid, large, fading out */
  content: ""; position: absolute; inset: -10%;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%);
  pointer-events: none;
}
.kicker { position: relative; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted); }
.cover-words {
  position: relative;
  font-size: clamp(56px, 16vw, 300px);
  line-height: .82;
  letter-spacing: -0.035em;
  margin-top: 24px;
  white-space: nowrap;
  user-select: none;
}
.rw { position: relative; display: inline-block; cursor: pointer; }
.rw::after {
  /* the redaction bar, slammed on with steps and a lime tab */
  content: ""; position: absolute; left: -0.02em; right: -0.02em; top: .2em; bottom: .14em;
  background: var(--redact);
  transform: scaleX(0); transform-origin: left;
  transition: transform 180ms steps(3, end);
}
.rw.redacted::after { transform: scaleX(1); }
.rw.redacted { color: var(--ink); }
.rw::before {
  content: ""; position: absolute; right: -0.12em; top: .2em; bottom: .14em; width: .14em;
  background: var(--lime); z-index: 1;
  transform: scaleY(0); transform-origin: top;
  transition: transform 180ms steps(3, end) 120ms;
}
.rw.redacted::before { transform: scaleY(1); }
.cover-sub {
  position: relative;
  margin-top: 40px;
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 600;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.2;
  max-width: 28ch;
}
.down {
  position: absolute; right: var(--pad); bottom: 40px;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--lime); color: var(--paper);
  transition: transform 300ms var(--ease);
}
.down:hover { transform: translateY(6px); }

/* ---------- 2. manifesto: pinned, lines slide in one by one ---------- */
.manifesto { position: relative; height: 320vh; }
.pin {
  position: sticky; top: 0; height: 100vh;
  display: grid; place-items: center;
  padding: 0 var(--pad);
  overflow: hidden;
}
.line {
  grid-area: 1 / 1;
  font-size: clamp(36px, 6vw, 104px);
  line-height: .95;
  max-width: 14ch;
  text-align: center;
  opacity: 0;
  transform: translateX(8vw);
  transition: opacity 400ms var(--ease), transform 600ms var(--ease);
}
.line { pointer-events: none; }
.line.on { opacity: 1; transform: none; pointer-events: auto; }
.line.gone { opacity: 0; transform: translateX(-8vw); }
.hl-lime { background: linear-gradient(var(--lime), var(--lime)) left 88% / 100% 42% no-repeat; color: inherit; padding: 0 .04em; transform: skewX(-9deg); display: inline-block; }

/* ---------- 3. tools: pinned horizontal run ---------- */
.tools { position: relative; height: 480vh; }
.tools-pin {
  position: sticky; top: 0; height: 100vh;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 40px;
}
.tools-head { padding: 0 var(--pad); display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.tools-head h2 { font-size: clamp(44px, 7vw, 120px); line-height: .85; }
.tools-head p { color: var(--ink-muted); max-width: 32ch; font-size: 15px; }
.track {
  display: flex; gap: 24px;
  padding: 0 var(--pad);
  will-change: transform;
}
.card {
  flex: 0 0 min(440px, 82vw);
  height: min(560px, 62vh);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 28px;
  display: flex; flex-direction: column;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease);
}
.card:hover { border-color: var(--lime); }
.card-top { display: flex; justify-content: space-between; align-items: start; }
.icon { width: 36px; height: 36px; fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: square; }
.idx { font-size: 12px; letter-spacing: .12em; color: var(--ink-muted); }
.card h3 { margin-top: 0; font-size: clamp(27px, 3vw, 42px); line-height: .92; }
.card .q { margin-top: 14px; color: var(--ink-muted); font-size: 15px; max-width: 32ch; }
.go { margin-top: 20px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }
.card:hover .go { text-decoration: underline; text-underline-offset: 5px; }
.card-main { display: flex; flex-direction: column; flex: 1; text-decoration: none; }
.clone {
  margin-top: 20px; align-self: flex-start;
  border: 1px solid var(--rule); padding: 10px 14px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-muted);
  transition: border-color 240ms var(--ease), color 240ms var(--ease);
}
.clone:hover { border-color: var(--lime); color: var(--lime); }
.card-end { background: var(--lime); color: var(--paper); justify-content: space-between; }
.card-end h3 { margin-top: 0; font-size: clamp(34px, 3.8vw, 56px); color: var(--paper); }
.card-end .q { color: var(--paper); }
.card-end .go { color: var(--paper); }

/* Figures: small live diagrams, one per tool. Decoration with a reason: each shows its question. */
.fig { position: relative; flex: 1; min-height: 96px; margin: 24px 0; display: flex; align-items: flex-end; gap: 6px; }
.fig-holdout i { flex: 1; height: 100%; background: var(--ink-faint); animation: holdout 3.2s steps(1, end) infinite; }
.fig-holdout i:nth-child(3n) { background: var(--lime); }
.fig-holdout i:nth-child(odd) { animation-delay: .4s; }
@keyframes holdout { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

.fig-haircut { position: relative; display: block; }
.fig-haircut b, .fig-haircut span { position: absolute; left: 0; bottom: 0; height: 40%; }
.fig-haircut b { width: 100%; background: var(--ink-faint); animation: haircutTop 4s var(--ease) infinite; }
.fig-haircut span { width: 40%; background: var(--lime); }
@keyframes haircutTop { 0%, 100% { width: 100%; } 50% { width: 40%; } }

.fig-rings { position: relative; }
.fig-rings i { position: absolute; left: 50%; top: 50%; border: 2px solid var(--lime); border-radius: 50%; transform: translate(-50%, -50%); animation: ring 3s var(--ease) infinite; }
.fig-rings i:nth-child(1) { width: 40px; height: 40px; }
.fig-rings i:nth-child(2) { width: 80px; height: 80px; animation-delay: .4s; border-color: var(--ink-muted); }
.fig-rings i:nth-child(3) { width: 120px; height: 120px; animation-delay: .8s; border-color: var(--ink-faint); }
@keyframes ring { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); } }

.fig-curve { display: flex; align-items: flex-end; gap: 10px; }
.fig-curve i { flex: 1; background: var(--ink-faint); height: 20%; animation: curve 4s var(--ease) infinite; }
.fig-curve i:nth-child(1) { animation-delay: 0s; } .fig-curve i:nth-child(2) { animation-delay: .2s; }
.fig-curve i:nth-child(3) { animation-delay: .4s; background: var(--lime); } .fig-curve i:nth-child(4) { animation-delay: .6s; } .fig-curve i:nth-child(5) { animation-delay: .8s; }
@keyframes curve { 0%, 100% { height: 20%; } 50% { height: 100%; } }

.fig-ticks { display: flex; flex-direction: column; justify-content: space-between; }
.fig-ticks i { display: block; height: 14px; width: 100%; background: var(--ink-faint); transform-origin: left; animation: tick 3s var(--ease) infinite; }
.fig-ticks i:nth-child(2) { animation-delay: .3s; } .fig-ticks i:nth-child(3) { animation-delay: .6s; background: var(--lime); }
.fig-ticks i:nth-child(4) { animation-delay: .9s; } .fig-ticks i:nth-child(5) { animation-delay: 1.2s; }
@keyframes tick { 0%, 100% { transform: scaleX(.2); } 50% { transform: scaleX(1); } }

/* ---------- 4. about ---------- */
.about { padding: 200px var(--pad) 160px; border-top: 1px solid var(--rule); }
.about-kicker { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 24px; }
.about-lede {
  font-family: var(--display); font-stretch: 62%; font-weight: 700;
  font-size: clamp(25px, 3.2vw, 48px); line-height: 1; letter-spacing: -0.02em; text-transform: lowercase;
  max-width: 18ch;
}
.about-figs {
  list-style: none; display: flex; flex-wrap: wrap; gap: 16px 40px;
  justify-content: space-between; text-align: center;
  margin-top: 40px; padding: 20px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-size: 15px; color: var(--ink-muted);
}
.about-figs strong { color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 6px; }
.about-body { margin-top: 40px; font-size: clamp(18px, 1.8vw, 22px); line-height: 1.45; max-width: 46ch; }
.about-sub { margin-top: 40px; color: var(--ink-muted); font-size: clamp(16px, 1.4vw, 19px); max-width: 48ch; }
.about-sub a { color: var(--lime); }

/* ---------- 5. signoff ---------- */
.signoff { padding: 120px var(--pad) 80px; border-top: 1px solid var(--rule); }
.sign-line { font-size: clamp(48px, 10vw, 160px); line-height: .85; letter-spacing: -0.035em; }
.footnote { margin-top: 28px; display: flex; gap: 12px; align-items: center; color: var(--ink-muted); font-size: 15px; }
.footnote .tag {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  background: var(--lime); color: var(--paper); font-size: 13px; font-weight: 700;
}
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--pad) 40px; font-size: 13px; color: var(--ink-muted); border-top: 1px solid var(--rule);
}
.foot a { color: var(--ink-muted); }

/* ---------- reduced motion: no pins, no loops, everything shown ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .manifesto { height: auto; }
  .pin { position: static; height: auto; padding: 120px var(--pad); display: block; }
  .line { position: static; opacity: 1; transform: none; text-align: left; margin-bottom: 40px; }
  .tools { height: auto; }
  .tools-pin { position: static; height: auto; padding: 120px 0; }
  .track { overflow-x: auto; }
}

/* ---------- phone: no pins, stacked ---------- */
@media (max-width: 760px) {
  .manifesto { height: auto; }
  .pin { position: static; height: auto; display: block; padding: 120px var(--pad); }
  .line { position: static; opacity: 1; transform: none; text-align: left; margin-bottom: 32px; font-size: clamp(30px, 8.5vw, 52px); }
  .tools { height: auto; }
  .tools-pin { position: static; height: auto; padding: 100px 0; }
  .track { flex-direction: column; }
  .card { flex: none; width: auto; height: auto; min-height: 360px; margin: 0 var(--pad); }
  .card-end { min-height: 260px; }
  .top nav { gap: 6px; }
  .top nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
  .wordmark { min-height: 44px; display: inline-flex; align-items: center; }
  .go { display: inline-flex; align-items: center; min-height: 44px; }
  .foot a { display: inline-flex; align-items: center; min-height: 44px; }
  .about-sub a { display: inline-block; padding: 10px 0; }
  .about { padding: 96px var(--pad) 80px; }
  .signoff { padding: 80px var(--pad) 64px; }
  .pin { padding: 80px var(--pad); }
  .skip:focus { top: 8px; }
  .down { display: none; }
}

/* Redaction chips inside body text: the brand bar, small enough to sit in a sentence.
   Slammed shut by default, click, tap, or keyboard to reveal. */
.rd {
  background: var(--redact); color: transparent;
  box-shadow: .09em 0 0 var(--lime);
  padding: 0 .14em; cursor: pointer; user-select: none;
  white-space: nowrap;
}
.rd:hover { background: var(--rule); }
.rd:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.rd.open {
  background: var(--lime); color: var(--paper);
  box-shadow: none; user-select: text;
}

/* Signoff: the whole line sits under a redaction bar until pressed. */
.sign-line { position: relative; cursor: pointer; }
.sign-line.barred { color: transparent; }
.sign-line.barred::after {
  content: ""; position: absolute; left: 0; right: 0; top: .08em; bottom: .02em;
  background: var(--redact); box-shadow: .09em 0 0 var(--lime);
}
.sign-line.barred:hover::after { background: var(--rule); }

/* The reach bar is a scratch-off: a canvas skin you rub away. JS arms it;
   unarmed it is plain text, so nothing hides without the script. */
.scratch { white-space: nowrap; }
.scratch.armed {
  background: var(--redact); color: transparent;
  box-shadow: .09em 0 0 var(--lime);
  padding: 0 .14em; cursor: pointer; user-select: none;
}
.scratch.armed.open { background: var(--lime); color: var(--paper); box-shadow: none; user-select: text; }
.scratch.has-canvas {
  background: transparent; color: inherit; box-shadow: none;
  padding: 0 .14em; position: relative;
}
.scratch canvas { position: absolute; top: 0; left: 0; touch-action: none; cursor: pointer; }
.scratch:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.tap-hint {
  display: block; margin-top: 26px; line-height: 1.4;
  font-size: clamp(12px, 1.1vw, 15px); font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ink-muted);
}

/* Past the fold, the header wordmark wears the redacted state:
   a bar over "ben" with the lime tab, straight from the logo file. */
.wordmark .wm-ben { position: relative; display: inline-block; }
body.scrolled .wordmark .wm-ben { color: transparent; }
body.scrolled .wordmark .wm-ben::after {
  content: ""; position: absolute; left: -0.04em; right: -0.04em; top: 0.16em; bottom: 0.14em;
  background: var(--ink); box-shadow: .09em 0 0 var(--lime);
}
.card-end .go { display: block; margin-top: 14px; }

/* Phone manifesto: the desktop pin stacks all four lines at once, so give
   them the full measure, a smaller cut, and a rule between statements. */
@media (max-width: 760px) {
  .pin { padding: 64px var(--pad) 24px; }
  .line {
    max-width: none; font-size: clamp(27px, 7.6vw, 38px);
    line-height: 1.08; margin-bottom: 0;
    border-top: 1px solid var(--rule); padding-top: 22px; margin-top: 22px;
  }
  .line:first-child { border-top: none; padding-top: 0; margin-top: 0; }
  .tap-hint { margin-top: 16px; }
}

/* Footer: socials and contact sit opposite the wordmark. */
.foot .socials { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.foot .socials a { color: var(--ink-muted); text-decoration: none; }
.foot .socials a:hover { color: var(--lime); }
@media (max-width: 760px) { .foot { flex-wrap: wrap; gap: 10px 22px; } }

/* Tool figures 1 and 4 rebuilt on transforms. Percentage heights inside
   flex cards resolve badly on phone browsers, and the single-step timing
   stalled the holdout bars. Same pictures, motion that loads everywhere. */
.fig-holdout i { height: auto; align-self: stretch; transform-origin: bottom; animation: holdout 3.2s var(--ease) infinite; }
.fig-curve i { height: auto; align-self: stretch; transform-origin: bottom; transform: scaleY(.2); animation: curve2 4s var(--ease) infinite; }
@keyframes curve2 { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
