/* acad-essentials — light watercolour theme for beginners. Mobile-first, one
 * theme.
 *
 * The watercolour lives in static files (images/art/*.webp, made once by
 * tools/make-art.py) plus colour, hand-drawn borders and a little CSS motion.
 * No filters at runtime, and none on ordinary images.
 *
 * Readability first: the audience is 14–79. Body text is 18px+, text colours
 * keep 7:1 or better on the paper, and tap targets are 48px. */

@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/assets/fonts/nunito-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/assets/fonts/nunito-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: "Caveat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/caveat-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/caveat-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;
}

:root {
  color-scheme: light;

  --paper: #fffbf3;      /* page: warm cream */
  --panel: #fffdf8;      /* cards, form */
  --ink: #2a2f45;        /* headings, primary text — 13:1 on --paper */
  --body: #3b4058;       /* body copy — 9.9:1 */
  --mute: #595e76;       /* secondary text — 6:1 */
  --line: #3a3f58;       /* hand-drawn outlines */
  --hair: #eadfcd;       /* soft dividers */
  --edge-soft: #e2d4bd;  /* quiet sand outline: form, advantages, FAQ */

  /* Watercolour pigments, and the pale washes behind things. */
  --sky: #7cc3e0;    --sky-soft: #e3f2f9;
  --peach: #f4a77f;  --peach-soft: #fde9dc;
  --mint: #8fcfae;   --mint-soft: #e3f4ea;
  --butter: #f5ce62; --butter-soft: #fdf3d3;
  --lilac: #b9a2da;  --lilac-soft: #efe8f7;

  --cta: #b5482f;        /* terracotta — white text on it is 5.3:1 */
  --cta-deep: #943a25;   /* CTA-coloured text: 7:1 on paper, 5.7:1 on washes */
  --focus: #2f7fb0;

  /* A hand-drawn box: every corner a slightly different curve. */
  --wobbly: 26px 18px 30px 16px / 18px 28px 16px 26px;
  --pad: 1.25rem;
  --max: 76rem;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.3, .7, .3, 1);
}

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

/* scroll-padding keeps anchors and keyboard focus clear of the sticky header. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  color: var(--body);
  font: 400 1.125rem/1.65 var(--sans);
  /* Paper grain: a static tile, nearly invisible, never behind small text alone. */
  background: var(--paper) url(/images/art/paper.webp) repeat;
  background-size: 512px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--cta-deep); text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
