/* kashorik — one stylesheet for both sites. Mobile first; two columns from 720px. */

/* ---------- Fonts (local files: Cyrillic and Latin subsets, plus ₽ from Latin Extended) ---------- */

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/assets/fonts/rubik-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/assets/fonts/rubik-latin-wght-normal.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;
}
/* Rubik's Latin Extended file, used only for the rouble sign. */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/assets/fonts/rubik-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+20BD;
}
@font-face {
  font-family: "Neucha";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/neucha-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Neucha";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/neucha-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2026;
}


/* ---------- Tokens ----------
   Paper and ink. These seven are the only colours on the site (tests/build.test.js checks the values
   and the contrast of --ink and --soft on --ground and --sheet). --construct and --joint are never body text. */

:root {
  --ground: #D3D6DA;      /* the page */
  --sheet: #FFFFFF;       /* cards, canvases, text on ink */
  --ink: #101114;         /* text, lines, the primary button */
  --soft: #2C3038;        /* secondary text */
  --construct: #B0127A;   /* heading underlines, spacing marks, photo marks */
  --construct2: #2F5FB3;  /* the focus ring */
  --joint: #E5261F;       /* the brand dot, the first tag */

  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --hand: "Neucha", "Rubik", "Segoe Print", cursive;

  /* Text roles. These seven are the only font sizes on the site (tests/build.test.js counts them):
     page title (h1), section title (h2), item title (h3, FAQ questions, card titles), body,
     small/caption, handwritten labels (the brand, the note line, step numbers) and the price figure.
     Neucha runs narrow, so the handwritten roles are a little larger than Rubik would need. */
  --fs-h1: clamp(2.1rem, 1.5rem + 3vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.45rem + 1.5vw, 2.5rem);
  --fs-h3: clamp(1.3rem, 1.22rem + 0.4vw, 1.5rem);
  --fs-body: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); /* 17px → 19px */
  --fs-small: clamp(0.9375rem, 0.91rem + 0.12vw, 1rem);
  --fs-accent: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --fs-price: clamp(2.5rem, 2rem + 2vw, 3.25rem);
  --fw-regular: 400;
  --fw-strong: 500;  /* controls (buttons) in Rubik; Neucha has one weight */
  /* Role colours; the dark contact block and the light form inside it redefine them. */
  --text: var(--ink);
  --text-soft: var(--soft);

  --gutter: clamp(1.25rem, 0.8rem + 2.4vw, 2.5rem);
  --section: clamp(3.5rem, 2.2rem + 5.5vw, 7rem);
  --measure: 38rem;
}

/* ---------- Text roles ---------- */

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Headings, card titles and FAQ questions: Neucha, the one weight it has. */
h1,
h2,
h3 {
  margin: 0 0 0.6em;
  font-family: var(--hand);
  font-weight: var(--fw-regular);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 1.04;
}

h2 {
  font-size: var(--fs-h2);
}

h3,
.faq summary {
  font-family: var(--hand);
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  line-height: 1.15;
}

/* Small / caption: units, the pack line, notes, the footer, and Moscow time beside a local time. */
.small,
.price-unit,
.price-pack,
.footer,
.slot-local + .slot-moscow {
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--text-soft);
}

