/* База: сброс, типографика, кнопки, общие блоки секций. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  overflow-x: clip;
}

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

ul[class], ol[class] {
  list-style: none;
  padding: 0;
}

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

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.on-dark :focus-visible,
.on-dark:focus-visible {
  outline-color: var(--on-dark);
}

::selection {
  background: var(--ochre);
  color: var(--navy);
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--on-dark);
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: none;
}

.mono {
  font-family: var(--font-mono);
}

.nowrap {
  white-space: nowrap;
}

/* ── Каркас ── */

.wrap {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
}

.section {
  position: relative;
  overflow: hidden;
  padding: var(--section-y) var(--gutter);
}

.section--flush-top {
  padding-top: 0;
}

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

.section__stack {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 64px);
}

/* Декоративный фон секции: линии и волны под содержимым */
.bg-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ── Заголовок секции ── */

.head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 24px clamp(40px, 8vw, 120px);
  align-items: end;
}

.head__title {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.on-dark .eyebrow {
  color: var(--on-dark-muted-2);
}

.h2 {
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: var(--ls-head);
  text-wrap: balance;
}

.lead {
  max-width: 520px;
  font-size: var(--fs-lead);
  line-height: 1.62;
  text-wrap: pretty;
}

/* Плашка-выделение: фирменный приём макета */
.lead--mark > span {
  padding: 3px 8px;
  background: var(--teal);
  color: var(--on-dark);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.lead--muted {
  line-height: 1.5;
  color: var(--on-dark-muted);
}

.tag {
  align-self: flex-start;
  padding: 3px 8px;
  background: var(--teal);
  color: var(--on-dark);
  font-size: var(--fs-small);
}

/* ── Кнопки ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn:disabled {
  cursor: default;
  opacity: .6;
}

.btn--dark {
  background: var(--navy);
  color: var(--on-dark);
}

.btn--dark:hover {
  background: var(--navy-2);
}

.btn--teal {
  background: var(--teal);
  color: var(--on-dark);
}

.btn--teal:hover {
  background: var(--teal-2);
}

.btn--outline {
  border-color: var(--navy);
  background: var(--cream);
  color: var(--navy);
  font-weight: 400;
}

.btn--outline:hover {
  background: var(--navy);
  color: var(--on-dark);
}

.btn--sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14.5px;
  font-weight: 400;
}

.btn__arrow {
  flex: none;
  transition: transform .2s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* Текстовая кнопка-ссылка */
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.link-btn:hover,
a:hover {
  text-decoration-thickness: 2px;
}

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
