/* ==========================================================================
   Watch Needs Love — базовые стили (токены, сброс, типографика, кнопки)
   Подключается на всех страницах сайта.
   ========================================================================== */

:root {
  /* Цвета */
  --c-bg: #06050b;
  --c-bg-2: #181a23;
  --c-bg-3: #13151d;
  --c-header: #0e0f16;
  --c-card: #1a191f;
  --c-card-glass: rgba(26, 25, 31, 0.89);
  --c-accent: #a51b19;
  --c-accent-hover: #c12320;
  --c-marker: #c9282a;
  --c-text: #ffffff;
  --c-muted: #cacaca;
  --c-muted-2: #c8c8c8;
  --c-chip: #d9d9d9;
  --c-line: rgba(255, 255, 255, 0.21);
  --c-line-soft: rgba(255, 255, 255, 0.13);
  --c-line-chip: rgba(255, 255, 255, 0.33);

  /* Шрифт */
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Размеры шрифтов (макет 1366px) */
  --fs-hero: clamp(28px, 3.3vw, 45px);
  --fs-h2: clamp(26px, 3.3vw, 45px);
  --fs-h2-md: clamp(26px, 2.93vw, 40px);
  --fs-h2-sm: clamp(22px, 2.56vw, 35px);
  --fs-lead: clamp(16px, 1.83vw, 25px);
  --fs-h3: 18px;

  /* Сетка */
  --container: 1366px;
  --gutter: clamp(16px, 3.88vw, 53px);
  --section-pad: clamp(56px, 6.5vw, 90px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 45px;
}

/* Сброс */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.208;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--c-accent-hover); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Контейнер и секции */
.container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-pad);
  overflow: hidden;
}

/* Фоны секций: градиент сверху вниз и снизу вверх */
.bg-fade-down { background: linear-gradient(180deg, var(--c-bg-2) 0%, var(--c-bg) 95%); }
.bg-fade-up { background: linear-gradient(0deg, var(--c-bg-2) 0%, var(--c-bg) 95%); }
.bg-fade-up-soft { background: linear-gradient(0deg, var(--c-bg-3) 3.5%, #05040a 87%); }

/* Типографика */
.h-hero,
.h-section {
  font-weight: 400;
  line-height: 1.208;
  text-transform: uppercase;
}
.h-hero { font-size: var(--fs-hero); }
.h-section { font-size: var(--fs-h2); }
.h-section--md { font-size: var(--fs-h2-md); }
.h-section--sm { font-size: var(--fs-h2-sm); }

.h-card {
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.208;
  text-transform: uppercase;
}

.lead {
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.208;
}

.text-muted {
  color: var(--c-muted);
  font-weight: 300;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 29px;
  padding: 0 12px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

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

.btn--outline {
  border-color: rgba(255, 255, 255, 0.29);
  font-size: 10px;
  min-height: 27px;
}
.btn--outline:hover { border-color: var(--c-text); }

.btn--lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn--xl { min-height: 60px; padding: 0 24px; font-size: 15px; }

/* Иконка-прицел (красный квадрат с крестом) */
.crosshair {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 52px;
  background: var(--c-accent);
}
.crosshair svg { width: 54px; height: 52px; }

/* Поля форм */
.field {
  display: flex;
  align-items: center;
  width: 100%;
  height: 60px;
  padding: 0 24px 0 37px;
  border: 1px solid var(--c-line);
  background: transparent;
  font-size: 13px;
  font-weight: 200;
  color: var(--c-text);
  transition: border-color 0.2s var(--ease);
}
.field::placeholder { color: var(--c-text); opacity: 1; }
.field:hover,
.field:focus { border-color: rgba(255, 255, 255, 0.5); outline: none; }

/* Анимация появления */
.reveal { opacity: 0; transform: translateY(44px); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Фоновые механизмы: тонкие контуры шестерён и баланса (js/main.js → initMechanisms) */
.mech-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.mech-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mech-bg__part { fill: none; stroke: rgba(255, 255, 255, 0.055); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mech-bg__part--accent { stroke: rgba(193, 35, 32, 0.16); }
@media (max-width: 640px) { .mech-bg { opacity: 0.7; } }
