/* Starfield canvas layer */
.hero__starfield {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero__starfield canvas {
  display: block;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.hero {
  position: relative;
  padding-top: calc(74px + clamp(50px, 8vw, 100px));
  padding-bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas:
    "kicker  stage"
    "title   stage"
    "lede    stage"
    "ctas    stage"
    "marquee marquee";
  column-gap: clamp(24px, 5vw, 80px);
  row-gap: 28px;
  align-items: start;
}

/* All direct content children sit above the starfield canvas */
.hero__kicker,
.hero__title,
.hero__lede,
.hero__ctas,
.hero__meta,
.hero__stage {
  position: relative;
  z-index: 1;
}

.hero__kicker {
  grid-area: kicker;
  display: inline-flex; align-items: center; gap: 10px;
  align-self: start;
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--c-text-3);
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--c-line);
  width: max-content;
}
.hero__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 4px oklch(0.505 0.293 285.7 / .18);
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px oklch(0.505 0.293 285.7 / .18); }
  50%     { box-shadow: 0 0 0 8px oklch(0.505 0.293 285.7 / .06); }
}

.hero__title {
  grid-area: title;
  font-size: clamp(48px, 7.2vw, 108px);
  line-height: .96;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--c-text);
}
.hero__line { display: block; }
.hero__thin { color: var(--c-text-3); font-weight: 300; }

.hero__lede {
  grid-area: lede;
  max-width: 52ch;
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--c-text-2);
  line-height: 1.55;
}
.hero__ctas {
  grid-area: ctas;
  display: inline-flex; gap: 12px; flex-wrap: wrap;
}
.hero__meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px;
  margin-top: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--c-line);
  max-width: 560px;
}
.hero__meta li { display: flex; flex-direction: column; gap: 4px; }
.hero__meta strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--c-text); }
.hero__meta span   { font-size: 12px; color: var(--c-text-3); letter-spacing: .02em; }

/* ===== STAGE (переосмыслено) =====
   Внутренняя grid-сетка 12×12 резервирует места для:
   - большого архивного листа (sheet) с Before/After — колонки 1..12, ряды 1..9
   - полароид-карточки со сценой — колонки 3..8, ряды 8..12 (частично под sheet — это осознанное наложение)
   - двух маленьких заметок — в явно выделенных зонах, вне фото
*/
.hero__stage {
  grid-area: stage;
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 1fr);
  aspect-ratio: 4/5;
  min-height: 560px;
  gap: 0;
}


/* Sheet: живой Before/After архивного портрета */
.hero__sheet {
  position: relative;
  grid-column: 1 / 11;
  grid-row: 1 / 10;
  border-radius: 22px;
  background: #20202000;
  border: 0px solid var(--c-line-2);
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 12px;
  transform: rotate(-1.2deg);
  transform-origin: top left;
}
.hero__sheet-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.hero__sheet-year  { color: var(--c-text-2); }
.hero__sheet-label { color: var(--c-accent); }

.cmp--hero-inline {
  flex: 1;
  border-radius: 14px;
  aspect-ratio: auto;
}

/* Полароид-сцена — осознанно лежит поверх нижнего правого угла листа,
   но строго смещена в правый нижний квадрант, без конфликтов с бейджами */
.hero__polaroid {
  position: relative;
  grid-column: 7 / 13;
  grid-row: 8 / 13;
  align-self: end;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--c-line-2);
  background: var(--c-panel);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
  transform: rotate(3deg);
  transition: transform .5s var(--ease);
  z-index: 2;
}
.hero__polaroid img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 3/4;
  filter: saturate(.95) contrast(1.02);
}
.hero__polaroid figcaption {
  position: absolute; left: 12px; bottom: 10px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em;
  color: #fff; text-transform: uppercase;
  padding: 5px 10px; background: rgba(0,0,0,.6);
  border-radius: 999px; backdrop-filter: blur(6px);
}

@media (hover: hover) {
  .hero__stage:hover .hero__sheet    { transform: rotate(-1.8deg); }
  .hero__stage:hover .hero__polaroid { transform: rotate(4deg) translateY(-4px); }
}

/* Заметки/бейджи — в явных зонах, НЕ поверх ключевых элементов */
.hero__note {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(14,14,20,.82);
  border: 1px solid var(--c-line-2);
  color: var(--c-text);
  font-size: 12px;
  backdrop-filter: blur(8px);
  width: max-content; white-space: nowrap;
  z-index: 3;
}
.hero__note svg { color: var(--c-accent); }
/* "лицо сохранено" — прилипает к правому верхнему углу листа */
.hero__note--a {
  grid-column: 9 / 13;
  grid-row: 1 / 2;
  align-self: start;
  justify-self: end;
  transform: translate(8px, -14px);
}
/* "4K · без водяных знаков" — живёт в левой колонке, под листом, свободное место */
.hero__note--b {
  grid-column: 1 / 7;
  grid-row: 11 / 13;
  align-self: end;
  justify-self: start;
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kicker"
      "title"
      "stage"
      "lede"
      "ctas"
      "marquee";
  }
  .hero__title { font-size: clamp(32px, 12vw, 72px); }
  .hero__stage {
    min-height: unset;
    aspect-ratio: 1/1;
    margin: 12px 0;
  }
  .hero__note--a { transform: translate(0, -10px); }
  .hero__sheet { transform: rotate(-0.8deg); transform-origin: top center; }
  .hero__polaroid {
    grid-column: 7 / 13;
    transform: rotate(2deg);
    transform-origin: bottom right;
  }
}
@media (max-width: 640px) {
  .hero__meta { grid-template-columns: 1fr 1fr; }
  .hero__meta li:last-child { grid-column: 1 / -1; }
  .hero__stage { aspect-ratio: 4/5; }
  .hero__polaroid {
    grid-column: 7 / 13;
    transform: rotate(1.5deg);
    transform-origin: bottom right;
  }
  .hero__note--a { font-size: 11px; padding: 6px 10px; transform: translate(0, -10px); }
  .hero__note--b { font-size: 11px; padding: 6px 10px; }
  .hero__sheet { transform: rotate(-0.5deg); transform-origin: top center; }
}
@media (max-width: 435px) {
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn { width: 100%; justify-content: center; }
}
