/* Plain and bright: white page, black type, centred headlines, pill buttons.
   Colour lives only in the soft panels behind the product, so the product is what you look at. */
:root {
  --bg: #ffffff;
  --text: #0d0d0d;
  --dim: #5d5d5d;
  --faint: #8f8f8f;
  --line: #e8e8e8;
  --soft: #f6f6f5;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --out: cubic-bezier(.16, 1, .3, 1);

  --t-bg: #1b1a21; --t-line: #2c2b34; --t-text: #e7e6ec; --t-dim: #8d8b98;
  --t-accent: #ff875f; --t-purple: #b793ff; --t-blue: #7fb2ff; --t-green: #7bd88f; --t-yellow: #f2c66d; --t-red: #f08a7e;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--text); color: #fff; padding: 8px 12px; border-radius: 8px; }
.logo { width: 24px; height: 24px; flex: none; }
.logo .cursor { transition: opacity .2s; }
.mark:hover .logo .cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Buttons: one dark primary, one light secondary (Von Restorff). Tall enough to hit easily (Fitts). */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border-radius: 999px; font-size: 16px; font-weight: 500; transition: background .2s, transform .15s; }
.btn:active { transform: scale(.97); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-light { background: var(--soft); color: var(--text); }
.btn-light:hover { background: #ececea; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }

/* Header: logo left, links centre, action right (Jakob's law). */
.top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; padding: 0 24px; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.8) blur(14px); }
.mark { display: inline-flex; align-items: center; gap: 9px; justify-self: start; font-weight: 600; font-size: 18px; }
.mark-foot { display: inline-flex; align-items: center; gap: 8px; }
.mark-foot .logo { width: 18px; height: 18px; }
.top nav { display: flex; gap: 32px; font-size: 15px; color: var(--dim); }
.top nav a:hover { color: var(--text); }
.top .btn { justify-self: end; }

