:root {
  --ink: #1d0b06;
  --paper: #f5e9cf;
  --paper-deep: #f7f0e4;
  --paper-section: #f5f3ed;
  --cream-top: #ffffff;
  --cream-mid: #f9f3e8;
  --cream-end: #f5ead6;
  --muted: #6b5b36;
  --muted-light: #a89b7a;
  --line: #e8dec8;
  --night: #17110a;
  --amber: #e9ac59;
  --white: #ffffff;
  --layout-wide: 90rem;
  --layout-gutter: var(--space-page-inline);
  --space-section-y: var(--space-section-104);
  /* DESIGN.md spacing (4px grid) + pen @ 1440 */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-xxl: 2rem;
  --space-page-inline: 4.5rem;
  --space-stack: 1.75rem;
  --space-section-48: 3rem;
  --space-section-56: 3.5rem;
  --space-section-72: 4.5rem;
  --space-section-80: 5rem;
  --space-section-88: 5.5rem;
  --space-section-96: 6rem;
  --space-section-104: 6.5rem;
  --hod-grid-cols: 12;
  --hod-steps-span: 6;
  --hod-mid-span: 2;
  --hod-preview-span: 4;
  --pad: clamp(var(--space-lg), 5vw, var(--space-page-inline));
  --font-serif: "PT Serif", Georgia, serif;
  --font-sans: Roboto, system-ui, sans-serif;
  --shadow-card: 0 18px 28px #1d0b0666;
  --focus-ring: 0 0 0 3px #f5e9cf, 0 0 0 5px #1d0b06;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-hero: 0.85s;
  --motion-reveal: 0.75s;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(1.35rem);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes hero-card-rise {
  from {
    opacity: 0;
    transform: translateY(2.5rem) rotate(var(--card-rotate, 0deg));
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--card-rotate, 0deg));
  }
}

@keyframes editorial-settle {
  from {
    transform: scale(1.045);
  }

  to {
    transform: scale(1);
  }
}

@keyframes rune-glow {
  from {
    opacity: 0;
    transform: scale(0.88) rotate(-8deg);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: none;
  }
}

.hero.is-ready .hero__title {
  animation: hero-rise var(--motion-hero) var(--ease-out-expo) 0.08s both;
}

.hero.is-ready .hero__lead {
  animation: hero-rise var(--motion-hero) var(--ease-out-expo) 0.18s both;
}

.hero.is-ready .hero__cta {
  animation: hero-rise var(--motion-hero) var(--ease-out-expo) 0.28s backwards;
}

.hero.is-ready .hero__card--back {
  --card-rotate: -10deg;
  animation: hero-card-rise 0.95s var(--ease-out-expo) 0.42s both;
}

.hero.is-ready .hero__card--mid {
  --card-rotate: 0deg;
  animation: hero-card-rise 0.95s var(--ease-out-expo) 0.52s both;
}

.hero.is-ready .hero__card--front {
  --card-rotate: 12deg;
  animation: hero-card-rise 0.95s var(--ease-out-expo) 0.62s both;
}

.hero.is-ready .hero__editorial-img {
  animation: editorial-settle 1.35s var(--ease-out-expo) both;
}

.reveal {
  opacity: 0;
  transform: translateY(2.25rem);
  filter: blur(5px);
  transition:
    opacity var(--motion-reveal) var(--ease-out-expo),
    transform var(--motion-reveal) var(--ease-out-expo),
    filter var(--motion-reveal) var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

.closing__rune.is-visible {
  animation: rune-glow 1s var(--ease-out-expo) both;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::selection {
  background: #e9ac59;
  color: var(--ink);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  background: linear-gradient(180deg, #fff 0%, #f4e3c2 100%);
}

h1,
h2,
h3,
h4,
.closing__phrase {
  font-family: var(--font-serif);
  font-weight: 400;
  text-wrap: balance;
}

a:focus-visible,
button:focus-visible,
.tab:focus-visible,
.hod-step:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a[href] {
  cursor: pointer;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.page {
  width: 100%;
  overflow-x: hidden;
}

.wrap {
  box-sizing: border-box;
  width: min(100%, var(--layout-wide));
  margin-inline: auto;
  padding-inline: clamp(var(--space-lg), 5vw, var(--layout-gutter));
}

.wrap.what {
  width: min(100%, var(--layout-wide));
  max-width: var(--layout-wide);
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.375rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  transition:
    transform 0.18s var(--ease-out-expo),
    box-shadow 0.18s var(--ease-out-expo),
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-3px);
    background: #3d241c;
    box-shadow: 0 14px 28px #1d0b0644;
  }

  .btn--outline:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
  }

  .btn--paper:hover {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 14px 28px #00000055;
  }

  .btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px #1d0b0624;
  }
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn--paper {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
}

.btn--sm {
  padding: 0.875rem 1.625rem;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
}

/* Header (in hero) */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
  font-weight: 500;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  font-size: 1rem;
}

