/* ============================================================
   THE ★ BOYS — главная страница
   Тёмный кинематографичный стиль, американский вайб.
   Анимации: GSAP + ScrollTrigger + Lenis (см. js/main.js).
   ============================================================ */

:root {
  --bg: #0b0e0d;          /* почти чёрный с зелёным подтоном под лес */
  --bg-soft: #111614;
  --ink: #f2efe8;         /* тёплый белый, как старая афиша */
  --ink-dim: #9aa39d;
  --red: #e0362c;         /* американский красный */
  --red-deep: #a3221b;
  --line: rgba(242, 239, 232, .14);

  --font-display: 'Anton', 'Oswald', sans-serif;   /* THE BOYS */
  --font-head: 'Oswald', sans-serif;               /* кириллические заголовки */
  --font-body: 'Inter', sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;      /* фолбэк */
  overflow-x: clip;        /* clip не создаёт scroll-контейнер и не ломает sticky */
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.star { color: var(--red); }

/* Плёночное зерно поверх всего — кинематографичность */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 999;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ============ НАВИГАЦИЯ ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 48px);
  transition: background .4s, box-shadow .4s, padding .4s;
}
.nav.is-scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(11, 14, 13, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: .06em;
}

.nav__links {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav__links a {
  position: relative;
  padding: 4px 0;
  color: var(--ink-dim);
  transition: color .25s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Бургер */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease-out), opacity .3s;
}
body.menu-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Мобильное меню на весь экран */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 14, 13, .96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
}
body.menu-open .menu {
  opacity: 1;
  visibility: visible;
}
.menu__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.menu__links a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(28px, 7vw, 40px);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 24px;
  opacity: 0;
  transform: translateY(14px);
  transition: color .25s;
}
.menu__links a em {
  font-style: normal;
  font-size: .45em;
  color: var(--red);
  vertical-align: super;
  margin-right: 10px;
}
.menu__links a:hover { color: var(--red); }
body.menu-open .menu__links a {
  opacity: 1;
  transform: none;
  transition: opacity .5s var(--ease-out) calc(.06s * var(--i, 0) + .15s),
              transform .5s var(--ease-out) calc(.06s * var(--i, 0) + .15s),
              color .25s;
}

/* ============ ГЛАВНЫЙ ЭКРАН ============ */
/* Герой закреплён: следующая секция наезжает на него занавесом */
.hero {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -8% 0;
  z-index: -1;
  will-change: transform;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.85) brightness(.9);
  will-change: transform;
}

/* Живой туман поверх леса */
.mist {
  position: absolute;
  inset: -20% -40%;
  pointer-events: none;
  background:
    radial-gradient(42% 50% at 28% 62%, rgba(242, 239, 232, .07), transparent 70%),
    radial-gradient(36% 46% at 76% 34%, rgba(242, 239, 232, .05), transparent 70%);
  animation: mist 26s ease-in-out infinite alternate;
}
.mist--2 {
  opacity: .7;
  background: radial-gradient(46% 56% at 60% 72%, rgba(242, 239, 232, .06), transparent 70%);
  animation-duration: 38s;
  animation-delay: -14s;
}
@keyframes mist {
  from { transform: translateX(-6%); }
  to   { transform: translateX(6%); }
}

/* затемнение поверх леса, чтобы текст читался */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,14,13,.55) 0%, rgba(11,14,13,.35) 40%, rgba(11,14,13,.92) 100%),
    radial-gradient(ellipse at 50% 42%, transparent 30%, rgba(11,14,13,.5) 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 110px 20px 80px;
  width: 100%;
  will-change: transform, opacity;
}

/* Подзаголовок над названием */
.hero__kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-head);
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.hero__kicker .line {
  width: clamp(24px, 6vw, 64px);
  height: 1px;
  background: var(--line);
}

/* THE BOYS — плакатная типографика */
.hero__title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(16px, 4vw, 48px);
  margin: 10px 0 clamp(28px, 4vh, 48px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 16vw, 200px);
  line-height: .95;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.hero__title .word { display: flex; overflow: hidden; padding-bottom: .06em; }
