* {
  box-sizing: border-box;
}

:root {
  --sand: #f6ead3;
  --sand-dark: #eeddc0;
  --steppe: #7c9a5a;
  --steppe-dark: #5d7a41;
  --fur: #b9a489;
  --ink: #35301f;
  --ink-soft: #6b6350;
  --accent: #e07a3f;
  --card: #fffdf8;
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 80% -10%, #fbe8c8 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 30%, #e9f0d8 0%, transparent 55%),
    var(--sand);
  overflow-x: hidden;
}

/* снежинки / пушинки */
.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.flake {
  position: absolute;
  top: -4vh;
  font-size: 14px;
  opacity: 0.55;
  animation: fall linear infinite;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); }
}

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.2rem;
  background: rgba(255, 253, 248, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(124, 154, 90, 0.25);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.15rem;
}
.logo strong { color: var(--steppe-dark); }
.logo__icon { width: 36px; height: 36px; }
.nav { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: 0.2s;
}
.nav a:hover {
  color: #fff;
  background: var(--steppe);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.2rem 1.4rem 3.6rem;
}
.hero__eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steppe-dark);
  font-weight: 700;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  line-height: 1.06;
}
.accent { color: var(--accent); }
.hero__lead {
  margin: 1.1rem 0 1.5rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 34rem;
}
.hero__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 0 #b45c28;
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary:active { transform: translateY(4px); box-shadow: 0 2px 0 #b45c28; }
.btn--ghost {
  background: transparent;
  color: var(--steppe-dark);
  border: 2px solid var(--steppe);
}
.btn--ghost:hover { background: var(--steppe); color: #fff; }

.purr-note {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--steppe-dark);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s;
}
.purr-note.show { opacity: 1; animation: wiggle 0.4s ease 3; }
@keyframes wiggle {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

/* ===== МАНУЛ ===== */
.hero__art {
  position: relative;
  display: flex;
  justify-content: center;
}
.manul {
  width: min(400px, 92%);
  cursor: pointer;
  filter: drop-shadow(0 18px 24px rgba(90, 70, 40, 0.28));
  animation: breathe 3.4s ease-in-out infinite;
  user-select: none;
}
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.015); }
}
.manul:active { transform: scale(0.97); }

/* моргание */
.manul__eye { transform-box: fill-box; transform-origin: center; }
.manul__eye { animation: blink 4.5s infinite; }
.manul__eye--r { animation-delay: 0.12s; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.08); }
}
.manul.purring .manul__eye { animation: happyEyes 0.6s ease 3; }
@keyframes happyEyes {
  50% { transform: scaleY(0.15); }
}

.speech {
  position: absolute;
  top: -6px;
  right: 4%;
  background: #fff;
  border: 2px solid var(--ink);
  padding: 0.5rem 0.9rem;
  border-radius: 16px 16px 16px 4px;
  font-weight: 800;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(8px) scale(0.8);
  transition: 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 3;
}
.speech.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ===== SECTIONS ===== */
.section {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.4rem;
}
.section--alt {
  max-width: none;
  background: linear-gradient(180deg, rgba(124, 154, 90, 0.14), rgba(124, 154, 90, 0.05));
  border-top: 2px dashed rgba(124, 154, 90, 0.4);
  border-bottom: 2px dashed rgba(124, 154, 90, 0.4);
}
.section--alt > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.section__title {
  margin: 0 0 1.6rem;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  text-align: center;
}
.section__sub {
  text-align: center;
  color: var(--ink-soft);
  margin: -0.8rem 0 1.8rem;
  font-size: 1.02rem;
}

/* ===== КАРТОЧКИ ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: 0 10px 24px rgba(90, 70, 40, 0.12);
  border-top: 5px solid var(--steppe);
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-6px) rotate(-0.5deg); }
.card__emoji { font-size: 2.2rem; }
.card h3 { margin: 0.6rem 0 0.5rem; font-size: 1.2rem; }
.card p { margin: 0; line-height: 1.6; color: var(--ink-soft); font-size: 0.97rem; }

/* ===== ФАКТЫ ===== */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.fact {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  text-align: left;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s;
}
.fact:hover { transform: translateY(-4px); border-color: var(--accent); }
.fact.active { border-color: var(--accent); background: #fff4e8; }
.fact__num { font-size: 0.8rem; font-weight: 800; color: var(--accent); letter-spacing: 0.1em; }
.fact__label { font-size: 1.08rem; font-weight: 800; color: var(--ink); }
.fact-answer {
  min-height: 3.2em;
  margin: 1.4rem auto 0;
  max-width: 640px;
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: 1.02rem;
  line-height: 1.55;
  box-shadow: 0 8px 20px rgba(90, 70, 40, 0.1);
}

/* ===== МЕСТА И СТАТЫ ===== */
.places {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 2rem;
}
.place {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--card);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(90, 70, 40, 0.12);
  transition: 0.2s;
}
.place:hover { transform: translateY(-3px); background: #eef4e3; }
.place span { font-size: 1.2rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.stat {
  background: var(--steppe);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  text-align: center;
  box-shadow: 0 10px 22px rgba(93, 122, 65, 0.35);
}
.stat__value { font-size: 2.4rem; font-weight: 800; }
.stat__label { font-size: 0.95rem; opacity: 0.92; margin-top: 0.3rem; }

/* ===== ВИКТОРИНА ===== */
.quiz {
  color: #000;
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  max-width: 680px;
  box-shadow: 0 12px 26px rgba(90, 70, 40, 0.14);
}
.quiz__progress {
  height: 10px;
  background: var(--sand-dark);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.2rem;
}
.quiz__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--steppe), var(--accent));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.quiz__q { font-size: 1.18rem; font-weight: 800; margin: 0 0 1rem; line-height: 1.45; }
.quiz__answers { display: grid; gap: 0.7rem; }
.quiz__btn {
  font-family: inherit;
  color: #000;
  font-size: 1rem;
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  border: 2px solid var(--sand-dark);
  background: #fff;
  cursor: pointer;
  transition: 0.15s;
}
.quiz__btn:hover:not(:disabled) { border-color: var(--steppe); background: #f2f7ea; }
.quiz__btn.correct { border-color: var(--steppe); background: #e4f2d4; font-weight: 800; }
.quiz__btn.wrong { border-color: #d9534f; background: #fbe4e3; }
.quiz__btn:disabled { cursor: default; }
.quiz__result { min-height: 1.4em; font-weight: 800; color: var(--steppe-dark); margin: 1rem 0 0; }
.quiz__restart { margin-top: 1rem; }

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.2rem 1rem 2.6rem;
  background: var(--ink);
  color: #f1e9d8;
  margin-top: 2rem;
}
.footer p { margin: 0.25rem 0; font-weight: 700; }
.footer__small { font-weight: 400; font-size: 0.88rem; opacity: 0.7; }

/* ===== АДАПТИВ ===== */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 2.2rem; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__art { order: -1; }
  .manul { width: min(300px, 80%); }
  .nav { display: none; }
}
