/* ===========================================
   BASE — Шрифты, сброс, контейнер, утилиты
   =========================================== */

/* ─── Font Faces ─── */
@font-face {
  font-family: 'Involve';
  src: url('../assets/fonts/Involve-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Involve';
  src: url('../assets/fonts/Involve-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Involve';
  src: url('../assets/fonts/Involve-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Involve';
  src: url('../assets/fonts/Involve-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Coolvetica';
  src: url('../assets/fonts/coolvetica.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ─── Reset ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  zoom: 1.25;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* На мобиле/планшете zoom отключён: на Android он ломает hit-testing
   (тапы по fixed-шапке не срабатывают) и размывает transform-анимации
   (drawer). Компенсации /1.25 в hero перекрываются в responsive.css. */
@media (max-width: 1024px) {
  html { zoom: 1; }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--slate);
  background: linear-gradient(105deg, #b6bfc9 0%, #e2e6ed 30%, #ebeef2 50%, #e2e6ed 70%, #b9c2cc 100%) fixed;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--t-fast) var(--ease-out);
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

ul, ol { list-style: none; }

/* ─── Container ─── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}

/* ─── Section ─── */
.section {
  padding: var(--sp-16) 0;
  position: relative;
}

.section--alt {
  background: transparent;
}

.section__header {
  margin-bottom: var(--sp-12);
}

.section__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-3xl);
  color: var(--slate);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section__subtitle {
  font-size: var(--text-base);
  color: var(--slate-pale);
  margin-top: var(--sp-2);
}

/* Якорная прокрутка к секции: отступ под fixed-шапку */
#programs { scroll-margin-top: 110px; }

/* ─── Tricolor ribbon (RF flag accent) ─── */
.tricolor {
  display: flex;
  height: 3px;
  width: 100%;
  position: relative;
  z-index: var(--z-sticky);
  flex-shrink: 0;
}

.tricolor span { flex: 1; }
.tricolor__white { background: #fff; }
.tricolor__blue { background: #0039A6; }
.tricolor__red { background: #D52B1E; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--snow); }
::-webkit-scrollbar-thumb { background: var(--lavender); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-pale); }

::selection {
  background: var(--cyan);
  color: var(--white);
}

/* ─── Reveal classes (applied by IntersectionObserver) ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--t-slow) var(--ease-smooth),
              transform var(--t-slow) var(--ease-smooth);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--t-slow) var(--ease-smooth),
              transform var(--t-slow) var(--ease-smooth);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--t-slow) var(--ease-smooth),
              transform var(--t-slow) var(--ease-smooth);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ─── Stagger children ─── */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 80ms; }
.stagger > *:nth-child(3) { transition-delay: 160ms; }
.stagger > *:nth-child(4) { transition-delay: 240ms; }
.stagger > *:nth-child(5) { transition-delay: 320ms; }
.stagger > *:nth-child(6) { transition-delay: 400ms; }
.stagger > *:nth-child(7) { transition-delay: 480ms; }
.stagger > *:nth-child(8) { transition-delay: 560ms; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
