/* ============================================================
   Брокколи VS Бекон — дизайн-система
   Токены → база → шапка → hero → рубрики → карточки → галерея →
   пост → документы → футер → cookie → адаптив
   ============================================================ */

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/unbounded-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/unbounded-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* фон и поверхность */
  --bg: #faf3e7;
  --surface: #ffffff;
  --surface-2: #fff9ef;
  --ink: #261f18;
  --ink-soft: #4c4238;
  --muted: #776b5c;
  --line: #f0e6d6;

  /* зелёная сторона */
  --green-700: #256e2e;
  --green-600: #2f8a3a;
  --green-500: #43a047;
  --green-100: #e5f4e2;
  --green-grad: linear-gradient(135deg, #2f8a3a, #66bb3a);

  /* бекон-сторона */
  --bacon-700: #b02330;
  --bacon-600: #d23440;
  --bacon-500: #e4535e;
  --bacon-100: #fce8e6;
  --bacon-grad: linear-gradient(135deg, #d23440, #f0716a);

  /* MAX */
  --max-grad: linear-gradient(135deg, #6b4df5, #9a4df5);

  --vs-grad: linear-gradient(100deg, #2f8a3a 20%, #8a7a28 50%, #d23440 80%);

  --display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --body: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 4px rgba(84, 60, 24, .07), 0 4px 14px rgba(84, 60, 24, .06);
  --shadow-md: 0 4px 10px rgba(84, 60, 24, .09), 0 14px 34px rgba(84, 60, 24, .10);
  --speed: 200ms;
}

/* ---------- база ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at -10% -5%, rgba(102, 187, 58, .12), transparent 60%),
    radial-gradient(900px 420px at 110% -5%, rgba(228, 83, 94, .12), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  touch-action: manipulation;
}
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; }
:focus-visible { outline: 3px solid #6b4df5; outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--green-100); }

.wrap { max-width: 700px; margin: 0 auto; padding: 0 16px; }

.icon { width: 1.15em; height: 1.15em; vertical-align: -0.22em; fill: currentColor; flex-shrink: 0; }

/* ---------- шапка ---------- */
.site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header::after {
  content: ""; display: block; height: 4px;
  background: linear-gradient(90deg, #2f8a3a 0 42%, #f2c14e 42% 58%, #d23440 58% 100%);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-img { height: 42px; width: auto; transition: transform var(--speed) ease-out; }
.brand:hover .brand-img { transform: scale(1.06) rotate(-2deg); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--ink); white-space: nowrap; letter-spacing: .01em; }
.brand-name em { font-style: normal; font-size: 11px; background: var(--vs-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 16px; font-weight: 600; font-size: 15px; }
.nav a { color: var(--ink-soft); padding: 6px 2px; }
.nav a:hover { color: var(--green-700); text-decoration: none; }
.nav a.active { color: var(--bacon-600); }

.btn-max {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--max-grad);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(107, 77, 245, .35);
  transition: transform var(--speed) ease-out, box-shadow var(--speed) ease-out;
}
.btn-max:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(107, 77, 245, .45); }
.btn-max:active { transform: translateY(0) scale(.97); }
.btn-max-big { padding: 14px 28px; font-size: 17px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex; align-items: center; gap: 22px;
  margin: 22px 0 6px;
  padding: 26px 26px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  filter: blur(70px); opacity: .45; pointer-events: none;
}
.hero::before { background: #7ccb5a; top: -140px; left: -110px; }
.hero::after { background: #f0716a; bottom: -160px; right: -110px; }
.hero-img { width: 250px; height: auto; flex-shrink: 0; position: relative; z-index: 1; filter: drop-shadow(0 10px 18px rgba(60, 40, 10, .25)); }
.hero-text { position: relative; z-index: 1; }
.hero-text h1 {
  margin: 0 0 10px;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(22px, 4.6vw, 34px); line-height: 1.15; letter-spacing: .005em;
}
.hero-text h1 .side-green { color: var(--green-600); }
.hero-text h1 .side-bacon { color: var(--bacon-600); }
.hero-text h1 .vs {
  display: inline-block; font-size: .62em; vertical-align: .18em; padding: 0 .18em;
  background: var(--vs-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-text p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 46ch; }

/* ---------- рубрики ---------- */
.chips-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 12px;
  scrollbar-width: none;
  position: sticky; top: 66px; z-index: 50;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; white-space: nowrap; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: transform var(--speed) ease-out, border-color var(--speed), color var(--speed);
}
.chip:hover { text-decoration: none; border-color: var(--green-500); color: var(--green-700); transform: translateY(-1px); }
.chip:active { transform: scale(.96); }
.chip-active { background: var(--green-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(47, 138, 58, .35); }
.chip-active:hover { color: #fff; border-color: transparent; }
.chip-n { opacity: .7; font-size: 12px; font-weight: 700; }
.chip-sm { padding: 4px 12px; font-size: 13px; background: var(--green-100); border: 0; color: var(--green-700); box-shadow: none; }

/* ---------- карточки ленты ---------- */
.feed { display: flex; flex-direction: column; gap: 18px; padding-bottom: 10px; }
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  transition: transform var(--speed) ease-out, box-shadow var(--speed) ease-out;
}
.feed > .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.avatar {
  border-radius: 50%; width: 46px; height: 46px; object-fit: cover;
  background: var(--green-100);
  outline: 2px solid #fff;
  box-shadow: 0 0 0 2.5px transparent, 0 0 0 2.5px var(--green-500);
}
.card-channel { font-weight: 700; font-size: 15px; }
.card-date { color: var(--muted); font-size: 13px; }
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; }
.card-title { margin: 0 0 12px; font-family: var(--display); font-weight: 500; font-size: 17.5px; line-height: 1.35; transition: color var(--speed); }
.card-link:hover .card-title { color: var(--green-700); }
.card-text { margin: 12px 0 0; color: var(--ink-soft); }
.post-chips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.card-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-weight: 600; font-size: 14px;
}
.read-more { color: var(--bacon-600); display: inline-flex; align-items: center; gap: 5px; }
.read-more .icon { transition: transform var(--speed) ease-out; }
.read-more:hover .icon { transform: translateX(3px); }
.max-link { color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.max-link:hover { color: #6b4df5; }

/* ---------- галерея ---------- */
.gallery { display: grid; gap: 5px; border-radius: var(--radius-md); overflow: hidden; }
.gallery-1 { grid-template-columns: 1fr; }
.gallery-2, .gallery-3, .gallery-4 { grid-template-columns: 1fr 1fr; }
.gallery-3 .g-item:first-child { grid-column: 1 / -1; }
.g-item { position: relative; overflow: hidden; }
.g-item img, .g-item video { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.card-link .g-item img { transition: transform 350ms ease-out; }
.card-link:hover .g-item img { transform: scale(1.04); }
.gallery-1 .g-item img, .gallery-1 .g-item video { aspect-ratio: auto; max-height: 660px; object-fit: contain; background: #17130e; }
.gallery-1 .g-item img { background: transparent; }
.post-full .g-item img.zoomed { object-fit: contain; max-height: none; cursor: zoom-out; }
.g-video-stub { width: 100%; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #38302a, #17130e); }
.play-badge {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.play-badge svg {
  width: 62px; height: 62px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .4));
  transition: transform var(--speed) ease-out;
}
.card-link:hover .play-badge svg { transform: scale(1.12); }

/* ---------- пагинация ---------- */
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 2px 8px; gap: 8px;
}
.page-btn {
  background: var(--surface); box-shadow: var(--shadow-sm);
  padding: 11px 18px; border-radius: var(--radius-pill); font-weight: 600; font-size: 14px;
  color: var(--ink-soft);
  transition: transform var(--speed) ease-out, color var(--speed);
}
.page-btn:hover { text-decoration: none; color: var(--bacon-600); transform: translateY(-2px); }
.page-num { color: var(--muted); font-size: 13px; }

/* ---------- страница поста ---------- */
.post-full { margin-top: 20px; }
.post-title { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 3.6vw, 26px); line-height: 1.3; margin: 4px 0 16px; }
.post-text { margin-top: 16px; font-size: 16.5px; }
.post-text p { margin: 0 0 13px; white-space: pre-wrap; overflow-wrap: break-word; }
.hashtags { margin-top: 12px; color: var(--green-600); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.post-cta {
  margin-top: 20px; text-align: center;
  padding: 22px 16px;
  background: linear-gradient(135deg, rgba(107, 77, 245, .08), rgba(154, 77, 245, .12));
  border-radius: var(--radius-md);
}
.post-cta p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.post-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.back-link { text-align: center; padding: 16px 0 6px; }

/* ---------- документы и «О канале» ---------- */
.about h2, .doc h2 { font-family: var(--display); font-weight: 500; font-size: 18px; margin-top: 26px; color: var(--ink); }
.about-img { display: block; margin: 12px auto; }
.about-list { padding-left: 4px; list-style: none; }
.about-list li { margin: 10px 0; padding-left: 4px; }
.about-note, .doc-date { color: var(--muted); font-size: 14px; }
.doc h1 { font-family: var(--display); font-weight: 500; font-size: 22px; }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.empty-state { text-align: center; padding: 48px 10px; color: var(--muted); }
.empty-state img { opacity: .95; }
.empty-state h1 { font-family: var(--display); font-weight: 500; }

/* ---------- соцсети ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0; }
.soc {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 15px; color: #fff !important;
  box-shadow: var(--shadow-sm);
  transition: transform var(--speed) ease-out, box-shadow var(--speed) ease-out;
}
.soc:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.soc:active { transform: scale(.97); }
.soc-max { background: var(--max-grad); font-size: 16px; padding: 12px 22px; }
.soc-vk { background: #0077ff; }
.soc-dzen { background: #221f1f; }
.soc-yt { background: #f03; }
.soc-tg { background: #229ed9; }

/* ---------- футер ---------- */
.site-footer {
  margin-top: 40px;
  background: #241d15;
  color: #cfc4b4;
  padding: 34px 0 24px;
  text-align: center;
}
.site-footer::before {
  content: ""; display: block; height: 4px; margin-top: -34px; margin-bottom: 30px;
  background: linear-gradient(90deg, #2f8a3a 0 42%, #f2c14e 42% 58%, #d23440 58% 100%);
}
.footer-title { font-family: var(--display); font-weight: 500; font-size: 16px; color: #fff; margin: 0 0 6px; }
.footer-socials p { color: #a99c88; margin: 0 0 14px; font-size: 14.5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin: 22px 0 0; font-size: 14px; }
.footer-links a { color: #cfc4b4; }
.footer-links a:hover { color: #fff; }
.footer-copy { color: #8a7d6a; font-size: 13px; margin-top: 16px; line-height: 1.5; }

/* ---------- cookie ---------- */
.cookie-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 200;
  display: none; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: 640px; margin: 0 auto;
  background: #241d15; color: #e8dfd2;
  padding: 14px 18px; border-radius: var(--radius-md);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35);
  font-size: 14px;
}
.cookie-bar.visible { display: flex; }
.cookie-bar a { color: #9ecb84; }
.cookie-bar button {
  margin-left: auto; cursor: pointer;
  background: var(--green-grad); color: #fff; border: 0;
  padding: 9px 20px; border-radius: var(--radius-pill);
  font: 700 14px var(--body);
  min-height: 40px;
  transition: transform var(--speed) ease-out;
}
.cookie-bar button:hover { transform: translateY(-1px); }

/* ---------- адаптив ---------- */
@media (max-width: 560px) {
  .hero { flex-direction: column; text-align: center; padding: 20px 16px; gap: 14px; }
  .hero-img { width: 210px; }
  .hero-text p { margin: 0 auto; }
  .brand-name { display: none; }
  .nav { gap: 12px; font-size: 14px; }
  .btn-max { padding: 8px 13px; font-size: 14px; }
  .card { padding: 14px; border-radius: 18px; }
  .chips-row { top: 62px; }
  .feed > .card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
