/* ==========================================================================
   AWC — Affiliate World Cup × Bangkok 2026
   Лендинг по макету Figma: "Landing AWC v1.1 · Desktop 1440 / Mobile 390 · Navy & Gold"
   Токены взяты из макета (Figma variables / text styles).
   Файл: css/style.css
   ========================================================================== */

/* ---------- Токены макета ---------- */
:root {
  /* цвета */
  --navy:        #061A33;                     /* основной тёмный фон */
  --navy-card:   #0D2A4C;                     /* карточки шагов */
  --light:       #F1F3F7;                     /* светлая секция "Формат" */
  --gold:        #E2B04A;                     /* акцентный золотой */
  --muted:       #A8B6CB;                     /* вторичный текст на тёмном */
  --white:       #FFFFFF;

  /* градиент кнопок и цифр шагов */
  --gold-gradient: linear-gradient(90deg, #C69238 0%, #FDE48F 45%, #BF8932 100%);
  --gold-shadow:   0px 12px 32px -8px rgba(226, 176, 74, 0.35);

  /* радиусы */
  --radius-card:   28px;
  --radius-card-s: 20px;
  --radius-pill:   999px;

  /* сетка макета: контейнер 1440, внутри отступы 120 → контент 1200 */
  --container:     1440px;
  --container-pad: 120px;
  --stage:         1440px;   /* ширина "сцены" для фонов/фото hero и футера */

  /* вертикальные отступы секций */
  --section-pad-y: 120px;
  --gap-section:   56px;

  /* шрифты */
  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-text:    'Onest', 'Segoe UI', Arial, sans-serif;
}

/* ---------- База ---------- */
html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.4;
  overflow-x: hidden;
}

/* Контейнер макета: max-width 1440, центрирован, внутренние отступы 120 */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* переключатели версий для разного брейкпоинта */
.only-mobile { display: none; }

/* заголовок секции: Unbounded Black 64 / UPPER / ls -0.015em */
.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 64px;
  line-height: 1em;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

/* подпись под заголовком секции: Onest Medium 20 / #A8B6CB */
.section-sub {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2em;
  color: var(--muted);
}

/* шапка секции: заголовок слева, подпись справа (align flex-end) */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
}

/* ---------- Кнопки ---------- */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 72px;
  padding: 0 40px;
  border-radius: var(--radius-pill);
  background: var(--gold-gradient);
  box-shadow: var(--gold-shadow);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1em;
  white-space: nowrap;
  /* в transition должны быть ПЕРЕЧИСЛЕНЫ все анимируемые свойства,
     иначе свойство меняется скачком: box-shadow — под текстом, scale — при наведении */
  transition: box-shadow .25s ease, scale .25s ease;
}

.btn-gold:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0px 18px 40px -8px rgba(226, 176, 74, 0.55);
    scale: 1.05;
}

.btn-gold:active {
  scale: 1;                  /* при клике кнопка плавно возвращается к обычному размеру */
  box-shadow:
    inset 0 2px 6px rgba(6, 26, 51, 0.22),
    var(--gold-shadow);
}

.btn-gold__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

/* компактная кнопка в шапке (desktop) */
.btn-gold--sm {
  height: 48px;
  padding: 0 24px;
  gap: 10px;
  font-size: 14px;
}

.btn-gold--sm .btn-gold__icon { width: 18px; height: 18px; flex: 0 0 18px; }

/* кнопка в соло-строке */
.btn-gold--solo {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
}

/* ---------- Логотип ---------- */
/* шапка: вертикальный лок-ап «кубок + AWC» (img/logo.png, 48×100) */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--white);
}

.logo__img { height: 100px; width: auto; display: block; }

/* футер: горизонтальный лок-ап «кубок + AFFILIATE WORLD CUP» */
.logo--row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.logo__trophy { height: 58px; width: auto; flex: 0 0 auto; }

.logo__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.15em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

/* ---------- Переключатель языка RU / EN ---------- */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
}

.lang__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  line-height: 1em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  transition: background .2s ease, color .2s ease;
}

