/* ============================================================
   Сайт про медведей — стили («таёжная» светлая тема)
   Файл подключён к index.html строкой <link rel="stylesheet">
   ============================================================ */

/* ---------- 1. ПЕРЕМЕННЫЕ: палитра «тайги» ---------- */
:root {
  --bg: #f6efe3;            /* кремовая «бумага» — фон страницы */
  --card: #fffaf0;          /* фон карточек, чуть светлее */
  --pine: #22301f;          /* тёмно-хвойный: главный экран */
  --pine-soft: #2c3d28;     /* хвоя посветлее: свечения и детали */
  --text: #2e2317;          /* тёмно-коричневый текст */
  --muted: #746349;         /* приглушённый второстепенный текст */
  --cream: #f3ecdc;         /* светлый текст на хвойном фоне */
  --accent: #b3572c;        /* терракота — главный цвет */
  --line: #e3d5bd;          /* границы карточек */
}

/* ---------- 2. БАЗОВЫЕ ПРАВИЛА ---------- */
* {
  margin: 0;                /* сбрасываем отступы браузера */
  padding: 0;
  box-sizing: border-box;   /* padding не увеличивает ширину блоков */
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  /* ^ браузер выбирает первый шрифт, который есть на устройстве */
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

.container {
  max-width: 1000px;
  margin: 0 auto;           /* auto по бокам = центр */
  padding: 0 20px;
}

/* Заголовки — антиквой (Georgia), как в бумажных справочниках */
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
}

/* ---------- 3. ЗНАЧОК ЛАПЫ ----------
   Штамп описан в index.html внутри <symbol id="paw">.
   Заливка = currentColor, поэтому цвет каждой копии
   задаётся обычным CSS-свойством color */
.stamp {
  position: absolute;       /* сам «исходник» на экран не показываем */
  width: 0;
  height: 0;
}

.paw {
  width: 56px;
  height: 56px;
  fill: currentColor;
}

/* Цвета лап — под шерсть каждого вида */
.paw--white      { color: #9dbdd0; }
.paw--brown      { color: #a9713a; }
.paw--spectacled { color: #7c8a80; }
.paw--himalayan  { color: #3b322b; }
.paw--panda      { color: #556b4f; }
.paw--sun        { color: #d19a3d; }

/* ---------- 4. ГЛАВНЫЙ ЭКРАН ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 90px 0 70px;
  background: var(--pine);
  color: var(--cream);
  overflow: hidden;
}

/* Мягкое «свечение» за заголовком: псевдоэлемент — блок,
   которого нет в HTML, его рисует CSS */
.hero::before {
  content: "";              /* без этого свойства он не появится */
  position: absolute;
  top: -160px;
  left: 50%;                /* ставим в центр по горизонтали */
  transform: translateX(-50%);
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 154, 61, 0.20), transparent 70%);
}

.badge {
  position: relative;       /* чтобы бейдж лежал поверх свечения */
  display: inline-block;
  border: 1px solid rgba(243, 236, 220, 0.35);
  color: #d9a441;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 999px;
}

.hero h1 {
  position: relative;
  font-size: clamp(44px, 9vw, 76px); /* растёт и уменьшается плавно */
  letter-spacing: 2px;
  margin: 16px 0 12px;
}

.hero__text {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  color: rgba(243, 236, 220, 0.75);
  font-size: 17px;
}

/* Большая лапа на герое + цепочка следов, уходящих в угол */
.paw--hero {
  position: relative;
  width: 92px;
  height: 92px;
  color: #d9a441;
  transform: rotate(-12deg);
  margin-bottom: 14px;
}

.paw--trail {
  position: absolute;
  color: #d9a441;
}

.paw--trail-1 {
  right: 12%;
  bottom: 90px;
  width: 44px;
  height: 44px;
  opacity: 0.35;
  transform: rotate(35deg);
}

.paw--trail-2 {
  right: 6%;
  bottom: 40px;
  width: 32px;
  height: 32px;
  opacity: 0.2;
  transform: rotate(45deg);
}

/* ---------- 5. СЕКЦИИ И КАРТОЧКИ ---------- */
.section { padding: 56px 0; }

.section--tinted {
  background: var(--card);  /* полоса чуть светлее фона */
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--last { padding-top: 44px; }

.section h2 {
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 24px;
  text-align: center;
}

.cards {
  display: grid;
  /* auto-fit: колонок появляется столько, сколько влезает;
     на телефоне остаётся одна — сетка сама перестраивается */
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);        /* карточка всплывает */
  border-color: var(--accent);        /* и подсвечивается граница */
  box-shadow: 0 12px 24px rgba(46, 35, 23, 0.10);
}

.card .paw { margin-bottom: 14px; }

.card h3 { font-size: 18px; margin-bottom: 8px; }

/* Табличка с весом — как бирка на справочной полке */
.tag {
  display: inline-block;
  background: #efe4cf;
  color: #93431f;           /* терракота темнее — чтобы бирка хорошо читалась */
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.card p { font-size: 14.5px; color: var(--muted); }

/* ---------- 6. ГРАФИК ВЕСА ----------
   Ширину и цвет каждой полоски приносит из HTML
   через переменные --w и --c на самой строке */
.bars {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 70px; /* имя | полоска | вес */
  align-items: center;
  gap: 12px;
}

.bar-name {
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}

.bar-track {
  height: 14px;
  background: #e7dcc6;
  border-radius: 999px;
}

.bar {
  width: var(--w);          /* % веса от самого крупного вида */
  height: 100%;
  background: var(--c);
  border-radius: inherit;
}

.bar-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.note {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 18px;
}

/* ---------- 7. СПИСОК ФАКТОВ ---------- */
.facts {
  list-style: none;         /* убираем точки у списка */
  display: grid;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}

.facts li {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent); /* терракотовая полоска слева */
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15px;
}

/* ---------- 8. ПОДВАЛ ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 26px 20px;        /* 20px по бокам — текст не липнет к краю на телефоне */
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 9. АДАПТИВ ПОД ТЕЛЕФОНЫ ----------
   Колонки карточек перестраиваются сами (auto-fit),
   остаётся уменьшить отступы и сузить колонки графика */
@media (max-width: 600px) {
  .hero { padding: 64px 0 50px; }
  .paw--trail { display: none; }          /* следы убираем, чтобы не мешали */
  .section { padding: 44px 0; }
  .bar-row { grid-template-columns: 86px 1fr 62px; }
}
