@font-face{font-family:"Golos Text";font-style:normal;font-weight:400 900;font-display:swap;src:url("fonts/golos-text-400-900-cyrillic.woff2") format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Golos Text";font-style:normal;font-weight:400 900;font-display:swap;src:url("fonts/golos-text-400-900-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Old Standard TT";font-style:italic;font-weight:400;font-display:swap;src:url("fonts/old-standard-tt-400-italic-cyrillic.woff2") format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Old Standard TT";font-style:italic;font-weight:400;font-display:swap;src:url("fonts/old-standard-tt-400-italic-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Old Standard TT";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/old-standard-tt-400-cyrillic.woff2") format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Old Standard TT";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/old-standard-tt-400-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Old Standard TT";font-style:normal;font-weight:700;font-display:swap;src:url("fonts/old-standard-tt-700-cyrillic.woff2") format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Old Standard TT";font-style:normal;font-weight:700;font-display:swap;src:url("fonts/old-standard-tt-700-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/* Two inks: cover yellow and engraving black, on white score paper. */
:root {
  --cover: #ffcf0d;
  --ink: #14110a;
  --paper: #fefefc;
  --ink-soft: #3b3626;
  --display: "Old Standard TT", "Times New Roman", serif;
  --text: "Golos Text", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --inset: clamp(1.25rem, 4vw, 3.5rem);
  --gap: clamp(3.5rem, 9vw, 7.5rem);
  --beat: 1s;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scrollbar-color: var(--ink) var(--cover);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1.1875rem, 1.05rem + 0.45vw, 1.3125rem)/1.55 var(--text);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--cover); }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-thickness: 3px; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.defs { position: absolute; }

.note {
  width: 0.5em;
  height: 1.15em;
  vertical-align: -0.12em;
  fill: currentColor;
}

/* Cover */

.cover {
  background: var(--cover);
  padding: 0 var(--gutter);
  overflow: clip;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.bar {
  max-width: 76rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 2rem;
}

.bar a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}
.bar a:hover { text-decoration: underline; text-decoration-thickness: 3px; }

.wordmark {
  font: 700 1.75rem/1 var(--display);
  margin-right: auto;
}

.bar ul { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }

.bar .lang { gap: 0.25rem; font-weight: 600; }
.lang a { padding: 0 0.6rem; }
.lang [aria-current] { background: var(--ink); color: var(--cover); }

.cover.slim { min-height: 0; display: block; }

.cover-body {
  max-width: 76rem;
  width: 100%;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

h1 {
  font-size: clamp(3rem, 8.4vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
}

.pitch p {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 30ch;
  font-size: 1.2em;
  line-height: 1.45;
}

/* Metronome: every tempo is on the scale, one is struck. */

.metronome {
  --nums: 3.5rem;
  --lane: 10.5rem;
  --axis: calc(var(--nums) + var(--lane) / 2);
  --swing: 4.5deg;
  --drop: calc(16.1% - 1.1rem);
  position: relative;
  height: clamp(24rem, 68svh, 40rem);
  max-width: 28rem;
  justify-self: end;
  width: 100%;
}

/* Numbers and words stand either side of a clear lane; the weight swings inside it. */
.scale {
  height: 86%;
  display: grid;
  grid-template-rows: repeat(8, 1fr);
}

.scale li {
  display: grid;
  grid-template-columns: var(--nums) var(--lane) 1fr;
  align-items: center;
  font: italic 400 1.75rem/1 var(--display);
  opacity: 0.66;
}

.scale .n {
  text-align: right;
  font-style: normal;
  font-variant-numeric: lining-nums tabular-nums;
}

.scale .n { padding-right: 0.6rem; }
.scale .t + span { padding-left: 0.6rem; }

.scale .t {
  --tick: 1px;
  align-self: stretch;
  background:
    linear-gradient(currentColor, currentColor) left center / var(--tk, 0.75rem) var(--tick) no-repeat,
    linear-gradient(currentColor, currentColor) right center / var(--tk, 0.75rem) var(--tick) no-repeat;
}

.scale .struck { opacity: 1; font-style: normal; font-weight: 700; }
.scale .struck .t { --tick: 3px; }

.pendulum {
  position: absolute;
  top: 0;
  bottom: 0.5rem;
  left: var(--axis);
  width: 0;
  transform-origin: 50% 100%;
  animation: swing var(--beat) cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
}

.pendulum::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1.5px;
  width: 3px;
  background: currentColor;
}

.pendulum::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: -0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: currentColor;
}

.weight {
  position: absolute;
  top: var(--drop, 12.5%);
  left: -1.5rem;
  width: 3rem;
  height: 2.2rem;
  background: currentColor;
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}

@keyframes swing {
  from { transform: rotate(calc(-1 * var(--swing, 11deg))); }
  to { transform: rotate(var(--swing, 11deg)); }
}

body:has(#stop:checked) .pendulum { animation-play-state: paused; }

.stop {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
}

.stop input {
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  border: 2px solid var(--ink);
  background: transparent;
  cursor: pointer;
}
.stop input:checked { background: var(--ink); box-shadow: inset 0 0 0 4px var(--cover); }
.stop .halt, .stop:has(:checked) .run { display: none; }
.stop:has(:checked) .halt { display: inline; }

.aside { justify-self: end; width: 100%; max-width: 28rem; }

/* Fields and the system line that runs down the page */

.field { padding: 0 var(--gutter); }
.field.ink { background: var(--ink); color: var(--paper); }
.field.ink ::selection { background: var(--cover); color: var(--ink); }
.field.close { background: var(--cover); }

.system {
  max-width: 76rem;
  margin: 0 auto;
  border-left: 1px solid;
  padding: var(--gap) 0 var(--gap) var(--inset);
}

h2 {
  position: relative;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h2::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: calc(-1 * var(--inset));
  width: calc(var(--inset) - 0.75rem);
  border-top: 1px solid;
}

.intro { margin-top: 1rem; max-width: 40ch; color: var(--ink-soft); }

/* Courses */

.course {
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 0 calc(-1 * var(--inset));
  padding: clamp(2rem, 5vw, 3.5rem) 0 0 var(--inset);
  border-top: 1px solid;
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  grid-template-areas: "tempo title" "tempo body";
  column-gap: clamp(2rem, 5vw, 5rem);
}

.course h3 {
  grid-area: title;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.tempo { grid-area: tempo; }

.mini {
  position: relative;
  height: 11rem;
  width: 9rem;
  border-bottom: 1px solid;
  overflow: clip;
}
.mini .pendulum { left: 50%; top: 0.75rem; bottom: 0; }
.mini .pendulum::after { bottom: -0.5rem; }
.mini .weight { left: -1.05rem; width: 2.1rem; height: 1.5rem; }

.t60 { --beat: 1s; --drop: 10%; }
.t72 { --beat: 0.833s; --drop: 24%; }

.mark {
  margin-top: 1rem;
  font: 700 1.5rem/1.2 var(--display);
  font-variant-numeric: lining-nums;
}
.mark em { display: block; font-weight: 400; }

.body { grid-area: body; margin-top: 1.5rem; max-width: 62ch; }
.body p + p { margin-top: 1em; }

.body h4 {
  margin-top: 2.5rem;
  font: 700 1.5rem/1.2 var(--display);
}

.helps {
  margin-top: 1rem;
  columns: 2 16rem;
  column-gap: 2.5rem;
}

.helps li,
.doc ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
  break-inside: avoid;
}

/* A notehead for a bullet. */
.helps li::before,
.doc ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.8em;
  height: 0.56em;
  border-radius: 50%;
  background: currentColor;
  transform: rotate(-22deg);
}

.fine { margin-top: 1.5rem; }
.care {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid;
  font-size: 0.94em;
}

/* How we teach */

.field.ink h2, .field.ink h3 { color: var(--cover); }

.rules { margin-top: clamp(2rem, 5vw, 3.5rem); }

.rules li {
  margin-left: calc(-1 * var(--inset));
  padding: clamp(1.5rem, 3.5vw, 2.25rem) 0 clamp(1.5rem, 3.5vw, 2.25rem) var(--inset);
  border-top: 1px solid;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0.75rem clamp(2rem, 5vw, 5rem);
  align-items: baseline;
}

.rules h3 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.12; }
.rules p { max-width: 46ch; }

