/* ===================================================================
   Партия Пикабушников — стили
   Палитра: кремовый фон, чёрная типографика, красный акцент
   =================================================================== */

:root {
  --cream:   #F4EFE6;
  --cream-2: #EDE6D8;
  --ink:     #141414;
  --ink-soft:#3a3733;
  --accent:  #E5431E;
  --accent-d:#c5380f;
  --white:   #ffffff;
  --line:    #1a1a1a;
  --muted:   #8a8276;

  --maxw: 1180px;
  --radius: 4px;

  --font-head: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.02; margin: 0; text-transform: uppercase; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  letter-spacing: .03em; font-size: 1rem;
  padding: 14px 26px; border: 2px solid var(--ink); border-radius: var(--radius);
  cursor: pointer; transition: transform .12s ease, background .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); border-color: var(--accent-d); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 2px solid var(--line);
  transition: padding .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }

.logo { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.logo-mark { display: grid; place-items: center; }
.logo-text {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: .92rem; line-height: .98; letter-spacing: .02em;
}

.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  font-family: var(--font-head); font-weight: 500; text-transform: uppercase;
  font-size: .82rem; letter-spacing: .06em; padding: 6px 0; position: relative;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--accent); transition: width .18s ease;
}
.primary-nav a:hover::after { width: 100%; }

.header-cta { flex: 0 0 auto; padding: 10px 18px; font-size: .82rem; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 40px; margin-left: auto; padding: 0;
  background: transparent; border: 2px solid var(--ink); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); margin-inline: auto; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; }

.hero-title { font-weight: 700; font-size: clamp(2.7rem, 7vw, 5.6rem); letter-spacing: -.01em; }
.hero-title .muted { color: var(--muted); }
.hero-title .accent { color: var(--accent); }