.logo,
.nav a:not(.btn),
.footer__nav a {
  transition: color 0.18s ease;
}

.logo:hover,
.nav a:not(.btn):hover {
  color: var(--muted);
}

.nav a:not(.btn):hover,
.footer__nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.nav-burger {
  display: none;
}

/* Hero — editorial-кадр, слоган по центру экрана */
.hero {
  --hero-topbar-h: 3.25rem;
  --hero-picture-inset: 1.75rem;
  --hero-picture-side: clamp(1.5rem, 2.5vw, 4rem);
  --hero-picture-radius: 45px;
  --hero-card-photo: clamp(9rem, 42vw, 16.75rem);
  --hero-card-task: 8.9rem;
  --hero-card-chrome: 59px;
  position: relative;
  overflow: hidden;
  background: #fff;
  min-height: 100svh;
  min-height: 100dvh;
}

.hero__editorial {
  position: absolute;
  top: calc(var(--hero-topbar-h) + var(--hero-picture-inset));
  right: var(--hero-picture-side);
  bottom: var(--hero-picture-inset);
  left: var(--hero-picture-side);
  z-index: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--hero-picture-radius);
  background: transparent;
  box-shadow: none;
}

.hero__editorial-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.hero__frame {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(100%, var(--layout-wide));
  min-height: 100svh;
  min-height: 100dvh;
  margin-inline: auto;
  pointer-events: none;
}

.hero__frame .hero__stack,
.hero__frame .hero__content,
.hero__frame .hero__cta {
  pointer-events: auto;
}

.hero__stack {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--hero-topbar-h) * 0.5);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 4vh, 2.75rem);
  width: min(96vw, var(--layout-wide));
  max-width: var(--layout-wide);
  padding-inline: clamp(var(--space-lg), 5vw, var(--layout-gutter));
  transform: translate(-50%, -50%);
}

.hero__topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  width: 100%;
  background: #fff;
  border-bottom: 0;
  transition: box-shadow 0.4s var(--ease-out-expo);
}

.hero__topbar.is-scrolled {
  box-shadow: 0 6px 28px #1d0b0614;
}

.hero__topbar-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-block: 0.625rem;
  padding-inline: var(--hero-picture-side);
}

.hero__header {
  width: 100%;
  padding: 0;
}

.hero__logo {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1.94vw, 1.75rem);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  flex-shrink: 0;
}

.hero__nav {
  gap: clamp(0.75rem, 1.94vw, 1.75rem);
  font-size: 1rem;
}

.hero__nav-btn {
  padding: 0.625rem 1.125rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  width: min(92vw, 40rem);
  max-width: 40rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 18px #f7f0e4;
}

.hero__lead {
  margin: 0;
  max-width: 28rem;
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  text-shadow: 0 0 16px #f7f0e4;
}

.hero__cta {
  align-self: center;
  margin-top: var(--space-sm);
  padding: 0.875rem 1.375rem;
  font-size: 1rem;
  box-shadow: 0 8px 24px #1d0b0630;
}

.hero__cards {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  width: 100%;
  max-width: min(100%, 62rem);
  pointer-events: none;
}