/* The page's one handwritten note (the group course start). */
.note {
  display: inline-block;
  margin-bottom: 0.4rem;
  color: var(--text-soft);
  font-family: var(--hand);
  font-size: var(--fs-accent);
  font-weight: var(--fw-regular);
  line-height: 1.1;
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.price-amount {
  font-family: var(--hand);
  font-size: var(--fs-price);
  font-weight: var(--fw-regular);
  line-height: 1;
  white-space: nowrap;
}

/* ---------- Drawn underlines (src/_includes/underline.njk) ---------- */

h1:has(+ .underline),
h2:has(+ .underline) {
  margin-bottom: 0.1em;
}

.underline {
  display: block;
  max-width: 100%;
  margin: 0 0 1.1rem;
}

.underline-h1 {
  width: 420px;
  height: 14px;
  margin-bottom: 1.25rem;
  color: var(--ink);
}

.underline-h2 {
  width: 190px;
  height: 10px;
  color: var(--construct);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

a {
  color: var(--text);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: text-decoration-thickness 0.2s ease-out, text-underline-offset 0.2s ease-out, text-decoration-color 0.2s ease-out;
}

a:hover {
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.24em;
}

:focus-visible {
  outline: 3px solid var(--construct2);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Same left edge as every other section, shorter lines. */
.wrap.narrow > * {
  max-width: min(46rem, 100%);
}

.section {
  padding-block: var(--section) 0;
}

.lead {
  max-width: var(--measure);
}

/* ---------- Buttons and links ----------
   A 2px ink line with uneven radii, as if drawn round the words. No shadows. */

.button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  background: var(--joint); /* red is the action colour: only things you press are filled with it */
  color: var(--sheet);
  font-weight: var(--fw-strong);
  line-height: 1.25;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.15s;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px) rotate(-0.6deg);
}

.button:active {
  transform: none;
  transition-duration: 0.06s;
}

/* The phone number or address under the button's label: the small role's size, the button's colour. */
.button-detail {
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
}

.button-quiet {
  background: transparent;
  color: var(--ink);
}

.button-quiet:hover {
  background: var(--sheet);
}

/* ---------- Masthead ----------
   Phones (under 480px): the mark and the name, plus the language switch on the abroad site; one line
   even at 320px. From 480px the contact button joins them, from 720px the section links; below 720px
   the section links are in the footer. */

.masthead-inner {
  display: flex;
  flex-wrap: wrap; /* a safety net for large system fonts; one line at 320px with default fonts */
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: 3.75rem;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  flex: none;
  display: block;
  width: 2rem;
  height: 2rem;
}

.brand-name {
  font-family: var(--hand);
  font-size: var(--fs-accent);
  font-weight: var(--fw-regular);
  letter-spacing: 0.01em;
}

.masthead .nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  display: none;
  align-items: center;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
}

.nav-link:hover {
  text-decoration-color: currentColor;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  color: var(--ink);
  font-weight: var(--fw-strong);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, transform 0.15s;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--sheet);
  transform: translateY(-1px) rotate(-0.6deg);
}

.lang-switch {
  white-space: nowrap;
}

.lang-switch-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
}

@media (max-width: 479px) {
  .masthead .nav {
    display: none;
  }
}

@media (min-width: 720px) {
  .nav-link {
    display: inline-flex;
  }
}

/* Touch screens: nav targets at least 44px tall. */
@media (pointer: coarse) {
  .nav-link, .nav-cta {
    min-height: 44px;
  }
}

/* ---------- Hero ----------
   Phones: the photo first, as a compact wide crop, then the title, the text, the tags and the button.
   From 720px: text on the left, the square photo on the right. Registration marks sit 14px outside
   the photo, inside the page gutter. */

.hero {
  padding-block: clamp(1.25rem, 0.4rem + 3.5vw, 4rem) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.hero .lead {
  margin-bottom: 1rem;
  color: var(--text-soft);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-family: var(--hand);
  font-size: var(--fs-body);
  line-height: 1.2;
}

/* What is taught, as a legend, not as buttons: plain handwritten words, each with a small drawn ring;
   the main subject's ring is filled with ink. */
.hero-tags li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-tags li::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
}

.hero-tags .is-main::before {
  background: var(--ink);
}

/* The button, and room beside it for a second item. */
.hero-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.hero-shot {
  position: relative;
}

.photo-marks {
  position: absolute;
  inset: -14px;
  width: calc(100% + 28px);
  height: calc(100% + 28px);
  color: var(--construct);
  pointer-events: none;
}

.hero-photo img,
.board img,
.lessons-photo img {
  border: 2px solid var(--ink);
  border-radius: 6px 14px 8px 12px / 12px 6px 14px 8px;
  background: var(--sheet);
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 12 / 5;
  object-fit: cover;
  object-position: 50% 28%;
}

@media (min-width: 720px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 5rem);
  }
  .hero-text {
    grid-column: 1;
    grid-row: 1;
  }
  .hero-photo {
    grid-column: 2;
    grid-row: 1;
  }
  .hero-shot {
    max-width: 30rem;
    margin-left: auto;
  }
  .hero-photo img {
    aspect-ratio: 1;
    object-position: 50% 50%;
  }
}

/* ---------- Credentials ---------- */

.credentials-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.portrait {
  width: 7rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--ink);
}

.facts,
.points {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 40rem;
}

.facts li,
.points li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.75rem;
  border-top: 1px solid var(--soft);
}

.facts li:last-child,
.points li:last-child {
  border-bottom: 1px solid var(--soft);
}

/* A spacing mark before each line. */
.facts li::before,
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.45em;
  width: 0.9rem;
  height: 2px;
  background: var(--construct);
}

