@font-face {
  font-family: Roobert;
  src: url(roobert-regular.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Roobert;
  src: url(roobert-semibold.woff2) format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Roobert;
  src: url(roobert-bold.woff2) format('woff2');
  font-weight: 700 800;
  font-display: swap;
}

:root {
  --ds-ink: #151518;
  --ds-ink-2: #48425f;
  --ds-green: #5c7900;
  --ds-lime: #d4f564;
  --ds-bg-cream: #f5ebdd;
  --ds-bg-paper: #fffdf8;
  --green-ink: #496200;
  --ds-title: clamp(36px, calc(2.5vw + 20px), 64px);
  --ds-sub: clamp(17px, calc(.42vw + 14px), 21px);
  --ds-label: clamp(12px, calc(.1vw + 11.6px), 13px);
  --ds-container: 1200px;
  --ds-gutter: clamp(20px, 4.45vw, 64px);
  --ds-space-section: clamp(72px, calc(3.8vw + 57px), 120px);
  --ds-gap-title: clamp(32px, calc(1.5vw + 26px), 56px);
  --problem-size: clamp(56px, 6.2vw, 96px);
  --founder-size: clamp(17px, 1.46vw, 21px);
  --answer-size: clamp(24px, 2.35vw, 34px);
  --pirate-ratio: 803 / 1200;
  color: var(--ds-ink);
  background: var(--ds-bg-paper);
  font-family: Roobert, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
::selection { color: var(--ds-ink); background: var(--ds-lime); }
.preview-space { height: 180px; }
#pains { background: var(--ds-bg-cream); }
.layout {
  width: min(var(--ds-container), calc(100% - 2 * var(--ds-gutter)));
  margin-inline: auto;
  padding-block: var(--ds-space-section);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34%;
  grid-template-areas: 'intro intro' 'cases pirate' 'progress pirate';
  column-gap: clamp(24px, 4vw, 64px);
}
.intro { grid-area: intro; }
.intro h1 { font-size: var(--ds-title); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
.intro em { color: var(--green-ink); font-style: normal; white-space: nowrap; }
.intro p { margin-top: 12px; color: var(--ds-ink-2); font-size: var(--ds-sub); line-height: 1.35; max-width: 46ch; }
.cases { grid-area: cases; padding-top: var(--ds-gap-title); }
.case + .case { margin-top: var(--ds-gap-title); }
.problem { position: relative; }
.problem h2 {
  font-size: var(--problem-size);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: .98;
  overflow-wrap: anywhere;
}
.founder { margin-top: 18px; color: var(--ds-ink-2); font-size: var(--founder-size); line-height: 1.42; }
.answer {
  max-width: 33ch;
  margin-top: 24px;
  color: var(--green-ink);
  font-size: var(--answer-size);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.022em;
}
.pirate {
  grid-area: pirate;
  position: relative;
  align-self: start;
  justify-self: end;
  width: min(100%, 380px);
  aspect-ratio: var(--pirate-ratio);
}
/* A soft contact shadow and a faint warm pool of light, so he stands on the page instead of floating. */
.pirate::before {
  content: '';
  position: absolute;
  inset: auto 4% -3.5% 10%;
  height: 11%;
  background:
    radial-gradient(closest-side, rgba(84, 56, 22, .30), rgba(84, 56, 22, .10) 55%, rgba(84, 56, 22, 0)),
    radial-gradient(closest-side, rgba(232, 196, 120, .30), rgba(232, 196, 120, 0));
  background-size: 74% 46%, 100% 100%;
  background-position: 58% 62%, center;
  background-repeat: no-repeat;
}
.pose { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.pose-swing { opacity: 0; }
.progress[hidden] { display: none; }
.progress {
  grid-area: progress;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  margin-inline-start: -6px;
  color: var(--ds-ink-2);
}
.count { order: 1; font-size: var(--ds-label); font-weight: 600; font-variant-numeric: tabular-nums; }
.dots { display: flex; }
.dot {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--green-ink);
  padding: 0;
  width: 26px;
  height: 44px;
  cursor: pointer;
  border-radius: 4px;
  touch-action: manipulation;
}
.dot::before { content: ''; width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 50%; }
.dot:hover::before { background: #a5ac76; }
.dot[aria-current='step']::before { background: currentColor; width: 10px; height: 10px; }
.dot:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }

/* Only the enhanced layout pins. The document otherwise remains a list of all seven pairs. */
.scrub #pains { min-height: calc(100svh + var(--travel)); }
.scrub .stage { position: sticky; top: 0; height: 100svh; }
.scrub .layout { height: 100%; grid-template-rows: auto minmax(0, 1fr) auto; padding-block: clamp(50px, 10svh, 100px) clamp(46px, 8svh, 80px); }
.scrub .cases { position: relative; padding: 0; }
.scrub .case {
  position: absolute;
  inset: clamp(50px, 10svh, 96px) 0 auto;
  margin: 0;
  visibility: hidden;
  opacity: var(--case-alpha, 1);
}
.scrub .case.is-current { visibility: visible; }
.scrub .answer { opacity: var(--answer-alpha, 0); }
.scrub .problem h2 { opacity: calc(1 - .3 * var(--answer-alpha, 0)); }
.scrub .layout { grid-template-areas: 'intro pirate' 'cases pirate' 'progress pirate'; grid-template-columns: minmax(0, 1fr) 37%; column-gap: clamp(16px, 2vw, 32px); }
.scrub .pirate { align-self: end; justify-self: start; width: auto; height: min(100%, 680px); max-width: 100%; margin-bottom: 18px; }
.scrub .pose-ready { opacity: calc(1 - var(--swing, 0)); }
.scrub .pose-swing { opacity: var(--swing, 0); }
.slash { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; visibility: hidden; }
/* The mask stroke reveals the blade cut from right (his side) to left, by scroll. */
.slash .edge {
  fill: none;
  stroke: #fff;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - clamp(0, (var(--cut-progress, 0) - var(--delay)) / (1 - var(--delay)), 1));
  stroke-linecap: butt;
}
/* Two soft layers in place of a blur filter: the same look without a repaint cost on every scroll frame. */
.slash .glow { fill: #c9df6a; opacity: .16; }
.slash .trail { fill: #b2cf3e; opacity: .26; }
.slash .shine { fill: none; stroke: #fdfbe9; stroke-width: 1.4; stroke-linecap: round; opacity: .8; }
.scrub .is-current .slash { visibility: visible; opacity: var(--cut-alpha, 0); }

@media (max-width: 860px) {
  :root { --problem-size: clamp(36px, 11.55vw, 66px); --answer-size: clamp(23px, 5.95vw, 31px); }
  .preview-space { height: 160px; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'intro' 'cases' 'pirate' 'progress'; }
  .pirate { width: min(46vw, 230px); margin-top: 36px; }
  .scrub .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'intro' 'cases' 'pirate' 'progress';
    grid-template-rows: auto minmax(0, 1fr) clamp(150px, 31svh, 280px) auto;
    padding-block: clamp(40px, 8.5svh, 72px) clamp(28px, 6svh, 55px);
  }
  .scrub .case { inset-block-start: clamp(30px, 7.2svh, 61px); }
  .scrub .pirate { margin: 0 0 6px; align-self: end; justify-self: end; width: auto; height: calc(100% - 6px); max-width: 62%; }
  .dot { width: clamp(26px, 8.4vw, 44px); }
  .progress { margin-inline-start: -10px; }
}
@media (max-width: 430px) {
  .scrub .intro h1 { max-width: 100%; }
  .scrub .case { inset-block-start: clamp(30px, 5.7svh, 49px); }
  .founder { margin-top: 14px; }
  .answer { margin-top: 19px; }
}
@media (max-height: 760px) and (max-width: 860px) {
  .scrub .layout { grid-template-rows: auto minmax(0, 1fr) clamp(92px, 22svh, 175px) auto; }
}
