/* ===== Tokens ===== */
:root {
  --bg-dark: #050508;
  --text-light: #f1f1f1;
  --gold: #ffd700;
  --gold-dark: #b8860b;
  --gold-deep: #8b6914;
  --cyan: #00bfff;
  --blue: #145cff;
  --blue-deep: #0a1e5c;
  --gradient-title: linear-gradient(
    180deg,
    #ffe566 0%,
    #ffd700 28%,
    #daa520 58%,
    #b8860b 100%
  );
  --gradient-btn-gold: linear-gradient(
    180deg,
    #ffe066 0%,
    #ffd700 35%,
    #c8960c 72%,
    #8b6914 100%
  );
  --gradient-btn-blue: linear-gradient(
    180deg,
    #1a6fff 0%,
    #145cff 40%,
    #0a3d9e 78%,
    #061e52 100%
  );
  --max: 460px;
  --btn-radius: 999px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  min-height: 100dvh;
  font-family: "Montserrat", "Arial Black", Impact, system-ui, sans-serif;
  color: var(--text-light);
  background: var(--bg-dark);
  line-height: 1.2;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Full-screen page ===== */
.page {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--bg-dark);
  background-image: url("assets/hero-bg.png");
  background-repeat: no-repeat;
  background-position: center 42%;
  background-size: cover;
}

.page__overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(2, 4, 14, 0.55) 0%,
      rgba(2, 4, 14, 0.12) 18%,
      rgba(2, 4, 14, 0) 42%,
      rgba(2, 4, 14, 0.18) 68%,
      rgba(2, 4, 14, 0.72) 100%
    );
}

/* ===== Layout shell ===== */
.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding:
    max(16px, var(--safe-top))
    clamp(16px, 4.5vw, 22px)
    max(18px, calc(14px + var(--safe-bottom)));
}

/* ===== Hero ===== */
.hero {
  flex-shrink: 0;
  padding-top: clamp(40px, 10vw, 60px);
  text-align: center;
  overflow: visible;
}

.hero__title {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: 0;
  overflow: visible;
}

.hero__title-line {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(52px, 16.5vw, 82px);
  font-weight: 900;
  line-height: 0.92;
  text-transform: uppercase;
  background: var(--gradient-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  overflow: visible;
  filter:
    drop-shadow(0 0 8px rgba(255, 215, 0, 0.55))
    drop-shadow(0 0 22px rgba(20, 92, 255, 0.35))
    drop-shadow(0 3px 0 rgba(90, 55, 0, 0.85))
    drop-shadow(0 5px 12px rgba(0, 0, 0, 0.6));
}

.hero__badge-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: clamp(10px, 2.8vw, 16px);
}

.hero__subtitle {
  display: inline-block;
  font-size: clamp(10px, 2.7vw, 13px);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a0a0a;
  padding: clamp(7px, 2vw, 9px) clamp(14px, 4vw, 20px);
  border-radius: 4px;
  background: linear-gradient(
    180deg,
    #ffe566 0%,
    #ffd700 45%,
    #c8960c 100%
  );
  border: 1px solid rgba(255, 230, 100, 0.6);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(255, 215, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ===== Spacer — keeps scene visible between hero and CTAs ===== */
.spacer {
  flex: 1 1 auto;
  min-height: clamp(16px, 4vh, 32px);
  max-height: clamp(64px, 15vh, 110px);
}

/* ===== Actions block ===== */
.actions {
  flex-shrink: 0;
  width: 100%;
  margin-top: clamp(245px, 29vh, 265px);
  margin-bottom: clamp(48px, 11vh, 72px);
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 4vw, 18px);
  width: min(100%, 92vw);
  margin: 0 auto;
}

/* ===== CTA buttons ===== */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 3.5vw, 16px);
  width: 100%;
  min-height: clamp(68px, 18vw, 78px);
  padding: 10px clamp(14px, 4vw, 18px);
  border-radius: var(--btn-radius);
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cta:active {
  transform: scale(0.985);
}

.cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

.cta__icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(42px, 11vw, 48px);
  height: clamp(42px, 11vw, 48px);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.78);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08);
}

.cta__icon {
  width: clamp(20px, 5.5vw, 24px);
  height: clamp(20px, 5.5vw, 24px);
}

.cta__text {
  flex: 1;
  font-size: clamp(12px, 3.4vw, 15px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
  padding-right: clamp(42px, 11vw, 48px);
}

/* Primary — Посмотреть предложение (gold) */
.cta--primary {
  background: var(--gradient-btn-gold);
  color: #0a0a0a;
  box-shadow:
    0 0 0 2px rgba(255, 215, 0, 0.45),
    0 0 18px rgba(255, 215, 0, 0.55),
    0 0 36px rgba(255, 180, 0, 0.35),
    0 6px 20px rgba(0, 0, 0, 0.45);
}

.cta--primary:hover {
  filter: brightness(1.08);
  box-shadow:
    0 0 0 2px rgba(255, 230, 100, 0.6),
    0 0 24px rgba(255, 215, 0, 0.7),
    0 0 48px rgba(255, 180, 0, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Secondary — Оставить заявку (blue) */
.cta--secondary {
  background: var(--gradient-btn-blue);
  color: #fff;
  box-shadow:
    0 0 0 2px rgba(0, 191, 255, 0.4),
    0 0 18px rgba(0, 191, 255, 0.5),
    0 0 36px rgba(20, 92, 255, 0.35),
    0 6px 20px rgba(0, 0, 0, 0.45);
}

.cta--secondary:hover {
  filter: brightness(1.1);
  box-shadow:
    0 0 0 2px rgba(0, 210, 255, 0.55),
    0 0 24px rgba(0, 191, 255, 0.65),
    0 0 48px rgba(20, 92, 255, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .cta {
    transition: none;
  }
}

/* ===== Small screens ===== */
@media (max-width: 430px) {
  .page__bg {
    background-position: center top;
  }
}

@media (max-width: 359px) {
  .hero__title-line {
    font-size: clamp(44px, 15vw, 52px);
  }

  .cta__text {
    font-size: 11px;
    letter-spacing: 0.02em;
  }
}

/* ===== Desktop — keep mobile composition centered ===== */
@media (min-width: 768px) {
  .page {
    align-items: center;
  }

  .page__bg {
    background-position: center top;
    background-size: cover;
  }

  .shell {
    padding-top: max(24px, var(--safe-top));
    padding-bottom: max(28px, calc(20px + var(--safe-bottom)));
  }

  .hero {
    padding-top: 48px;
  }

  .hero__title-line {
    font-size: 78px;
  }

  .hero__subtitle {
    font-size: 12px;
  }

  .actions {
    margin-top: 175px;
    margin-bottom: 56px;
  }
}