.credentials-place {
  margin-top: 1rem;
}

@media (min-width: 720px) {
  .credentials-grid {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
  }
  .portrait {
    width: 11rem;
  }
}

.video {
  position: relative;
  margin-top: 2.5rem;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--ink);
  border-radius: 12px 4px 10px 5px / 5px 10px 4px 12px;
  overflow: hidden;
  background: var(--ink);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Cards ----------
   .card: the offer and review cards. .sheet-card: a white sheet for a canvas or a work viewer, with
   .card-foot under it (a dashed rule, then .card-cap: the title line and the label line, then controls). */

.card,
.sheet-card,
.lesson,
.outline-list li {
  background: var(--sheet);
  border: 2px solid var(--ink);
}

.card,
.lesson,
.outline-list li {
  border-radius: 12px 4px 10px 5px / 5px 10px 4px 12px;
}

.card {
  padding: clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem);
}

.sheet-card {
  position: relative;
  min-width: 0;
  border-radius: 5px 11px 4px 12px / 12px 4px 11px 5px;
}

.card-foot {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1.5px dashed var(--ink);
}

.card-cap {
  display: grid;
  gap: 2px;
  margin: 0;
  font-family: var(--hand);
  font-weight: var(--fw-regular);
  line-height: 1.15;
}

.card-cap > * {
  font-weight: var(--fw-regular); /* a <b> title stays in Neucha's one weight */
}

.card-cap > :first-child {
  font-size: var(--fs-h3);
}

.card-cap > :nth-child(2) {
  font-size: var(--fs-body);
  color: var(--text-soft);
}

/* ---------- Free review ---------- */

.review .lead {
  margin-bottom: 1.25rem;
}

.review .points {
  margin-bottom: 1.25rem;
}

/* ---------- Lessons ---------- */

.lessons-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

.lesson-list {
  display: grid;
  gap: 14px;
}

.lesson {
  max-width: 36rem;
  padding: 1rem 1.15rem;
}

.lesson h3 {
  margin-bottom: 0.3em;
}

.lesson p {
  color: var(--text-soft);
}

.lessons-photo img {
  width: 100%;
  max-width: 20rem;
}

@media (min-width: 720px) {
  .lessons-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
  }
  .lessons-photo img {
    margin-left: auto;
  }
}

/* ---------- Offers ---------- */

.offer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 0.5rem;
}

.offer {
  display: flex;
  flex-direction: column;
}

/* One session large, its length beside it; the pack on the small line under it. */
.price {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1.5px dashed var(--ink);
}

.price-figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.6rem;
  margin-bottom: 0.3rem;
}

/* When lessons can be booked: a body-size line under the price cards; the payment note follows it, smaller. */
.hours {
  max-width: 44rem;
  margin: 1.5rem 0 0;
}

.hours + .payment {
  margin-top: 0.5rem;
}

.payment {
  max-width: 44rem;
  margin-top: 1.5rem;
}

.slots {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1.5px dashed var(--ink);
  border-radius: 5px 11px 4px 12px / 12px 4px 11px 5px;
}

.slot-group + .slot-group {
  margin-top: 1rem;
}

.slot-title {
  margin-bottom: 0.25rem;
}

.slot-list {
  margin: 0;
  padding-left: 1.2rem;
}

.slot + .slot {
  margin-top: 0.35rem;
}

/* Abroad site with scripts: the visitor's own time leads, Moscow time follows, small (see .small). */
.slot-local {
  display: block;
}

@media (min-width: 720px) {
  .offer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Group course teaser ---------- */

.board img {
  width: 100%;
}

.group-text {
  max-width: 44rem;
  margin-top: 1.75rem;
}

@media (min-width: 900px) {
  .group-teaser .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: center;
  }
  .group-text {
    margin-top: 0;
  }
}

/* ---------- How to start ---------- */

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  align-content: start; /* side by side, the three texts start on one line */
}

.step-number {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
  background: var(--ink);
  color: var(--sheet);
  font-family: var(--hand);
  font-size: var(--fs-accent);
  font-weight: var(--fw-regular);
  line-height: 1;
}

