/* The landing page: the hero's harmonograph, the drill, the ratio story, the pendulum lab, the skills, the notebook,
   the loudness chart, pricing and questions. Plates hold a canvas (the figure, its pen and the pendulums behind it)
   over the static SVG the build writes; the SVG is what shows without JavaScript. SVG figure strokes are in each
   figure's own units (no non-scaling strokes) so the ink can draw itself with dash offsets in every browser. */

:root { interpolate-size: allow-keywords; }
.home main { overflow-x: clip; }
.home main > section { max-width: var(--wide); margin: 0 auto; padding: clamp(96px, 11vw, 150px) var(--gutter) 0; }
.kicker { font: 600 16px/1.3 var(--body); color: var(--ink-text); }
.section-head { max-width: 44rem; display: grid; gap: 16px; }
.section-head h2, .nb-copy h2 { font-size: clamp(38px, 5vw, 62px); line-height: 1.03; letter-spacing: -0.022em; font-weight: 540; }
.section-head p:not(.kicker), .nb-copy p { color: var(--muted); font-size: clamp(18px, 1.5vw, 20px); line-height: 1.6; }
.fine { color: var(--muted); font-size: 15px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Headlines rise line by line out of a mask (landing.js); the mask leaves room for descenders. */
.line-mask { display: block; overflow: clip; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.line { display: block; }
@media (prefers-reduced-motion: no-preference) {
  /* Until landing.js takes over: the hero's headline and plate wait, but never longer than a moment. */
  .js .hero [data-split] { opacity: 0; animation: failsafe-opacity 0s linear 2.6s forwards; }
  .js .hero-plate:not(.live) .plate-svg { visibility: hidden; animation: failsafe 0s linear 2.6s forwards; }
}
@keyframes failsafe { to { visibility: visible; } }
@keyframes failsafe-opacity { to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  /* The hero's one orchestrated entrance: the headline rises (landing.js), then the rest settles in after it. */
  .js .hero-copy > :not(h1), .js .tuner, .js .hero-cap { animation: settle 0.9s var(--pen) both; }
  .js .hero-copy > .kicker { animation-delay: 0.05s; }
  .js .hero-copy > .lede { animation-delay: 0.5s; }
  .js .hero-copy > .cta { animation-delay: 0.62s; }
  .js .hero-copy > .fine { animation-delay: 0.74s; }
  .js .tuner { animation-delay: 0.9s; }
  .js .hero-cap { animation-delay: 1.05s; }
  .js .hero-plate { animation: settle-plate 1.1s var(--pen) 0.15s both; }
}
@keyframes settle { from { opacity: 0; transform: translateY(14px); } }
@keyframes settle-plate { from { opacity: 0; transform: translateY(22px) scale(0.985); } }

/* Hero: the copy, and the instrument (the plate, its chips and its caption) */
.home main > .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding-top: clamp(28px, 5vw, 64px);
}
.hero-copy { display: grid; gap: 24px; align-content: center; }
.hero h1 { font-size: clamp(44px, 5.9vw, 82px); line-height: 0.99; letter-spacing: -0.028em; font-weight: 520; }
.hero .lede { font-size: clamp(18px, 1.55vw, 21px); line-height: 1.6; color: var(--muted); max-width: 33rem; }
.instrument { margin: 0; display: grid; gap: 20px; justify-items: start; }
.hero-plate { width: min(100%, max(320px, calc(100svh - 330px))); }
.hero-plate > svg { inset: 6%; width: 88%; height: 88%; }
.hero-fig path { fill: none; stroke: var(--ink); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.tuner { display: grid; gap: 10px; width: 100%; }
.tuner-label { font-size: 15px; font-weight: 500; color: var(--muted); }
html:not(.js) .tuner { display: none; }
.hero-cap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; align-items: start; width: 100%; }
.cap-ratio { font: 560 54px/1 var(--display); color: var(--ink-text); min-width: 2.9em; }
.cap-text { color: var(--muted); font-size: 17px; line-height: 1.55; }
@media (min-width: 901px) { .cap-text { min-height: calc(1.55em * 4); } }
.cap-text b { color: var(--text); font-weight: 600; }
@media (max-width: 900px) {
  .home main > .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-plate { width: min(100%, 520px); }
}
@media (max-width: 560px) {
  .chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-cap { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cap-ratio { font-size: 46px; min-width: 0; }
}

/* Drill */
.try { display: grid; gap: 40px; }
.drill { background: var(--sheet); border: 1px solid var(--rule); border-radius: 28px; box-shadow: var(--shadow-lift); padding: clamp(18px, 3vw, 34px); display: grid; gap: 24px; max-width: 60rem; }
.drill-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.drill-count { color: var(--muted); font-size: 16px; margin-left: auto; }
.drill-count b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.drill-note { color: var(--muted); }
@media (max-width: 560px) {
  /* Play and the count share the first row; the trail gets the second, so nothing moves when the label changes. */
  .drill-count { order: 2; }
  .trail-wrap { order: 3; flex-basis: 100%; }
}

/* The ratio story: a pinned plate that retunes as the steps scroll past */
.story { display: grid; gap: 44px; }
.story-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.story-plate { position: sticky; top: 88px; display: grid; gap: 18px; justify-items: center; }
.story-sheet { width: min(100%, max(300px, calc(100svh - 330px))); }
.story-readout { width: min(100%, max(300px, calc(100svh - 330px))); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.story-ratio { font: 560 58px/1 var(--display); color: var(--ink-text); min-width: 2.4em; }
.gauge { display: grid; gap: 6px; }
.gauge-track, .gauge-ticks { margin-inline: 12px; }
.gauge-label { font-size: 15px; color: var(--muted); line-height: 1.35; }
.gauge-label b { color: var(--text); font-weight: 600; }
.gauge-track {
  position: relative;
  height: 22px;
  background:
    linear-gradient(var(--rule), var(--rule)) 0 50% / 100% 1px no-repeat,
    linear-gradient(var(--pencil), var(--pencil)) 0 50% / 1px 10px no-repeat,
    linear-gradient(var(--pencil), var(--pencil)) 25% 50% / 1px 8px no-repeat,
    linear-gradient(var(--pencil), var(--pencil)) 50% 50% / 1.5px 22px no-repeat,
    linear-gradient(var(--pencil), var(--pencil)) 75% 50% / 1px 8px no-repeat,
    linear-gradient(var(--pencil), var(--pencil)) 100% 50% / 1px 10px no-repeat;
}
.gauge-needle { position: absolute; inset: 0; }
.gauge-needle::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--ink-wash); }
.gauge-ticks { position: relative; height: 18px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gauge-tick { position: absolute; top: 0; transform: translateX(-50%); }
.gauge-tick:nth-child(1) { left: 0; }
.gauge-tick:nth-child(2) { left: 25%; }
.gauge-tick:nth-child(3) { left: 50%; }
.gauge-tick:nth-child(4) { left: 75%; }
.gauge-tick:nth-child(5) { left: 100%; }
.gauge-tick.zero { color: var(--text); font-weight: 600; }
.story-index { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font: 600 18px/1 var(--display); color: var(--muted); font-variant-numeric: lining-nums; }
.story-index li { transition: color 200ms ease; position: relative; padding-bottom: 6px; }
.story-index li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 1px; background: var(--ink); transform: scaleX(0); transition: transform 300ms var(--pen); }
.story-index li.on { color: var(--ink-text); }
.story-index li.on::after { transform: scaleX(1); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.step { min-height: 74vh; display: grid; align-content: center; justify-items: start; gap: 14px; padding: 24px 0; }
.step-fig { display: none; width: 150px; height: 150px; }
.step-fig path { stroke: var(--ink); stroke-width: 1.15; }
.step .step-ratio { font: 560 clamp(48px, 5vw, 64px)/1 var(--display); color: var(--ink-text); font-variant-numeric: lining-nums; }
.step h3 { font-size: clamp(30px, 3vw, 36px); }
.step p { color: var(--muted); max-width: 31rem; }
.step .step-note { color: var(--text); font-size: 16px; font-weight: 500; }
.sources { color: var(--muted); font-size: 15px; max-width: 54rem; }
html:not(.js) .story-plate { display: none; }
html:not(.js) .story-body { grid-template-columns: minmax(0, 1fr); }
html:not(.js) .step { min-height: 0; border-top: 1px solid var(--rule); padding: 28px 0; }
html:not(.js) .step-fig { display: block; }
@media (max-width: 900px) {
  .story-body { grid-template-columns: minmax(0, 1fr); }
  .story-plate { display: none; }
  .step { min-height: 0; border-top: 1px solid var(--rule); padding: 30px 0; }
  .step-fig { display: block; width: 140px; height: 140px; }
}

/* The pendulum lab */
.lab { display: grid; gap: 44px; }
.lab-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.lab-plate { width: min(100%, 560px); }
.lab-panel { display: grid; gap: 24px; align-content: center; min-width: 0; }
.lab-readout { display: grid; gap: 8px; }
.lab-ratio { font: 560 clamp(60px, 7vw, 96px)/1 var(--display); color: var(--ink-text); letter-spacing: -0.02em; }
.lab-name { font: 560 clamp(24px, 2.4vw, 30px)/1.2 var(--display); text-wrap: balance; }
.lab-detail { color: var(--muted); min-height: 3.3em; }
.lab-control { display: grid; gap: 4px; }
.lab-ends { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.lab-slider { position: relative; }
.lab-slider input { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
.lab-slider input:focus-visible { outline: none; }
.lab-slider input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--rule); }
.lab-slider input::-moz-range-track { height: 4px; border-radius: 2px; background: var(--rule); }
.lab-slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--sheet);
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 6px var(--ink-wash);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.lab-slider input::-moz-range-thumb { box-sizing: border-box; width: 28px; height: 28px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--ink); box-shadow: 0 0 0 6px var(--ink-wash); }
.lab.is-snapped .lab-slider input::-webkit-slider-thumb { background: var(--ink); }
.lab.is-snapped .lab-slider input::-moz-range-thumb { background: var(--ink); }
.lab-slider input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ink); outline-offset: 4px; }
.lab-slider input:focus-visible::-moz-range-thumb { outline: 2px solid var(--ink); outline-offset: 4px; }
.lab-ticks { display: block; width: calc(100% - 28px); margin: -6px 14px 0; overflow: visible; }
.lab-ticks line { stroke: var(--pencil); stroke-width: 1.5; }
.lab-ticks text { font: 600 13px var(--body); fill: var(--muted); }
html:not(.js) .lab-control, html:not(.js) [data-lab-hear] { display: none; }
@media (max-width: 900px) {
  /* Readout, plate, then the slider right under it, so the figure stays in view while you slide. */
  .lab-body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lab-panel { display: contents; }
  .lab-readout { order: 1; }
  .lab-plate { order: 2; width: min(100%, 520px); }
  .lab-control { order: 3; }
  .lab-panel > .hear, .lab-panel > noscript { order: 4; }
  .lab-ratio { font-size: 56px; }
  .lab-detail { min-height: 0; }
}
@media (max-width: 560px) {
  .lab-ticks text.alt { transform: translateY(15px); }
}