a:hover { color: #6f2a1a; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 0.75rem; font-weight: 800; }
h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

.container { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.75rem 1rem; background: var(--ink); color: #fff; border-radius: 12px;
}
.skip-link:focus { top: 1rem; color: #fff; }

.icon {
  width: 1.5em; height: 1.5em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3.25rem; padding: 0.6rem 1.5rem;
  border: 2px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink);
  font: 700 1.05rem/1.2 var(--sans); text-align: center; text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 4px 0 var(--sky-soft);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s ease;
}
.btn:hover { color: var(--ink); background: var(--sky-soft); transform: translateY(-2px); box-shadow: 4px 6px 0 var(--sky); }
.btn:active { transform: translateY(1px); box-shadow: 1px 2px 0 var(--sky); }
.btn--solid { background: var(--cta); border-color: var(--cta); color: #fff; box-shadow: 3px 4px 0 var(--peach); }
.btn--solid:hover { background: var(--cta-deep); border-color: var(--cta-deep); color: #fff; box-shadow: 4px 6px 0 var(--peach); }
.btn--small { min-height: 2.75rem; padding: 0.4rem 1.1rem; font-size: 0.95rem; }
.btn--block { width: 100%; }
.btn .icon { width: 1.25em; height: 1.25em; }
.btn[aria-disabled="true"] { opacity: .6; cursor: progress; }

/* --- header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}
/* A painted brush line instead of a ruled border. */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 10px;
  background: url(/images/art/stroke-sky.webp) center / 100% 100% no-repeat;
  opacity: .7; pointer-events: none;
}
.header-bar { display: flex; align-items: center; gap: 0.6rem; min-height: 4rem; }
.brand {
  display: flex; align-items: baseline; gap: 0.2rem; margin-right: auto;
  font: 800 1.25rem/1 var(--sans); color: var(--ink); text-decoration: none; letter-spacing: 0.02em;
}
.brand span { font: 600 1.55rem/1 var(--hand); color: var(--cta); letter-spacing: 0; }
.brand:hover { color: var(--ink); }

/* Icon AND the word «Меню»: a bare hamburger is not obvious to everyone. */
.nav-toggle > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  height: 3rem; padding: 0 1rem 0 0.8rem; border: 2px solid var(--line); border-radius: 999px;
  font: 800 1rem/1 var(--sans); color: var(--ink); background: var(--panel);
}
.nav-toggle > summary::-webkit-details-marker { display: none; }
.nav-toggle[open] > summary { background: var(--sky-soft); }
.nav-list {
  position: absolute; left: 0; right: 0; top: 100%;
  margin: 0; padding: 0.5rem var(--pad) 1.25rem;
  list-style: none; background: var(--paper);
  border-bottom: 2px solid var(--hair);
  box-shadow: 0 18px 30px -20px rgba(42, 47, 69, .35);
  max-height: calc(100dvh - 4rem); overflow-y: auto;
}
.nav-list a {
  display: block; padding: 0.8rem 0;
  border-bottom: 1px dashed var(--hair);
  font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none;
}
.nav-list a:hover { color: var(--cta); }
.nav-contact:first-of-type { margin-top: 0.5rem; }
.nav-contact a { display: flex; align-items: center; gap: 0.6rem; border-bottom: 0; color: var(--cta-deep); }
.header-cta { display: none; }
.nav-signup a { color: var(--cta-deep); }

/* Compact: a 38px pill whose two options are 30px targets — above the 24px minimum. */
.lang-switch {
  display: flex; padding: 2px; gap: 0.15rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--panel);
}
.lang-switch a {
  display: flex; align-items: center; justify-content: center;
  min-width: 2.2rem; min-height: 1.9rem; padding: 0 0.35rem; border-radius: 999px;
  font: 800 0.85rem/1 var(--sans); color: var(--ink); text-decoration: none;
}
.lang-switch a:hover { background: var(--sky-soft); color: var(--ink); }
.lang-switch a[aria-current] { background: var(--ink); color: #fff; }

/* --- hero --------------------------------------------------------------- */
.hero { position: relative; padding: 2.5rem 0 3rem; overflow: hidden; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-kicker {
  display: inline-block; margin-bottom: 1rem; padding: 0.35rem 1rem;
  font-weight: 700; font-size: 0.95rem; color: var(--ink);
  background: var(--mint-soft); border-radius: 999px;
}
.hero-lead { font-size: 1.2rem; max-width: 36rem; }
.hero-lead strong { color: var(--ink); }
.hero-actions { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.75rem; }

.hero-art { position: relative; justify-self: center; width: min(100%, 34rem); }
/* Two painted washes bloom in behind the illustration, once. */
.hero-art::before, .hero-art::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  background: center / contain no-repeat;
  animation: bloom 1.6s var(--ease) both;
}
.hero-art::before { inset: -6% 10% 20% -12%; background-image: url(/images/art/wash-peach.webp); }
.hero-art::after { inset: 25% -14% -8% 20%; background-image: url(/images/art/wash-sky.webp); animation-delay: .35s; }
.hero-art img { display: block; }
.art-stack { position: relative; animation: float 4s ease-in-out .4s 1; }

/* A black cat hides behind the laptop; only its tail shows. The layer is the
   size of hero.webp, clipped at the lid's top edge (17.78% down, from
   tools/make-art.py), so the tail rises from behind the lid, swishes twice and
   settles — all within 5 s. Hover the picture and the cat moves: the tail ducks
   behind the lid and, a beat later, its ears peek up further along; move away
   and it swaps back. The ears layer is clipped at the same lid line. */
.hero-tail, .hero-ears { position: absolute; inset: 0; clip-path: inset(0 0 82.22% 0); pointer-events: none; }
.hero-tail img {
  transform-origin: 63.8% 17.78%;   /* where the tail meets the lid */
  animation: tail-rise .9s var(--ease) 1.2s backwards, tail-swish 1.1s ease-in-out 2.1s 2;
}
/* The hover duck lives on its own wrapper, not on the img: a running CSS
   animation overrides the img's transform, so ducking the img itself would
   leave the tail up — next to the ears — when the picture is hovered during
   the opening swish. On the wrapper the two transforms add up, so the tail is
   always below the lid while hovered: tail or ears, never both. */
.tail-duck { display: block; transition: transform .45s var(--ease) .3s; }   /* returns after the ears have gone */
.hero-ears img { transform: translateY(20%); transition: transform .4s var(--ease); }
.hero-art:hover .tail-duck { transform: translateY(20%); transition-delay: 0s; }
.hero-art:hover .hero-ears img { transform: none; transition-delay: .3s; }   /* after the tail has gone */

.hero-proof {
  display: grid; gap: 0.75rem; margin-top: 2.5rem;
}
.proof-item {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.9rem 1.1rem; min-height: 4.5rem;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--wobbly);
  box-shadow: 4px 5px 0 var(--butter-soft);
  font-size: 0.98rem; line-height: 1.35; color: var(--ink);
}
.proof-item img { width: 2.6rem; height: auto; flex: none; }
.proof-item > .icon { width: 2.4rem; height: 2.4rem; color: var(--cta); }
.proof-score { font: 800 2.2rem/1 var(--sans); color: var(--cta); flex: none; }
.proof-item--info { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.proof-item--info .icon, .info-trigger > .icon:last-child {
  width: 1.15em; height: 1.15em; margin-left: 0.35rem; vertical-align: -0.2em; color: var(--mute);
}
.proof-item--info:hover { background: var(--butter-soft); }
a.proof-item { color: var(--ink); text-decoration: none; }
a.proof-item:hover { color: var(--ink); }
.proof-link { color: var(--cta-deep); text-decoration: underline; text-underline-offset: 0.2em; }

/* --- sections ----------------------------------------------------------- */
.section { position: relative; padding: 3.5rem 0; }
/* Painted section grounds: ragged-edged washes, stretched to the section. */
.section--sky   { background: url(/images/art/section-sky.webp) center / 100% 100% no-repeat; }
.section--peach { background: url(/images/art/section-peach.webp) center / 100% 100% no-repeat; }
.section--mint  { background: url(/images/art/section-mint.webp) center / 100% 100% no-repeat; }

.section-head { margin-bottom: 2rem; }
.section-head--art { display: grid; gap: 1rem; align-items: end; }
.section-art { display: none; }
.eyebrow { margin: 0 0 0.25rem; font: 600 1.6rem/1 var(--hand); color: var(--cta); }
/* The heading sits on a brush stroke that paints itself in (see motion). */
.section-head h2 {
  display: inline; line-height: 1.35;
  background: url(/images/art/stroke-peach.webp) 0 88% / 100% 0.5em no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 0.15em;
}
#audience h2, #reviews h2 { background-image: url(/images/art/stroke-sky.webp); }
#steps h2, #signup h2 { background-image: url(/images/art/stroke-mint.webp); }
.section-lead { max-width: 44rem; margin-top: 1rem; font-size: 1.15rem; }

/* --- cards -------------------------------------------------------------- */
.cards { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.card {
  position: relative;
  padding: 1.5rem 1.4rem;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--wobbly);
  box-shadow: 5px 6px 0 var(--wash-soft, var(--sky-soft));
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 7px 9px 0 var(--wash-soft, var(--sky-soft)); }
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; }
.cards--row .card { display: flex; gap: 1rem; align-items: flex-start; border-color: var(--edge-soft); }

