:root {
  --bg-page: #000000;
  --topbar-bg: #f9f7f6;
  --text-dark: #222222;

  --container: 1200px;
  --x-pad: 24px;

  --logo-size: clamp(48px, 9vw, 100px);

  --brand-size: clamp(20px, 3.3vw, 40px);
  --brand-line: 1.1;

  --subbrand-size: clamp(11px, 1.4vw, 16px);
  --subbrand-color: #5a5a5a;

  --topbar-y: clamp(8px, 1.5vw, 16px);
  --topbar-h: 0px;             /* выставляется из JS */

  /* геометрия «куба» в чипсе */
  --cube-z: 36px;              /* толщина (увеличь для более явного объёма) */
  --cube-perspective: 600px;   /* глубина перспективы (меньше = сильнее эффект) */
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  background: var(--bg-page);
  color: #fff;
  
}

/* ===== Шапка ===== */
.topbar {
  width: 100%;
  background: var(--topbar-bg);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--topbar-y) var(--x-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar .container {
  max-width: none;
  margin: 0;
  padding-left: clamp(8px, 8vw, 140px);
  padding-right: clamp(16px, 12vw, 300px);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  text-decoration: none;
  color: var(--text-dark);
}
.logo img {
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: contain;
  display: block;
}
.logo-text { display: grid; gap: 4px; min-width: 0; }
.brand {
  color: var(--text-dark);
  font-weight: 700;
  font-size: var(--brand-size);
  line-height: var(--brand-line);
  white-space: nowrap;
}
.subbrand {
  font-size: var(--subbrand-size);
  color: var(--subbrand-color);
  line-height: 1.2;
  white-space: nowrap;
}
.menu-btn {
  font-size: clamp(22px, 2.8vw, 26px);
  background: transparent;
  border: none;
  color: #111;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}
.menu-btn:active { transform: scale(0.98); }

/* ===== Hero ===== */
.hero {
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  align-items: stretch;
  background: #000;
  overflow: hidden;
}
.hero-container {
  width: 100%;
  padding-left: 140px;
  padding-right: 300px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(711px, 820px) 1fr;
  align-items: center;
  gap: 4px;
  height: 100%;
}

/* Левая колонка */
.hero-content { max-width: 980px; margin-top: 0; }  /* было -100px — убрал */
.hero-title {
  margin: 70px 0 32px 0;   /* уменьшаем нижний отступ */
  font-weight: 700;
  font-size: 66px;
  line-height: 66px;
  color: #FFFEFE;
  position: relative;
}

.hero-title::after {
  content: "";
  display: block;
  width: clamp(280px, 55vw, 787px); /* адаптивная длина */
  height: 3px;
  margin-top: 24px;
  background: #fff;
  border-radius: 2px;
}


.hero-subtitle {
  margin: 32px 0 40px 0;   /* смещаем подзаголовок ниже линии */
  font-weight: 400;
  font-size: 20px;
  line-height: 25px;
  color: #D9D3D3;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  margin-top: 32px;
}

/* ===== CHIP: «крутится» вся плашка ===== */

/* ===== CHIP: «перелистывание как карты» ===== */

/* Внешняя оболочка чипса — габарит и сцена */
.hero-chip {
  width: 420px;
  max-width: 100%;
  min-height: 72px;
  position: relative;
}

/* Слой для анимируемых «карт» */
.chip-stage {
  position: relative;
  width: 100%;
  min-height: 72px;
}

/* Одна "карта" (плашка с текстом) */
.chip-card {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 14px 20px;
  border-radius: 12px;

  background: linear-gradient(180deg, #1B1B1B 0%, #121212 100%);
  border: 1px solid #2B2B2B;
  box-shadow:
    0 8px 18px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.05);

  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  text-align: center;
  font-size: 16px;
  line-height: 1.25;

  /* анимация перемещения/проявления */
  transition:
    transform 420ms cubic-bezier(.22,.75,.25,1),
    opacity   420ms ease,
    box-shadow 420ms ease;
  will-change: transform, opacity;
}

/* начальные/конечные состояния для перелистывания */
.chip-card.enter-from {
  transform: translateX(110%) scale(.98);
  opacity: 0;
  z-index: 3;
}
.chip-card.enter-to {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 3;
}

.chip-card.leave-from {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 2;
}
.chip-card.leave-to {
  transform: translateX(-110%) scale(.98);
  opacity: 0;
  z-index: 2;
}

/* карта, ожидающая своей очереди (на заднем плане) */
.chip-card.idle {
  transform: translateX(6%) scale(.985);
  opacity: .0;                 /* не видно, но занимает положение справа */
  z-index: 1;
}

/* мобильная подстройка */
@media (max-width: 560px) {
  .hero-chip { min-height: 64px; }
  .chip-stage { min-height: 64px; }
  .chip-card  { font-size: 15px; padding: 12px 16px; }
}


/* ===== Статичные чипсы (без анимации) ===== */
.hero-chips{
  max-width: clamp(520px, 56vw, 760px);
  margin-top: 18px;
}

.chip-list{
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr)); /* 2 колонки по месту */
  gap: 14px 16px;                                      /* вертикаль / горизонталь */
  margin: 0;
  padding: 0;
  list-style: none;
}



