/* ==========================================================================
   DaIGR — основные стили лендинга
   Сетка: фиксированная шапка + якорные секции на одной странице
   ========================================================================== */

/* --- Базовые настройки и переменные --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Фирменные цвета (как на оригинальном daigr.ru) */
  --color-green: #2abf31;
  --color-green-dark: #0bb519;
  --color-green-bright: #03cd15;
  --color-accent: #02e429;
  --color-dark: #212121;
  --color-dark-2: #1f1f1f;
  --color-muted: #727272;
  --color-white: #fff;
  --container: 1200px;
  --header-h: 90px;
  --font: "Roboto", Arial, sans-serif;
  --font-nav: Arial, sans-serif; /* в меню — Arial, не Roboto */
}

html {
  scroll-behavior: smooth;
  /* Якорные ссылки не прячутся под фиксированной шапкой */
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  color: #000;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  opacity: 0.85;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow {
  max-width: 900px;
}

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 30px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.btn--primary {
  background: var(--color-green-dark);
  color: #000;
}

.btn--primary:hover {
  color: var(--color-white);
  opacity: 1;
}

/* --- Шапка: лого | меню | соцсети + CTA --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(33, 33, 33, 0.95);
  color: var(--color-white);
}

.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: var(--header-h);
  padding: 0 40px;
  gap: 20px;
}

.header__logo {
  flex-shrink: 0;
}

.header__logo img {
  width: 60px;
  height: 60px;
}

.header__nav {
  justify-self: center;
  min-width: 0;
}

.header__menu {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__menu a {
  text-transform: uppercase;
  font-family: var(--font-nav);
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.3s;
}

.header__menu a:hover,
.header__menu a.is-active {
  color: var(--color-green);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.header__social {
  display: flex;
  gap: 6px;
}

.header__social a {
  color: var(--color-white);
  display: flex;
}

.header__social svg {
  width: 30px;
  height: 30px;
}

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.header__burger span {
  display: block;
  height: 2px;
  background: var(--color-white);
  border-radius: 1px;
}

/* --- Hero-блоки: главный экран и призыв к действию --- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-dark);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--color-white);
  text-align: center;
}

/* Главный экран на всю высоту viewport; фон задаётся inline в HTML */
.hero--main {
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  background-position: center center;
  background-size: cover;
  overflow: hidden;
}