/* Hero */
.hero { text-align: center; padding: clamp(72px, 12vh, 136px) 24px 56px; }
.hero h1 { font-size: clamp(44px, 6.6vw, 88px); font-weight: 600; letter-spacing: -.04em; line-height: 1.02; max-width: 11em; margin-inline: auto; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--dim); max-width: 30em; margin: 24px auto 36px; }
.hero .install { margin-bottom: 20px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Soft painted panels behind the product. */
.canvas { position: relative; border-radius: 28px; overflow: hidden; background:
  radial-gradient(60% 80% at 15% 20%, #ffd2bd 0%, transparent 60%),
  radial-gradient(55% 70% at 85% 25%, #d9ccff 0%, transparent 60%),
  radial-gradient(70% 70% at 60% 100%, #ffe7c7 0%, transparent 65%),
  #f4efe9; }
.canvas-0 { background: radial-gradient(70% 90% at 20% 10%, #cfe0ff 0%, transparent 60%), radial-gradient(60% 80% at 90% 90%, #d9ccff 0%, transparent 60%), #eef0f7; }
.canvas-1 { background: radial-gradient(70% 90% at 80% 10%, #ffd8c4 0%, transparent 60%), radial-gradient(60% 80% at 10% 90%, #d7f0dc 0%, transparent 60%), #f5f1ea; }

/* Showcase: the replay plays by itself; the chapters show where it is and let you jump. */
.showcase { width: min(1200px, 100% - 48px); margin: 0 auto; }
.showcase .canvas { padding: clamp(24px, 6vw, 88px) clamp(16px, 7vw, 120px); }
.term { margin: 0; border-radius: 14px; background: var(--t-bg); color: var(--t-text); font: 13.5px/1.75 var(--mono); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(40, 20, 60, .45); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--t-line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; color: var(--t-dim); font-size: 12px; }
.term-body { padding: 20px 24px; height: 420px; overflow: hidden; }
.term-status { display: flex; align-items: center; gap: 10px; padding: 10px 24px; border-top: 1px solid var(--t-line); font-size: 12.5px; color: var(--t-dim); }
.term-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--t-green); }
.term[data-step="2"] .term-status .dot { background: var(--t-yellow); animation: pulse 1.4s ease-in-out infinite; }
.c-accent { color: var(--t-accent); } .c-purple { color: var(--t-purple); } .c-blue { color: var(--t-blue); }
.c-green { color: var(--t-green); } .c-yellow { color: var(--t-yellow); } .c-dim { color: var(--t-dim); }
.t-user { border-left: 2px solid var(--t-accent); padding-left: 12px; margin: 10px 0 14px; }
.t-out { padding-left: 20px; }
.t-text { margin: 14px 0 10px; max-width: 62ch; }
.t-ask { border: 1px solid var(--t-yellow); border-radius: 10px; padding: 12px 14px; margin: 4px 0 12px; transition: border-color .4s; }
.term[data-step="3"] .t-ask, .term[data-step="4"] .t-ask { border-color: var(--t-line); }
.term[data-step="4"] .t-ask .diff { text-decoration: line-through; opacity: .45; }
.ask-head { font-weight: 700; margin-bottom: 8px; }
.diff { padding: 0 8px; white-space: pre; overflow-x: auto; transition: opacity .4s; }
.diff.del { background: #3a1c1c; color: var(--t-red); }
.diff.add { background: #16301f; color: var(--t-green); }
.ask-keys { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; color: var(--t-dim); }
.ask-keys kbd { font: 700 12px var(--mono); color: #111; padding: 1px 7px; border-radius: 4px; margin-right: 6px; }
.k-y { background: var(--t-green); } .k-a { background: var(--t-purple); } .k-n { background: var(--t-red); }
.term[data-step="3"] .k-y { animation: press .45s var(--out); }
.js .term .t { opacity: 0; transform: translateY(6px); transition: opacity .35s var(--out), transform .35s var(--out); transition-delay: calc(var(--i, 0) * 110ms); }
.js .term .t.in { opacity: 1; transform: none; }
@keyframes press { 40% { transform: scale(.8); box-shadow: 0 0 0 6px rgba(123, 216, 143, .3); } }
@keyframes pulse { 50% { opacity: .35; } }

.chapters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 28px; }
.chapter { align-self: start; font: inherit; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: var(--faint); transition: color .3s; }
.chapter:hover, .chapter[aria-selected="true"] { color: var(--text); }
.chapter .bar { display: block; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 14px; }
.chapter .bar span { display: block; height: 100%; width: 100%; background: var(--text); transform: scaleX(0); transform-origin: left; }
.chapter[aria-selected="true"] .bar span { animation: fill var(--dur, 4s) linear forwards; }
.chapter.past .bar span { transform: scaleX(1); }
.chapter strong { display: block; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.chapter-text { font-size: 14px; line-height: 1.45; color: var(--dim); }
.chapter:not([aria-selected="true"]) .chapter-text { color: var(--faint); }
@keyframes fill { to { transform: scaleX(1); } }

/* Sections */
.block { width: min(1200px, 100% - 48px); margin: 0 auto; padding-top: clamp(96px, 14vh, 160px); }
.block > h2 { text-align: center; font-size: clamp(32px, 4vw, 52px); font-weight: 600; letter-spacing: -.035em; line-height: 1.08; margin-bottom: 48px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--soft); border-radius: 24px; padding: 32px; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; transition: background .2s; }
.card:hover { background: #efefed; }
.card h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.card p { color: var(--dim); font-size: 16px; }
.model-names { text-align: center; color: var(--faint); font-size: 15px; margin-top: 32px; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gallery figure { margin: 0; }
.gallery .canvas { padding: clamp(20px, 4vw, 48px); border-radius: 24px; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 20px 50px -24px rgba(0,0,0,.35); transition: transform .6s var(--out); }
.gallery figure:hover img { transform: scale(1.02); }
.gallery figcaption { margin-top: 14px; color: var(--dim); font-size: 15px; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: 18px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-size: 22px; line-height: 1; transition: transform .3s var(--out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--dim); padding-bottom: 22px; }

/* The last section repeats the install (serial position). */
.get { text-align: center; padding-bottom: 24px; }
.install { display: flex; align-items: stretch; width: min(640px, 100%); margin: 0 auto; padding: 6px; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; text-align: left; cursor: copy; transition: border-color .2s, box-shadow .2s; }
.install:hover { border-color: #d4d4d4; box-shadow: 0 6px 24px -12px rgba(0,0,0,.2); }
.cmd { flex: 1; align-self: center; padding: 6px 16px; font: 13px/1.5 var(--mono); color: var(--dim); overflow-wrap: break-word; }
.ps1 { color: var(--faint); }
.copy-state { display: grid; place-items: center; padding: 0 22px; border-radius: 999px; background: var(--text); color: #fff; font-size: 15px; font-weight: 500; transition: background .2s; }
.install.done .copy-state { background: #1f8a4c; }
.dls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 24px; font-size: 14px; color: var(--faint); }
.dls a:hover { color: var(--text); }
.dl.mine { color: var(--text); font-weight: 600; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; width: min(1200px, 100% - 48px); margin: 120px auto 0; padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--faint); }

@media (max-width: 860px) {
  .top { grid-template-columns: 1fr auto; }
  .top nav { display: none; }
  .chapters { grid-template-columns: 1fr 1fr; }
  .cards, .gallery { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .term { font-size: 11.5px; }
  .term-body { height: 360px; padding: 16px; }
  .install { border-radius: 20px; }
  .copy-state { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .chapter[aria-selected="true"] .bar span { transform: scaleX(1); }
}
