/* CosmoMatch · промо 07 — Баухаус: модульная сетка, три чистых цвета */

:root {
  --ground: #F1EAD8;
  --ink: #141414;
  --accent: #D6421F;
  --secondary: #1F5BD6;
  --glow: #F2C14E;
  --cell: clamp(56px, 7vw, 92px);
}

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

html, body { background: var(--ground); }

body {
  font-family: 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

.mod {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px 64px;
}

/* ---------- шапка ---------- */

.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 0 20px;
  border-bottom: 3px solid var(--ink);
}

.logo { display: flex; align-items: center; gap: 16px; }

.logo__mark { width: 46px; height: 46px; flex: none; }

.mark__tri { fill: var(--accent); }
.mark__circ { fill: var(--secondary); }
.mark__pip { fill: var(--glow); }
.mark__star { fill: #FFFFFF; }

.logo__mark .mark__circ-wrap,
.conj .conj__circ-wrap {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo:hover .mark__circ-wrap { transform: rotate(45deg); }
.conj:hover .conj__circ-wrap { transform: rotate(45deg); }

.wordmark {
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}

.head__num {
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 3px solid var(--ink);
  padding: 4px 12px;
  white-space: nowrap;
}

/* ---------- hero: сетка 6×6, фигуры в верхних модулях ---------- */

.stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(var(--cell), auto);
  column-gap: 24px;
  row-gap: 24px;
  padding: 40px 0 48px;
  overflow: hidden;
}

.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(20, 20, 20, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 20, 20, 0.08) 1px, transparent 1px);
  background-size: calc(100% / 6) var(--cell);
}

.shape { position: absolute; display: block; will-change: transform; }

.shape--circle {
  width: clamp(64px, 9vw, 120px);
  height: clamp(64px, 9vw, 120px);
  border-radius: 50%;
  background: var(--secondary);
  top: 26px;
  right: 6%;
}

.shape--triangle {
  width: clamp(56px, 8vw, 104px);
  height: clamp(56px, 8vw, 104px);
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  top: 30px;
  left: 47%;
}

.shape--square {
  width: clamp(36px, 5vw, 64px);
  height: clamp(36px, 5vw, 64px);
  background: var(--glow);
  top: 44%;
  right: 2%;
}

.shape--dot {
  width: clamp(18px, 2.4vw, 32px);
  height: clamp(18px, 2.4vw, 32px);
  border-radius: 50%;
  background: var(--ink);
  top: 12px;
  left: 38%;
}

.hero__text {
  grid-column: 1 / span 3;
  grid-row: 2 / span 2;
  align-self: end;
  padding-top: 90px;
}

.kicker {
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 18px;
}

.headline {
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.sub {
  font-size: 17px;
  max-width: 40ch;
  margin-bottom: 26px;
}

.cta {
  display: inline-block;
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #FFFFFF;
  background: var(--ink);
  padding: 16px 40px;
  border: 3px solid var(--ink);
  transition: background 0.25s ease, color 0.25s ease;
}

.cta:hover, .cta:focus-visible { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }

.cta--ghost { background: transparent; color: var(--ink); }
.cta--ghost:hover, .cta--ghost:focus-visible { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

.hero__conj {
  grid-column: 4 / span 3;
  grid-row: 2 / span 2;
  align-self: center;
  justify-self: end;
  width: min(320px, 80%);
}

.conj { display: block; width: 100%; height: auto; }

.star--pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: star-pulse 2.4s ease-in-out infinite;
}

@keyframes star-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

/* ---------- плитки ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.tile {
  position: relative;
  border: 3px solid var(--ink);
  background: var(--ground);
  padding: 26px 24px 30px;
  min-height: 220px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tile:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--ink); }

.tile::before {
  content: "";
  position: absolute;
  top: -3px; left: -3px; right: -3px;
  height: 10px;
  background: var(--band, var(--ink));
}

.tile--red { --band: var(--accent); }
.tile--blue { --band: var(--secondary); }
.tile--yellow { --band: var(--glow); }

.tile__fig { display: block; height: 64px; margin-bottom: 18px; }

.fig { display: inline-block; }

.fig--square { width: 44px; height: 44px; background: var(--accent); }

.fig--circle {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--secondary);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile--blue:hover .fig--circle { transform: rotate(45deg); }

.fig--triangle {
  width: 46px; height: 42px;
  background: var(--glow);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.tile__t {
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tile__d { font-size: 15px; }

.tile__idx {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(20, 20, 20, 0.45);
}

/* ---------- манифест ---------- */

.manifest {
  background: var(--ink);
  padding: 44px 36px;
  margin-bottom: 48px;
}

.quote p {
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #F1EAD8;
  max-width: 34ch;
}

/* ---------- финал ---------- */

.final {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 3px solid var(--ink);
  padding-top: 32px;
}

.note {
  font-size: 16px;
  max-width: 42ch;
}

/* ---------- подвал ---------- */

.foot { margin-top: 52px; }

.shape-band svg { display: block; width: 100%; height: 36px; }

.foot__text {
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 18px 0 12px;
}

.promo-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  border-top: 3px solid var(--ink);
  padding-top: 14px;
}

.promo-nav a {
  font-family: 'Jost', 'PT Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.2s ease;
}

.promo-nav a:hover, .promo-nav a:focus-visible { color: var(--accent); }

/* ---------- появление по скроллу ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px); /* 3 шага сетки по 8px */
  transition: opacity 0.5s steps(3), transform 0.5s steps(3);
}

[data-reveal].is-in { opacity: 1; transform: translateY(0); }

/* ---------- адаптив ---------- */

@media (max-width: 860px) {
  .hero__text { grid-column: 1 / -1; grid-row: 3 / span 1; padding-top: 130px; }
  .hero__conj { grid-column: 1 / -1; grid-row: 4; justify-self: start; width: min(280px, 74vw); }
  .shape--triangle { left: 58%; }
  .tiles { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .mod { padding: 0 18px 44px; }
  .stage { column-gap: 14px; row-gap: 14px; }
  .headline { font-size: clamp(36px, 10.5vw, 56px); }
  .logo__mark { width: 38px; height: 38px; }
  .wordmark { font-size: 13px; }
}

/* ---------- reduce-motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .star--pulse { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .cta, .tile, .mark__circ-wrap, .conj__circ-wrap, .fig--circle { transition: none; }
  .tile:hover { transform: none; box-shadow: none; }
}