.hero .hero__card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(10.5rem, 18vw, 19.5rem);
  height: calc(var(--hero-card-photo) + var(--hero-card-task) + var(--hero-card-chrome));
  max-width: 19.5rem;
  margin: 0;
  perspective: 1100px;
  background: transparent;
  transform: translateY(0) rotate(var(--card-rotate, 0deg));
  transform-origin: center bottom;
  transform-style: preserve-3d;
  transition:
    transform 0.45s var(--ease-out-expo),
    box-shadow 0.45s var(--ease-out-expo);
}

.hero__card-inner {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
}

.hero__card.is-turning {
  z-index: 6;
}

.hero__card-face {
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  padding: 7px 9px;
  box-shadow: 0 14px 32px #1d0b0666;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero__card-face--front {
  display: grid;
  grid-template-rows: var(--hero-card-photo) 6px 36px 3px minmax(0, 1fr);
  transform: rotateY(0deg);
}

.hero__card-face--back {
  position: absolute;
  inset: 0;
  display: flex;
  transform: rotateY(180deg);
}

.hero__card-shirt {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.hero__card--back {
  z-index: 1;
  --card-rotate: -10deg;
}

.hero__card--mid {
  z-index: 2;
  --card-rotate: 0deg;
}

.hero__card--front {
  z-index: 3;
  --card-rotate: 12deg;
}

@media (hover: hover) {
  .hero .hero__card:hover {
    transform: translateY(-0.65rem) rotate(var(--card-rotate));
    box-shadow: 0 22px 48px #1d0b0675;
    z-index: 4;
  }

  .what__stack:hover .what__card {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px #1d0b0670;
  }

  .tab {
    transition:
      background 0.25s var(--ease-out-expo),
      color 0.25s var(--ease-out-expo),
      transform 0.25s var(--ease-out-expo);
  }

  .tab:hover {
    transform: translateY(-2px);
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
  }

  .audience__photo:hover {
    transform: scale(1.02);
  }
}

.game-card__photo--short {
  height: 172px;
}

/* Те же пропорции, что у игровой карты во 2-й секции */
.hero .game-card__photo {
  height: auto;
  min-height: 0;
  border-radius: 12px;
}

@media (min-width: 900px) {
  .hero {
    --hero-card-photo: 16.75rem;
  }
}

.hero .game-card__paper--task {
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.hero .game-card__task {
  overflow: hidden;
  font-size: clamp(0.6875rem, 1.6vw, 0.8125rem);
  line-height: 1.32;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.game-card__photo {
  height: 179px;
  border-radius: 10px;
  background: center / cover no-repeat;
}

.game-card__rule {
  height: 6px;
  background: #000;
}

.game-card__ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: #fff;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.game-card__paper {
  height: 20px;
  background: linear-gradient(180deg, #ebb060 0%, #e9ac59 42%, #d07f37 100%);
}

/* Section common — вертикаль по landing.pen, горизонталь через .wrap + --pad (72px) */
.section {
  scroll-margin-top: var(--space-xl);
}

#what.section,
#hod.section,
#merch.section,
#partner.section {
  padding-block: clamp(var(--space-xxl), 7.22vw, var(--space-section-y));
}

#audience.section {
  padding-block: clamp(5.5rem, 11vw, 8.5rem);
}

#download.section {
  padding-block: clamp(var(--space-xxl), 7.22vw, var(--space-section-y));
}

.section--white {
  background: var(--white);
}

.section--cream {
  background: linear-gradient(180deg, var(--cream-top) 0%, var(--cream-mid) 55%, var(--cream-end) 100%);
}

.section--paper {
  background: var(--paper-section);
}

.section__title {
  margin: 0 0 var(--space-stack);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.section__title--center {
  text-align: center;
  margin-bottom: var(--space-xxl);
}

/* What — pen: карты 600×640 слева, текст 500px справа, space-between */
.what {
  display: grid;
  gap: var(--space-xxl);
  align-items: center;
}

@media (min-width: 1200px) {
  .what {
    grid-template-columns: 600px 500px;
    justify-content: space-between;
    column-gap: 0;
    row-gap: 0;
    align-items: center;
    min-height: 40rem;
  }
}

.what__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}

.what__text .section__title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.15;
}

