/* ============================================================
   Chicken Road Fanhub — "Redactioneel" (light editorial magazine)
   Тема: тёплая бумага, чернильные линии, острые углы, номера секций
   ============================================================ */

:root {
  /* Фон и поверхности */
  --bg: #faf7f1;          /* тёплая бумага */
  --surface: #ffffff;
  --surface-alt: #f2ede3;
  --line: #e0d9ca;        /* волосяные линии */
  --ink: #191713;         /* чернила */
  --line-strong: #191713;

  /* Акценты */
  --accent: #d94f2b;      /* персимон */
  --accent-soft: #fbeae4;
  --teal: #2f6f6a;        /* глубокий бирюзовый */
  --teal-soft: #e6f0ee;
  --amber: #e6a13c;

  /* Текст */
  --text: #191713;
  --text-muted: #6f6a60;
  --text-faint: #9b948a;

  /* Шрифты */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Форма — острые углы, печатный стиль */
  --radius: 0px;
  --radius-sm: 2px;

  --maxw: 1160px;
  --shadow-print: 6px 6px 0 rgba(25, 23, 19, 0.9);
  --shadow-soft: 0 2px 14px rgba(25, 23, 19, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
}

img { max-width: 100%; display: block; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 0.5rem; }
h3 { font-size: 1.25rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { padding: 60px 0; }

/* Нумерованный заголовок секции — как в журнале */
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.sec-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 3px;
  white-space: nowrap;
}
.sec-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-faint);
}

.lead { color: var(--text-muted); font-size: 1.13rem; max-width: 64ch; }

/* Волосяная линия-разделитель */
.hairline { border: none; border-top: 1px solid var(--line); max-width: var(--maxw); margin: 0 auto; }

/* ---------- Бегущая строка ---------- */
.ticker {
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 8px 0;
  letter-spacing: 0.4px;
}
.ticker-track { display: inline-block; animation: ticker-move 46s linear infinite; }
.ticker-track span { margin-right: 70px; }
@keyframes ticker-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ink);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo:hover { text-decoration: none; }
.logo .logo-chick { font-size: 1.45rem; }
.logo b { color: var(--accent); font-weight: 600; font-style: italic; }
.main-nav { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  color: var(--text-muted);
  padding: 7px 12px;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover { color: var(--ink); text-decoration: none; }
.main-nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
.nav-toggle {
  display: none;
  background: none;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  padding: 5px 14px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding: 76px 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: start;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* Фото с подписью — журнальный приём */
.figure { border: 1px solid var(--ink); background: var(--surface-alt); }
.figure img { width: 100%; height: 340px; object-fit: cover; background: var(--surface-alt); }
.figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 9px 13px;
  border-top: 1px solid var(--ink);
  background: var(--surface);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { text-decoration: none; transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-small { padding: 7px 15px; font-size: 0.87rem; }

/* ---------- Live-лента шагов (hero-панель) ---------- */
.feed-panel {
  border: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-print);
}
.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink);
  background: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.feed-live { display: flex; align-items: center; gap: 7px; color: var(--accent); }
.feed-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.1s ease infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.feed-list {
  height: 240px;
  overflow: hidden;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feed-row {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  animation: feed-in 0.3s ease;
}
@keyframes feed-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.feed-row .fr-x { color: var(--accent); font-weight: 700; }
.feed-row.safe { border-left: 3px solid var(--teal); }
.feed-row.blocked { border-left: 3px solid var(--accent); background: var(--accent-soft); }
.feed-row.banked { border-left: 3px solid var(--amber); background: var(--teal-soft); }
.feed-ctrl { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--ink); flex-wrap: wrap; }

/* ---------- Счётчики ---------- */
.stats-band { background: var(--ink); color: var(--bg); padding: 46px 0; }
.stats-band .stat-label { color: #b7b0a3; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  color: var(--bg);
}
.stat-num .unit { color: var(--accent); }
.stat-label { font-size: 0.88rem; margin-top: 4px; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 22px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--accent); }
.card .card-emoji { font-size: 1.7rem; margin-bottom: 10px; display: block; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.94rem; }

/* Карточка с фото */
.photo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.photo-card img { height: 170px; width: 100%; object-fit: cover; background: var(--surface-alt); }
.photo-card .pc-body { padding: 18px 22px; }

/* Фото + текст */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split .figure img { height: 320px; }
.split.rev .figure { order: 2; }