/* An icon sitting in a watercolour blob; the blob spreads on hover. */
.icon-wash {
  display: inline-flex; align-items: center; justify-content: center;
  width: 4.25rem; height: 3.5rem; margin-bottom: 0.75rem; flex: none;
  color: var(--ink);
  background: var(--wash, url(/images/art/wash-sky.webp)) center / 100% 100% no-repeat;
  transition: background-size .5s var(--ease);
}
.icon-wash .icon { width: 2rem; height: 2rem; }
.card:hover .icon-wash { background-size: 118% 118%; }
.cards > :nth-child(5n+1) { --wash: url(/images/art/wash-sky.webp);    --wash-soft: var(--sky-soft); }
.cards > :nth-child(5n+2) { --wash: url(/images/art/wash-peach.webp);  --wash-soft: var(--peach-soft); }
.cards > :nth-child(5n+3) { --wash: url(/images/art/wash-mint.webp);   --wash-soft: var(--mint-soft); }
.cards > :nth-child(5n+4) { --wash: url(/images/art/wash-butter.webp); --wash-soft: var(--butter-soft); }
.cards > :nth-child(5n+5) { --wash: url(/images/art/wash-lilac.webp);  --wash-soft: var(--lilac-soft); }

/* --- steps -------------------------------------------------------------- */
.steps { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.step {
  padding: 1.25rem 1.4rem 1.5rem;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 2px dashed var(--line); border-radius: var(--wobbly);
}
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 4.5rem; height: 3.75rem; margin-bottom: 0.5rem;
  font: 600 2.6rem/1 var(--hand); color: var(--ink);
  background: url(/images/art/wash-butter.webp) center / 100% 100% no-repeat;
}
.step:nth-child(2) .step-num { background-image: url(/images/art/wash-sky.webp); }
.step:nth-child(3) .step-num { background-image: url(/images/art/wash-mint.webp); }
.step:nth-child(4) .step-num { background-image: url(/images/art/wash-peach.webp); }
.step p { margin: 0; }