.what__text p {
  margin: 0;
  max-width: 27.5rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.5;
}

.what__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.what__actions .btn {
  padding: 0.875rem 1.375rem;
  border-radius: 12px;
}

.what__visual {
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: visible;
}

.what__stack {
  position: relative;
  width: min(100%, 26.25rem);
  height: clamp(18rem, 72vw, 28rem);
  margin-inline: auto;
  overflow: visible;
}

@media (min-width: 1200px) {
  .what__visual {
    justify-content: flex-start;
  }

  .what__stack {
    width: 600px;
    height: 640px;
    margin-inline: 0;
  }

  .what__text {
    justify-self: end;
    width: 100%;
    max-width: 500px;
  }
}

.what__stack-back {
  position: absolute;
  left: 16%;
  top: 18%;
  width: 42%;
  height: 63%;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 14px 32px #1d0b0659;
}

.what__name-card {
  position: absolute;
  left: 31.5%;
  top: 14.5%;
  width: 49%;
  height: 74.5%;
  padding: 9px;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 14px 32px #1d0b0659;
}

.what__name-parchment {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  padding: 2rem 3rem 1.75rem 1.75rem;
  border-radius: 12px;
  background: radial-gradient(ellipse 135% 125% at 50% 40%, #f0c27a 0%, #e9ac59 58%, #d07f37 100%);
}

.what__name-letters {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 500;
  line-height: 0.88;
  color: var(--ink);
  text-align: center;
}

.what__name-rune {
  width: 4.875rem;
  height: auto;
  object-fit: contain;
}

.what__card {
  position: absolute;
  left: 58.3%;
  top: 12.5%;
  width: 52%;
  max-width: 19.5rem;
  margin: 0;
  transform: none;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  padding: 7px 9px;
  box-shadow: 0 14px 32px #1d0b0666;
  transition:
    transform 0.45s var(--ease-out-expo),
    box-shadow 0.45s var(--ease-out-expo);
}

.game-card--author .game-card__photo--author {
  height: clamp(9rem, 42vw, 16.75rem);
  border-radius: 12px 12px 0 0;
}

@media (min-width: 900px) {
  .game-card--author .game-card__photo--author {
    height: 16.75rem;
  }
}

.game-card__rule--thin {
  height: 3px;
}

.game-card__paper--task {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.625rem;
  height: auto;
  min-height: 7.5rem;
  padding: 1rem;
  border-radius: 0 0 12px 12px;
  background: radial-gradient(ellipse 240% 280% at 50% 15%, #ebb060 0%, #e9ac59 62%, #d4893c 100%);
}

.game-card__task {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
}

.game-card__seal {
  align-self: flex-end;
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  object-fit: cover;
}

/* Hod — interactive steps */
.hod__head {
  margin-bottom: var(--space-xxl);
}

.hod__title {
  margin: 0;
}

.hod__layout {
  display: grid;
  gap: var(--space-section-48);
  align-items: start;
}

@media (min-width: 960px) {
  .hod__layout {
    width: 100%;
    grid-template-columns: repeat(var(--hod-grid-cols), minmax(0, 1fr));
    column-gap: 0;
    row-gap: var(--space-section-48);
    align-items: start;
  }

  .hod__layout > :first-child {
    grid-column: 1 / span var(--hod-steps-span);
    min-width: 0;
  }

  .hod-preview {
    grid-column: calc(var(--hod-steps-span) + var(--hod-mid-span) + 1) / span var(--hod-preview-span);
    justify-self: stretch;
    margin-inline: 0;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 360 / 800;
  }
}

@media (max-width: 959px) {
  .hod-preview {
    width: min(100%, 14.0625rem);
    height: auto;
    aspect-ratio: 360 / 800;
    margin-inline: auto;
  }
}

.hod-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hod-step {
  position: relative;
  display: grid;
  grid-template-columns: 4px auto 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.75rem 0;
  cursor: default;
  border: none;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--muted-light);
  transition:
    background 0.25s var(--ease-out-expo),
    color 0.25s var(--ease-out-expo);
}

.hod-step:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.hod-step__bar {
  width: 4px;
  height: 2.75rem;
  align-self: center;
  border-radius: 2px;
  background: transparent;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.hod-step__num {
  font-size: 0.9375rem;
  font-weight: 500;
}

.hod-step__label {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
}

.hod-step:hover,
.hod-step.is-active {
  color: var(--ink);
  background: #faf6ee;
}

.hod-step:hover .hod-step__bar,
.hod-step.is-active .hod-step__bar {
  opacity: 1;
  background: var(--ink);
}

.hod-step.is-active .hod-step__label,
.hod-step:hover .hod-step__label {
  font-weight: 500;
}

.hod-preview {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 16px 40px #1d0b0618;
  background: #2a2018;
}

.hod-preview__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: opacity 0.2s ease;
}

.hod-preview__img.is-swapping {
  opacity: 0.65;
}

/* Audience tabs */
.audience__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xxl);
}

