/* The Artbench download page, in the app's Workshop look (docs/DESIGN.md): graphite, 1 px lines, small corners, amber
   for what matters. Motion comes from js/site.js (the logo drawn by the app's own pencil simulation; --s, --e and --pg,
   which follow the scroll); without it, or under reduced motion, everything is simply there. */
:root {
  --bg: #161616; --s1: #1b1b1b; --s2: #212121; --s3: #282828;
  --line: rgba(255, 255, 255, .075); --line2: rgba(255, 255, 255, .15);
  --text: #e4e4e4; --strong: #f4f2ee; --muted: #a8a8a8; --dim: #878787;
  --accent: #e8a33d; --accent2: #f0b75e; --ink: #17140f; --ok: #8fbf7a;
  --sans: "IBM Plex Sans", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Archivo", var(--sans);
  --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.22, 1.35, .36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--accent2); text-underline-offset: 3px; }
code { font: 500 .86em var(--mono); background: var(--s2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 2px; }
img, video { max-width: 100%; display: block; }
h2 { font: 700 clamp(28px, 3.4vw, 40px)/1.12 var(--display); font-stretch: 112%; letter-spacing: -.015em; color: var(--strong); margin: 0 0 16px; }
h3 { font: 600 15px var(--sans); color: var(--strong); margin: 0 0 10px; }
.kicker { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }

/* the pencil line under a phrase: drawn when its section comes into view */
.hl { position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: -2px; right: -4px; bottom: -.06em; height: .1em; min-height: 3px;
  background: var(--accent); border-radius: 2px; transform-origin: 0 50%; transform: rotate(-.6deg); }
.js .hero .hl::after { transform: rotate(-.6deg) scaleX(0); transition: transform .9s var(--ease) .3s; }
.js .hero.in .hl::after { transform: rotate(-.6deg) scaleX(1); }
.js .sc .hl::after { transform: rotate(-.6deg) scaleX(clamp(0, calc((var(--e, 1) - .3) * 1.8), 1)); }   /* drawn as you scroll */

/* ---- top ---- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(16px, calc((100vw - 1200px) / 2)); background: rgba(22, 22, 22, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--strong); text-decoration: none;
  font: 700 20px var(--display); font-stretch: 114%; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; color: var(--accent); }
nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
nav a { color: var(--muted); text-decoration: none; transition: color .1s; }
nav a:hover { color: var(--strong); }

.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: var(--ink);
  font: 600 16px var(--sans); text-decoration: none; padding: 12px 20px; border-radius: 3px; border: 1px solid var(--accent);
  transition: background .12s, border-color .12s, transform .12s; }
.btn:hover { background: var(--accent2); border-color: var(--accent2); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn.small { padding: 6px 13px; font-size: 13px; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--strong); border-color: var(--line2); }
.btn.ghost:hover { border-color: var(--muted); background: var(--s1); }

main > section { max-width: 1200px; margin: 0 auto; padding: 0 16px; scroll-margin-top: 72px; }

/* ---- hero: the cutting mat, the logo drawn by the pencil ---- */
.hero { position: relative; text-align: center; padding-top: 72px !important; }
.mat { position: absolute; inset: -40px calc(50% - 50vw) -60px; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 55% 65% at 50% 30%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 55% 65% at 50% 30%, #000 25%, transparent 78%); }
.lock { display: inline-flex; align-items: center; gap: .3em; font-size: clamp(44px, 7vw, 88px); margin: 0 auto 30px;
  background: none; border: 0; padding: 0; color: var(--strong); cursor: pointer; }
.lock:focus-visible { outline: 1px solid var(--accent); outline-offset: 8px; }
.lock .mark { color: var(--accent); width: 1.45em; height: 1.45em; overflow: visible; transform-origin: 50% 100%; }
.lock .word { display: inline-flex; overflow: hidden; font: 660 .82em/1.12 var(--display); font-stretch: 114%;
  letter-spacing: -.02em; padding: .1em 0 .04em; margin-top: -.1em; }
.lock .word i { font-style: normal; display: inline-block; }
.lock.play .word i { animation: rise .6s var(--spring) calc(2.4s + var(--i) * 40ms) both; }
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }

h1 { font: 700 clamp(32px, 5vw, 60px)/1.08 var(--display); font-stretch: 112%; letter-spacing: -.02em; color: var(--strong);
  margin: 0 auto 20px; max-width: 920px; }
.lead { color: var(--muted); font-size: clamp(17px, 1.9vw, 20px); max-width: 700px; margin: 0 auto 30px; }
.cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.fine { color: var(--dim); font: 400 12.5px var(--mono); margin: 18px 0 0; }
.fine a { color: var(--muted); }
.js .hero .rise { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .hero.in .rise { opacity: 1; transform: none; }
.js .hero.in .lead { transition-delay: .08s; }
.js .hero.in .cta { transition-delay: .16s; }
.js .hero.in .fine { transition-delay: .24s; }

/* ---- motion that follows the scroll (js/site.js sets --s, --e, --pg; without it they stay at rest) ---- */
.pencil { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.pencil i { position: absolute; left: 0; top: 0; height: 2px; width: calc(var(--pg, 0) * 100%); background: var(--accent); }
.pencil i::after { content: ""; position: absolute; right: -9px; top: -3px; border-left: 9px solid var(--accent);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent; }     /* the lead, drawing the line */
.js .hero > :not(.mat) { translate: 0 calc(var(--s, 0) * -120px); }
.js .hero { opacity: calc(1 - var(--s, 0) * .7); }
.js .hero .mat { translate: 0 calc(var(--s, 0) * 90px); }
.js .hero .lock { scale: calc(1 - var(--s, 0) * .12); }
.js .sc .kicker, .js .sc h2 { translate: 0 calc((1 - var(--e, 1)) * 56px); opacity: calc(var(--e, 1) * 1.6 - .3); }
.js .sc .text > p:not(.kicker), .js .rule ol, .js .install .cols, .js .tr p { translate: 0 calc((1 - var(--e, 1)) * 90px);
  opacity: calc(var(--e, 1) * 1.6 - .5); }
.js .split .frame, .js .split .term { translate: calc((1 - var(--e, 1)) * 140px) calc((1 - var(--e, 1)) * 40px);
  rotate: calc((1 - var(--e, 1)) * 4deg); opacity: calc(var(--e, 1) * 1.5 - .2); }
.js .split.flip .term { translate: calc((1 - var(--e, 1)) * -140px) calc((1 - var(--e, 1)) * 40px); rotate: calc((1 - var(--e, 1)) * -4deg); }
.js .specs div { translate: 0 calc((1 - var(--e, 1)) * 60px); opacity: calc(var(--e, 1) * 1.7 - .4); }
.js .specs div:nth-child(2) { translate: 0 calc((1 - var(--e, 1)) * 100px); }
.js .specs div:nth-child(3) { translate: 0 calc((1 - var(--e, 1)) * 140px); }
.js .specs div:nth-child(4) { translate: 0 calc((1 - var(--e, 1)) * 180px); }
.js .specs div:nth-child(5) { translate: 0 calc((1 - var(--e, 1)) * 220px); }
.js .steps li { translate: 0 calc((1 - var(--e, 1)) * 80px); opacity: calc(var(--e, 1) * 1.7 - .5); }
.js .steps li:nth-child(2) { translate: 0 calc((1 - var(--e, 1)) * 130px); }
.js .steps li:nth-child(3) { translate: 0 calc((1 - var(--e, 1)) * 180px); }
.js .film video { scale: calc(.8 + var(--e, 1) * .2); opacity: calc(var(--e, 1) * 1.4 - .1); }

/* ---- the tour: a question, then the view that answers it ---- */
.tour { margin-top: 80px !important; }
.js .tour { height: calc(100vh + 6 * 70vh); }                      /* pinned while the page scrolls six stretches */
.js .tour-pin { position: sticky; top: 64px; padding-top: 8px; }
.js .tour .window { width: min(100%, calc((100vh - 300px) * 1.6)); margin-left: auto; margin-right: auto;
  transform-origin: 50% 0; transform: perspective(1600px) rotateX(calc((1 - var(--e, 1)) * 26deg)) scale(calc(.86 + var(--e, 1) * .14)); }
.ask { display: flex; align-items: baseline; justify-content: center; gap: 14px; min-height: 1.6em; margin: 0 0 20px; }
.ask-label { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.q { margin: 0; font: 600 clamp(20px, 2.6vw, 30px)/1.3 var(--display); font-stretch: 108%; color: var(--strong); }
.caret { display: inline-block; width: .45em; height: 3px; margin-left: 4px; background: var(--accent); border-radius: 1px;
  animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.tabs { display: flex; justify-content: center; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; background: none; border: 0; color: var(--dim); font: 500 14px var(--sans); padding: 12px 16px;
  cursor: pointer; transition: color .1s; }
.tabs button b { font: 500 11px var(--mono); color: var(--dim); margin-right: 6px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--strong); }
.tabs button[aria-selected="true"] b { color: var(--accent); }
.tabs button i { position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--line2); display: none; }
.tabs button[aria-selected="true"] i { display: block; }
.tabs button i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%;
  transform: scaleX(var(--p, 1)); }

.window { margin-top: 22px; border: 1px solid var(--line2); border-radius: 4px; background: #111; overflow: hidden; }
.view { margin: 0; display: none; }
.view.on { display: block; animation: show .5s var(--ease); }
.window .view { transition: opacity .3s var(--ease), filter .3s var(--ease); }
.window.asking .view.on { opacity: .35; filter: saturate(.4); }
@keyframes show { from { opacity: 0; transform: scale(.99); } to { opacity: 1; transform: none; } }
.shot { position: relative; }
.shot img { width: 100%; height: auto; }
.view figcaption { color: var(--muted); font-size: 15px; padding: 14px 20px 16px; border-top: 1px solid var(--line); background: var(--s1); }

/* a tag pointing at its place in the screenshot: a ring on the spot, the label beside it */
.tag { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; pointer-events: none; }
.tag::before { content: ""; position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--accent); background: rgba(232, 163, 61, .16); }
.tag > span { position: absolute; top: -13px; left: 18px; white-space: nowrap; background: var(--accent); color: var(--ink);
  font: 500 12.5px/1 var(--mono); padding: 7px 9px; border-radius: 2px; }
.tag[data-side="l"] > span { left: auto; right: 18px; }
.tag[data-side="b"] > span { top: 16px; left: -22px; }
.tag[data-side="t"] > span { top: -44px; left: -22px; }
.tag[data-side="bl"] > span { top: 16px; left: auto; right: -22px; }
.js .tag::before, .js .tag > span { opacity: 0; transform: scale(.5); transition: opacity .3s var(--ease), transform .5s var(--spring); }
.js .view.tags .tag::before, .js .view.tags .tag > span { opacity: 1; transform: none; }
.js .view.tags .tag:nth-of-type(2)::before, .js .view.tags .tag:nth-of-type(2) > span { transition-delay: .3s; }
.js .view.tags .tag:nth-of-type(3)::before, .js .view.tags .tag:nth-of-type(3) > span { transition-delay: .6s; }

/* ---- at a glance: figures between hairlines, like the app's stats ---- */
.specs { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 72px !important; padding: 0 !important;
  width: min(1168px, calc(100% - 32px));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs div { padding: 18px; border-left: 1px solid var(--line); }
.specs div:first-child { border-left: 0; padding-left: 0; }
.specs b { display: block; font: 600 22px/1.2 var(--sans); color: var(--strong); margin-bottom: 4px; }
.specs span { color: var(--dim); font-size: 13px; line-height: 1.4; display: block; }

/* ---- split sections ---- */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; margin-top: 128px !important; }
.split.flip .text { order: 2; }
.split .text > p:not(.kicker) { color: var(--muted); margin: 0 0 14px; }
.split .text > p.small { font-size: 14px; color: var(--dim); }
.frame { margin: 0; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; background: #111; }
.frame img { width: 100%; }

.term { border: 1px solid var(--line2); border-radius: 4px; background: #101010; overflow: hidden; }
.term-bar { display: flex; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--line);
  font: 500 11.5px var(--mono); color: var(--dim); letter-spacing: .04em; }
.term-bar span:first-child { color: var(--accent); }
.term pre { margin: 0; padding: 18px 18px 20px; min-height: 23em; overflow-x: auto; }
.term code { background: none; border: 0; padding: 0; font: 400 13.5px/1.65 var(--mono); color: var(--muted); white-space: pre; }
.term .u { color: var(--strong); font-weight: 500; }
.term .k { color: var(--accent); }
.term .ok { color: var(--ok); }
.term .cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--accent);
  animation: blink 1s steps(2, start) infinite; }

/* ---- the rule ---- */
.rule { margin-top: 136px !important; }
.rule ol { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.rule li { display: flex; gap: 14px; align-items: flex-start; padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line); }
.rule li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.rule svg { flex: none; width: 24px; height: 24px; margin-top: 1px; fill: none; stroke: var(--accent); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 0; }
.js .rule svg { stroke-dashoffset: 24; transition: stroke-dashoffset .6s var(--ease) .4s; }
.js .rule.in svg { stroke-dashoffset: 0; }
.js .rule.in li:nth-child(2) svg { transition-delay: .65s; }
.js .rule.in li:nth-child(3) svg { transition-delay: .9s; }
.js .rule.in li:nth-child(4) svg { transition-delay: 1.15s; }

.film { margin-top: 136px !important; }
.film video { width: 100%; border-radius: 4px; border: 1px solid var(--line2); background: #000; }

/* ---- install ---- */
.install { margin-top: 136px !important; }
.steps { list-style: none; padding: 0; margin: 28px 0 36px; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps li { display: flex; gap: 16px; padding: 22px 22px 22px 0; color: var(--muted); }
.steps li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.steps b { font: 700 34px/1 var(--display); color: var(--accent); }
.steps strong { color: var(--strong); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.cols p { color: var(--muted); margin: 0 0 10px; font-size: 15.5px; }
.cols strong { color: var(--text); }
.cta.again { justify-content: flex-start; margin-top: 36px; }

.tr { margin-top: 96px !important; border-top: 1px solid var(--line); padding: 36px 0 0 !important; width: min(1168px, calc(100% - 32px)); }
.tr h2 { font-size: 22px; }
.tr p { color: var(--muted); margin: 0; }

footer { max-width: 1200px; margin: 80px auto 0; padding: 28px 16px 48px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
footer b { color: var(--muted); font-weight: 600; }


@media (max-width: 900px) {
  .js .tour { height: calc(100vh + 6 * 60vh); }
  .js .split .frame, .js .split .term, .js .split.flip .term { translate: 0 calc((1 - var(--e, 1)) * 60px); rotate: none; }
  nav a:not(.btn) { display: none; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 24px; margin-top: 96px !important; }
  .split.flip .text { order: 0; }
  .specs { grid-template-columns: 1fr 1fr; }
  .specs div, .specs div:first-child { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); }
  .specs div:nth-child(even) { border-left: 1px solid var(--line); padding-left: 16px; }
  .specs div:last-child { border-bottom: 0; grid-column: 1 / -1; }
  .rule ol, .steps, .cols { grid-template-columns: 1fr; }
  .rule li:nth-child(even), .steps li + li { padding-left: 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .cols { gap: 8px; }
  .tabs { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex: none; padding: 10px 12px; }
  .tag { display: none; }
  .shot { aspect-ratio: 4 / 3; overflow: hidden; }                 /* a phone sees the part that answers, larger */
  .shot img { width: 230%; max-width: none; transform: translate(var(--mx, 0), var(--my, 0)); }
  .term code { font-size: 11px; }
  .term pre { min-height: 0; }
  .ask { flex-direction: column; align-items: flex-start; gap: 4px; min-height: 4.4em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