.hero__title .word--accent .letter {
  color: var(--red);
  text-shadow: 0 0 60px rgba(224, 54, 44, .35);
}
.hero__title .letter {
  display: inline-block;
  text-shadow: 0 8px 40px rgba(0, 0, 0, .6);
  will-change: transform;
}

/* Неоновое мерцание BOYS (класс вешается после интро) */
.word--accent.is-flicker .letter { animation: flicker 7s linear infinite; }
@keyframes flicker {
  0%, 40.9%, 43.1%, 45.9%, 46.1%, 77.9%, 80.1%, 100% { opacity: 1; }
  41.5% { opacity: .55; }
  42.4% { opacity: 1; }
  45.2%, 46% { opacity: .8; }
  78.6% { opacity: .65; }
  79.3% { opacity: 1; }
}

/* Общее фото — как снимок из архива */
.hero__photo {
  width: min(680px, 88vw);
  will-change: transform;
}
.photo-frame {
  background: var(--ink);
  padding: clamp(8px, 1.4vw, 14px);
  padding-bottom: clamp(10px, 1.8vw, 18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
  overflow: hidden;
  will-change: transform, clip-path;
}
.photo-frame img { width: 100%; will-change: transform; }

.hero__photo figcaption {
  margin-top: 16px;
  font-family: var(--font-head);
  font-size: clamp(11px, 1.6vw, 14px);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* Стрелка вниз */
.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 5vh, 52px);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .3em;
  color: var(--ink-dim);
  transition: color .25s;
}
.hero__scroll:hover { color: var(--red); }
.hero__scroll svg { animation: bounce 2s infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============ КОНТЕНТ-«ЗАНАВЕС» ПОВЕРХ ГЕРОЯ ============ */
.over-hero {
  position: relative;
  z-index: 2;
  background: var(--bg);
  box-shadow: 0 -40px 90px rgba(0, 0, 0, .6);
}

/* ============ БЕГУЩАЯ СТРОКА ============ */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--red);
  color: #16100f;
  overflow: hidden;
  padding: 12px 0;
  will-change: transform;
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}
.ticker__track span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(15px, 2.2vw, 20px);
  letter-spacing: .28em;
  text-transform: uppercase;
  white-space: nowrap;
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ============ СОСТАВ ============ */
.crew {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(70px, 10vw, 130px) clamp(20px, 4vw, 48px);
  overflow: visible;
}

/* Огромный контурный текст-фон, едет при скролле */
.crew__bgtext {
  position: absolute;
  top: 4%;
  left: 0;
  z-index: -1;
  font-family: var(--font-display);
  font-size: clamp(120px, 22vw, 280px);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 239, 232, .07);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.crew__head { text-align: center; margin-bottom: clamp(40px, 6vw, 70px); }
.crew__eyebrow {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.crew__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 400;
  letter-spacing: .03em;
  margin: 8px 0 10px;
  overflow: hidden;
}
.crew__title-inner { display: inline-block; will-change: transform; }
.crew__sub { color: var(--ink-dim); font-size: 15px; }

.crew__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 24px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .3s, background .3s;
  will-change: transform, opacity;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s var(--ease-out);
}
.card:hover {
  border-color: rgba(224, 54, 44, .5);
  background: #151b18;
}
.card:hover::before { transform: scaleY(1); }

.card__num {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--red);
}
.card__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 30px);
  letter-spacing: .06em;
  line-height: 1.08;
  margin-top: 24px;
}
.card__role {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink-dim);
  margin-bottom: 26px;
}
.card__cta {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color .25s, transform .3s var(--ease-out);
}
.card:hover .card__cta {
  color: var(--ink);
  transform: translateX(6px);
}

/* ============ ПОДВАЛ — by Polina for my girls ============ */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(46px, 7vw, 84px) 20px clamp(32px, 4vw, 52px);
  background:
    radial-gradient(60% 90% at 50% 100%, rgba(224, 54, 44, .07), transparent 70%),
    var(--bg);
  border-top: 1px solid var(--line);
}
.footer__deco {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
}
.footer__deco .line { width: clamp(46px, 11vw, 120px); height: 1px; background: var(--line); }
.footer__deco .star { font-size: 15px; }
.footer__script {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(46px, 8vw, 68px);
  line-height: 1.1;
  color: var(--ink);
  text-shadow: 0 6px 30px rgba(0, 0, 0, .5);
}
.footer__for {
  margin-top: 4px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(12px, 1.7vw, 15px);
  letter-spacing: .44em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.footer__for .heart {
  color: var(--red);
  display: inline-block;
  animation: heart-beat 1.8s infinite;
}
@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(1.3); }
  20% { transform: scale(1); }
  30% { transform: scale(1.18); }
  40% { transform: scale(1); }
}
.footer__brand {
  margin-top: 30px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--ink-dim);
}

