/* ==========================================================================
   База: скидання стилів, типографіка, контейнер, доступність
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background-color: var(--c-cream);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
  color: var(--c-ink);
}

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

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

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--c-peach);
  color: var(--c-burgundy);
}

/* ---------- Доступність ---------- */

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

/* На бордовому фоні бордове кільце не видно — робимо світлим */
.site-footer :focus-visible,
.offer :focus-visible {
  outline-color: var(--c-peach);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--c-burgundy);
  color: var(--c-cream);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  transition: top 0.2s var(--ease);
}

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

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

/* ---------- Каркас ---------- */

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

.section {
  padding-block: var(--section-y);
}

.section--tinted {
  background: var(--c-cream-deep);
  border-block: 1px solid var(--c-line);
}

/* ---------- Дрібні текстові елементи ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-burgundy);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
  flex: none;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--c-ink-soft);
  max-width: 56ch;
}

/* ---------- Анімація появи ---------- */

.reveal {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}