/* ==========================================================================
   Koch School LMS — Base: reset, типографика, фокус, утилиты
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: 'ss01' on, 'cv11' on;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }

/* ---- Типографика ------------------------------------------------------- */

.h1 {
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
.h1--lg { font-size: var(--text-h1-lg); }

.h2 {
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.h3 {
  font-size: var(--text-h3);
  font-weight: 700;
  line-height: var(--leading-snug);
  letter-spacing: -0.005em;
}

.h4 {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: var(--leading-snug);
}

.kpi-num {
  font-size: var(--text-kpi);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tracking-kpi);
  font-variant-numeric: tabular-nums;
}
.kpi-num--lg { font-size: var(--text-kpi-lg); }

.lead { font-size: var(--text-lg); line-height: 1.55; }
.text-sm { font-size: var(--text-sm); line-height: 1.5; }
.text-xs { font-size: var(--text-xs); line-height: 1.5; letter-spacing: 0.01em; }
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
.strong { font-weight: 700; }
.bold { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }

.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--fg-2);
}

.prose {
  max-width: var(--reading-max);
  font-size: var(--text-lg);
  line-height: 1.65;
}
.prose p + p { margin-top: 1em; }
.prose h2 { font-size: var(--text-h2); font-weight: 700; letter-spacing: var(--tracking-display); margin: 1.6em 0 0.6em; line-height: var(--leading-snug); }
.prose h3 { font-size: var(--text-h3); font-weight: 700; margin: 1.4em 0 0.5em; }
.prose ul { list-style: disc; padding-left: 1.3em; margin: 0.8em 0; }
.prose ol { list-style: decimal; padding-left: 1.3em; margin: 0.8em 0; }
.prose li + li { margin-top: 0.35em; }
.prose strong { font-weight: 700; }
.prose figure { margin: 1.5em 0; }
.prose figcaption { font-size: var(--text-sm); color: var(--fg-2); margin-top: var(--s-2); }
.prose .callout {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--s-4) var(--s-5);
  font-size: var(--text-md);
  background: var(--surface);
  margin: 1.2em 0;
}

a.link {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
  transition: text-decoration-color var(--dur-fast) var(--ease);
}
a.link:hover { text-decoration-color: var(--fg); }

/* ---- Фокус ------------------------------------------------------------- */

:focus { outline: none; }
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--r-sm);
}

/* ---- Утилиты ----------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.stack > * + * { margin-top: var(--stack-gap, var(--s-4)); }
.stack--2 { --stack-gap: var(--s-2); }
.stack--3 { --stack-gap: var(--s-3); }
.stack--6 { --stack-gap: var(--s-6); }
.stack--8 { --stack-gap: var(--s-8); }

.row { display: flex; align-items: center; gap: var(--row-gap, var(--s-3)); }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.row--start { align-items: flex-start; }
.row--wrap { flex-wrap: wrap; }
.row--2 { --row-gap: var(--s-2); }
.row--4 { --row-gap: var(--s-4); }
.grow { flex: 1 1 auto; min-width: 0; }
.shrink-0 { flex-shrink: 0; }

.grid { display: grid; gap: var(--grid-gap, var(--s-4)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(var(--grid-min, 280px), 1fr)); }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.right { text-align: right; }
.center { text-align: center; }
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); }
.hide-mobile { display: initial; }
.show-mobile { display: none !important; }

@media (max-width: 768px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .grid--2-mobile { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-mobile { display: none !important; }
  .show-mobile { display: initial !important; }
  .show-mobile.row, .show-mobile.stack { display: flex !important; }
}

/* ---- Иконки ------------------------------------------------------------ */

.icon {
  width: 20px; height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}
.icon--sm { width: 16px; height: 16px; }
.icon--xs { width: 14px; height: 14px; }
.icon--lg { width: 24px; height: 24px; }