.lang__item:hover { color: var(--white); }

/* активный язык — белый овал с тёмным текстом (по макету) */
.lang__item.is-active {
  background: var(--white);
  color: var(--navy);
}

/* ---------- 01 · Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;                 /* минимальный зазор между шапкой и контентом на любом экране */
  min-height: 960px;
  padding: 28px 0 96px;
  background: var(--navy);
  overflow: hidden;
}

/* "сцена" 1440px: фото и оверлей не разъезжаются на широких экранах */
.hero__stage {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--stage);
  max-width: 100%;
  overflow: hidden;
  z-index: 0;
}

/* фото справа: из Figma слой "фото" 915×998 на (561; -10),
   выгруженная видимая часть 879×960 — ставим вплотную к правому краю сцены */
.hero__photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 879px;
  height: 960px;
  max-width: none;
  object-fit: cover;
  object-position: center;
  /* правый край фото мягко растворяется в фоне — «облако» вместо обрыва */
  -webkit-mask-image: linear-gradient(to right, #000 55%, rgba(0, 0, 0, 0.6) 80%, rgba(0, 0, 0, 0) 100%);
          mask-image: linear-gradient(to right, #000 55%, rgba(0, 0, 0, 0.6) 80%, rgba(0, 0, 0, 0) 100%);
}

/* градиенты поверх фото: лёгкое затемнение правой части + градиенты из макета */
.hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(270deg, rgba(6, 26, 51, 0.45) 0%, rgba(6, 26, 51, 0.22) 30%, rgba(6, 26, 51, 0) 62%),
    linear-gradient(180deg, rgba(6, 26, 51, 0.55) 0%, rgba(6, 26, 51, 0) 20%, rgba(6, 26, 51, 0) 80%, rgba(6, 26, 51, 0.9) 100%),
    linear-gradient(90deg, rgba(6, 26, 51, 1) 0%, rgba(6, 26, 51, 1) 40%, rgba(6, 26, 51, 0.55) 58%, rgba(6, 26, 51, 0.08) 78%, rgba(6, 26, 51, 0.12) 100%);
}

.hero__header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 720px;
  max-width: 100%;
}

/* плашка турнира: pill, padding 12/22/12/14, gap 16 */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  padding: 12px 22px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
}

.hero__badge-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0px 0px 10px 0px rgba(226, 176, 74, 0.8);
}

.hero__badge-label {
  font-weight: 600;
  font-size: 14px;
  line-height: 1em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.hero__badge-date {
  font-weight: 600;
  font-size: 20px;
  line-height: 1em;
  color: var(--white);
}

.hero__title {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Unbounded Black 96 / lh .96 / ls -0.02em / UPPER */
.hero__title-main {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 96px;
  line-height: 1.05em;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
}

/* Unbounded Bold 28 / #E2B04A */
.hero__title-sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1em;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Onest Regular 24 / lh 1.4 / rgba(255,255,255,.85) */
.hero__text {
  font-size: 24px;
  line-height: 1.4em;
  color: rgba(255, 255, 255, 0.85);
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-top: 12px;
}

.hero__note {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2em;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- 02 · Формат ---------- */
.format {
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
  padding: var(--section-pad-y) 0;
  background: var(--light);
  color: var(--navy);
}

.format .section-title { color: var(--navy); }

.format__cards {
  display: flex;
  align-items: stretch;
  gap: 24px;
}

/* белая карточка: padding 36, gap 16, radius 28 */
.card {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;              /* чтобы карточка не раздувалась от min-content текста */
  gap: 16px;
  padding: 36px;
  border-radius: var(--radius-card);
  background: var(--white);
}

.card__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.card__icon svg,
.card__icon img { width: 100%; height: 100%; display: block; }

/* Unbounded Black 38 / ls -0.02em / #061A33 */
.card__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 38px;
  line-height: 1em;
  letter-spacing: -0.02em;
  color: var(--navy);
}

/* Onest Medium 20 / lh 1.35 / rgba(6,26,51,.75) */
.card__text {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.35em;
  color: rgba(6, 26, 51, 0.75);
}

/* соло-строка: navy, radius 28, padding 28/36 */
.solo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 36px;
  border-radius: var(--radius-card);
  background: var(--navy);
}

/* Unbounded Bold 26 / lh 1.3 / white */
.solo__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.3em;
  color: var(--white);
}