.step p {
  padding-top: 0.35rem;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
  .step {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ (works without scripts) ---------- */

.faq details {
  border-top: 1px solid var(--soft);
}

.faq details:last-child {
  border-bottom: 1px solid var(--soft);
}

.faq summary {
  position: relative;
  padding: 1rem 2.5rem 1rem 0;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.3rem;
  top: calc(1rem + 0.6em - 1px);
  width: 0.85rem;
  height: 2px;
  border-radius: 1px;
  background: var(--construct);
  transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.4, 1);
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.faq details p {
  margin: 0 0 1.25rem;
}

/* ---------- Contact: the ink block at the end of the main page ---------- */

.contact {
  --text: var(--ground);
  --text-soft: var(--ground);
  margin-top: var(--section);
  padding-block: var(--section);
  background: var(--ink);
  color: var(--text);
}

.contact .underline-h2 {
  color: var(--text);
}

/* The page ends on its action, so this block is the loudest: a display-size heading, the brand's ball drawn large,
   three facts as a legend, and filled red buttons. */
.contact h2 {
  font-size: var(--fs-h1);
}

.contact-grid {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: center;
}

.contact-body {
  min-width: 0;
  max-width: 46rem;
}

.contact-motif {
  width: min(11rem, 55%);
  height: auto;
  color: var(--ground);
}

.contact-motif-ball {
  fill: var(--joint);
}

@media (min-width: 720px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 20rem);
  }
  .contact-motif {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }
  .contact-body {
    grid-column: 1;
    grid-row: 1;
  }
}

.contact-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--hand);
  font-size: var(--fs-accent);
  line-height: 1.2;
}

.contact-facts li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-facts + .lead {
  margin-top: 1rem;
}

.contact-facts li::before {
  content: "";
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
  background: var(--joint);
}

.contact-actions {
  display: grid;
  gap: 0.75rem;
  width: fit-content;
  max-width: 100%;
  margin: 2rem 0 0;
}

.contact-actions .button {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start; /* icon and text stay together at the left, also in a full-width button */
  gap: 0.75rem;
  min-height: 3.75rem;
  padding: 0.9rem 1.6rem;
  background: var(--joint);
  border-color: var(--sheet);
  color: var(--sheet);
  font-size: var(--fs-accent);
}

.contact-actions .button .button-detail {
  font-size: var(--fs-small);
}

/* The channel icon (src/_includes/icons.njk) beside the text block; the label and the detail stay stacked. */
.contact-actions .icon {
  flex: none;
}

.contact-actions .button-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-actions .button-ghost {
  background: var(--joint);
  border-color: var(--sheet);
  color: var(--sheet);
}

.contact-actions .button-ghost:hover {
  background: var(--soft);
}

@media (max-width: 479px) {
  .contact-actions {
    width: 100%;
  }
  .contact-actions .button {
    width: 100%;
  }
}

/* Abroad site: the enquiry form, a white sheet on the ink block. */
.enquiry {
  --text: var(--ink);
  --text-soft: var(--soft);
  margin: 2rem 0 0;
  padding: 1.5rem;
  background: var(--sheet);
  color: var(--text);
  border-radius: 12px 4px 10px 5px / 5px 10px 4px 12px;
}
.enquiry-trap { display: none; }
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.field input,
.field textarea { width: 100%; min-width: 0; padding: 0.65rem 0.75rem; font: inherit; color: var(--ink); background: var(--sheet); border: 2px solid var(--ink); border-radius: 4px 8px 5px 7px / 7px 5px 8px 4px; }
.field-short input { max-width: 8rem; }
.field-check { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 1.25rem; }
.field-check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; flex: none; accent-color: var(--ink); }
.enquiry-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 0; }

/* ---------- Footer ---------- */

.footer {
  padding-block: 2rem 2.5rem;
}

.footer-inner p {
  margin-bottom: 0.4rem;
}

/* The header's section links, below 720px (the header shows them from 720px). */
.footer-nav {
  display: none;
}

@media (max-width: 719px) {
  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    margin-bottom: 0.75rem;
  }
  .footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ---------- Group course page, 404, privacy ---------- */

.group-full h1,
.not-found h1 { margin-top: 0.25rem; }
.outline { margin-top: 2.5rem; }
.outline-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.outline-list li { padding: 0.9rem 1rem; }
.group-full .slots { margin-top: 1.5rem; }
.group-cta { margin-top: 2rem; }
.not-found-alt { margin-top: 2.5rem; }
.privacy h2 { margin-top: 2rem; }

/* ---------- Motion ----------
   Only small hover movements on buttons and the FAQ sign; nothing moves by itself.
   All of it is off under prefers-reduced-motion. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .button:hover,
  .button:focus-visible,
  .nav-cta:hover,
  .nav-cta:focus-visible {
    transform: none;
  }
}

/* ---------- Exercises ----------
   Five canvases on sheet-cards, and the small pendulum beside the hero button. Both are `hidden` in the HTML
   and shown by /assets/js/exercises.js, which also draws them and sets touch-action per canvas. */

