/*
 * Solid Web Studio — базовый слой темы.
 * Токены собраны из трёх направлений; см. docs/THIRD-PARTY.md.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/lora-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/lora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-400-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-400-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-700-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-700-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Нейтральные */
  --neutral-50: #fbf9f4;
  --neutral-100: #f4f0e7;
  --neutral-200: #e7e0d2;
  --neutral-300: #d2c8b6;
  --neutral-400: #b3a794;
  --neutral-500: #8f8370;
  --neutral-600: #6d675d;
  --neutral-700: #524c44;
  --neutral-800: #3a352f;
  --neutral-900: #24211d;
  --neutral-950: #14120f;
  /* Кобальт */
  --brand-50: #eef2ff;
  --brand-100: #dce4ff;
  --brand-200: #b9c8ff;
  --brand-300: #8ea6ff;
  --brand-400: #5c7dff;
  --brand-500: #1f4bff;
  --brand-600: #163bd6;
  --brand-700: #102ead;
  --brand-800: #0b2185;
  --brand-900: #07165c;
  --brand-950: #040d36;
  /* Лайм */
  --lime-100: #edffbd;
  --lime-300: #d4ff66;
  --lime-400: #c9ff4d;
  --lime-500: #b4f02e;
  /* Сигнал */
  --signal-100: #ffe0d1;
  --signal-500: #ff4d00;
  --signal-700: #ad3200;
  /* Тёмное */
  --graphite: #090c11;
  --graphite-2: #111722;
  --graphite-line: #232c3b;

  /* Семантика */
  --paper: var(--neutral-50);
  --surface: #ffffff;
  --surface-alt: var(--neutral-100);
  --ink: #171512;
  --muted: var(--neutral-600);
  --line: #ded6c7;
  --line-strong: var(--neutral-300);
  --primary: var(--brand-500);
  --primary-hover: var(--brand-600);
  --primary-foreground: #ffffff;
  --highlight: var(--lime-400);
  --highlight-foreground: #000000;
  --signal: var(--signal-500);
  --signal-foreground: #000000;
  --dark: var(--graphite);
  --dark-raised: var(--graphite-2);
  --dark-foreground: #f3f6f8;
  --dark-muted: #94a1b5;
  --dark-line: var(--graphite-line);

  /* Типографика */
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* Форма */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(23, 21, 18, .06);
  --shadow-md: 0 8px 24px -8px rgba(23, 21, 18, .18);
  --shadow-lg: 0 28px 60px -32px rgba(23, 21, 18, .38);
  --container: 1200px;
  --gutter: 24px;
  --header-h: 76px;
}

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

[hidden] {
  display: none !important;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

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

img {
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color .18s ease;
}

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

p {
  margin: 0 0 1em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 .55em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.03em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

h2 {
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

h4 {
  font-size: 1.15rem;
}

strong,
b {
  font-weight: 700;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

li {
  margin-bottom: .35em;
}

blockquote {
  margin: 1.5em 0;
  padding: 1.1em 1.4em;
  border-left: 3px solid var(--primary);
  background: var(--surface-alt);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.45;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.2em 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: .95rem;
}

th,
td {
  padding: .7em .8em;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

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

.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:active) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  transform: translateY(-200%);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Кнопки */
.btn,
.button,
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-sans);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.btn:hover,
.button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--primary-hover);
  color: var(--primary-foreground);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--ghost,
.button--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover,
.button--ghost:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--ink);
}

.btn--lime {
  background: var(--highlight);
  color: var(--highlight-foreground);
}

.btn--lime:hover {
  background: var(--lime-500);
  color: var(--highlight-foreground);
}

.btn--signal {
  background: var(--signal);
  color: var(--signal-foreground);
}

.btn--signal:hover {
  background: var(--signal-700);
  color: #fff;
}

.btn--sm {
  padding: 10px 16px;
  font-size: .8rem;
}

.btn--block {
  width: 100%;
}

/* Формы */
label {
  display: block;
  margin-bottom: 5px;
  font-size: .86rem;
  font-weight: 600;
}

.form-item,
.form-actions {
  margin-bottom: 1rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .95rem;
  line-height: 1.3;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 75, 255, .12);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.form-item--checkbox,
.form-type-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.form-item--checkbox label,
.form-type-checkbox label {
  margin: 0;
  font-weight: 400;
  font-size: .86rem;
  line-height: 1.45;
}

input[type="checkbox"],
input[type="radio"] {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--primary);
}

.description,
.form-item .description,
.webform-element-description {
  margin-top: 5px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.form-required {
  color: var(--signal-700);
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: .8em 1em;
  margin-bottom: 1em;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

/* Сообщения Drupal */
.messages,
.alert {
  margin: 0 0 1.2rem;
  padding: .9em 1.1em;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: .92rem;
}

.messages--error,
.alert--error {
  border-left-color: #c53030;
  background: #fdeaea;
}

.messages--warning,
.alert--warning {
  border-left-color: #b77900;
  background: #fff6df;
}

.messages--status,
.alert--success {
  border-left-color: #1e7a4a;
  background: #e9f7ee;
}

/* Пагинация */
.pager,
.pager__items {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.pager__item a,
.pager__item.is-active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  color: var(--ink);
  font-size: .85rem;
}

.pager__item a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pager__item.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pager__item--next a,
.pager__item--last a,
.pager__item--previous a,
.pager__item--first a {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
}

/* Утилиты */
.section {
  padding: clamp(3.2rem, 7vw, 6rem) 0;
}

.section--tight {
  padding: 2.4rem 0;
}

.section--dark {
  background: var(--dark);
  color: var(--dark-foreground);
}

.section--sand {
  background: var(--surface-alt);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0;
}

.section-head__link {
  flex: none;
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.section-head__link:hover {
  color: var(--primary);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: .9rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.text-muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/golos-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/golos-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