.hero-lead { font-size: clamp(1rem, 1.4vw, 1.18rem); max-width: 46ch; margin: 26px 0 30px; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-art { position: relative; margin: 0; }
/* Иллюстрация встроена в UI: без рамки и «карточной» тени,
   тёмные края мягко растворяются в кремовом фоне. */
.hero-art img {
  width: 100%;
  -webkit-mask-image: radial-gradient(115% 130% at 52% 46%, #000 62%, rgba(0,0,0,.35) 82%, transparent 100%);
          mask-image: radial-gradient(115% 130% at 52% 46%, #000 62%, rgba(0,0,0,.35) 82%, transparent 100%);
}
.speech-bubble {
  position: absolute; top: 6px; left: -6px; z-index: 2;
  background: var(--white); color: var(--ink);
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  font-size: clamp(.72rem, 1.4vw, .95rem); line-height: 1.1; letter-spacing: .02em;
  padding: 12px 16px; border: 2px solid var(--ink); border-radius: 10px;
  max-width: 210px; box-shadow: 4px 4px 0 var(--accent);
}
.speech-bubble::after {
  content: ""; position: absolute; left: 28px; bottom: -12px;
  border-width: 12px 10px 0 0; border-style: solid; border-color: var(--ink) transparent transparent transparent;
}

/* ---------- Roadmap ---------- */
.roadmap { background: var(--ink); color: var(--cream); border-block: 2px solid var(--line); }
.roadmap-grid { list-style: none; margin: 0; padding: 28px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stage { position: relative; padding-left: 18px; }
.stage::before { content: ""; position: absolute; left: 0; top: 4px; width: 6px; height: 6px; background: var(--accent); }
.stage-when { display: block; font-family: var(--font-head); text-transform: uppercase; font-size: .72rem; letter-spacing: .12em; color: var(--accent); }
.stage-name { display: block; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: 1.25rem; margin: 4px 0 6px; }
.stage-desc { display: block; font-size: .9rem; color: #cfc8ba; }

/* ---------- Sections shared ---------- */
.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; color: var(--accent); margin: 0 0 12px; }
.section-title { font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 3.4rem); letter-spacing: -.01em; }
.section-title .accent { color: var(--accent); }
.section-lead { font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 60ch; margin: 20px 0 0; color: var(--ink-soft); }

.about { padding: clamp(48px, 7vw, 84px) 0; }

/* ---------- Direction cards ---------- */
.directions { padding: 0 0 clamp(48px, 7vw, 84px); }
.directions .section-title { margin-bottom: 28px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.card {
  background: var(--white); border: 2px solid var(--line); border-radius: 8px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--accent); }
.card-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  border-bottom: 2px solid var(--line);
}
.card-body { padding: 20px 22px 24px; }
.card-title { font-weight: 700; font-size: 1.15rem; margin-bottom: 8px; }
.card-desc { font-size: .92rem; color: var(--ink-soft); margin: 0; }

/* ---------- Program ---------- */
.program { background: var(--cream-2); border-block: 2px solid var(--line); padding: clamp(48px, 7vw, 84px) 0; }
.program .section-title { margin-bottom: 28px; }
/* Гибкая сетка: 4 в ряд, неполный последний ряд центрируется,
   зазоры показывают фон секции (без чёрного контейнера). */
.program-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.program-item { flex: 1 1 240px; max-width: 262px; background: var(--cream); border: 2px solid var(--line); border-radius: 8px; padding: 24px 22px; }
.program-num { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; color: var(--accent); }
.program-item h3 { font-weight: 600; font-size: 1.2rem; margin: 8px 0 8px; }
.program-item p { margin: 0; font-size: .95rem; color: var(--ink-soft); }

/* ---------- Join / CTA ---------- */
.join { background: var(--accent); color: #fff; padding: clamp(52px, 8vw, 96px) 0; border-block: 2px solid var(--line); }
.join-inner { text-align: center; max-width: 720px; }
.join-title { font-weight: 700; color: #fff; font-size: clamp(2rem, 5vw, 3.6rem); }
.join-lead { font-size: clamp(1rem, 1.4vw, 1.2rem); margin: 16px 0 28px; }
.join-form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.join-form input {
  flex: 1 1 240px; max-width: 320px; font-family: var(--font-body); font-size: 1rem;
  padding: 14px 16px; border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.join-form .btn { border-color: var(--ink); background: var(--ink); color: #fff; }
.join-form .btn:hover { background: #000; }
.join-note { margin: 18px 0 0; font-size: .9rem; opacity: .92; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--cream); }
.ticker { overflow: hidden; background: var(--accent); border-block: 2px solid var(--line); }
.ticker-track {
  display: flex; width: max-content;
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: 1.05rem; letter-spacing: .04em; color: #fff; padding: 12px 0;
  animation: ticker 28s linear infinite;
}
.ticker-track span { white-space: nowrap; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding: 44px 0; }
.footer-brand .logo-text { font-size: 1.05rem; }
.footer-brand p { margin: 12px 0 0; color: #cfc8ba; max-width: 30ch; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-family: var(--font-head); text-transform: uppercase; font-size: .85rem; letter-spacing: .05em; }
.footer-nav a:hover { color: var(--accent); }
.footer-social { display: flex; flex-direction: column; gap: 10px; }
.footer-contacts a { font-weight: 600; }
.footer-contacts a:hover { color: var(--accent); }
.footer-legal { margin: 14px 0 0; font-size: .82rem; color: #9a9286; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .primary-nav {
    position: fixed; inset: 68px 0 auto 0; margin: 0;
    background: var(--cream); border-bottom: 2px solid var(--line);
    transform: translateY(-120%); transition: transform .22s ease; will-change: transform;
  }
  .primary-nav.open { transform: translateY(0); }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .primary-nav li { border-bottom: 1px solid rgba(0,0,0,.12); }
  .primary-nav a { display: block; padding: 14px 0; font-size: 1rem; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 460px; margin-inline: auto; }
  .speech-bubble { left: auto; right: -6px; }

  .roadmap-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 460px) {
  .roadmap-grid { grid-template-columns: 1fr; }
  .hero-art img { box-shadow: 6px 6px 0 var(--ink); }
}
