/* ============================================================
   Chicken Road Club — "Karton & Pastel"
   Тема: крафт-бумага, пастельные акценты, мягкие тени,
   скругления, стикеры. Тон: дружелюбный ментор.
   ============================================================ */

:root {
  /* Фон и поверхности */
  --bg: #f4ede1;             /* крафт-бумага */
  --surface: #fffaf1;        /* светлый картон */
  --surface-2: #efe5d3;
  --line: #e3d6bf;

  /* Акценты */
  --peach: #ff8a5c;          /* тёплый персиковый */
  --peach-soft: #ffe9df;
  --mint: #5fbf9f;           /* мятный */
  --mint-soft: #e2f3ec;
  --sky: #7fa8d9;            /* пастельное небо */
  --sky-soft: #e5eef9;
  --sun: #f6c453;            /* тёплый жёлтый */
  --sun-soft: #fdf3dc;

  /* Чернильно-тёплый текст */
  --ink: #4a403a;
  --text: #55493f;
  --muted: #8a7d70;
  --faint: #b3a696;

  /* Шрифты */
  --font-display: "Baloo 2", "Comic Sans MS", cursive;
  --font-body: "Nunito", "Segoe UI", Arial, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  /* Форма — всё скруглённое, картонное */
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 10px 26px rgba(96, 78, 58, 0.14);
  --shadow-sm: 0 4px 12px rgba(96, 78, 58, 0.12);

  --maxw: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  /* лёгкая фактура крафта */
  background-image: repeating-linear-gradient(
    0deg, transparent 0 3px, rgba(96, 78, 58, 0.012) 3px 4px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: var(--mint); font-weight: 600; text-decoration: none; }
a:hover { color: var(--peach); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin-bottom: 8px; }
h3 { font-size: 1.22rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: 58px 0; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }

/* Стикер-киккер */
.sticker {
  display: inline-block;
  background: var(--sun);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 18px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  transform: rotate(-2deg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.sticker.mint { background: var(--mint-soft); }
.sticker.peach { background: var(--peach-soft); }
.sticker.sky { background: var(--sky-soft); }

/* ---------- Бегущая строка ---------- */
.ticker {
  background: var(--ink);
  color: var(--sun-soft);
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 0;
}
.ticker-track { display: inline-block; animation: ticker-move 48s linear infinite; }
.ticker-track span { margin-right: 64px; }
@keyframes ticker-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 237, 225, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 2px dashed var(--line);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 13px 22px; max-width: var(--maxw); margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.35rem; color: var(--ink);
  display: flex; align-items: center; gap: 9px;
}
.logo:hover { text-decoration: none; }
.logo .logo-chick { font-size: 1.55rem; }
.logo b { color: var(--peach); }
.main-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.main-nav a {
  color: var(--muted);
  font-weight: 700;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.94rem;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover { background: var(--sun-soft); color: var(--ink); text-decoration: none; }
.main-nav a.active { background: var(--peach); color: #fff; }
.nav-toggle {
  display: none; font-size: 1.25rem; padding: 6px 15px;
  background: var(--surface); color: var(--ink);
  border: 2px dashed var(--line); border-radius: var(--radius-sm); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding: 70px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; }
.hero h1 em {
  font-style: normal;
  color: var(--peach);
  background: linear-gradient(transparent 62%, var(--sun-soft) 62%);
  border-radius: 6px;
  padding: 0 4px;
}
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  border: 6px solid var(--surface);
  outline: 2px dashed var(--line);
}
.figure img { width: 100%; height: 330px; object-fit: cover; }
.fig-cap {
  font-size: 0.82rem; color: var(--muted);
  padding: 10px 16px; background: var(--surface);
  border-top: 2px dashed var(--line);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1rem;
  padding: 11px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-3px) rotate(-1deg); box-shadow: var(--shadow); }
.btn-peach { background: var(--peach); color: #fff; box-shadow: var(--shadow-sm); }
.btn-mint { background: var(--mint); color: #fff; box-shadow: var(--shadow-sm); }
.btn-quiet { background: var(--surface); color: var(--ink); border: 2px dashed var(--line); }
.btn-small { padding: 7px 16px; font-size: 0.88rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Симуляция забега (hero) ---------- */
.sim-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 2px dashed var(--line);
}
.sim-panel h3 {
  font-size: 1rem;
  color: var(--mint);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.sim-lanes { display: grid; gap: 7px; margin-bottom: 14px; position: relative; }
.sim-lane {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
  transition: background 0.25s, border-color 0.25s;
}
.sim-lane .lane-x { margin-left: auto; font-weight: 700; color: var(--mint); }
.sim-lane.passed { border-color: var(--mint); background: var(--mint-soft); color: var(--muted); }
.sim-lane.current { border-color: var(--peach); background: var(--peach-soft); }
.sim-lane.caught { border-color: var(--peach); background: var(--peach-soft); color: var(--ink); }
.sim-chicken {
  position: absolute; left: 14px; top: 6px;
  font-size: 1.35rem; z-index: 2;
  transition: top 0.3s ease;
}
.sim-stats {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.88rem;
  margin-bottom: 10px; color: var(--muted);
}
.sim-stats b { color: var(--ink); font-size: 1.05rem; }
.sim-coach {
  min-height: 46px;
  background: var(--sun-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 12px;
}
.sim-controls { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------- Счётчики ---------- */
.stats-band {
  background: var(--mint-soft);
  border-top: 2px dashed var(--line);
  border-bottom: 2px dashed var(--line);
  padding: 44px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  color: var(--ink);
}
.stat-num .unit { color: var(--peach); }
.stat-label { font-size: 0.87rem; color: var(--muted); margin-top: 2px; }

/* ---------- Карточки ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: transform 0.18s, border-color 0.18s;
}
.card:hover { transform: translateY(-5px) rotate(-0.6deg); border-color: var(--sun); }
.card .card-emoji {
  font-size: 1.75rem;
  display: inline-flex;
  width: 52px; height: 52px;
  align-items: center; justify-content: center;
  background: var(--peach-soft);
  border-radius: 50%;
  margin-bottom: 12px;
}
.card:nth-child(2n) .card-emoji { background: var(--mint-soft); }
.card:nth-child(3n) .card-emoji { background: var(--sky-soft); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.94rem; }

.photo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.photo-card img { height: 175px; width: 100%; object-fit: cover; background: var(--surface-2); }
.photo-card .pc-body { padding: 18px 22px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split.rev .figure { order: 2; }

/* ---------- Таблица режимов ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px dashed var(--line);
  margin-top: 28px;
}
table.modes { width: 100%; border-collapse: collapse; min-width: 660px; font-size: 0.95rem; }
table.modes th, table.modes td { padding: 13px 18px; text-align: left; border-bottom: 2px dashed var(--line); }
table.modes th {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--sun-soft);
}
table.modes td { color: var(--muted); }
table.modes td:first-child {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.02rem;
}
table.modes td:first-child span.mode-chip {
  display: inline-block; padding: 3px 14px; border-radius: 999px; color: #fff; font-size: 0.85rem;
}
.mode-easy { background: var(--mint); }
.mode-medium { background: var(--sun); color: var(--ink) !important; }
.mode-hard { background: var(--peach); }
.mode-hardcore { background: #e2574c; }
table.modes tr:last-child td { border-bottom: none; }
.table-note { font-size: 0.86rem; color: var(--faint); margin-top: 12px; font-style: italic; }

/* ---------- Квиз ---------- */
.quiz-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 2px dashed var(--line);
  padding: 28px;
  margin-top: 28px;
}
.quiz-q { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px dashed var(--line); }
.quiz-q:last-of-type { border-bottom: none; }
.quiz-q h4 { font-family: var(--font-body); font-size: 1.02rem; margin-bottom: 10px; color: var(--ink); }
.quiz-opts { display: flex; gap: 9px; flex-wrap: wrap; }
.quiz-opt {
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  padding: 8px 17px; border-radius: 999px; cursor: pointer;
  background: var(--bg); color: var(--muted); border: 2px solid var(--line);
}
.quiz-opt:hover { border-color: var(--mint); color: var(--ink); }
.quiz-opt.picked { background: var(--mint); color: #fff; border-color: var(--mint); }
.quiz-opt.right { background: var(--mint); color: #fff; border-color: var(--mint); }
.quiz-opt.wrong { background: var(--peach); color: #fff; border-color: var(--peach); }
.quiz-result { margin-top: 14px; font-family: var(--font-display); font-size: 1.05rem; min-height: 28px; color: var(--peach); }

/* ---------- Карточки наставника (генератор) ---------- */
.coach-deck {
  background: var(--mint-soft);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-top: 28px;
  border: 2px dashed var(--mint);
}
.mentor-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
  margin: 16px 0 18px;
  min-height: 88px;
  display: flex; align-items: center;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--ink);
  transform: rotate(-0.6deg);
}

/* ---------- FAQ ---------- */
.faq-list { margin-top: 28px; display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-q {
  width: 100%; background: none; border: none;
  color: var(--ink);
  font-family: var(--font-body); font-size: 1.02rem; font-weight: 700;
  text-align: left; padding: 17px 22px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-q:hover { color: var(--peach); }
.faq-q .faq-arrow {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sun-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--ink);
  transition: transform 0.25s, background 0.25s;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); background: var(--peach-soft); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a-inner { padding: 0 22px 18px; color: var(--muted); font-size: 0.95rem; max-width: 76ch; }

/* ---------- Бейджи ---------- */
.badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.badge {
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.87rem; font-weight: 700;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 8px;
}

/* ---------- CTA ---------- */
.cta-banner {
  background: var(--peach-soft);
  border-radius: var(--radius-lg);
  padding: 38px 42px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.cta-banner p { color: var(--muted); max-width: 56ch; }

/* ---------- Глоссарий ---------- */
.glossary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
.glossary-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 15px 19px;
  box-shadow: var(--shadow-sm);
}
.glossary-item dt {
  font-family: var(--font-display);
  color: var(--mint);
  font-size: 1rem;
}
.glossary-item dd { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }

/* ---------- Контентные страницы ---------- */
.page-head { padding: 60px 0 36px; }
.page-head h1 { margin-bottom: 12px; }

.prose { max-width: 78ch; }
.prose h2 { margin: 38px 0 12px; }
.prose h3 { margin: 24px 0 8px; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: var(--muted); }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); }

.step-list { margin-top: 24px; display: grid; gap: 16px; }
.step-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  display: flex; gap: 18px; align-items: flex-start;
}
.step-item .step-n {
  font-family: var(--font-display);
  font-size: 1.15rem;
  background: var(--sun);
  color: var(--ink);
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---------- Форма ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 30px; align-items: start; }
.contact-form {
  display: grid; gap: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 2px dashed var(--line);
  padding: 28px;
}
.contact-form label { font-size: 0.88rem; font-weight: 700; color: var(--muted); }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.97rem;
  padding: 11px 14px;
  margin-top: 5px;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  outline: none; border-color: var(--mint);
}
.form-error { color: #d9534f; font-size: 0.87rem; min-height: 18px; font-weight: 700; }
.form-success { display: none; background: var(--mint-soft); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.92rem; color: var(--mint); font-weight: 700; }

/* ---------- Cookie ---------- */
.cookie-banner {
  position: fixed; bottom: 20px; left: 20px; right: 20px; max-width: 540px;
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px; z-index: 100; display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { color: #cfc4b6; font-size: 0.9rem; margin-bottom: 14px; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner .btn-peach { background: var(--peach); }
.cookie-banner .btn-quiet { background: transparent; color: var(--bg); border: 2px solid #5b5049; }

/* ---------- Футер ---------- */
.site-footer {
  background: var(--surface-2);
  border-top: 2px dashed var(--line);
  padding: 52px 0 28px; margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; }
.footer-grid h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 13px;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.footer-grid a:hover { color: var(--peach); }
.footer-about-text { color: var(--muted); font-size: 0.92rem; }
.footer-disclaimer {
  color: var(--faint);
  font-size: 0.85rem;
  border-top: 2px dashed var(--line);
  margin-top: 32px; padding-top: 18px; max-width: 92ch;
}
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--faint); font-size: 0.82rem; margin-top: 14px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .split.rev .figure { order: 0; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .glossary-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 2px dashed var(--line);
    flex-direction: column; align-items: stretch;
    padding: 12px 22px 18px; gap: 4px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 16px; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .cta-banner { padding: 26px; }
}