.hero--main .hero__content {
  padding-top: calc(var(--header-h) + 20px);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.hero__overlay--warm {
  background: linear-gradient(rgba(117, 108, 55, 0.2), rgba(66, 43, 22, 0.2));
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 40px 20px 60px;
}

.hero__title {
  margin: 0 0 24px;
  font-family: var(--font);
  font-size: clamp(42px, 5vw, 60px);
  font-weight: 600;
  line-height: 1.17;
}

.hero__title--cta {
  font-weight: 600;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 2px 80px rgba(0, 0, 0, 0.9);
}

.hero__text {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 300;
  line-height: 1.5;
  max-width: 800px;
  margin-inline: auto;
}

.hero--cta {
  min-height: 50vh;
}

.hero__scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  animation: bounce 2s infinite;
  z-index: 1;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* --- Секции страницы (отступы подобраны под оригинал Tilda) --- */
.section {
  padding: 80px 0;
}

.section--intro {
  padding-top: 105px;
  background: var(--color-white);
}

.section--slider {
  padding: 30px 0 60px;
}

.section--stats {
  padding: 105px 0 90px;
}

.section--gallery {
  padding: 120px 0 0;
}

.section--activities {
  padding: 45px 0 210px;
}

.section--join {
  padding: 135px 0 90px;
}

.section--team {
  padding: 60px 0 45px;
  background: var(--color-dark-2);
  color: var(--color-white);
}

.section__title {
  margin: 0 0 20px;
  font-family: var(--font);
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.23;
  text-transform: uppercase;
}

.section__title--center {
  text-align: center;
}
.section__title--green {
  color: var(--color-green-bright);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.23;
  text-transform: none;
}
.section__title--light {
  color: var(--color-white);
}

.section__subtitle {
  margin: 0 0 40px;
  font-family: var(--font);
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
}

.section__subtitle--center {
  text-align: center;
}
.section__subtitle--muted {
  color: var(--color-muted);
}
.section__subtitle--light {
  color: #fff8f8;
}

.lead {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 300;
  line-height: 1.45;
  text-align: center;
}

/* --- Слайдер фото команды --- */
.slider {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.slider__viewport {
  overflow: hidden;
  border-radius: 4px;
  width: 100%;
}

.slider__track {
  display: flex;
  transition: transform 0.3s ease;
  will-change: transform;
}

.slider__slide {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider__slide img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 2px;
  background: rgba(232, 232, 232, 1);
  color: #000;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}

.slider__arrow--prev {
  left: -56px;
}
.slider__arrow--next {
  right: -56px;
}

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #c7c7c7;
  cursor: pointer;
}

.slider__dot.is-active,
.slider__dot:hover {
  background: #222;
}

/* --- Блок «Мы — команда»: цифры и факты --- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 20px;
}

.stats__number {
  font-family: var(--font);
  font-size: 44px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-green);
  margin-bottom: 8px;
}

.stats__label {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.55;
}

/* --- Галерея: сетка 4×2, клик открывает лайтбокс --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.gallery__item {
  aspect-ratio: 1;
  border: none;
  padding: 0;
  cursor: pointer;
  background: center / cover no-repeat;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.gallery__item:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* --- Блок «А ещё…»: список активностей --- */
.activities {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activities__item {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.activities__item:last-child {
  margin-bottom: 0;
}

.activities__icon {
  flex-shrink: 0;
  width: 55px;
  height: 55px;
}

.activities__title {
  margin: 0 0 8px;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.activities__text {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
  color: #333;
}

/* --- Наставники: карточки с фото и контактами --- */
.team {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 40px;
}

.team__card {
  text-align: center;
}

.team__photo {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  border-radius: 50%;
  object-fit: cover;
}

.team__name {
  margin: 0 0 12px;
  font-family: var(--font);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.17;
  color: var(--color-accent);
}

.team__info {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
}

.team__info strong {
  font-weight: 700;
}

.team__info a {
  text-decoration: underline;
}

/* --- Лайтбокс: полноэкранный просмотр фото галереи --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  padding: 20px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  border: none;
  background: none;
  color: var(--color-white);
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 22px;
  cursor: pointer;
  z-index: 1;
  transition: background 0.2s;
}

.lightbox__arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox__arrow--prev {
  left: 20px;
}
.lightbox__arrow--next {
  right: 20px;
}

/* --- Адаптив: планшет и мобильные --- */
@media (max-width: 1200px) {
  .header__inner {
    padding: 0 24px;
  }
  .header__menu {
    gap: 0 16px;
  }
  .header__menu a {
    font-size: 14px;
  }
}

@media (max-width: 1100px) {
  .slider__arrow--prev {
    left: 8px;
  }
  .slider__arrow--next {
    right: 8px;
  }
}

@media (max-width: 980px) {
  .header__inner {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
  }

  .header__burger {
    display: flex;
  }

  /* Выпадающее меню под шапкой */
  .header__nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    justify-self: auto;
    background: rgba(33, 33, 33, 0.98);
    padding: 20px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.3s,
      opacity 0.3s;
  }

  .header__nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header__menu {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .header__actions {
    margin-left: auto;
    gap: 10px;
  }

  .header__social {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .team {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }
}

@media (max-width: 600px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 60px 0;
  }
  .section--activities {
    padding-bottom: 100px;
  }
}

/* Адаптив для блока */
@media (max-width: 600px) {
  .section--join-telegram {
    padding: 60px 0 80px;
  }

  .join-telegram {
    padding: 30px 20px;
  }

  .join-telegram__btn {
    width: 100%;
    padding: 0 20px;
    font-size: 15px;
  }
}