.tab {
  padding: 0.75rem 1.375rem;
  border-radius: 999px;
  border: 1px solid #6b5b36;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper-deep);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tab.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.audience__panel {
  display: grid;
  gap: var(--space-section-80);
  align-items: center;
}

@media (min-width: 900px) {
  .audience__panel {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 28rem;
  }
}

.audience__heading {
  margin: 0 0 1rem;
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.25;
}

.audience__body {
  margin: 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  white-space: pre-line;
}

.audience__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-xl);
}

.audience__download {
  flex-shrink: 0;
}

.audience__photo-wrap {
  display: flex;
  justify-content: center;
}

.audience__photo {
  width: min(100%, 32.5rem);
  height: min(25rem, 60vw);
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 12px 32px #1d0b0614;
  transition:
    opacity 0.25s var(--ease-out-expo),
    transform 0.45s var(--ease-out-expo),
    box-shadow 0.45s var(--ease-out-expo);
}

.audience__photo.is-swapping {
  opacity: 0.7;
}

.audience__photo--tilt {
  transform: rotate(-5deg);
}

/* Split sections (merch, b2b) */
.split {
  display: grid;
  gap: var(--space-section-80);
  align-items: end;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
  }

  .split--reverse {
    grid-template-columns: 1.1fr 1fr;
  }

  .split--reverse .split__media {
    order: -1;
  }
}

.split__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
}

.split__body {
  margin: 0 0 1.5rem;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.split__img {
  width: 100%;
  max-height: 27.5rem;
  object-fit: cover;
  border-radius: 4px;
}

.split__photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  min-width: 0;
}

.merch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-section-48);
}

.merch__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 36rem;
  text-align: center;
}

.merch__title {
  margin-bottom: 1rem;
  font-family: var(--font-serif);
  font-weight: 400;
}

.merch__lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.merch__photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

.merch__photos img {
  display: block;
  width: 100%;
  height: min(28rem, 46vw);
  object-fit: cover;
  border-radius: 4px;
}

.partner__panel {
  display: grid;
  grid-template-columns: minmax(0, 32.5rem) minmax(0, 1fr);
  column-gap: 3.5rem;
  align-items: center;
  margin-top: 4.5rem;
  padding: 2.25rem 2.5rem 2.5rem 0;
  background: #faf6ee;
  border-radius: 8px;
}

.partner__photo {
  display: block;
  width: 100%;
  height: 30.25rem;
  margin-top: -6.75rem;
  margin-bottom: -0.75rem;
  object-fit: cover;
  object-position: center 16%;
  border-radius: 4px;
}

.partner__copy {
  padding-right: 0.5rem;
}

.partner__copy .split__title {
  font-family: var(--font-serif);
  font-weight: 400;
}

.partner__copy .split__body {
  margin-bottom: 1.5rem;
}

@media (max-width: 800px) {
  .partner__panel {
    grid-template-columns: 1fr;
    margin-top: 3rem;
    padding: 0 1.25rem 1.5rem;
  }

  .partner__photo {
    height: 22rem;
    margin: -2.5rem 0 0.5rem;
  }
}

.split__photos .split__img {
  height: min(22rem, 52vw);
  max-height: none;
}

/* Closing */
.closing {
  text-align: center;
}

