/* ==========================================================================
   Cup'D — сброс, типографика, базовые элементы
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Декоративные надписи и фотополосы намеренно вылезают за края —
     горизонтальную прокрутку гасим на уровне документа, а не только body.
     Именно clip, а не hidden: hidden делает документ скролл-контейнером,
     и тогда прилипающая шапка (position: sticky) уезжает вместе со страницей.
     hidden оставлен запасным для старых браузеров, которые не знают clip. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-white);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: var(--lh-body);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

/* Переходы по якорям (#calculator, #lead и т.д.) — цель прокрутки
   отодвигаем на высоту прилипающей шапки, иначе она режет заголовок. */
section[id] { scroll-margin-top: 100px; }

@media (max-width: 767px) {
  section[id] { scroll-margin-top: 68px; }
}

img,
svg,
video { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; background: none; border: 0; padding: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

p { margin: 0; }

::selection { background: var(--c-yellow); color: #000; }

:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 3px;
}

/* --- Заголовки ---------------------------------------------------------- */

h1, h2, h3, h4, .display {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: var(--display-tracking);
  line-height: var(--lh-display);
  text-transform: uppercase;
}

h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: var(--lh-h3);
}

/* Жёлтая часть заголовка — приём, повторяющийся по всему макету */
.accent { color: var(--c-yellow); }

/* --- Раскладка ---------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: var(--section-gap); }

/* --- Кнопки ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 19px 34px;
  border-radius: var(--radius-pill);
  font-family: var(--f-display);
  font-size: var(--fs-cta);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--c-yellow);
  color: #000;
}

.btn--primary:hover {
  background: #ffd249;
  box-shadow: 0 10px 30px -10px rgba(255, 187, 0, 0.7);
}

.btn--ghost {
  border: 1px solid var(--c-white);
  color: var(--c-white);
}

.btn--ghost:hover {
  background: var(--c-white);
  color: #000;
}

.btn--ghost-yellow {
  border: 1px solid var(--c-yellow);
  color: var(--c-yellow);
}

.btn--ghost-yellow:hover {
  background: var(--c-yellow);
  color: #000;
}

.btn--sm { padding: 13px 24px; font-size: 14px; }

/* --- Служебное ---------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Крупные «призрачные» надписи на фоне (START YOUR BUSINESS и т.п.) */
.ghost-type {
  position: absolute;
  z-index: 0;
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: var(--display-tracking);
  line-height: 0.95;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 0;
  background: linear-gradient(180deg, #1c1c1c 0%, #0a0a0a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  max-width: 100vw;
}

/* Тёплое пятно-засветка */
.glow {
  position: absolute;
  z-index: 0;
  background: var(--glow-warm);
  pointer-events: none;
  filter: blur(10px);
}

/* На узких экранах длинные декоративные надписи переносим — иначе они
   растягивают документ и появляется горизонтальная прокрутка. */
@media (max-width: 767px) {
  .ghost-type {
    white-space: normal;
    max-width: 100%;
    word-break: break-word;
  }
}