.chip{
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 54px;               /* одинаковая высота строки */
  padding: 12px 18px;

  border-radius: 12px;
  background: linear-gradient(180deg, #1B1B1B 0%, #121212 100%);
  border: 1px solid #2B2B2B;
  box-shadow:
    0 8px 18px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.05);

  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 15px;
  line-height: 1.25;

  text-align: center;
  white-space: normal;             /* можно в 2 строки */
  word-break: break-word;
}

/* если строка не влезает — разрешаем перенос внутри, но красиво */
@supports (overflow-wrap: anywhere) {
  .chip { overflow-wrap: anywhere; white-space: normal; }
}

/* Адаптив под мобилку */
@media (max-width: 768px) {
  .hero-chips { max-width: 100%; }
  .chip-list { gap: 10px; justify-content: center; }
  .chip { font-size: 14px; padding: 10px 14px; }
}






/* ===== Кнопка ===== */
.btn {
  display: inline-block;
  padding: 16px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.btn-light {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 20px;
  padding: 16px 42px;
  height: 56px;

  border-radius: 12px;
  border: 1px solid rgba(233, 5, 5, 0.15);          /* тонкая обводка */
  color: #111111;                                 /* тёмный текст */
  background: rgba(255, 255, 255, 0.9);           /* белая база */

  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);

  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.15),              /* внешняя тень */
    inset 0 1px 0 rgba(255, 255, 255, 0.6),      /* верхний блик */
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);          /* нижняя грань */

  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;

  text-decoration: none;
  letter-spacing: .02em;
  transition:
    transform .15s ease,
    box-shadow .25s ease,
    background .25s ease,
    border-color .25s ease;
  overflow: hidden;
}


.btn-light::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(120% 120% at 0% 0%,
      rgba(255,255,255,0.6) 0%,
      rgba(250, 247, 247, 0.404) 40%,
      transparent 70%);
  transform: translate(-10%, -10%);
  transition: transform .6s ease;
  pointer-events: none;
}



/* Блик раз в 4 секунды */
.btn-light::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%; /* начинаем за пределами */
  width: 120%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(240, 55, 55, 0.6) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;

  animation: shine 4s infinite; /* каждые 4 секунды */
}

@keyframes shine {
  0%   { left: -150%; opacity: 0; }
  10%  { left: -50%;  opacity: 1; }
  20%  { left: 150%;  opacity: 1; }
  100% { left: 150%;  opacity: 1; }
}



.btn-light:hover {
  background: rgba(255, 255, 255, 1);            /* ярко-белая */
  border-color: rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
  box-shadow:
    0 12px 24px rgb(0, 0, 0),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 0, 0, 0.08);
}


.btn-light:hover::before {
  transform: translate(5%, 5%) rotate(0.0001deg); /* сдвиг блика при ховере */
}

.btn-light:active {
  transform: translateY(0);
  box-shadow:
    0 6px 12px rgb(0, 0, 0),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* доступность: фокус-обводка */
.btn-light:focus-visible {
  outline: 2px solid rgba(247, 10, 10, 0.4);
  outline-offset: 3px;
}

/* Фолбэк для браузеров без backdrop-filter */
@supports not ((backdrop-filter: blur(10px))) {
  .btn-light {
    background: rgba(255, 255, 255, 0.16);
  }
}

/* ===== Правая колонка ===== */
.hero-image {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 1;
}


.hero-image img {
  height: 100%;
  width: auto;
  object-fit: cover;
  transform: translateX(15%);
}

/* базовый стиль "световых пятен" */
.abs {
  position: absolute;
  width: 70px;     /* подгони под размер кубика */
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle,
              rgba(255,255,255,0.85) 0%,
              rgba(255,255,255,0.5) 40%,
              rgba(255,255,255,0.0) 70%);
  animation: glow 4s infinite;
  opacity: 0;
  pointer-events: none;
}

/* размещение по животу (подгони проценты вручную) */
.abs1 { top: 18%; left: 46%; animation-delay: 0s; }
.abs2 { top: 20%; left: 63%; animation-delay: .4s; }
.abs3 { top: 30%; left: 45%; animation-delay: .8s; }
.abs4 { top: 31%; left: 64%; animation-delay: 1.2s; }
.abs5 { top: 44%; left: 40%; animation-delay: 1.6s; }
.abs6 { top: 43%; left: 65%; animation-delay: 2s; }

@keyframes glow {
  0%, 100% { opacity: 0; transform: scale(0.9); filter: blur(2px); }
  40%      { opacity: 1; transform: scale(1.05); filter: blur(4px); }
  60%      { opacity: .8; transform: scale(1.0); filter: blur(3px); }
}

/* ===== Адаптив ===== */
@media (max-width: 1280px) {
  .hero-container { padding-left: 80px; padding-right: 160px; }
  .hero-image img { transform: translateX(4%); }
}