.closing__rune {
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 1.75rem;
  border-radius: 16px;
  object-fit: cover;
}

.closing__phrase {
  margin: 0 auto 2rem;
  max-width: 36rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

/* Footer */
.footer {
  background: var(--night);
  color: var(--paper);
  padding-block: var(--space-section-56);
}

.footer__top {
  display: grid;
  gap: var(--space-xxl);
}

@media (min-width: 800px) {
  .footer__top {
    grid-template-columns: 1.2fr auto auto;
    justify-content: space-between;
  }
}

.footer__brand {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.footer__about {
  margin: 0;
  max-width: 24rem;
  color: var(--muted-light);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: flex-start;
}

@media (min-width: 800px) {
  .footer__nav {
    align-items: flex-end;
  }
}

.footer__nav a:hover {
  color: #fff;
}

.footer__cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

@media (min-width: 800px) {
  .footer__cta {
    align-items: flex-end;
    text-align: right;
  }
}

.footer__cta p {
  margin: 0;
  max-width: 16rem;
  color: var(--muted-light);
  font-size: 0.875rem;
  line-height: 1.4;
}

.footer__rule {
  height: 1px;
  margin-block: var(--space-xxl);
  background: var(--amber);
  opacity: 0.35;
  border: 0;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: #7a6e58;
  font-size: 0.8125rem;
}

@media (max-width: 899px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding-bottom: 0.75rem;
  }

  .hero__topbar {
    position: relative;
    grid-area: 1 / 1;
    left: auto;
    right: auto;
    width: 100%;
    margin: 0;
    z-index: 6;
  }

  .hero__topbar-inner {
    width: 100%;
    max-width: none;
    padding-block: 0.75rem;
    padding-inline: max(1rem, env(safe-area-inset-left));
  }

  .hero__header {
    position: relative;
  }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: auto;
    padding: 0;
  }

  .nav-burger span {
    display: block;
    width: 1.25rem;
    height: 2px;
    border-radius: 1px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .hero__header.is-open .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hero__header.is-open .nav-burger span:nth-child(2) {
    opacity: 0;
  }

  .hero__header.is-open .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero__nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    z-index: 7;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.4rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 36px #1d0b0626;
  }

  .hero__header.is-open .hero__nav {
    display: flex;
  }

  .hero__nav a:not(.btn) {
    display: block;
    padding: 0.8rem 0.9rem;
    border-radius: 8px;
  }

  .hero__nav a:not(.btn):hover {
    background: #faf6ee;
    text-decoration: none;
  }

  .hero__nav .hero__nav-btn {
    display: none;
  }

  .hero__editorial {
    position: relative;
    grid-area: 2 / 1;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    margin: 0 0.75rem 0.75rem;
    border-radius: 28px;
    transform: none;
  }

  .hero__editorial-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .hero__frame {
    position: relative;
    grid-area: 2 / 1;
    z-index: 1;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    margin: 0 0.75rem 0.75rem;
  }

  .hero__stack {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: 1.25rem;
    padding: 1.75rem 0.25rem 1.25rem;
    transform: none;
  }

  .hero__content {
    width: 100%;
    max-width: none;
    padding: 0.5rem 0.75rem 0;
  }

  .hero__title {
    font-size: 2.75rem;
  }

  .hero__lead {
    font-size: 1.375rem;
  }

  .hero__cards {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: center;
    padding-inline: 0;
    overflow: visible;
    pointer-events: none;
  }

  .hero__card--back,
  .hero__card--front {
    display: none;
  }

  .hero .hero__card,
  .hero.is-ready .hero__card--mid {
    --card-rotate: 0deg;
    flex: 0 0 auto;
    width: min(16.5rem, 74vw);
    max-width: none;
  }

  .hero {
    --hero-card-photo: 9.5rem;
  }

  #what.section,
  #hod.section,
  #merch.section,
  #partner.section,
  #download.section,
  #audience.section {
    padding-block: 3.25rem;
  }

  .what__visual {
    display: none;
  }

  .what__text .section__title,
  .section__title {
    font-size: 2rem;
  }

  .hod-step {
    gap: 0.75rem;
    padding: 1rem 0.35rem;
  }

  .hod-step__label {
    font-size: 1.25rem;
  }

  .hod-preview {
    display: none;
  }

  .audience__heading {
    font-size: 1.375rem;
  }

  .audience__photo {
    height: 16rem;
  }

  .merch {
    gap: 1.75rem;
  }

  .merch__photos {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .merch__photos img {
    height: 16rem;
  }

  .closing__phrase {
    font-size: 1.75rem;
  }

  .footer__nav {
    align-items: flex-start;
  }
}