/* App screens */
.screens { display: grid; gap: 48px; }
.phones { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: start; }
.phone { display: grid; gap: 14px; justify-items: center; min-width: 0; }
.phone:nth-child(even) { margin-top: 64px; }
.phone-frame { padding: 8px; border-radius: 40px; background: var(--sheet); border: 1px solid var(--rule); box-shadow: var(--shadow-lift); max-width: 300px; }
.phone-frame img { border-radius: 32px; width: 100%; height: auto; }
.phone p { font-weight: 600; font-size: 16px; color: var(--muted); }
@media (max-width: 760px) {
  .phones { grid-auto-columns: 64%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; }
  .phone { scroll-snap-align: center; }
  .phone:nth-child(even) { margin-top: 0; }
}

/* What you train */
.train { display: grid; gap: 44px; }
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.skill { background: var(--sheet); border: 1px solid var(--rule); border-radius: 24px; padding: clamp(20px, 3vw, 30px); display: grid; gap: 20px; align-content: start; min-width: 0; }
.skill-head { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: center; }
.skill-fig, .dial { width: 112px; height: 112px; }
.skill-fig path { stroke: var(--ink); stroke-width: 1.5; }
.dial circle { fill: none; stroke: var(--rule); stroke-width: 1; }
.dial .rim { stroke: var(--ink); stroke-width: 1.3; stroke-dasharray: 100; }
.dial .hand { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.dial text { font: 600 12px var(--body); fill: var(--muted); }
.dial text.on { fill: var(--ink-text); font-weight: 700; }
.skill h3 { font-size: clamp(28px, 2.6vw, 32px); }
.skill-head p { color: var(--muted); font-size: 17px; margin-top: 6px; line-height: 1.5; }
.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tracks li { border-top: 1px solid var(--rule); padding-top: 14px; display: grid; gap: 4px; }
.tracks h4 { font: 600 18px/1.3 var(--body); letter-spacing: 0; }
.tracks p { color: var(--muted); font-size: 17px; line-height: 1.5; }
.tracks .levels { color: var(--text); font-size: 16px; }
.tracks .caveat { color: var(--ink-text); font-size: 16px; }
@media (max-width: 860px) { .skills { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 400px) {
  .skill-head { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
  .skill-fig, .dial { width: 88px; height: 88px; }
}

/* The notebook */
.home main > .notebook { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.nb-copy { display: grid; gap: 18px; }
.nb-grid { list-style: none; margin: 0; padding: clamp(18px, 3vw, 30px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 12px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 24px; box-shadow: var(--shadow-lift); }
.nb-grid li { display: grid; justify-items: center; gap: 8px; min-width: 0; }
.nb-fig { width: 100%; max-width: 92px; height: auto; aspect-ratio: 1; }
.nb-grid span { font: 600 17px/1 var(--display); color: var(--muted); transition: color 300ms ease; }
.nb-grid li.inked .nb-fig path { stroke: var(--ink); }
.nb-grid li.inked span { color: var(--ink-text); }
@media (max-width: 900px) { .home main > .notebook { grid-template-columns: minmax(0, 1fr); } }

/* The piano */
.piano { display: grid; gap: 36px; }
.chart { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 24px; padding: clamp(18px, 3vw, 30px); display: grid; gap: 16px; }
.loudness { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: clamp(120px, 16vw, 170px) auto; gap: 8px 12px; }
.loudness-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 14px; line-height: 16px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; margin-block: calc(clamp(120px, 16vw, 170px) * 0.05 - 8px); }
.loudness-plot { width: 100%; height: 100%; overflow: visible; }
.loudness-plot .grid { stroke: var(--rule); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.loudness-plot .grid.target { stroke: var(--pencil); stroke-dasharray: 4 4; }
.loudness-plot .dots { fill: none; stroke: var(--ink); stroke-width: 3.5px; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0.7; }
.loudness-x { grid-column: 2; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.chart figcaption { color: var(--muted); font-size: 16px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.facts li { display: grid; align-content: start; gap: 8px; color: var(--muted); font-size: 17px; line-height: 1.55; border-top: 1.5px solid var(--ink); padding-top: 16px; }
.facts b { font: 600 26px/1.15 var(--display); color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 760px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* Pricing */
.pricing { display: grid; gap: 36px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 60rem; }
.plan { background: var(--sheet); border: 1px solid var(--rule); border-radius: 24px; padding: clamp(22px, 3vw, 32px); display: grid; gap: 14px; align-content: start; }
.plan.pro { border: 1.5px solid var(--ink); box-shadow: var(--shadow-lift); }
.plan h3 { font-size: 30px; }
.price { font: 560 clamp(52px, 5vw, 64px)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.price span { font: 500 17px/1 var(--body); letter-spacing: 0; color: var(--muted); }
.trial { color: var(--verdigris); font-weight: 600; font-size: 16px; }
.plan ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.or { color: var(--muted); border-top: 1px solid var(--rule); padding-top: 14px; }
.or b { color: var(--text); }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* From the blog */
.journal { display: grid; gap: 36px; }
.journal > p { justify-self: start; }

/* Questions */
.faq { display: grid; gap: 32px; }
.faq-list { display: grid; max-width: 54rem; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font: 600 19px/1.35 var(--body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--ink-text); }
.faq summary .icon { color: var(--ink-text); transition: transform 250ms var(--pen); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details::details-content { block-size: 0; overflow-y: clip; transition: block-size 320ms var(--pen), content-visibility 320ms allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq details p { padding: 0 0 24px; color: var(--muted); max-width: 46rem; }

/* Closing */
.home main > .closing { display: grid; justify-items: center; text-align: center; gap: 26px; padding-top: clamp(110px, 13vw, 170px); }
.closing-fig { width: clamp(150px, 18vw, 210px); height: auto; aspect-ratio: 1; }
/* The logo's own line: 1.25% of its 556-unit drawing. */
.closing-fig path { fill: none; stroke: var(--ink); stroke-width: 6.95; stroke-linecap: round; stroke-linejoin: round; }
.closing h2 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.025em; font-weight: 540; max-width: 16ch; }
.closing .cta { justify-content: center; }