/* Plans: a price list, one barline per plan. */

.plans { margin-top: 1.25rem; }

.plans-course {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  font: italic 400 clamp(1.5rem, 2.6vw, 1.875rem)/1.2 var(--display);
}

.plans li {
  margin-left: calc(-1 * var(--inset));
  padding: clamp(1.5rem, 3.5vw, 2.25rem) 0 clamp(1.5rem, 3.5vw, 2.25rem) var(--inset);
  border-top: 1px solid;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) auto;
  gap: 0.5rem clamp(1.5rem, 4vw, 4rem);
  align-items: baseline;
}

.plans h4 { font: 700 clamp(1.6rem, 3vw, 2.25rem)/1.12 var(--display); }

.price {
  font: 700 clamp(1.75rem, 3.2vw, 2.5rem)/1.1 var(--display);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.price s {
  margin-right: 0.5em;
  font-weight: 400;
  font-size: clamp(1.1875rem, 2.2vw, 1.6875rem);
  text-decoration-thickness: 1px;
  color: var(--ink-soft);
}

.terms-note {
  margin: 0 0 0 calc(-1 * var(--inset));
  padding: 1.5rem 0 0 var(--inset);
  border-top: 1px solid;
  max-width: none;
  font-size: 0.94em;
}

/* Documents: policies and the about page. */

.doc h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.doc .updated { margin-top: 1rem; font-size: 1rem; color: var(--ink-soft); }

.doc h2 {
  margin-top: 3.25rem;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0;
}
.doc h2::before { top: 0.6em; }

.doc p, .doc ul { max-width: 66ch; margin-top: 1em; }
.doc ul li { padding-left: 1.6rem; margin-bottom: 0.55rem; }
.doc .lede { font-size: 1.2em; line-height: 1.45; max-width: 40ch; margin-top: 1.5rem; }
.doc strong { font-weight: 600; }

/* A detail the owner still has to supply: marked in cover yellow so it cannot be missed. */
.tbd { background: var(--cover); padding: 0 0.3em; }

.form {
  max-width: 66ch;
  margin-top: 1em;
  padding: 0.25rem 1.25rem 1.25rem;
  border: 1px solid;
}

.system.tail { padding-top: clamp(2.5rem, 6vw, 4rem); }
.system.tail .staff { margin-top: 0; }

/* Close: the piece ends on a staff with a final barline. */

.close .system { padding-bottom: 0; }
.close .who { margin-top: 1rem; max-width: 40ch; }

.finale {
  margin-top: var(--gap);
  font: 700 clamp(2.75rem, 8vw, 5.5rem)/0.98 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.staff {
  position: relative;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0 calc(-1 * var(--inset));
  height: 3rem;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 0 25% / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 0 75% / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  border-right: 7px solid;
}
.staff::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 6px;
  border-left: 1px solid;
}

.foot {
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  font-size: 1rem;
  align-items: baseline;
}

.legal { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.foot a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.foot p { align-self: center; }

/* Narrow screens */

@media (max-width: 52rem) {
  .cover { min-height: 0; }
  .cover.slim { min-height: 0; display: block; }

.cover-body { grid-template-columns: 1fr; align-items: start; }
  .metronome, .aside { justify-self: start; }
  .metronome { height: 26rem; --nums: 3.25rem; --lane: 6.5rem; --swing: 4deg; --tk: 0.5rem; --drop: calc(16.1% - 0.7rem); }
  .metronome .weight { left: -0.85rem; width: 1.7rem; height: 1.3rem; }
  .scale li { font-size: clamp(1.2rem, 6vw, 1.5rem); }
  /* Five languages have to fit beside the wordmark, and the section links below in two rows at most. */
  .bar { column-gap: 0.75rem; }
  .bar ul:not(.lang) { order: 3; width: 100%; gap: 0 1.25rem; font-size: 1rem; }
  .bar .lang a { padding: 0 0.4rem; }

  .course {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "tempo" "body";
  }
  .tempo {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 6rem 1fr;
    column-gap: 1.25rem;
    align-items: end;
  }
  .mini { height: 7.5rem; width: 6rem; grid-row: span 2; }
  .mark { margin-top: 0; }
  .rules li { grid-template-columns: 1fr; }
  .plans li { grid-template-columns: 1fr; }
  .price { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .pendulum { animation: none; transform: rotate(3deg); }
  .stop { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .pendulum { animation: none; }
  .stop { display: none; }
}
