/* ==========================================================================
   base.css — дизайн-токены, сброс, типографика, общие утилиты
   ========================================================================== */

:root {
  /* Цвета */
  --ink: #17140f;
  --ink-2: #3b352d;
  --muted: #6f675c;
  --paper: #ffffff;
  --paper-2: #f7f4ef;
  --paper-3: #efeae1;
  --line: #e4ded3;
  --red: #b8231f;
  --red-dark: #8e1916;
  --red-soft: #fbeeec;
  --gold: #a8864c;
  --gold-light: #e7c99a;

  /* Геометрия */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --section-y: clamp(64px, 8vw, 118px);
  --header-h: 72px;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(23, 20, 15, 0.06), 0 4px 14px rgba(23, 20, 15, 0.05);
  --shadow-md: 0 12px 32px rgba(23, 20, 15, 0.12);
  --shadow-lg: 0 24px 60px rgba(23, 20, 15, 0.18);

  /* Шрифты */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --font-serif: Georgia, "Times New Roman", "PT Serif", serif;

  /* Анимации */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

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

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

img {
  height: auto;
}

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

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--red);
  color: #fff;
}

/* --- Сетка ------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section--tinted {
  background: var(--paper-2);
}

.section--video {
  padding-bottom: calc(var(--section-y) * 0.7);
}

.section__head {
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section__head--center {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}

.section__title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-top: 6px;
}

/* --- Типографика ------------------------------------------------------- */

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow--light {
  color: var(--gold-light);
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
}

/* --- Утилиты ----------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

.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;
}

.noscript {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 14px;
}

.noscript a {
  color: var(--gold-light);
  text-decoration: underline;
}

/* Появление при скролле (включается через JS) */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@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;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
