/* ============================================
   НИИ Котиковедения — editorial / brutalist mix
   палитра: bone, ink, neon-coral, deep-sea
   ============================================ */

:root {
  --bone:   #f3eee3;
  --bone-2: #e8e1d0;
  --ink:    #15161a;
  --ink-2:  #2a2c33;
  --coral:  #ff4a1c;
  --coral-2:#ffa384;
  --sea:    #0b3a4a;
  --sea-2:  #1a6d85;
  --acid:   #c8f24a;
  --line:   #15161a;
}

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

html, body { background: var(--bone); color: var(--ink); }
body {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* paper grain */
.noise {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.09  0 0 0 0 0.1  0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main, header, footer { position: relative; z-index: 2; }

/* ========== TOPBAR ========== */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px;
  border-bottom: 2px solid var(--ink);
  background: var(--bone);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.topbar__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.topbar__seal { font-size: 22px; animation: wobble 4s ease-in-out infinite; }
.topbar__title { letter-spacing: 0.12em; }
.topbar__meta { display: flex; align-items: center; gap: 10px; }
.topbar__meta .dot { opacity: 0.4; }
.blink {
  background: var(--coral); color: var(--bone);
  padding: 3px 8px; border-radius: 2px;
  animation: blink 1.4s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes wobble { 0%,100%{transform:rotate(-6deg)} 50%{transform:rotate(8deg)} }

/* ========== HERO ========== */
.hero {
  padding: 60px 28px 70px;
  border-bottom: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(255,74,28,0.18), transparent 50%),
    radial-gradient(ellipse at 10% 90%, rgba(11,58,74,0.18), transparent 55%),
    var(--bone);
}
.hero__tag {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-block;
  padding: 6px 12px;
  border: 1.5px solid var(--ink);
  margin-bottom: 28px;
  background: var(--bone-2);
}
.hero__title {
  font-family: 'Fraunces', serif;
  font-variation-settings: "SOFT" 30, "WONK" 1;
  line-height: 0.86;
  display: flex; flex-direction: column;
  font-weight: 900;
  margin-bottom: 32px;
  text-transform: lowercase;
}
.hero__word--big {
  font-size: clamp(58px, 13vw, 180px);
  letter-spacing: -0.04em;
  font-style: italic;
}
.hero__word--mid {
  font-size: clamp(72px, 15vw, 220px);
  letter-spacing: -0.05em;
  color: var(--coral);
  margin-left: clamp(20px, 6vw, 80px);
  transform: rotate(-2deg);
}
.hero__word--small {
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  margin-top: 16px;
  margin-left: clamp(40px, 12vw, 180px);
}
.hero__word--accent {
  font-size: clamp(40px, 7.5vw, 100px);
  letter-spacing: -0.03em;
  margin-left: clamp(60px, 18vw, 280px);
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 6px;
  text-underline-offset: 8px;
}
.hero__lede {
  max-width: 560px;
  font-size: clamp(17px, 1.6vw, 21px);
  margin-bottom: 32px;
  line-height: 1.4;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stamp {
  position: absolute;
  top: 80px; right: -40px;
  transform: rotate(14deg);
  border: 3px double var(--coral);
  color: var(--coral);
  padding: 10px 22px;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.2em;
  background: rgba(243,238,227,0.6);
  font-weight: 700;
  user-select: none;
  pointer-events: none;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 2px solid var(--ink);
  background: var(--bone);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 500;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn--primary { background: var(--coral); color: var(--bone); }
.btn--ghost { background: transparent; }
.btn--accent { background: var(--acid); }
.btn--small { padding: 10px 16px; font-size: 12px; box-shadow: 3px 3px 0 var(--ink); }

/* ========== TICKER ========== */
.ticker {
  background: var(--ink);
  color: var(--bone);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  padding: 14px 0;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ticker__track {
  display: inline-flex;
  white-space: nowrap;
  gap: 32px;
  animation: scroll 50s linear infinite;
  padding-left: 100%;
}
.ticker__track span { display: inline-block; }
.ticker__track span:nth-child(2n) { color: var(--coral); }
@keyframes scroll { to { transform: translateX(-100%); } }

/* ========== STATS ========== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-bottom: 2px solid var(--ink);
}
.stat {
  padding: 36px 28px;
  border-right: 2px solid var(--ink);
  background: var(--bone);
}
.stat:last-child { border-right: none; }
.stat__num {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(46px, 5vw, 72px);
  line-height: 1;
  color: var(--sea);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.stat:nth-child(2) .stat__num { color: var(--coral); }
.stat:nth-child(3) .stat__num { color: var(--ink); }
.stat:nth-child(4) .stat__num { color: var(--sea-2); }
.stat__label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* ========== GAME ========== */
.game {
  padding: 70px 28px;
  background: var(--sea);
  color: var(--bone);
  border-bottom: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.game::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.06) 1px, transparent 2px),
    radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 1px, transparent 2px),
    radial-gradient(circle at 90% 10%, rgba(255,255,255,0.05) 1px, transparent 2px);
  background-size: 80px 80px, 60px 60px, 100px 100px;
  pointer-events: none;
}
.game__header { max-width: 700px; margin-bottom: 40px; position: relative; }
.game__title {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(42px, 6vw, 80px);
  letter-spacing: -0.02em;
  color: var(--acid);
  line-height: 1;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.game__sub {
  font-size: clamp(15px, 1.4vw, 18px);
  max-width: 540px;
  opacity: 0.9;
  font-style: italic;
}
.game__board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.game__seal {
  position: relative;
  aspect-ratio: 1;
  background: var(--bone);
  border: 3px solid var(--ink);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
  overflow: hidden;
}
.game__seal:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink); }
.game__seal:active, .game__seal.poke {
  transform: translate(4px, 4px) scale(0.97);
  box-shadow: 4px 4px 0 var(--ink);
}
.game__seal-emoji {
  font-size: clamp(120px, 18vw, 220px);
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
  filter: drop-shadow(0 6px 0 rgba(0,0,0,0.15));
}
.game__seal.poke .game__seal-emoji { transform: scale(1.15) rotate(-6deg); }
.game__seal-shadow {
  position: absolute; bottom: 8%; left: 50%;
  width: 50%; height: 16px;
  background: rgba(0,0,0,0.1);
  border-radius: 50%;
  transform: translateX(-50%);
  filter: blur(6px);
}

.game__panel {
  background: var(--bone);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 8px 8px 0 var(--ink);
  display: flex; flex-direction: column; gap: 20px;
}
.game__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.game__lbl {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  flex: 0 0 110px;
}
.game__val {
  font-family: 'DM Mono', monospace;
  font-weight: 600;
  font-size: 15px;
  margin-left: auto;
}
.game__val--big { font-size: 32px; font-family: 'Bungee', sans-serif; color: var(--coral); }
.game__val--status { font-style: italic; font-family: 'Fraunces', serif; font-size: 16px; text-align: right; max-width: 200px; }
.game__bar {
  flex: 1; min-width: 120px;
  height: 16px;
  background: var(--bone-2);
  border: 2px solid var(--ink);
  border-radius: 100px;
  overflow: hidden;
}
.game__bar-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--coral-2));
  transition: width 0.3s cubic-bezier(.34,1.56,.64,1);
}