@media (max-width: 1100px) {
  .hero-container { padding-left: 48px; padding-right: 96px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-image { order: 2; justify-content: center; align-items: center; }
  .hero-image img { transform: none; max-height: 54vh; height: auto; }
  .hero-content { order: 1; text-align: left; margin-top: 0; }
  .hero-title { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; }
  .hero-subtitle { font-size: clamp(16px, 2.6vw, 20px); line-height: 1.4; }
}

@media (max-width: 768px) {
  .hero {
    position: relative;
    min-height: calc(100svh - var(--topbar-h));
  }

  .hero-container {
    min-height: inherit;
    padding: 16px 20px 24px;
  }

  .hero-grid {
    min-height: inherit;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: 18px;
  }

  /* Картинка */
  .hero-image {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 0;
    pointer-events: none;
  }
  .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    transform: none;
    max-height: none;
  }
  .hero-image .abs { display: none !important; }

  /* Контент */
  .hero-content {
    position: relative;
    z-index: 2; /* текст и кнопки поверх подложки */
    text-align: center;
    width: 100%;
    padding: 24px 16px;
  }
  .hero-content::before {
    content: "";
    position: absolute;
    inset: 0; /* подложка на весь блок контента */
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    border-radius: 16px;
    z-index: 1; /* стекло под текстом */
  }

  /* Заголовок и подзаголовок внутри подложки */
  .hero-title,
  .hero-subtitle,
  .hero-actions {
    position: relative;
    z-index: 2; /* выше стекла */
  }

  .hero-title {
    margin: 0 0 14px;
    font-size: clamp(26px, 7vw, 34px);
    line-height: 1.22;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
  }
  .hero-subtitle {
    margin: 0 0 22px;
    color: rgba(255,255,255,.92);
    font-weight: 400;
    font-size: clamp(14px, 4vw, 17px);
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
  }

  /* Чипс карточками */
  .chip-cube { display: none !important; }
  .hero-chip { width: 100%; max-width: 320px; min-height: 48px; }
  .chip-card { font-size: 14px; padding: 10px 14px; }
  .chip-card.enter-from { transform: translateX(105%) scale(.98); }
  .chip-card.leave-to   { transform: translateX(-105%) scale(.98); }

  .hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 14px;
  }

  .btn { padding: 14px 22px; }
}

/* Доступно для SEO/скринридеров, невидимо в UI */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
  clip-path: inset(50%);
}


/* === MOBILE: блок всегда помещается на 1 экран === */
@media (max-width: 768px) {
  .hero {
    position: relative;
    min-height: calc(100svh - var(--topbar-h));
    overflow: hidden;
  }

  /* фон за текстом */
  .hero-image {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: .32;
    pointer-events: none;
    z-index: 0;
  }
  .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    transform: none;
    max-height: none;
  }

  .hero-container { min-height: inherit; padding: 10px 12px 12px; }
  .hero-grid {
    min-height: inherit;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;       /* вертикально центрируем */
    gap: 10px;
  }

  /* стеклянный блок ограничиваем по высоте экрана */
  .hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    padding: 12px 12px;
    text-align: center;

    /* ключ: не позволяем блоку быть выше видимой части */
    max-height: calc(100svh - var(--topbar-h) - 20px);
    display: grid;
    grid-auto-rows: min-content; /* все секции по контенту */
    gap: 10px;
  }
  .hero-content::before{
    content:"";
    position:absolute; inset:0;
    border-radius:14px;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(6px) saturate(150%);
    -webkit-backdrop-filter: blur(6px) saturate(150%);
    z-index:1;
  }
  .hero-title,
  .hero-subtitle,
  .hero-actions { position: relative; z-index: 2; }

  /* текст компактнее */
  .hero-title{
    margin: 0;
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.14;
  }
  .hero-title::after{
    width: 60%;
    height: 2px;
    margin: 8px auto 6px;
  }
  .hero-subtitle{
    margin: 0;
    font-size: clamp(13px, 3.8vw, 15px);
    line-height: 1.45;
    color: rgba(255,255,255,.9);
  }

  /* чипсы в одну колонку и ниже по высоте */
  .hero-chips{ width: 100%; max-width: 460px; margin-top: 2px; }
  .chip-list{ grid-template-columns: 1fr; gap: 8px; }
  .chip{
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12.5px;
    border-radius: 10px;
  }

  /* кнопка помещается */
  .hero-actions{
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: 4px;
  }
  .btn{
    width: 100%;
    max-width: 280px;
    padding: 12px 16px;
    height: auto;
    font-size: 14px;
  }
}

/* доп. сжатие для низких экранов (например, 640px по высоте и ниже) */
@media (max-width: 768px) and (max-height: 640px) {
  .hero-title{ font-size: clamp(20px, 5.6vw, 26px); }
  .hero-subtitle{ font-size: 12.5px; }
  .chip{ min-height: 36px; font-size: 12px; padding: 7px 9px; }
  .btn{ max-width: 260px; padding: 10px 14px; font-size: 13.5px; }
}


.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-link {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  color: #222;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .topbar-link {
    display: none; /* если в моб версии не нужна – можно убрать эту строку */
  }
}