/* ---------- Таблица режимов ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-top: 28px;
}
table.modes { width: 100%; border-collapse: collapse; min-width: 660px; font-size: 0.94rem; }
table.modes th, table.modes td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
table.modes th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  background: var(--surface-alt);
  color: var(--text-muted);
}
table.modes td:first-child { font-family: var(--font-display); font-weight: 600; color: var(--accent); }
table.modes tr:last-child td { border-bottom: none; }
.table-note { font-size: 0.86rem; color: var(--text-faint); margin-top: 12px; font-style: italic; }

/* ---------- Чек-лист ---------- */
.check-box {
  border: 1px solid var(--ink);
  background: var(--surface);
  padding: 26px;
  margin-top: 28px;
  box-shadow: var(--shadow-print);
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
  user-select: none;
}
.check-item:last-of-type { border-bottom: none; }
.check-item input { margin-top: 5px; accent-color: var(--accent); width: 17px; height: 17px; }
.check-item.done .check-text { color: var(--text-faint); text-decoration: line-through; }
.check-meter {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--teal);
  min-height: 24px;
}
.check-bar { height: 8px; background: var(--surface-alt); border: 1px solid var(--ink); margin-top: 8px; }
.check-bar-fill { height: 100%; width: 0%; background: var(--teal); transition: width 0.3s ease; }

/* Генератор совета */
.tip-machine { border: 1px solid var(--ink); background: var(--surface-alt); padding: 22px; margin-top: 28px; }
.tip-output {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.18rem;
  min-height: 56px;
  margin-bottom: 14px;
  color: var(--ink);
}

/* ---------- FAQ-аккордеон ---------- */
.faq-list { margin-top: 26px; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--ink); background: transparent; }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  padding: 17px 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq-q:hover { color: var(--accent); }
.faq-q .faq-arrow { color: var(--accent); transition: transform 0.25s; font-size: 0.9rem; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a-inner { padding: 0 6px 18px; color: var(--text-muted); font-size: 0.95rem; max-width: 75ch; }

/* ---------- Бейджи ---------- */
.badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.badge {
  border: 1px solid var(--ink);
  background: var(--surface);
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- CTA ---------- */
.cta-banner {
  border: 1px solid var(--ink);
  background: var(--teal-soft);
  padding: 38px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-print);
}
.cta-banner p { color: var(--text-muted); max-width: 56ch; }

/* ---------- Глоссарий ---------- */
.glossary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 26px; }
.glossary-item { border: 1px solid var(--line); background: var(--surface); padding: 14px 18px; }
.glossary-item dt { font-weight: 700; font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); }
.glossary-item dd { color: var(--text-muted); font-size: 0.92rem; margin-top: 4px; }

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

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

.step-list { margin-top: 22px; border-top: 2px solid var(--ink); }
.step-item { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.step-item::before {
  content: attr(data-step);
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--accent);
  min-width: 52px;
  line-height: 1.2;
}

/* ---------- Форма ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 28px; align-items: start; }
.contact-form { display: grid; gap: 16px; border: 1px solid var(--ink); padding: 26px; background: var(--surface); box-shadow: var(--shadow-print); }
.contact-form label { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.97rem;
  padding: 10px 13px;
  margin-top: 5px;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-error { color: var(--accent); font-size: 0.86rem; min-height: 18px; font-weight: 600; }
.form-success { display: none; background: var(--teal-soft); border: 1px solid var(--teal); color: var(--teal); padding: 12px 16px; font-size: 0.93rem; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
  position: fixed;
  bottom: 22px;
  left: 22px;
  max-width: 520px;
  background: var(--ink);
  color: var(--bg);
  padding: 20px 22px;
  box-shadow: 8px 8px 0 var(--accent);
  z-index: 100;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { color: #cfc9bd; font-size: 0.9rem; margin-bottom: 14px; }
.cookie-banner a { color: var(--bg); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner .btn-primary { background: var(--bg); color: var(--ink); }
.cookie-banner .btn-quiet { color: var(--bg); border-color: var(--bg); }

/* ---------- Футер ---------- */
.site-footer { background: var(--surface-alt); border-top: 1px solid var(--ink); 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-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 13px;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--ink); }
.footer-disclaimer {
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid 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(--text-faint); font-size: 0.82rem; margin-top: 14px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); 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, .card-grid-4 { 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: 1px solid var(--ink);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 24px 16px;
    gap: 2px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px 12px; border-bottom: none; border-left: 2px solid transparent; }
  .main-nav a.active { border-left-color: var(--accent); }
}

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