:root {
  color-scheme: light;
  --ink: #0d1114;
  --muted: rgba(13, 17, 20, 0.72);
  --panel: rgba(244, 247, 249, 0.78);
  --line: rgba(255, 255, 255, 0.82);
  --shadow: rgba(42, 48, 55, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(246, 249, 250, 0.22), rgba(218, 225, 229, 0.62)),
    url("/start/img/background.jpg") center / cover no-repeat,
    linear-gradient(135deg, #f4f8fa 0%, #dfe7eb 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  animation: background-in 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.messenger-gate {
  display: grid;
  width: min(100%, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) clamp(14px, 4vw, 28px) max(18px, env(safe-area-inset-bottom));
  place-items: center;
}

.choice-panel {
  position: relative;
  isolation: isolate;
  width: 100%;
  display: grid;
  gap: clamp(14px, 2.9vw, 20px);
  padding: clamp(28px, 5.8vw, 42px) clamp(22px, 5.8vw, 42px) clamp(22px, 4.8vw, 36px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: clamp(34px, 8vw, 64px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(230, 237, 241, 0.34)),
    rgba(246, 249, 251, 0.48);
  box-shadow:
    0 30px 76px rgba(42, 48, 55, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 -24px 46px rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(34px) saturate(1.35) contrast(1.04);
  backdrop-filter: blur(34px) saturate(1.35) contrast(1.04);
  animation: panel-in 760ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
}

.choice-panel::before,
.choice-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.choice-panel::before {
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.78), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(180, 225, 235, 0.34), transparent 28%),
    radial-gradient(circle at 42% 90%, rgba(255, 255, 255, 0.45), transparent 34%);
  filter: blur(10px);
}

.choice-panel::after {
  inset: 1px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow:
    inset 12px 16px 26px rgba(255, 255, 255, 0.34),
    inset -18px -22px 38px rgba(114, 129, 144, 0.12);
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(25px, 5.4vw, 30px);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: 0;
  animation: content-in 620ms cubic-bezier(0.16, 1, 0.3, 1) 260ms both;
}

.lead {
  max-width: 27ch;
  margin: -4px 0 clamp(26px, 5vw, 36px);
  color: var(--muted);
  font-size: clamp(17px, 4vw, 21px);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0;
  animation: content-in 620ms cubic-bezier(0.16, 1, 0.3, 1) 340ms both;
}

.messenger-list {
  display: grid;
  gap: clamp(12px, 2.6vw, 14px);
}

.messenger-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: clamp(58px, 12.8vw, 66px);
  padding: 12px clamp(18px, 4.2vw, 28px);
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  font-size: clamp(16px, 4.3vw, 22px);
  font-weight: 520;
  line-height: 1.08;
  letter-spacing: 0;
  box-shadow:
    0 10px 22px rgba(33, 39, 45, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
  animation: button-in 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.messenger-button span {
  min-width: 0;
  white-space: nowrap;
}

.messenger-button:nth-child(1) {
  animation-delay: 460ms;
}

.messenger-button:nth-child(2) {
  animation-delay: 540ms;
}

.messenger-button-max {
  color: #ffffff;
  background: #0c0d0e;
}

.messenger-button-telegram {
  background: rgba(255, 255, 255, 0.88);
}

.messenger-button:active {
  transform: translateY(1px) scale(0.99);
}

@media (hover: hover) {
  .messenger-button:hover {
    box-shadow:
      0 14px 30px rgba(33, 39, 45, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.62);
    transform: translateY(-1px);
  }
}

.messenger-logo {
  width: clamp(20px, 4.8vw, 25px);
  height: clamp(20px, 4.8vw, 25px);
  display: block;
  border-radius: 6px;
}

@media (max-width: 360px) {
  .messenger-gate {
    padding-right: 10px;
    padding-left: 10px;
  }

  .choice-panel {
    border-radius: 30px;
    padding-right: 16px;
    padding-left: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .lead {
    font-size: 16px;
    line-height: 1.22;
  }

  .messenger-button {
    gap: 8px;
    font-size: 15px;
    min-height: 56px;
  }
}

@media (max-width: 767px) {
  body {
    background:
      linear-gradient(180deg, rgba(246, 249, 250, 0.18), rgba(218, 225, 229, 0.5)),
      url("/start/img/background-mobile.jpg") center / cover no-repeat,
      linear-gradient(135deg, #f4f8fa 0%, #dfe7eb 100%);
  }
}

@keyframes background-in {
  from {
    background-position: center 54%;
    filter: saturate(0.92) brightness(1.05);
  }

  to {
    background-position: center center;
    filter: saturate(1) brightness(1);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.965);
    filter: blur(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes content-in {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes button-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .choice-panel,
  h1,
  .lead,
  .messenger-button {
    animation: none;
  }
}