/* ---------- 04 · Как попасть ---------- */
.how {
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
  padding: var(--section-pad-y) 0;
  background: var(--navy);
}

.how__steps {
  display: flex;
  align-items: stretch;
  gap: 24px;
}

/* карточка шага: #0D2A4C, border rgba(255,255,255,.08), radius 28, padding 36, gap 40 */
.step {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  gap: 40px;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  background: var(--navy-card);
}

/* Unbounded Black 64, заливка градиентом */
.step__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 64px;
  line-height: 1em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Onest Medium 22 / lh 1.4 / white */
.step__text {
  font-weight: 500;
  font-size: 22px;
  line-height: 1.4em;
  color: var(--white);
}

.how__cta { display: flex; justify-content: flex-start; }

/* ---------- 05 · Футер ---------- */
.footer {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 720px;
  padding: var(--section-pad-y) 0 40px;
  overflow: hidden;
  background: var(--navy);
}

/* "сцена" 1440px: фоновое фото не разъезжается на широких экранах */
.footer__stage {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--stage);
  max-width: 100%;
  overflow: hidden;
  z-index: 0;
}

.footer__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.footer__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 26, 51, 1) 0%, rgba(6, 26, 51, 0.55) 45%, rgba(6, 26, 51, 0.75) 80%, rgba(6, 26, 51, 1) 100%);
}

.footer__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
}

