@font-face {
  font-family: "Fira Sans";
  src: url("./assets/fira-sans-medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --text: #e6e8ec;
  --muted: #b0b7c3;
  --primary: #a78bfa;
  --accent: #7c4dff;
  --accent-hover: #8b5cf6;
  --accent-pressed: #6639f2;
  --border: rgb(167 139 250 / 18%);
  --danger: #f43f5e;
  --danger-text: #fda4af;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 280px;
  background: #080a11;
  color: var(--text);
  font-family: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
  margin: 0;
}

button, a, summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

svg {
  display: block;
  flex-shrink: 0;
}

/* Цвета, слои и прозрачность из AuthGradientBackground в мобильном приложении. */
.auth-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(138deg, #080a11 0%, #101323 38%, #120c21 72%, #080a11 100%);
}

.gradient-layer,
.gradient-layer::before {
  position: absolute;
  inset: -136px;
}

.gradient-layer::before {
  content: "";
}

.gradient-primary {
  opacity: 0.96;
  transform: translate(-142px, -6px) scale(1.1);
}

.gradient-primary::before {
  background: linear-gradient(137deg, #0b0d16 0%, #251a45 42%, #7c4dff 78%, #111219 100%);
}

.gradient-secondary {
  opacity: 0.34;
  transform: translate(128px, 8px) scale(1.1);
}

.gradient-secondary::before {
  background: linear-gradient(225deg, #080a11 0%, #141523 36%, #302158 72%, #3f80ff 100%);
}

.gradient-depth {
  opacity: 0.22;
  transform: translate(-104px, 10px) scale(1.1);
}

.gradient-depth::before {
  background: linear-gradient(180deg, #111219 0%, #171628 44%, #6639f2 82%, #0e0f14 100%);
}

.gradient-accent {
  opacity: 0.62;
  transform: translate(-118px, -5px) scale(1.1);
}

.gradient-accent::before {
  background: linear-gradient(45deg, #080a11 0%, #151124 42%, #3f80ff 76%, #251a45 100%);
}

.gradient-wash {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background: linear-gradient(180deg, rgb(8 10 17 / 8%) 0%, rgb(8 10 17 / 38%) 58%, rgb(8 10 17 / 68%) 100%);
}

.page {
  width: min(100%, 712px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: max(48px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 30px;
  letter-spacing: -1px;
}

.brand-logo {
  display: block;
  border-radius: 12px;
}

main {
  padding-block: 52px 40px;
  margin-block: auto;
}

.intro {
  text-align: center;
}

h1 {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 500;
  letter-spacing: -1.9px;
  line-height: 1.12;
}

h1 span {
  color: #d8cbff;
}

.intro-description {
  margin-top: 22px;
  color: var(--muted);
  line-height: 1.65;
}

.downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.platform-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgb(17 18 25 / 76%);
  box-shadow: 0 12px 36px rgb(8 10 17 / 10%);
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.platform-icon {
  display: grid;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgb(167 139 250 / 12%);
  border-radius: 16px;
  background: rgb(167 139 250 / 7%);
}

.platform-label {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
}

h2 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.platform-description {
  margin-block: 20px 24px;
  color: var(--muted);
  font-size: 13px;
}

.download-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button-primary {
  background: var(--accent);
  box-shadow: 0 4px 16px rgb(124 77 255 / 16%);
}

.download-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid rgb(244 63 94 / 48%);
  border-radius: 18px;
  background: rgb(244 63 94 / 12%);
  font-size: 14px;
}

.download-alert-icon {
  margin-top: 1px;
  color: var(--danger);
}

.download-alert-content {
  min-width: 0;
}

.download-alert h2 {
  margin-bottom: 8px;
  color: var(--danger-text);
  font-size: 16px;
  line-height: 1.4;
}

.download-alert-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding-block: 8px;
  color: var(--danger-text);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.download-alert-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.install-guide {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgb(17 18 25 / 62%);
}

summary {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-radius: 18px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
}

summary::-webkit-details-marker {
  display: none;
}

.help-icon {
  color: var(--primary);
}

.chevron {
  margin-left: auto;
  color: var(--muted);
  transition: transform 180ms ease;
}

details[open] .chevron {
  transform: rotate(180deg);
}

.guide-content {
  padding: 0 24px 24px;
  font-size: 14px;
}

.guide-intro {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.install-steps {
  display: grid;
  gap: 24px;
  margin: 24px 0;
  padding-left: 28px;
}

.install-steps li {
  padding-left: 8px;
}

.install-steps li::marker {
  color: var(--primary);
}

h3 {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 500;
}

.install-steps p,
.guide-note {
  color: var(--muted);
  line-height: 1.7;
}

.guide-note {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.guide-note a {
  display: inline-block;
  min-height: 44px;
  padding-top: 14px;
  color: #d8cbff;
  text-underline-offset: 4px;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 5px;
}

@media (hover: hover) {
  .button-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
  }

  summary:hover {
    background: rgb(167 139 250 / 6%);
  }
}

.button-primary:active {
  background: var(--accent-pressed);
  transform: translateY(0);
}

@media (max-width: 580px) {
  .page {
    padding-top: max(32px, env(safe-area-inset-top));
    padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
  }

  main {
    padding-block: 36px 32px;
  }

  h1 {
    font-size: clamp(28px, 8.8vw, 44px);
    letter-spacing: -1.2px;
  }

  .intro-description {
    margin-top: 18px;
    font-size: 14px;
  }

  .desktop-break {
    display: none;
  }

  .downloads {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 28px;
  }

  .platform-card {
    padding: 20px;
    border-radius: 20px;
  }

  .platform-description {
    margin-block: 14px 18px;
  }

  .download-alert {
    gap: 10px;
    padding: 18px;
    font-size: 13px;
  }

  summary {
    gap: 10px;
    padding: 18px;
    font-size: 13px;
  }

  .guide-content {
    padding: 0 18px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
  }
}
