/* ==========================================================================
   main.css — базовые стили, reset, типографика, контейнеры, секции
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

/* Видимая обводка фокуса для доступности */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----- Типографика ------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(36px, 6vw, 80px); }
h2 { font-size: clamp(28px, 4vw, 48px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); letter-spacing: 0.03em; }
h4 { font-size: 18px; letter-spacing: 0.02em; }

p {
  margin: 0 0 1em;
}

/* ----- Контейнер --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad-mobile);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ----- Секции ------------------------------------------------------------ */
.section {
  padding-block: var(--section-pad-y-mobile);
  position: relative;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section__title {
  position: relative;
  margin-bottom: 24px;
}

.section__title::after {
  content: '';
  display: block;
  width: 56px;
  height: 2px;
  background: var(--gradient-gold);
  margin-top: 16px;
  border-radius: 2px;
}

.section__lead {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 40px;
  line-height: 1.65;
}

/* ----- Скрытие визуальное, но доступно для скринридеров ------------------ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Скроллбары (опционально, премиум-ощущение) ----------------------- */
::selection {
  background: var(--accent);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}
