:root {
  --paper: #f2ede3;
  --paper-2: #e9e3d6;
  --ink: #141312;
  --ink-2: #5d5850;
  --line: rgba(20, 19, 18, .22);
  --red: #e0240f; /* киноварь */
  --display: 'Monomakh', 'Oranienbaum', Georgia, serif;
  --text: 'Golos Text', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* зерно бумаги */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: .16; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, blockquote { margin: 0; }
ol { padding: 0; list-style: none; }

.mono {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.todo { color: var(--red); }

/* ---------- шапка ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { font-size: 22px; line-height: 1; text-decoration: none; color: var(--red); }
.nav { display: flex; gap: clamp(14px, 2.4vw, 34px); margin-left: auto; }
.nav a {
  font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; padding: 8px 0;
}
.nav a:hover { color: var(--red); }

.btn {
  display: inline-block;
  padding: 16px 26px;
  background: var(--ink); color: var(--paper);
  font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: background .2s;
}
.btn:hover { background: var(--red); }
.btn--small { padding: 11px 16px; font-size: 11px; }
.btn--invert { background: var(--paper); color: var(--ink); }
.btn--invert:hover { background: var(--ink); color: var(--paper); }
.link {
  font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px;
}
.link:hover { color: var(--red); }

/* ---------- первый экран ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 84px var(--pad) 40px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}
.hero__meta { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); }
.hero__word {
  font: 400 clamp(44px, 13.2vw, 300px)/.9 var(--display);
  letter-spacing: -.01em;
  text-align: center;
  white-space: nowrap;
  margin: clamp(8px, 2vw, 28px) calc(var(--pad) * -1) 0;
  color: var(--ink);
}
.hero__word span { display: inline-block; will-change: transform; }
.hero__figure {
  position: relative; z-index: 2;
  width: min(100%, 1180px, 108svh);
  margin: clamp(-150px, -8.5vw, -30px) auto 0;
  align-self: end;
}
.hero__figure img { width: 100%; }
.hero__color {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}
.hero__figure:hover .hero__color { opacity: 1; }
.hero__foot {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: 1fr 1.1fr auto; gap: 24px 48px; align-items: end;
  border-top: 1px solid var(--ink);
  padding-top: 22px;
}
.hero__tag { font: 400 clamp(26px, 3vw, 44px)/1 var(--display); color: var(--red); }
.hero__lead { max-width: 44ch; color: var(--ink-2); }
.hero__cta { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }

/* ---------- секции ---------- */
.sec {
  padding: clamp(72px, 10vw, 150px) var(--pad);
  max-width: 1280px; margin: 0 auto;
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.sec--wide { max-width: 1560px; }
.sec.in, .contact.in { opacity: 1; transform: none; }
.sec__head {
  display: flex; align-items: baseline; gap: 18px;
  border-top: 1px solid var(--ink);
  padding-top: 14px; margin-bottom: clamp(28px, 5vw, 64px);
  color: var(--ink-2);
}
.num { position: relative; font: 400 34px/1 var(--display); color: var(--red); min-width: 1.4em; text-transform: uppercase; }
/* титло над буквенной цифрой */
.num::after {
  content: ''; position: absolute; left: 0; top: -9px; width: 24px; height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 8'%3E%3Cpath d='M1 6V3.5C5 .5 8 1 12 3.5s7 3 11 0V1' fill='none' stroke='%23e0240f' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center / contain;
}
.h2 {
  font: 400 clamp(32px, 5.3vw, 86px)/.98 var(--display);
  letter-spacing: -.01em;
  max-width: 18ch;
  text-wrap: balance;
}
.h2--big { font-size: clamp(44px, 7.4vw, 124px); }
.lead {
  font-size: clamp(18px, 1.55vw, 23px); line-height: 1.45;
  max-width: 56ch; margin-top: clamp(28px, 4vw, 56px);
}
.drop::first-letter {
  font: 400 4.2em/.78 var(--display);
  color: var(--red);
  float: left; padding: .06em .1em 0 0;
}
.notes { margin-top: 28px; color: var(--ink-2); }

/* тёмная секция: фон во всю ширину окна, цвета перевёрнуты */
.sec--dark {
  --paper: #141312;
  --ink: #f2ede3;
  --ink-2: #a39c90;
  --line: rgba(242, 237, 227, .22);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
}

/* секция на бежевом потемнее, фон во всю ширину окна */
.sec--tint {
  --paper: #e2d9c7;
  background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
}

/* цифры */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(36px, 6vw, 80px);
  border-top: 1px solid var(--line);
}
.stat {
  padding: 26px 22px 30px 0;
  border-right: 1px solid var(--line);
  opacity: 0; transform: translateY(16px); transition: opacity .7s, transform .7s;
}
.stat + .stat { padding-left: 22px; }
.stat:last-child { border-right: 0; }
.stat.in { opacity: 1; transform: none; }
.stat b {
  display: flex; align-items: baseline; gap: 10px;
  font: 400 clamp(60px, 8vw, 132px)/.9 var(--display); color: var(--red);
}
.stat b small { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.stat p { margin-top: 16px; font-size: 15px; color: var(--ink-2); max-width: 24ch; }
.stat sup { font-size: .7em; color: var(--red); margin-left: 2px; }

/* три шага */
.waves { margin-top: clamp(36px, 6vw, 80px); }
.waves__row {
  display: grid; grid-template-columns: 70px 1fr 1fr; gap: 24px;
  padding: 22px 0; border-top: 1px solid var(--line);
  align-items: start;
}
.waves__row--head { color: var(--ink-2); padding: 0 0 12px; border: 0; }
.waves__row b { display: block; font: 400 clamp(24px, 2.6vw, 38px)/1.05 var(--display); margin-bottom: 8px; }
.waves__row span { color: var(--ink-2); font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.waves__row b { color: var(--ink); }
.waves__row .waves__n { font: 400 44px/1 var(--display); color: var(--ink); }
.waves__row--gap { border-bottom: 1px solid var(--line); }
.waves__empty { outline: 1px dashed var(--red); outline-offset: 12px; }
.waves__empty b { color: var(--red); }

/* герои */
.heroes {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(36px, 6vw, 80px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.hero-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px clamp(14px, 2vw, 30px) 26px;
  border-right: 1px solid var(--line);
  transition: background .35s, color .35s, opacity .7s, transform .7s;
  opacity: 0; transform: translateY(20px);
}
.hero-card.in { opacity: 1; transform: none; }
.hero-card:last-child { border-right: 0; }
.hero-card header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.hero-card h3 { font: 400 clamp(30px, 3.6vw, 58px)/.95 var(--display); }
.hero-card header .mono { color: var(--red); padding-top: 8px; white-space: nowrap; }
.hero-card img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: contain; object-position: center bottom;
  margin: 18px 0 14px;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.hero-card p { color: var(--ink-2); font-size: 15px; margin-top: auto; }
.hero-card:hover { background: var(--ink); color: var(--paper); }
.hero-card:hover p { color: #b7b0a3; }
.hero-card:hover img { transform: scale(1.04); filter: brightness(1.5) contrast(1.05); }

.ranks { margin-top: 34px; color: var(--ink-2); }
.ranks__grid { display: grid; grid-template-columns: repeat(27, 1fr); gap: clamp(3px, .7vw, 12px); margin-bottom: 14px; }
.ranks__grid svg { width: 100%; fill: none; stroke: var(--ink); stroke-width: 1; opacity: .45; }

/* кодекс */
.codex { margin-top: clamp(36px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.codex li {
  display: grid; grid-template-columns: clamp(70px, 12vw, 190px) 1fr; align-items: center;
  border-top: 1px solid var(--line);
  padding: clamp(14px, 2vw, 26px) 0;
  font: 400 clamp(24px, 3.4vw, 52px)/1.05 var(--display);
  opacity: 0; transform: translateX(-16px); transition: opacity .7s, transform .7s;
}
.codex li.in { opacity: 1; transform: none; }
.codex li span { font-size: clamp(60px, 9vw, 150px); line-height: .8; color: var(--red); }

/* пилот */
.pilot__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 70px); align-items: end; }
.pilot__img { width: 100%; }
.player {
  display: flex; align-items: center; gap: 18px;
  margin-top: 34px; padding: 16px 18px;
  border: 1px solid var(--ink); max-width: 480px;
  color: var(--ink-2);
}
.player__btn {
  width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 15px; padding-left: 4px;
}
.player__btn:disabled { opacity: .55; }
.player__body { flex: 1; }
.player__title { font-weight: 500; color: var(--ink); font-size: 15px; }
.player__bar { height: 1px; background: var(--line); margin-top: 12px; }
.player__bar i { display: block; width: 0; height: 100%; background: var(--red); }
.pilot .todo { margin-top: 18px; }
.quote {
  margin-top: clamp(48px, 8vw, 120px);
  font: 400 clamp(34px, 6vw, 96px)/1 var(--display);
  color: var(--red); text-align: center; text-wrap: balance;
}

/* план */
.road {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin-top: clamp(36px, 6vw, 80px);
  border-top: 1px solid var(--ink);
}
.road li {
  position: relative; padding: 30px 20px 0 0;
  opacity: 0; transform: translateY(16px); transition: opacity .7s, transform .7s;
}
.road li.in { opacity: 1; transform: none; }
.road li::before {
  content: ''; position: absolute; top: -6px; left: 0;
  width: 11px; height: 11px; background: var(--paper); border: 1px solid var(--ink);
  transform: rotate(45deg);
}
.road li.is-now::before { background: var(--red); border-color: var(--red); }
.road .mono { color: var(--ink-2); }
.road li.is-now .mono { color: var(--red); }
.road b { display: block; font: 400 clamp(24px, 2.3vw, 36px)/1.05 var(--display); margin: 12px 0 10px; }
.road p { font-size: 15px; color: var(--ink-2); max-width: 24ch; }

/* команда */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: clamp(36px, 6vw, 80px); }
.member i { display: block; aspect-ratio: 4 / 5; background: var(--paper-2); border: 1px dashed var(--line); margin-bottom: 16px; }
.member b { display: block; font: 400 26px/1.1 var(--display); }
.member .mono { display: block; color: var(--red); margin: 8px 0; }
.member p { font-size: 15px; color: var(--ink-2); }

/* контакт */
.contact {
  background: var(--red); color: var(--paper);
  padding: clamp(80px, 12vw, 180px) var(--pad);
  text-align: center;
}
.contact h2 { font: 400 clamp(44px, 8.6vw, 150px)/.92 var(--display); margin: 22px 0 26px; }
.contact p { font-size: clamp(17px, 1.5vw, 22px); }
.contact .btn { margin: 36px 0 22px; }
.contact .todo { color: var(--paper); opacity: .75; }

.foot {
  display: flex; justify-content: space-between;
  padding: 22px var(--pad);
  background: var(--ink); color: var(--paper);
}

/* все заголовки набраны прописными: строчные Monomakh читаются как церковный полуустав */
.h2, .hero__tag, .hero-card h3, .waves__row b, .codex li, .quote, .road b, .member b, .contact h2 { text-transform: uppercase; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .top .btn--small { margin-left: auto; }
  .hero { min-height: auto; padding-top: 76px; }
  .hero__meta span:last-child { display: none; }
  .hero__figure { margin-top: -5vw; }
  .hero__foot { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding-left: 0 !important; padding-right: 14px; }
  .stat:nth-child(2n) { border-right: 0; padding-left: 14px !important; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .waves__row { grid-template-columns: 36px 1fr 1fr; gap: 14px; }
  .waves__row .waves__n { font-size: 30px; }
  .waves__row b { font-size: 15px; letter-spacing: .01em; }
  .waves__row span { font-size: 13px; }
  .waves__empty { outline-offset: 6px; }
  .heroes { grid-template-columns: 1fr; }
  .hero-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-card:last-child { border-bottom: 0; }
  .hero-card img { aspect-ratio: auto; max-height: 70vw; }
  .ranks__grid { grid-template-columns: repeat(9, 1fr); gap: 8px; }
  .pilot__grid { grid-template-columns: 1fr; }
  .road { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--ink); }
  .road li { padding: 0 0 30px 26px; }
  .road li::before { top: 4px; left: -6px; }
  .team { grid-template-columns: 1fr; }
  .member i { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sec, .stat, .hero-card, .codex li, .road li { opacity: 1; transform: none; transition: none; }
}