/* Onest SemiBold 14 / ls .14em / UPPER / #E2B04A */
.footer__label {
  font-weight: 600;
  font-size: 14px;
  line-height: 1em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Unbounded Black 60 / lh 1.05 / UPPER / центр */
.footer__date {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 60px;
  line-height: 1.1em;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-align: center;
  color: var(--white);
}

/* Onest Medium 20 / rgba(255,255,255,.7) */
.footer__sub {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2em;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* нижняя полоса: border-top 1px rgba(255,255,255,.14) */
.footer__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* ---------- Появление секций ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Адаптив
   Макет: Desktop 1440 → Mobile 390
   ========================================================================== */

/* --- ≤1360: сжимаем контейнерные отступы --- */
@media (max-width: 1360px) {
  :root {
    --container-pad: 80px;
    --section-pad-y: 96px;
  }

  .hero__photo { width: 61%; height: 100%; right: 0; top: 0; }

  .hero__title-main { font-size: 76px; }
  .section-title { font-size: 52px; }
  .footer__date { font-size: 48px; }
  .card__title { font-size: 32px; }
  .card__text { font-size: 18px; }
  .step__num { font-size: 52px; }
  .step__text { font-size: 20px; }
  .solo__text { font-size: 22px; }
}

/* --- ≤1024: планшет — карточки в 2 ряда, фото на всю ширину --- */
@media (max-width: 1024px) {
  :root {
    --container-pad: 40px;
    --section-pad-y: 64px;
    --gap-section: 40px;
  }

  body { font-size: 18px; }

  .hero {
    min-height: 620px;       /* hero не сжимается: header и контент не липнут друг к другу */
    padding: 20px 0 64px;
  }

  .hero__photo {
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
  }

  .hero__content { width: 100%; gap: 22px; }
  .hero__title-main { font-size: 56px; }
  .hero__title-sub { font-size: 22px; }
  .hero__text { font-size: 19px; }

  .format__cards,
  .how__steps { flex-wrap: wrap; }

  .card,
  .step { flex: 1 1 calc(50% - 12px); }

  .solo {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer { min-height: auto; padding: 64px 0 28px; }
  .footer__date { font-size: 40px; }
}

/* --- ≤768: мобильный макет 390 --- */
@media (max-width: 768px) {
  .only-desktop { display: none; }
  .only-mobile { display: inline; }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* hero 820px, padding 12/0/36, фото 390×560 на y=60 */
  .hero {
    min-height: 820px;
    padding: 12px 0 36px;
  }

  .hero__photo {
    top: 60px;
    left: 0;
    right: auto;
    width: 100%;
    height: 560px;
    /* на мобиле фото режется краем экрана — растворяем мягче */
    -webkit-mask-image: linear-gradient(to right, #000 68%, rgba(0, 0, 0, 0.55) 86%, rgba(0, 0, 0, 0) 100%);
            mask-image: linear-gradient(to right, #000 68%, rgba(0, 0, 0, 0.55) 86%, rgba(0, 0, 0, 0) 100%);
  }
  .hero__note{
    font-size: 13px;
  }
  /* мобильный логотип меньше */
  .logo__img { height: 48px; }
  .logo__trophy { height: 40px; }
  .logo__text { font-size: 10px; }

  /* мобильный градиент-оверлей из макета + затемнение справа */
  .hero__overlay {
    background-image:
      linear-gradient(270deg, rgba(6, 26, 51, 0.35) 0%, rgba(6, 26, 51, 0.12) 32%, rgba(6, 26, 51, 0) 62%),
      linear-gradient(180deg, rgba(6, 26, 51, 0.85) 0%, rgba(6, 26, 51, 0.1) 18%, rgba(6, 26, 51, 0.35) 45%, rgba(6, 26, 51, 1) 66%, rgba(6, 26, 51, 1) 100%);
  }

  .hero__content { gap: 18px; }
  .hero__cta { padding-top: 6px; gap: 12px; }

  /* в мобильной шапке кнопки нет — только лого и язык */
  .hero__header-btn { display: none; }
  .hero__header-right { gap: 10px; }

  .lang__item { min-width: 38px; padding: 6px 12px; font-size: 12px; }

  .hero__title-main { font-size: 44px; }
  .hero__title-sub { font-size: 19px; }
  .hero__text { font-size: 17px; }
  .hero__badge { padding: 10px 16px 10px 12px; gap: 10px; }
  /* в мобильном макете в плашке только точка + дата */
  .hero__badge-label { display: none; }
  .hero__badge-date { font-size: 16px; }

  .btn-gold { height: 60px; font-size: 16px; padding: 0 28px; }
  .btn-gold__icon { width: 20px; height: 20px; flex: 0 0 20px; }

  .card,
  .step { padding: 22px; }
  /* формат: 2 карточки в ряд (в макете 169×181 при 390) */
  .format__cards { flex-wrap: wrap; gap: 12px; }
  .card { flex: 1 1 calc(50% - 6px); min-width: 0; gap: 10px; border-radius: var(--radius-card-s); }
  .step { flex: 1 1 100%; gap: 18px; border-radius: var(--radius-card-s); flex-direction: row; align-items: flex-start; }

  .card__title { font-size: 28px; }
  .card__text { font-size: 16px; }
  .step__num { font-size: 40px; }
  .step__text { font-size: 16px; }

  .solo { padding: 22px; border-radius: var(--radius-card-s); }
  .solo__text { font-size: 18px; }

  /* футер 640px, padding 64/0/28 */
  .footer { min-height: 640px; padding: 64px 0 28px; }
  .footer__content { gap: 18px; }
  .footer__date { font-size: 32px; }
  .footer__sub { font-size: 15px; }
  .footer__label { font-size: 12px; }

  .footer__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 20px;
  }
}

/* --- ≤480: мелкие телефоны (макет Mobile 390) --- */
@media (max-width: 480px) {
  :root { --container-pad: 20px; }

  .hero { padding-top: 12px; }
  .hero__title-main { font-size: 38px; }
  .hero__cta { width: 100%; }
  .hero__cta .btn-gold { width: 100%; }

  .section-title { font-size: 34px; }

  /* заголовок карточки чуть сжимается на самых узких экранах (< 390) */
  .card__title { font-size: clamp(18px, 5.6vw, 22px); overflow-wrap: break-word; }

}
