/* ==========================================================================
   base.css — токены, reset, типографика, общие классы (по контракту проекта)
   ========================================================================== */

/* ---------- Токены ---------- */
:root {
  /* Палитра */
  --c-dark: #091e25;
  --c-dark-soft: #2a3b45;
  --c-text: #011f27;
  --c-bg: #f0dcc5;
  --c-line: #bfb099;
  --c-accent: #c43a1e;
  --c-secondary: #1c3d52;
  --c-btn-gray: #415358;
  --c-photo-stub: #d9d9d9;

  /* Бордеры */
  --border-on-dark: rgba(255, 255, 255, 0.2);
  --border-on-light: rgba(9, 30, 37, 0.3);

  /* Прозрачности */
  --o-label: 0.7;
  --o-inactive: 0.5;
  --o-disabled: 0.4;
  --o-readmore: 0.6;

  /* Шрифты */
  --font-display: 'Cochin LT', 'Cormorant Garamond', serif;
  --font-text: 'Inter Tight', Arial, sans-serif;

  /* Радиусы */
  --r-4: 4px;
  --r-8: 8px;
  --r-12: 12px;
  --r-16: 16px;
  --r-24: 24px;

  /* Сетка */
  --container: 1920px;
  --gutter: 40px;

  /* Базовый gap карточек */
  --gap: 16px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
ul, ol {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

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

table {
  border-collapse: collapse;
}

/* ---------- Базовая типографика ---------- */
body {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 24px;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}

/* ---------- Сетка ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Общие классы
   ========================================================================== */

/* ---------- Иконка (инлайн svg) ---------- */
.icon {
  display: inline-block;
  fill: currentColor;
  stroke: currentColor;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ---------- Кнопка ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 56px;
  padding: 8px 24px;
  border-radius: var(--r-8);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 24px;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn .icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.btn--primary {
  background-color: var(--c-accent);
}
.btn--primary:hover {
  opacity: 0.92;
}

.btn--dark {
  background-color: var(--c-dark);
}
.btn--dark:hover {
  opacity: 0.92;
}

.btn--light {
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid #fff;
  color: var(--c-text);
  opacity: 0.8;
}
.btn--light:hover {
  background-color: rgba(255, 255, 255, 0.55);
}

/* Вторичная на тёмном (rgba .2 + белый бордер + белый текст, как «Подробнее») */
.btn--ghost {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid #fff;
  color: #fff;
}
.btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Малые кнопки (h40, текст 14/20, padding 8/16) — «Все партнеры», «Все новости» */
.btn--sm {
  height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 20px;
}

.btn--gray {
  background-color: var(--c-btn-gray);
}
.btn--gray:hover {
  opacity: 0.92;
}

/* ---------- Лейбл секции «—◆— Текст» ----------
   Тире-ромб — accent (#c43a1e); текст — c-secondary, opacity .7.
   На тёмном фоне (--light) текст белый, тире остаётся accent. */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.section-label__dash {
  width: 68px;
  height: 12px;
  color: var(--c-accent);
  fill: currentColor;
  flex-shrink: 0;
}

.section-label__text {
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 28px;
  color: var(--c-secondary);
  opacity: var(--o-label);
}

.section-label--light .section-label__text {
  color: #fff;
}

/* ---------- Стрелки слайдера ---------- */
.slider-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.slider-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #fff;
  border-radius: var(--r-4);
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.slider-nav__btn:not([disabled]):hover {
  background: rgba(255, 255, 255, 0.55);
}

.slider-nav__btn .icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s ease;
}

.slider-nav__btn:not([disabled]):hover .icon {
  transform: translateX(2px);
}

.slider-nav__btn--prev .icon {
  transform: scaleX(-1);
}

.slider-nav__btn--prev:not([disabled]):hover .icon {
  transform: scaleX(-1) translateX(2px);
}

.slider-nav__btn[disabled] {
  opacity: var(--o-disabled);
  cursor: default;
}

/* Малые стрелки */
.slider-nav--sm .slider-nav__btn {
  width: 24px;
  height: 24px;
}
.slider-nav--sm .slider-nav__btn .icon {
  width: 14px;
  height: 14px;
}

/* Белые стрелки на тёмном */
.slider-nav--light .slider-nav__btn {
  border-color: var(--border-on-dark);
  color: #fff;
}

/* ==========================================================================
   Адаптив общих классов (дискретные ступени 1440 / 768 / 360)
   ========================================================================== */

/* ---- ≤1440: лейбл секции мельче (16/24) ---- */
@media (max-width: 1919px) {
  .section-label__text {
    font-size: 16px;
    line-height: 24px;
  }
}

/* ---- ≤360: узкая мобила ---- */
@media (max-width: 767px) {
  .container {
    padding-inline: 16px;
  }

  /* Кнопки сжимаются: h40, текст 14/20, иконка 16 */
  .btn {
    height: 40px;
    /* Figma 360: все контентные кнопки px-[24px] (было 16) */
    padding: 8px 24px;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
  }
  .btn .icon {
    width: 16px;
    height: 16px;
  }

  .section-label {
    gap: 16px;
  }
  .section-label__dash {
    width: 46px;
    height: 8px;
  }
  .section-label__text {
    font-size: 14px;
    line-height: 20px;
  }
  /* Часть секций на 360 имеет сабтайтл мельче — 12/16 (Figma: about/events/news/photobank — нода h16; greetings/participate/partnership/partners — h20, остаются 14/20). */
  .s-about .section-label__text,
  .s-events .section-label__text,
  .s-news .section-label__text,
  .s-photobank .section-label__text {
    font-size: 12px;
    line-height: 16px;
  }
}