.exercises[hidden],
.hero-pendulum[hidden] {
  display: none;
}

.exercises-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

/* The sheet-card does not clip, so the canvas rounds its own top corners to follow the card's. */
.exercise canvas {
  display: block;
  width: 100%;
  height: 190px;
  border-radius: 3px 9px 0 0 / 10px 2px 0 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.hero-pendulum {
  display: block;
  flex: none;
  width: 150px;
  height: 120px;
}

/* On phones the row wraps: the button takes the full width and the pendulum hangs centred under it. */
@media (max-width: 719px) {
  .hero-action .button {
    width: 100%;
    align-items: center;
    text-align: center;
  }
  .hero-pendulum {
    margin-inline: auto;
  }
}

/* From tablets up the pendulum always sits beside the button: the row never wraps, the button's label may. */
@media (min-width: 720px) {
  .hero-action {
    flex-wrap: nowrap;
  }
}

.hero-pendulum,
.exercise canvas[data-demo="balls"],
.exercise canvas[data-demo="pendulum"] {
  cursor: grab;
}

.exercise canvas.is-grabbing {
  cursor: grabbing;
}

/* ---------- Work viewers ----------
   .sheet-card with a stage of stacked pictures (only .on is visible) and a .card-foot: the title, the
   label line (always present, so the card never changes height), then the controls. The controls are
   `hidden` in the HTML and shown by /assets/js/works.js. */

.works-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

/* Four cards: one column on phones, two by two from 620px (storyboard with eye, head with horses: each pair
   has similar proportions), a single row from 960px with the storyboard twice as wide as the others. No card sits alone on a row. */
@media (min-width: 620px) {
  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .works-grid {
    /* the storyboard is the widest drawing and gets two shares of the row */
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  }
}

/* The sheet-card does not clip, so the stage rounds its own top corners to follow the card's. */
.work-stage {
  position: relative;
  overflow: hidden;
  border-radius: 3px 9px 0 0 / 10px 2px 0 0;
  background: var(--sheet);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.work-board .work-stage {
  aspect-ratio: 640 / 400;
}

.work-eye .work-stage {
  aspect-ratio: 460 / 360;
}

.work-head .work-stage {
  aspect-ratio: 640 / 780;
}

/* The cursor promises a gesture, so it appears only once the script (which adds .is-live) has started. */
.work.is-live.work-board .work-stage {
  cursor: pointer;
}

.work.is-live.work-eye .work-stage,
.work.is-live.work-head .work-stage {
  cursor: ew-resize;
}

.work-horses .work-stage {
  aspect-ratio: 530 / 604;
  touch-action: manipulation; /* a press is a zoom; the page still scrolls and pinches */
}

.work-horses .work-stage img {
  object-fit: fill;
  transform-origin: 0 0;
  transition: transform 0.5s cubic-bezier(0.3, 0.9, 0.3, 1);
}

/* Pressable only once the script has made the stage a button. */
.work.is-live.work-horses .work-stage {
  cursor: zoom-in;
}

.work.is-live.work-horses .work-stage[aria-pressed="true"] {
  cursor: zoom-out;
}

.work-horses .work-stage:focus-visible {
  outline: 3px solid var(--construct2);
  outline-offset: -3px;
}

.work-stage img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.work-stage img.on {
  z-index: 1; /* the frames are stacked and opaque: the current one is on top */
}

.work-label {
  min-height: 1.15em;
  white-space: nowrap;
}

.work-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 2.75rem;
}

/* Without the script the controls row is gone, not an empty strip. */
.work-controls[hidden] {
  display: none;
}

.work-marks {
  display: flex;
  flex: 1;
  gap: 6px;
  min-width: 0;
}

.work-mark {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.work-mark::after {
  content: "";
  position: absolute;
  inset: calc(50% - 4px) 0;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--ground);
}

.work-mark.on::after {
  background: var(--joint);
}

.work-btn {
  flex: none;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 9px 4px 8px 4px;
  background: var(--sheet);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-small);
  font-weight: var(--fw-strong);
  cursor: pointer;
}

.work-btn:hover {
  background: var(--ground);
}

.work-mark:focus-visible,
.work-btn:focus-visible {
  outline: 3px solid var(--construct2);
  outline-offset: 2px;
}
