/* ===== Tokens ===== */
:root {
  --bg-deep: #03050A;
  --bg-mid: #070A10;
  --bg-panel: #0B1220;
  --text-light: #E8E8E8;
  --text-muted: #9AA3B2;
  --red: #FF1A1A;
  --red-dark: #D90000;
  --red-deep: #A90000;
  --cyan: #00AEEF;
  --cyan-light: #53CFFF;
  --panel-bg: rgba(4, 7, 12, 0.72);
  --panel-border: rgba(83, 207, 255, 0.32);
  --max: 500px;
  --content-max: 430px;
  --btn-radius: 18px;
  --panel-radius: 28px;
  --side-gutter: clamp(20px, 5.5vw, 28px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 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: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-light);
  background: var(--bg-deep);
  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-deep);
  background-image: url("assets/hero-bg.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

.page__overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 130% 100% at 50% 100%,
      rgba(255, 26, 26, 0.1) 0%,
      rgba(0, 174, 239, 0.08) 35%,
      transparent 62%
    ),
    radial-gradient(
      ellipse 110% 85% at 50% 40%,
      rgba(3, 5, 10, 0) 0%,
      rgba(3, 5, 10, 0.42) 58%,
      rgba(3, 5, 10, 0.78) 100%
    ),
    linear-gradient(
      180deg,
      rgba(3, 5, 10, 0.62) 0%,
      rgba(3, 5, 10, 0.06) 24%,
      rgba(3, 5, 10, 0.18) 50%,
      rgba(3, 5, 10, 0.68) 76%,
      rgba(3, 5, 10, 0.92) 100%
    ),
    linear-gradient(
      90deg,
      rgba(255, 26, 26, 0.07) 0%,
      transparent 38%,
      transparent 62%,
      rgba(0, 174, 239, 0.07) 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;
  align-items: center;
  justify-content: flex-start;
  padding:
    max(0px, var(--safe-top))
    max(var(--side-gutter), var(--safe-right))
    max(18px, calc(14px + var(--safe-bottom)))
    max(var(--side-gutter), var(--safe-left));
}

/* ===== Hero ===== */
.hero {
  width: 100%;
  max-width: var(--content-max);
  flex-shrink: 0;
  text-align: center;
  padding-top: clamp(288px, 45svh, 368px);
  padding-bottom: 8px;
  padding-inline: clamp(10px, 2.5vw, 16px);
}

.hero__title {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.22em;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 10px;
  line-height: 0.92;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-size: clamp(20px, calc((100vw - (var(--side-gutter) * 2) - 32px) / 11.2), 50px);
}

.hero__word {
  font-family: "Anton", "Arial Black", Impact, sans-serif;
  font-size: 1em;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--text-light);
  flex-shrink: 0;
  text-shadow:
    0 3px 16px rgba(0, 0, 0, 0.9),
    0 1px 4px rgba(0, 0, 0, 0.95);
}

.hero__word--accent {
  color: var(--red);
  text-shadow:
    0 0 24px rgba(255, 26, 26, 0.45),
    0 3px 16px rgba(0, 0, 0, 0.9);
}

.hero__subtitle {
  max-width: 30ch;
  margin: 0 auto;
  padding-inline: clamp(6px, 1.5vw, 12px);
  font-size: clamp(18px, 4.8vw, 22px);
  font-weight: 500;
  line-height: 1.22;
  color: rgba(232, 232, 232, 0.9);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* ===== CTA panel ===== */
.cta-panel {
  width: min(90%, var(--content-max));
  flex-shrink: 0;
  margin: 12px auto 0;
  padding: 18px 16px 16px;
  border-radius: var(--panel-radius);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 0 28px rgba(0, 174, 239, 0.1),
    0 10px 36px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(83, 207, 255, 0.08);
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ===== CTA buttons ===== */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 clamp(56px, 15vw, 64px);
  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 var(--cyan-light);
  outline-offset: 3px;
}

.cta__icon-wrap {
  position: absolute;
  left: clamp(12px, 3.5vw, 16px);
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(42px, 11vw, 46px);
  height: clamp(42px, 11vw, 46px);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
}

.cta__icon-wrap--outline {
  background: transparent;
}

.cta__icon {
  width: 24px;
  height: 24px;
}

.cta__text {
  width: 100%;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(13px, 3.6vw, 17px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
}

/* Primary — Оставить заявку */
.cta--primary {
  min-height: 76px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0) 42%
    ),
    linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  box-shadow:
    0 0 28px rgba(255, 26, 26, 0.38),
    0 10px 28px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cta--primary .cta__text {
  font-size: clamp(16px, 4.2vw, 18px);
}

.cta--primary:hover {
  filter: brightness(1.06);
  box-shadow:
    0 0 36px rgba(255, 26, 26, 0.48),
    0 12px 32px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Secondary — Связаться с менеджером */
.cta--secondary {
  min-height: 68px;
  background: rgba(3, 5, 10, 0.95);
  color: #fff;
  border: 1px solid rgba(255, 26, 26, 0.8);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.cta--secondary:hover {
  background: rgba(7, 10, 16, 0.98);
  border-color: var(--red);
}

/* ===== Safety line ===== */
.safety {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: clamp(15px, 3.9vw, 18px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-muted);
}

.safety__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--cyan);
}

.safety__text {
  color: var(--text-muted);
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .cta {
    transition: none;
  }
}

/* ===== Small screens ===== */
@media (max-width: 374px) {
  .hero__title {
    font-size: clamp(19px, calc((100vw - (var(--side-gutter) * 2) - 28px) / 11.5), 34px);
    gap: 0.18em;
  }

  .hero__subtitle {
    font-size: 17px;
  }

  .cta__text {
    font-size: clamp(12px, 3.4vw, 13px);
    letter-spacing: 0.03em;
  }

  .cta--primary {
    min-height: 72px;
  }

  .cta--secondary {
    min-height: 64px;
  }
}

@media (max-width: 359px) {
  .hero {
    padding-top: 272px;
  }

  .hero__title {
    font-size: clamp(18px, calc((100vw - (var(--side-gutter) * 2) - 24px) / 11.8), 32px);
  }
}

/* ===== Medium / large mobile ===== */
@media (min-width: 390px) {
  .hero__title {
    font-size: clamp(22px, calc((100vw - (var(--side-gutter) * 2) - 36px) / 11), 50px);
  }

  .cta--primary {
    min-height: 80px;
  }

  .cta--secondary {
    min-height: 70px;
  }
}

@media (min-width: 430px) {
  .cta-panel {
    width: min(92%, var(--content-max));
  }
}

/* ===== Desktop — keep mobile composition centered ===== */
@media (min-width: 768px) {
  .page {
    align-items: center;
  }

  .page__bg {
    background-position: center top;
  }

  .shell {
    padding-top: max(8px, var(--safe-top));
    padding-bottom: max(28px, calc(20px + var(--safe-bottom)));
  }

  .hero {
    padding-top: 360px;
  }

  .hero__title {
    font-size: 50px;
  }

  .hero__subtitle {
    font-size: 21px;
  }
}