/* Large desktop, 2K (QHD), 4K — scale layout to match viewport */
@media (min-width: 1920px) {
  :root {
    --hero-min-h: min(90vh, 52rem);
    --type-display: clamp(2.75rem, 2vw, 3rem);
    --type-lead: clamp(1.625rem, 1.2vw, 1.75rem);
    --type-section: clamp(2.25rem, 1.6vw, 3rem);
  }

  .section__title {
    font-size: var(--type-section);
  }

  .what__text p,
  .split__body {
    font-size: 1.1875rem;
    max-width: 32rem;
  }

  .hod-preview {
    border-radius: 32px;
  }

  .audience__heading {
    font-size: 1.875rem;
  }

  .audience__body {
    font-size: 1.0625rem;
    max-width: 36rem;
  }

  .audience__photo {
    max-width: 36rem;
    height: min(28rem, 42vw);
  }

  .split__img {
    max-height: 32rem;
  }

  .closing__phrase {
    font-size: var(--type-section);
    max-width: 42rem;
  }
}

@media (min-width: 2560px) {
  :root {
    --hero-min-h: min(88vh, 58rem);
    /* Фиксированный потолок типографики — как на макете ~1440, без роста от vw */
    --type-display: 3rem;
    --type-lead: 1.75rem;
    --type-section: 3rem;
  }

  .site-header:not(.hero__header) {
    padding-block: 2.25rem;
  }

  .logo {
    font-size: 1.75rem;
  }

  .nav {
    gap: 2rem;
    font-size: 1rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .hod-step {
    padding: 2rem 0;
    gap: 1.5rem;
  }

  .hod-step__bar {
    height: 3.25rem;
  }

  .hod-preview {
    border-radius: 36px;
  }

  .tab {
    padding: 0.875rem 1.625rem;
    font-size: 1rem;
  }

  .audience__photo {
    max-width: 40rem;
    height: min(31rem, 36vw);
  }

  .split__title {
    font-size: 2.5rem;
  }

  .split__img {
    max-height: 36rem;
  }

  .closing__rune {
    width: 8.5rem;
    height: 8.5rem;
  }

  .footer__brand {
    font-size: 2rem;
  }
}

@media (min-width: 1920px) and (max-width: 2559px) {
  html {
    font-size: 106.25%;
  }
}

@media (min-width: 3840px) {
  html {
    font-size: 100%;
  }

  :root {
    --hero-min-h: min(86vh, 64rem);
    --type-display: 3rem;
    --type-lead: 1.75rem;
    --type-section: 3rem;
  }

  .section__title,
  .closing__phrase {
    font-size: var(--type-section);
  }

  .what__text p,
  .split__body,
  .audience__body,
  .nav,
  .btn,
  .tab {
    font-size: 1rem;
  }

  .what__text p {
    font-size: 1.125rem;
  }

  .audience__heading {
    font-size: 1.625rem;
  }

  .split__title {
    font-size: 2.5rem;
  }

  .logo {
    font-size: 1.75rem;
  }

  .footer__brand {
    font-size: 2rem;
  }

  .hod-preview {
    border-radius: 40px;
    box-shadow: 0 24px 56px #1d0b0620;
  }

  .audience__photo {
    max-width: 44rem;
    height: min(34rem, 32vw);
  }

  .split__img {
    max-height: 40rem;
  }

  .closing__phrase {
    max-width: 48rem;
  }
}

@media (min-width: 2560px) and (min-aspect-ratio: 21/9) {
  .wrap {
    width: min(100%, var(--layout-wide));
  }
}
