/* ===== Tokens ===== */
:root {
  --bg-top: #eef5fb;
  --bg-bottom: #d9e8f4;
  --surface: #ffffff;
  --text: #0f2744;
  --text-muted: #5a7390;
  --blue: #1f6fbf;
  --blue-deep: #134a86;
  --blue-soft: #e3eef8;
  --gold: #c9a227;
  --shadow: 0 12px 40px rgba(19, 74, 134, 0.12);
  --radius-card: 24px;
  --max: 430px;
  --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;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 80% at 50% -10%, #f7fbff 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding:
    calc(100px + var(--safe-top))
    20px
    max(24px, calc(20px + var(--safe-bottom)));
}

.shell {
  width: 100%;
  max-width: var(--max);
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 28px 22px 26px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

/* Entrance */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise-in 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .cta--primary {
    animation: none !important;
  }
}

/* Typography */
.title {
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--blue-deep);
  margin-bottom: 10px;
}

.lead {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* CTA stack */
.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.cta {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  border-radius: 17px;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    background 160ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cta__row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cta__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.cta__text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cta:active {
  transform: scale(0.98);
}

.cta:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Primary — Оставить заявку */
.cta--primary {
  min-height: 60px;
  background: linear-gradient(180deg, #2480d6 0%, var(--blue-deep) 100%);
  color: #fff;
  box-shadow:
    0 10px 24px rgba(19, 74, 134, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  animation: soft-pulse 2.8s ease-in-out infinite;
}

.cta--primary::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 19px;
  border: 1.5px solid rgba(201, 162, 39, 0.35);
  pointer-events: none;
  opacity: 0.7;
}

.cta--primary:hover {
  filter: brightness(1.05);
  box-shadow:
    0 14px 28px rgba(19, 74, 134, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.cta--primary:active {
  filter: brightness(0.98);
}

/* Secondary — Написать менеджеру */
.cta--secondary {
  min-height: 56px;
  background: #f7fbff;
  color: var(--blue-deep);
  border: 1.5px solid var(--blue);
  box-shadow: 0 4px 12px rgba(19, 74, 134, 0.06);
}

.cta--secondary .cta__icon {
  color: var(--blue);
}

.cta--secondary:hover {
  background: var(--blue-soft);
  box-shadow: 0 6px 16px rgba(19, 74, 134, 0.1);
}

.cta--secondary:active {
  background: #e8f1f8;
}

@keyframes soft-pulse {
  0%,
  100% {
    box-shadow:
      0 10px 24px rgba(19, 74, 134, 0.28),
      0 0 0 0 rgba(31, 111, 191, 0.28);
  }
  50% {
    box-shadow:
      0 12px 28px rgba(19, 74, 134, 0.32),
      0 0 0 10px rgba(31, 111, 191, 0);
  }
}

@media (min-width: 768px) {
  .card {
    padding: 36px 32px 32px;
  }

  .title {
    font-size: 36px;
  }

  .lead {
    font-size: 17px;
  }

  .cta--primary .cta__text {
    font-size: 19px;
  }
}