/* ============ ПРЕЛОАДЕР ============ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: transform .75s cubic-bezier(.7, 0, .2, 1);
}
.preloader.is-done { transform: translateY(-101%); }
.preloader__logo {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: .08em;
  color: var(--ink);
}
.preloader__logo .star {
  display: inline-block;
  animation: pre-star 1.3s ease-in-out infinite;
}
@keyframes pre-star {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.35) rotate(72deg); }
}
.preloader__bar {
  width: min(240px, 60vw);
  height: 2px;
  background: rgba(242, 239, 232, .12);
  overflow: hidden;
}
.preloader__bar i {
  display: block;
  height: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
}
.preloader__pct {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .34em;
  color: var(--ink-dim);
}

/* ============ ШТОРКА-ПЕРЕХОД МЕЖДУ СТРАНИЦАМИ ============ */
.pt__panel {
  position: fixed;
  top: -10%;
  bottom: -10%;
  left: -20%;
  width: 140%;
  z-index: 3000;
  background: linear-gradient(90deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-right: 4px solid var(--red);
  transform: translateX(-115%) skewX(-8deg);
  pointer-events: none;
}
.pt__logo {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 3001;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: .08em;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
}
.pt__logo span { color: var(--red); }
/* уход со страницы: панель наезжает слева */
html.pt-cover-anim .pt__panel {
  transition: transform .55s cubic-bezier(.7, 0, .2, 1);
  transform: translateX(0) skewX(-8deg);
}
html.pt-cover-anim .pt__logo { transition: opacity .3s ease .22s; opacity: 1; }
/* приход на страницу: панель уже закрыта, уезжает вправо */
html.pt-cover .pt__panel { transform: translateX(0) skewX(-8deg); }
html.pt-cover .pt__logo { opacity: 1; }
html.pt-reveal .pt__panel {
  transition: transform .65s cubic-bezier(.7, 0, .2, 1) .05s;
  transform: translateX(115%) skewX(-8deg);
}
html.pt-reveal .pt__logo { transition: opacity .25s; opacity: 0; }

/* ============ СТАРТОВЫЕ СОСТОЯНИЯ ДЛЯ GSAP-ИНТРО ============
   Действуют только когда JS доступен и движение не отключено.
   GSAP доводит эти значения до финальных. */
@media (prefers-reduced-motion: no-preference) {
  .has-js .nav { opacity: 0; transform: translateY(-16px); }
  .has-js .hero__kicker { opacity: 0; }
  .has-js .hero__title .letter { transform: translateY(115%) skewY(8deg); }
  .has-js .hero__bg img { transform: scale(1.12); }
  .has-js .photo-frame { clip-path: inset(0% 0% 100% 0%); }
  .has-js .photo-frame img { transform: scale(1.15); }
  .has-js .hero__photo { transform: translateY(46px); }
  .has-js .hero__photo figcaption { opacity: 0; }
  .has-js .hero__scroll { opacity: 0; }
  .has-js .card { opacity: 0; transform: translateY(44px); }
  .has-js .crew__title-inner { transform: translateY(112%); }
  .has-js .crew__eyebrow,
  .has-js .crew__sub { opacity: 0; }
}

/* ============ АДАПТИВ ============ */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; border-color: rgba(242, 239, 232, .3); }
}
@media (max-width: 520px) {
  .hero__photo figcaption {
    font-size: 10px;
    letter-spacing: .12em;
  }
  .hero__kicker { letter-spacing: .24em; }
}

/* Уважение к настройке «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-delay: 0s !important;
    transition-duration: .001s !important;
    transition-delay: 0s !important;
  }
  html { scroll-behavior: auto; }
  .grain, .mist { animation: none; }
  .hero { position: relative; }
}