/* --- programs ----------------------------------------------------------- */
.programs { display: grid; gap: 2rem; }
/* The painted frame is a 9-slice image; border-radius still rounds the
   background inside it. */
.program {
  display: flex; flex-direction: column;
  padding: 0.75rem 0.75rem 1.25rem;
  border: 22px solid transparent;
  border-image: url(/images/art/frame.webp) 48 / 24px round;
  border-radius: 34px;
  background: var(--panel) padding-box;
}
.program-head { display: grid; gap: 0.5rem; margin-bottom: 0.5rem; }
.program-art { order: -1; justify-self: center; width: min(100%, 20rem); }
.program-tag {
  align-self: flex-start; margin-bottom: 0.5rem; padding: 0.25rem 0.8rem;
  font-weight: 700; font-size: 0.95rem; color: var(--ink);
  background: var(--lilac-soft); border-radius: 999px;
}
.program h3 { font-size: 1.75rem; margin-bottom: 0.25rem; }
.program-hint { margin: 0.5rem 0 0.25rem; font-size: 1rem; color: var(--mute); }
.program-lead { font-weight: 700; color: var(--ink); }
.program-items { margin: 0 0 1.25rem; padding: 0; list-style: none; }
.program-items li { border-bottom: 1px dashed var(--hair); }
.info-trigger {
  display: flex; align-items: flex-start; gap: 0.6rem; width: 100%;
  padding: 0.7rem 0.25rem; border: 0; background: none; border-radius: 10px;
  font: inherit; color: var(--body); text-align: left; cursor: pointer;
}
.info-trigger > .icon:first-child { width: 1.3em; height: 1.3em; margin-top: 0.1em; color: var(--mint); stroke-width: 2.4; }
.info-trigger span { flex: 1; }
.info-trigger:hover { background: var(--mint-soft); color: var(--ink); }
.program .btn { margin-top: auto; }

