:root {
  --bg: #ffffff;
  --soft: #f6f8fc;
  --ink: #0c1222;
  --body: #33404f;
  --muted: #5a6472;
  --line: #e6e9ef;
  --line-strong: #d5dae3;
  --accent: #1b4dd8;
  --accent-dark: #143aa8;
  --accent-soft: #eef3ff;
  --band: #0a1020;
  --ok: #17683c;
  --ok-soft: #eaf7ee;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(12, 18, 34, .05);
  --shadow: 0 1px 2px rgba(12, 18, 34, .05), 0 10px 30px rgba(12, 18, 34, .07);
  --ease: 160ms cubic-bezier(.2, .6, .3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 .55em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 3.9vw, 3.15rem); letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.06rem; letter-spacing: -0.012em; }
p { margin: 0 0 1.05em; max-width: 68ch; }
a { color: var(--accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }

.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.linklike:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 32px; height: 70px; }
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.025em; color: var(--ink);
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand .mark { width: 24px; height: 24px; flex: 0 0 auto; }
.nav .links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav .links a:not(.btn) {
  color: #2a3444; font-size: .94rem; font-weight: 500;
}
.nav .links a:not(.btn):hover { color: var(--accent); text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent); border-radius: 10px;
  padding: 12px 20px; font-size: .95rem; font-weight: 600; letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: #fafbfe; border-color: #c2c8d4; color: var(--ink); }
.btn.light { background: #fff; color: var(--accent-dark); border-color: #fff; }
.btn.light:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- hero ---------- */
.hero { padding: 84px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent-dark);
  border-radius: 999px; padding: 6px 14px; font-size: .78rem; font-weight: 650;
  letter-spacing: .01em; margin-bottom: 22px;
}
.hero p.lead { font-size: 1.12rem; color: #3a4656; max-width: 30em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.trust-line { margin-top: 20px; font-size: .875rem; color: var(--muted); max-width: 34em; }

.hero-media { margin: 0; }
.hero-media img {
  display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: var(--shadow);
  object-fit: cover;
}

/* ---------- stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 26px; padding-bottom: 26px; }
.stat .n { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.stat .l { font-size: .82rem; color: var(--muted); }

/* ---------- sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 46em; margin-bottom: 38px; }
.section-head p { color: var(--muted); }
.alt { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card .tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent-dark); margin-bottom: 12px;
}

/* levels */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.level {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  transition: border-color var(--ease);
}
.level:hover { border-color: var(--line-strong); }
.level .code { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--accent); }
.level p { font-size: .905rem; color: var(--muted); margin: 10px 0 0; }

/* steps */
ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
ol.steps li { counter-increment: s; padding-left: 50px; position: relative; margin-bottom: 24px; }
ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
ol.steps li strong { display: block; color: var(--ink); }

/* dark band */
.band { background: var(--band); color: #fff; border: 0; }
.band h2 { color: #fff; }
.band p { color: #aeb7c6; }
.band .btn.light { margin-top: 10px; }

/* photo blocks */
.teacher-block { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center; }
.teacher-block img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow); }
.band-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.band-grid img { display: block; width: 100%; height: auto; border-radius: 14px; }

/* quotes */
.quote { border-left: 3px solid var(--accent); padding-left: 20px; }
.quote p { font-size: 1.03rem; color: #26303d; }
.quote .who { font-size: .85rem; color: var(--muted); }

/* FAQ */
details.faq { border-bottom: 1px solid var(--line); padding: 18px 0; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin-top: 12px; color: var(--muted); }

/* ---------- forms ---------- */
.form { max-width: 560px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: #39424f; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 13px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 9px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(27,77,216,.14);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.form-note { font-size: .82rem; color: var(--muted); }
.form-error { color: #b42318; font-size: .9rem; margin-top: 10px; }
.thanks {
  border: 1px solid #cfe3d4; background: var(--ok-soft); border-left: 4px solid var(--ok);
  padding: 20px 22px; border-radius: 10px;
}

/* ---------- auth ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; background: var(--soft); }
.auth-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 40px 36px; width: min(430px, 92vw);
}
.auth-card h1 { font-size: 1.5rem; }
.auth-card .btn { width: 100%; }

/* ---------- cabinet ---------- */
.lessons { display: grid; gap: 12px; margin-top: 28px; }
.lesson-row {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.lesson-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.lesson-row .n { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.lesson-row a { color: var(--ink); font-weight: 600; }
.lesson-row a:hover { color: var(--accent); text-decoration: none; }
.player {
  background: var(--band); border-radius: var(--radius); aspect-ratio: 16/9;
  display: grid; place-items: center; color: #6f7a8c; margin: 26px 0; font-size: .9rem;
}
.transcript { border-left: 2px solid var(--line); padding-left: 20px; }
.transcript p { margin-bottom: .75em; }

/* ---------- tables ---------- */
table.prices { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: .95rem; }
table.prices th, table.prices td { text-align: left; padding: 14px; border-bottom: 1px solid var(--line); }
table.prices th { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
table.prices tbody tr:hover { background: #fbfcfe; }
table.prices td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.save { display: inline-block; background: var(--ok-soft); color: var(--ok); font-size: .76rem; font-weight: 700;
        padding: 3px 8px; border-radius: 6px; margin-left: 8px; vertical-align: middle; }

/* horizontal scroll for tables on narrow screens */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 22px; }
.table-scroll table.prices { margin-top: 0; min-width: 560px; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 56px 0 34px; background: #fbfcfe; }
.foot-disclaimer { margin: 26px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; max-width: 62em; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.foot-grid h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 9px; font-size: .92rem; }
.foot-grid a { color: #2a3444; }
.foot-grid a:hover { color: var(--accent); }
.foot-bottom {
  margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .84rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }

@media (max-width: 960px) {
  .hero-grid, .grid-2, .grid-3, .levels, .foot-grid, .stats .wrap, .teacher-block, .band-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding: 52px 0; }
  section { padding: 56px 0; }
  .nav { height: auto; padding: 14px 0; flex-wrap: wrap; gap: 14px; }
  .nav .links { margin-left: 0; flex-wrap: wrap; gap: 18px; }
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .teacher-block img { max-width: 280px; }
}

@media (max-width: 700px) {
  .nav { flex-wrap: nowrap; gap: 12px; }
  .nav .links {
    flex: 1 1 auto; min-width: 0; flex-wrap: nowrap;
    overflow-x: auto; gap: 16px; padding-bottom: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav .links::-webkit-scrollbar { display: none; }
  .nav .links a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
