/* Tool pages: a big opening line, a pinned demo that plays as you scroll, then the details.
   Layout: one column; the pinned section splits into captions (left) and the stage (right),
   stacking stage-over-caption on phones. Motion only under html.motion. */

/* hero */
.t-hero { padding-block: 32px 72px; }
.t-hero .wrap { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.crumb { font-family: var(--font-ui); font-size: 14px; }
.crumb a { color: var(--ink-muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.t-h1 { font-size: clamp(40px, 7.4vw, 80px); line-height: 1.16; letter-spacing: -0.035em; font-weight: 700; max-width: 14ch; }
.t-h1 .hand { color: var(--hand-ink); }
.t-hero .lede { font-size: clamp(17px, 1.6vw, 20px); max-width: 40ch; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-family: var(--font-ui); font-size: 13px; color: var(--ink-muted); }
.scroll-cue::before { content: ""; width: 1px; height: 28px; background: linear-gradient(var(--ink-muted), transparent); }
.motion .t-hero [data-reveal] { animation: t-rise .9s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
@keyframes t-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* pinned demo */
.scrolly { position: relative; padding-block: 16px 48px; }
.scrolly-pin { width: 100%; }
.scrolly-inner { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 56px; align-items: center; }
.scrolly .wrap { max-width: 1280px; }
.scrolly-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.scrolly-bars { display: flex; gap: 6px; }
.scrolly-bar { position: relative; width: 36px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.scrolly-bar::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--fill, 0)); }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px; }
.chapter { display: flex; flex-direction: column; gap: 12px; }
.chapter .num { font-family: var(--font-brand); font-weight: 800; font-size: 13px; letter-spacing: .1em; color: var(--hand-ink); line-height: 1.3; }
.chapter h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.28; letter-spacing: -0.025em; }
.chapter p { font-size: 17px; line-height: 1.8; color: var(--ink-muted); max-width: 32ch; }
.scrolly-stage { position: relative; height: 470px; min-width: 0; }
.scrolly-stage > .hd { height: 100%; }
html:not(.motion) .scrolly-bars, .scrolly:not(.is-live) .scrolly-bars { display: none; }

.motion .scrolly.is-live { height: calc(100svh + var(--n, 3) * 115svh); padding-block: 0; }
.motion .scrolly.is-live .scrolly-pin { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; }
.motion .scrolly.is-live .chapters { gap: 0; }
.motion .scrolly.is-live .chapter { grid-area: 1 / 1; opacity: 0; transform: translateY(18px); transition: opacity .45s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.motion .scrolly.is-live .chapter.is-on { opacity: 1; transform: none; transition-delay: .08s; }
.motion .scrolly.is-live .scrolly-stage { height: min(calc(100svh - 112px), 600px); transform: scale(calc(.93 + .07 * var(--enter, 1))); transform-origin: 50% 70%; }

@media (max-width: 900px) {
  .scrolly-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .scrolly-stage { height: 460px; }
  .chapter h2 { font-size: 24px; }
  .chapter p { font-size: 15.5px; line-height: 1.7; max-width: none; }
  .motion .scrolly.is-live .scrolly-inner { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 18px; }
  .motion .scrolly.is-live .scrolly-stage { height: min(calc(100svh - 250px), 470px); }
  .motion .scrolly.is-live .scrolly-copy { gap: 14px; min-height: 172px; }
}

/* numbers */
.t-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.t-stat { display: flex; flex-direction: column; gap: 6px; padding: 24px 0 0; border-top: 2px solid var(--ink); }
.t-stat .big { font-family: var(--font-brand); font-weight: 800; font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.t-stat .big small { font-size: .42em; margin-left: 4px; letter-spacing: 0; font-family: var(--font-body); font-weight: 700; }
.t-stat p { font-size: 15px; color: var(--ink-muted); }

/* details */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.features .card { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; }
.features h3 { font-size: 18px; line-height: 1.45; }
.features p { font-size: 15px; line-height: 1.7; color: var(--ink-muted); }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mode { display: flex; flex-direction: column; gap: 8px; }
.mode .tag { align-self: flex-start; font-family: var(--font-ui); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--hand-soft); color: var(--ink); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 2px solid var(--line); }
.steps li::before { content: counter(step); font-family: var(--font-brand); font-weight: 800; font-size: 14px; color: var(--hand-ink); }
.steps b { font-weight: 700; font-size: 18px; }
.steps span { font-size: 15px; line-height: 1.65; color: var(--ink-muted); }
.notice { background: var(--hand-soft); border-radius: var(--radius-md); padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.notice .dots { font-size: 15px; }
.cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta .prose { gap: 8px; }

.reveal-on [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(28px); }
.reveal-on [data-reveal] { transition: opacity .8s ease, transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }

@media (max-width: 900px) {
  .features, .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .features, .modes, .steps { grid-template-columns: minmax(0, 1fr); }
  .t-stats { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .t-stat { flex-direction: row; align-items: baseline; gap: 14px; padding-top: 14px; }
  .t-stat .big { font-size: 44px; min-width: 3.2ch; }
}