/* --- reviews ------------------------------------------------------------ */
.section-art { width: 15rem; justify-self: end; }
.carousel {
  --gap: 1.25rem;
  --cols: 1;
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0.5rem 0.5rem 1.25rem; margin: 0 -0.5rem;
  scrollbar-width: thin;
}
.carousel > * { scroll-snap-align: start; }
.carousel:focus-visible { outline-offset: -3px; }
.review {
  display: flex; flex-direction: column;
  padding: 1.5rem; background: var(--panel);
  border: 2px solid var(--line); border-radius: var(--wobbly);
  box-shadow: 5px 6px 0 var(--lilac-soft);
}
.review-stars { margin-bottom: 0.5rem; font-size: 1.25rem; letter-spacing: 0.15em; color: var(--butter); -webkit-text-stroke: 1px #c99a1c; }
.review blockquote { margin: 0 0 1rem; }
.review-origin { font-size: 1rem; color: var(--mute); }
.review footer {
  margin-top: auto; padding-top: 0.9rem; border-top: 1px dashed var(--hair);
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between;
  font-size: 0.95rem; color: var(--mute);
}
.carousel-controls { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.carousel-controls button {
  display: flex; align-items: center; justify-content: center;
  width: 3.25rem; height: 3.25rem; border-radius: 50%;
  border: 2px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer;
  transition: background .2s ease, transform .2s var(--ease);
}
.carousel-controls button:hover { background: var(--sky-soft); transform: translateY(-2px); }

/* --- FAQ ---------------------------------------------------------------- */
.faq { display: grid; gap: 0.9rem; max-width: 56rem; }
.faq details {
  background: var(--panel); border: 2px solid var(--edge-soft); border-radius: var(--wobbly);
  transition: background .3s ease;
}
.faq details[open] { background: var(--mint-soft); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.25rem; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 1.1rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+" / ""; flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  font: 700 1.5rem/1 var(--sans); color: var(--ink);
  background: url(/images/art/wash-mint.webp) center / 100% 100% no-repeat;
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 1.25rem 1.25rem; max-width: 50rem; }

/* --- sign-up ------------------------------------------------------------ */
.contact { display: grid; gap: 1.75rem; }
.contact-aside dl { margin: 0; display: grid; gap: 0.15rem; }
.contact-aside dt { margin-top: 0.9rem; font: 600 1.45rem/1 var(--hand); color: var(--cta-deep); }
.contact-aside dd { margin: 0; color: var(--ink); }
.messengers { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.35rem !important; }
.messenger {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 2.9rem; padding: 0.35rem 1rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--panel);
  font-weight: 700; color: var(--ink); text-decoration: none;
}
.messenger:hover { background: var(--sky-soft); color: var(--ink); }
.messenger .icon { width: 1.3em; height: 1.3em; }

/* A quiet sand-coloured hand-drawn edge: the painted purple frame was too
   loud around the one place visitors need to concentrate. */
.contact-panel {
  padding: 1.5rem 1.25rem;
  background: var(--panel);
  border: 2px solid var(--edge-soft); border-radius: var(--wobbly);
  box-shadow: 0 14px 30px -22px rgba(42, 47, 69, .45);
}
/* Bottom-aligned, so a label that wraps to two lines doesn't push its input
   out of line with its neighbour. */
.field-row { display: grid; gap: 0 1rem; align-items: end; }
.field { margin-bottom: 1.1rem; }
/* Error messages must not make the form jump: every checked field keeps a
   one-line slot under its input whether or not there is a message, and a field
   beside it in the same row gets an equal spacer so the two stay level. */
.field { --err-h: calc(0.25rem + 0.95rem * 1.4); }
.field:has(.field-error) { margin-bottom: 0.35rem; }
/* (The spacer beside an error slot is added in the two-column layout below —
   stacked on a phone, a field needs no partner to stay level with.) */
.field label { display: block; margin-bottom: 0.4rem; font-weight: 700; font-size: 1rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3.25rem; padding: 0.7rem 0.95rem;
  font: inherit; font-size: 1.05rem; line-height: 1.3; color: var(--ink);
  background: #fff; border: 2px solid #8a8172; border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 7.5rem; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--focus); box-shadow: 0 0 0 4px var(--sky-soft);
}
.field [aria-invalid="true"] { border-color: var(--cta); background: #fffaf7; }
.field-error {
  box-sizing: border-box; min-height: var(--err-h); margin: 0; padding-top: 0.25rem;
  font-weight: 700; font-size: 0.95rem; line-height: 1.4; color: var(--cta-deep);
}
.field--trap { position: absolute; left: -9999px; }
.form-note { font-size: 1rem; color: var(--mute); margin: 0.75rem 0 0; }
/* The small print under the button: one quiet block, lines close together. */
.form-notes { display: grid; gap: 0.3rem; margin-top: 1.1rem; font-size: 1rem; line-height: 1.45; color: var(--mute); }
.form-notes p { margin: 0; }
.form-status {
  margin-top: 1rem; padding: 0.9rem 1.1rem; border-radius: 14px;
  background: var(--peach-soft); color: var(--ink); font-weight: 700;
}
.form-status:empty { padding: 0; margin: 0; background: none; }
.form-status--ok { background: var(--mint-soft); }

/* --- pop-ups ------------------------------------------------------------ */
.popover {
  position: fixed; inset: 0; margin: auto;
  width: min(34rem, calc(100vw - 2rem)); height: fit-content;
  max-height: calc(100vh - 4rem); overflow-y: auto;
  padding: 1.75rem;
  background: var(--panel); color: var(--body);
  border: 2px solid var(--line); border-radius: var(--wobbly);
  box-shadow: 8px 10px 0 var(--sky-soft);
}
.popover h3 { font-size: 1.25rem; }
.popover-tag {
  display: inline-block; margin-bottom: 0.5rem; padding: 0.2rem 0.75rem;
  font-weight: 700; font-size: 0.95rem; color: var(--ink);
  background: var(--lilac-soft); border-radius: 999px;
}
.popover::backdrop { background: rgba(42, 47, 69, 0.35); }
/* Entry/exit: allow-discrete lets display and the top layer animate. */
.popover {
  opacity: 0; transform: translateY(0.75rem) scale(.98);
  transition: opacity .25s ease, transform .25s var(--ease),
              overlay .25s ease allow-discrete, display .25s ease allow-discrete;
}
.popover:popover-open { opacity: 1; transform: none; }
@starting-style { .popover:popover-open { opacity: 0; transform: translateY(0.75rem) scale(.98); } }

/* --- footer, consent ---------------------------------------------------- */
.site-footer { position: relative; padding: 3rem 0 2.5rem; font-size: 1rem; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: url(/images/art/stroke-mint.webp) center / 100% 100% no-repeat;
}
.footer-grid { display: grid; gap: 1.5rem; text-align: center; }
.footer-grid strong { color: var(--ink); }
.footer-meta { font-size: 1rem; color: var(--mute); }
.link-button { padding: 0; border: 0; background: none; font: inherit; color: var(--cta-deep); text-decoration: underline; cursor: pointer; }

.consent {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60;
  max-width: 34rem; margin-inline: auto; padding: 1.25rem;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--wobbly);
  box-shadow: 6px 8px 0 var(--butter-soft);
}
.consent[hidden] { display: none; }
.consent p { font-size: 1rem; }
.consent-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.consent-actions .btn { flex: 1 1 8rem; }

/* --- motion ------------------------------------------------------------- */
@keyframes float   { 50% { transform: translateY(-10px) rotate(0.6deg); } }
@keyframes bloom   { from { transform: scale(.82); opacity: 0; } }
@keyframes tail-rise  { from { transform: translateY(20%); } }
@keyframes tail-swish { 30% { transform: rotate(-9deg); } 70% { transform: rotate(6deg); } }
/* All motion is one-off and done within 5 s (WCAG 2.2.2): nothing loops. */
@keyframes paint-in { from { background-size: 0% 0.5em; } to { background-size: 100% 0.5em; } }
@keyframes bleed-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* Scroll-driven, where supported: headings' brush strokes paint in and cards
   settle onto the page as they enter. Elsewhere everything is simply shown. */
@supports (animation-timeline: view()) {
  .section-head h2 {
    animation: paint-in linear both;
    animation-timeline: view(); animation-range: entry 20% cover 35%;
  }
  .cards > li, .step, .program, .faq details, .proof-item {
    animation: bleed-in linear both;
    animation-timeline: view(); animation-range: entry 0% entry 90%;
  }
}

/* --- breakpoints -------------------------------------------------------- */
@media (min-width: 48rem) {
  :root { --pad: 2rem; }
  .section { padding: 5rem 0; }
  .hero { padding: 4rem 0 4.5rem; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-proof { grid-template-columns: repeat(3, 1fr); }
  .section-head--art { grid-template-columns: 1fr auto; }
  .section-art { display: block; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .carousel { --cols: 2; }
  .field-row { grid-template-columns: repeat(2, 1fr); }
  .field-row > .field:not(:has(.field-error)) { margin-bottom: 0.35rem; }
  .field-row > .field:not(:has(.field-error))::after { content: ""; display: block; height: var(--err-h); }
  .contact { grid-template-columns: 1fr 1.8fr; align-items: start; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); text-align: left; }
  .header-cta { display: inline-flex; }
  .nav-signup { display: none; }   /* the header button takes over */
}

/* Narrow phones: the word «Меню» needs the room, so the language switch shows
   only the other language (the page itself shows which one you are on), and
   the brand shrinks a touch. */
@media (max-width: 26rem) {
  .header-bar { gap: 0.4rem; }
  .brand { font-size: 1.1rem; }
  .brand span { font-size: 1.35rem; }
  .nav-toggle > summary { padding: 0 0.8rem 0 0.65rem; }
  .lang-switch a[aria-current] { display: none; }
}
/* The smallest phones (320px): a little tighter still. */
@media (max-width: 22rem) {
  :root { --pad: 0.9rem; }
  .brand { font-size: 1rem; }
  .brand span { font-size: 1.2rem; }
  .nav-toggle > summary { gap: 0.3rem; padding: 0 0.65rem 0 0.5rem; }
  .lang-switch a { min-width: 2rem; padding: 0 0.3rem; }
  /* Keep every field error on its one reserved line. */
  .contact-panel { padding-inline: 0.9rem; }
  .field-error { font-size: 0.88rem; }
}

/* One course, one wide frame: the description sits beside the drawing, the
   topic list runs in two columns, the button keeps its natural width. */
@media (min-width: 60rem) {
  .program-head { grid-template-columns: 1fr 20rem; align-items: center; column-gap: 2.5rem; }
  .program-art { order: 0; }
  .program-items { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .program .btn--block { width: auto; align-self: flex-start; padding-inline: 2.5rem; }
}

@media (min-width: 72rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .carousel { --cols: 3; }
  .nav-toggle > summary { display: none; }
  .nav-list {
    position: static; display: flex; gap: 1.4rem;
    padding: 0; border: 0; background: none; box-shadow: none;
  }
  .nav-list a { border: 0; padding: 0.25rem 0; font-size: 1rem; }
  .nav-contact { display: none; }
  .header-bar { gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html, .carousel { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .carousel-controls, .hero-actions, .hero-art, .section-art, .consent { display: none; }
  body, .section { background: #fff; color: #000; }
}