/* floating fish */
.game__bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.fly {
  position: absolute;
  font-size: 32px;
  pointer-events: none;
  animation: fly 1.1s ease-out forwards;
}
@keyframes fly {
  0%   { transform: translate(0, 0) scale(1) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx, 0), -120px) scale(0.4) rotate(360deg); opacity: 0; }
}

/* ========== FACTS ========== */
.facts {
  padding: 70px 28px;
  border-bottom: 2px solid var(--ink);
  background: var(--bone);
}
.facts__header {
  display: flex; justify-content: space-between; align-items: end;
  gap: 20px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.facts__title {
  font-family: 'Fraunces', serif;
  font-variation-settings: "SOFT" 30, "WONK" 1;
  font-style: italic;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.02em;
  font-weight: 900;
}
.fact-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bone-2);
  border: 3px solid var(--ink);
  border-radius: 4px;
  padding: 40px 36px 28px;
  position: relative;
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(-0.6deg);
  transition: transform 0.3s ease;
}
.fact-card.flip { transform: rotate(0.8deg) scale(1.01); }
.fact-card__stamp {
  position: absolute;
  top: -14px; left: 24px;
  background: var(--ink);
  color: var(--bone);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  padding: 6px 12px;
  text-transform: uppercase;
}
.fact-card__text {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.4;
  margin-bottom: 20px;
}
.fact-card__sig {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  text-align: right;
  opacity: 0.7;
  letter-spacing: 0.04em;
}

/* ========== MANIFESTO ========== */
.manifesto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  background: var(--ink);
  color: var(--bone);
}
.manifesto__col {
  padding: 40px 32px;
  border-right: 2px solid var(--bone);
}
.manifesto__col:last-child { border-right: none; }
.manifesto__col h3 {
  font-family: 'Bungee', sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--coral-2);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.manifesto__col p {
  font-size: 16px;
  line-height: 1.55;
  opacity: 0.92;
}

/* ========== FOOTER ========== */
footer {
  background: var(--bone-2);
  padding: 30px 28px;
  border-top: 2px solid var(--ink);
}
.foot__row {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.foot__disclaimer {
  font-size: 13px;
  font-style: italic;
  opacity: 0.6;
  max-width: 600px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .topbar { flex-direction: column; gap: 8px; align-items: flex-start; padding: 12px 18px; }
  .topbar__meta { font-size: 10px; gap: 6px; flex-wrap: wrap; }
  .hero { padding: 40px 18px 50px; }
  .hero__stamp { top: 20px; right: -30px; font-size: 11px; padding: 6px 14px; }
  .hero__word--mid { margin-left: 0; }
  .hero__word--small { margin-left: 0; }
  .hero__word--accent { margin-left: 0; text-decoration-thickness: 4px; }
  .stat { border-right: none; border-bottom: 2px solid var(--ink); }
  .stat:last-child { border-bottom: none; }
  .game { padding: 50px 18px; }
  .game__board { grid-template-columns: 1fr; gap: 30px; }
  .game__seal { max-width: 340px; margin: 0 auto; width: 100%; }
  .game__lbl { flex: 0 0 90px; font-size: 10px; }
  .game__val--status { font-size: 14px; max-width: 100%; text-align: left; }
  .facts { padding: 50px 18px; }
  .facts__header { flex-direction: column; align-items: flex-start; }
  .fact-card { padding: 32px 22px 22px; }
  .manifesto__col { border-right: none; border-bottom: 2px solid var(--bone); }
  .manifesto__col:last-child { border-bottom: none; }
}
