/* ─────────────────────────────────────────────────────────────────────
   Академия Савви · Design System
   v0.2 · 2026 · brutalist-light + опциональное стекло

   Стиль: тёплый кремовый фон, гигантская sans-serif типографика,
   цветные крупно-скруглённые карточки, плоские pill-кнопки, синий акцент.
   ───────────────────────────────────────────────────────────────────── */

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

:root {

  /* ─── 1. Поверхности ───────────────────────────────────────────── */
  --bg:           #FFFFFF;   /* основной — чистый белый */
  --bg-soft:      #F5F5F2;   /* секция с альт-заливкой — тёплый светло-серый */
  --bg-tint:      #FAFAF7;   /* самая светлая для inputs */
  --bg-card:      #FFFFFF;
  --bg-dark:      #0F0F0F;   /* почти чёрный, для тёмных карт/футера */

  /* ─── 2. Текст ─────────────────────────────────────────────────── */
  --text:         #0F0F0F;
  --text-2:       #4A4A48;
  --text-3:       #8A8A86;
  --text-muted:   #B5B5AE;
  --text-on-dark: #FFFFFF;
  --text-on-blue: #FFFFFF;

  /* ─── 3. Синий акцент (из логотипа) ────────────────────────────── */
  --accent:       #2B5CFF;
  --accent-hover: #1E47D6;
  --accent-soft:  #E8EEFF;
  --accent-line:  rgba(43, 92, 255, 0.15);

  /* ─── 4. Зелёный — второй акцент для разнообразия карт ─────────── */
  --green:        #2C8E5B;
  --green-hover:  #226E47;
  --green-soft:   #DCEFE3;

  /* ─── 5. Цвета аватарок-заглушек (градиенты) ───────────────────── */
  --av-1: linear-gradient(135deg, #FFB37A, #E87A4B);  /* персик */
  --av-2: linear-gradient(135deg, #7BC4A0, #2C8E5B);  /* зелёный */
  --av-3: linear-gradient(135deg, #93B0FF, #2B5CFF);  /* синий */
  --av-4: linear-gradient(135deg, #F5C84B, #E0A52A);  /* охра */
  --av-5: linear-gradient(135deg, #C49AFF, #7A4FE0);  /* фиолет */

  /* ─── 6. Опциональное стекло (для плашек на цветных секциях) ───── */
  --ice-bg:        rgba(255, 255, 255, 0.55);
  --ice-bg-strong: rgba(255, 255, 255, 0.75);
  --ice-border:    rgba(255, 255, 255, 0.85);
  --ice-blur:      blur(24px) saturate(1.5);
  --ice-shadow:    0 8px 32px rgba(15, 15, 15, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);

  /* ─── 7. Скругления ────────────────────────────────────────────── */
  --r-xs:   8px;
  --r-sm:   14px;
  --r:      24px;
  --r-lg:   32px;
  --r-xl:   40px;
  --r-pill: 999px;

  /* ─── 8. Тайпо: семейства ──────────────────────────────────────── */
  --sans:  'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  ui-monospace, 'SF Mono', 'Menlo', monospace;

  /* ─── 9. Шкала размеров ────────────────────────────────────────── */
  --fs-hero:   clamp(42px, 6.4vw, 92px);
  --fs-h1:     clamp(40px, 6vw, 80px);
  --fs-h2:     clamp(36px, 5vw, 64px);
  --fs-h3:     26px;
  --fs-h4:     20px;
  --fs-lead:   18px;
  --fs-body:   16px;
  --fs-small:  14px;
  --fs-micro:  13px;
  --fs-nano:   11px;

  /* ─── 10. Контейнер и ритм ─────────────────────────────────────── */
  --container:    1280px;
  --gutter:       32px;
  --section-y:    100px;
  --section-y-sm: 64px;
}

/* ─── 11. База ───────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── 12. Тайпо: заголовки ───────────────────────────────────────── */

.h-hero, .hero h1 {
  font-family: var(--sans);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}

.h1, h1 {
  font-family: var(--sans);
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}

.h2, h2 {
  font-family: var(--sans);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
}

.h3, h3 {
  font-family: var(--sans);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}

.h4 {
  font-family: var(--sans);
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* Акцент-цвета для отдельных слов в заголовке */
.t-blue  { color: var(--accent); }
.t-green { color: var(--green); }

.lead {
  font-size: var(--fs-lead);
  color: var(--text-2);
  line-height: 1.6;
  font-weight: 500;
}
.muted   { color: var(--text-3); }
.muted-2 { color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.45;
  letter-spacing: -0.005em;
  margin-bottom: 24px;
}

/* ─── 13. Логотип «академия / савви» ─────────────────────────────── */

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 0.86;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 22px;
  color: var(--text);
  font-family: var(--sans);
}
.brand .line { display: inline-flex; align-items: baseline; }
.brand .blue { color: var(--accent); }
.brand .brand-i { color: var(--accent); }
.brand .brand-pre {
  display: inline-block;
  text-align: right;
  min-width: 4.4em;
}
.brand-lg { font-size: 36px; }
.brand-xl { font-size: 56px; }

/* ─── 14. Pill buttons ───────────────────────────────────────────── */

.btn,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  border: 2px solid transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
}

.btn-primary,
.pill-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover,
.pill-primary:hover { background: var(--accent-hover); }

.btn-dark,
.pill-dark {
  background: var(--text);
  color: #fff;
}
.btn-dark:hover,
.pill-dark:hover { background: #2A2A28; }

.btn-light,
.pill-light {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
  padding: 12px 26px;
}
.btn-light:hover,
.pill-light:hover { background: var(--text); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 12px 18px;
  font-weight: 600;
}
.btn-ghost:hover { color: var(--accent); }

.btn-lg, .pill-lg { padding: 18px 36px; font-size: 16px; }
.btn-sm, .pill-sm { padding: 10px 20px; font-size: 13px; }
.btn-block        { width: 100%; }

/* Стрелка-кружок в pill: <span class="arrow">→</span> */
.btn .arrow,
.pill .arrow {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.20);
  border-radius: 50%;
  margin-left: -2px;
}
.btn-light .arrow,
.pill-light .arrow,
.btn-ghost .arrow { background: rgba(15, 15, 15, 0.10); color: var(--text); }

/* ─── 15. Карты-блоки (основной примитив) ────────────────────────── */

.card {
  border-radius: var(--r-lg);
  padding: 36px;
  background: var(--bg-card);
  color: var(--text);
  transition: transform 0.25s ease;
}
.card-hover:hover { transform: translateY(-4px); }

/* Варианты заливки */
.card-light   { background: var(--bg-card); }
.card-soft    { background: var(--bg-soft); }
.card-blue    { background: var(--accent); color: #fff; }
.card-dark    { background: var(--bg-dark); color: #fff; }
.card-green   { background: var(--green); color: #fff; }
.card-tint    { background: var(--bg-tint); }

/* На цветных картах теги/линии должны быть светлее */
.card-blue h3,
.card-dark h3,
.card-green h3 { color: #fff; }

.card-blue .muted,
.card-dark .muted,
.card-green .muted { color: rgba(255, 255, 255, 0.7); }

/* Padding-варианты */
.card-pad-sm  { padding: 24px; }
.card-pad     { padding: 36px; }
.card-pad-lg  { padding: 48px; }

/* ─── 16. Chip / Tag — мелкие пилюли внутри карт ─────────────────── */

.chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(15, 15, 15, 0.06);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.card-blue .chip,
.card-dark .chip,
.card-green .chip {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.chip-accent { background: var(--accent); color: #fff; }
.chip-outline {
  background: transparent;
  border: 1.5px solid var(--text);
  padding: 5px 13px;
}

/* ─── 17. Метрика — гигантская цифра + малая подпись ─────────────── */

.metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.metric-num {
  font-family: var(--sans);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.metric-num.t-blue  { color: var(--accent); }
.metric-num.t-green { color: var(--green); }
.metric-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.005em;
  line-height: 1.4;
  max-width: 18ch;
}
.metric-num .unit {
  font-size: 0.5em;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: -0.02em;
  vertical-align: 0.18em;
}

.metrics-row {
  display: flex;
  gap: 56px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* ─── 18. Team strip — кружочки аватаров «N+ человек» ────────────── */

.team-strip {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.team-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 4px solid var(--bg);
  margin-left: -14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  overflow: hidden;
  position: relative;
}
.team-circle:first-child { margin-left: 0; }
.team-circle img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.team-circle.av-1 { background: var(--av-1); }
.team-circle.av-2 { background: var(--av-2); }
.team-circle.av-3 { background: var(--av-3); }
.team-circle.av-4 { background: var(--av-4); }
.team-circle.av-5 { background: var(--av-5); }
.team-circle.counter {
  background: var(--text);
  color: #fff;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.team-circle-sm { width: 44px; height: 44px; font-size: 14px; border-width: 3px; margin-left: -10px; }
.team-circle-xs { width: 32px; height: 32px; font-size: 11px; border-width: 2px; margin-left: -8px; }

/* ─── 19. Bage-«медалька» с цифрой 1 ─────────────────────────────── */

.seal-badge {
  display: inline-flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 320px;
}
.seal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.seal-accent { background: var(--accent); }
.seal-dark   { background: var(--text); }
.seal-green  { background: var(--green); }
.seal-text { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.45; }
.seal-text .muted { color: var(--text-3); font-size: 13px; display: block; margin-top: 2px; }

/* ─── 20. Опциональное стекло (для плавающих плашек на цвете) ────── */

.ice {
  background: var(--ice-bg);
  backdrop-filter: var(--ice-blur);
  -webkit-backdrop-filter: var(--ice-blur);
  border: 1px solid var(--ice-border);
  border-radius: var(--r-lg);
  box-shadow: var(--ice-shadow);
  position: relative;
  overflow: hidden;
  padding: 24px;
}
.ice::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  pointer-events: none;
}

.float-card {
  position: absolute;
  background: var(--bg-card);
  border-radius: var(--r);
  padding: 14px 18px;
  box-shadow: 0 8px 24px rgba(15, 15, 15, 0.08);
  z-index: 3;
}

/* ─── 21. Nav ────────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ─── 22. Утилиты ────────────────────────────────────────────────── */

.center { text-align: center; }

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

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
