:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --ink: #172033;
  --muted: #5d6a7f;
  --line: #dce3ee;
  --card: #ffffff;
  --blue: #1768e8;
  --blue-dark: #0d47a1;
  --green: #12a36c;
  --yellow: #f0b429;
  --shadow: 0 18px 60px rgba(22, 39, 73, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif;
  line-height: 1.5;
}

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

p a {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(245, 247, 251, 0.9);
  border-bottom: 1px solid rgba(220, 227, 238, 0.85);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.topnav a,
.actions a,
.download {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 9px 14px;
  font-weight: 700;
}

.topnav a:hover,
.actions a:hover,
.download:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.intro {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: 48px 0;
}

.eyebrow,
.section-title span {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro-copy > p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: 19px;
}

.actions,
.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.actions a:first-child,
.download {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.download.secondary {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.phone-preview {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  padding: 20px;
  border: 10px solid #111827;
  border-radius: 36px;
  background: #101827;
  box-shadow: var(--shadow);
}

.phone-status {
  width: 86px;
  height: 22px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: #050814;
}

.telegram-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: #1f3042;
  color: #fff;
}

.bubble {
  max-width: 230px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #31465c;
  font-weight: 700;
}

.qr-demo,
.mini-qr {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  aspect-ratio: 1;
  padding: 18px;
  background: #fff;
  border-radius: 12px;
}

.qr-demo span,
.mini-qr::before,
.mini-qr::after {
  background: #111827;
  border-radius: 2px;
}

.qr-demo span:nth-child(3n),
.qr-demo span:nth-child(4n) {
  background: transparent;
}

.telegram-card p {
  margin: 0;
  color: #dbeafe;
}

.notice,
.help,
.platform {
  margin: 0 0 28px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(22, 39, 73, 0.06);
}

.notice-grid,
.help-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.notice-grid p,
.help-list p {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.section-title {
  max-width: 780px;
}

.section-title h2,
.notice h2,
.help h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.section-title p {
  color: var(--muted);
  font-size: 18px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.step {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.step-num {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #e8f0ff;
  color: var(--blue-dark);
  font-weight: 900;
}

.step h3 {
  margin-bottom: 0;
  font-size: 20px;
}

.step p {
  color: var(--muted);
}

.mock {
  margin-top: auto;
  min-height: 150px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  background: #eef4fb;
  padding: 14px;
}

.search,
.window-title {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.app-line,
.file-row,
.menu-row,
.status-ok,
.phone-menu div,
.profile-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}

.app-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 8px 10px;
  font: inherit;
  font-weight: 800;
}

.chat {
  background: #172033;
}

.chat .dark {
  background: #24364a;
  color: #fff;
}

.mini-qr {
  width: 120px;
  min-height: auto;
  margin: 10px auto 0;
  background:
    linear-gradient(90deg, #111827 25%, transparent 25% 50%, #111827 50% 75%, transparent 75%),
    linear-gradient(#111827 25%, transparent 25% 50%, #111827 50% 75%, transparent 75%),
    #fff;
  background-size: 32px 32px;
}

.mini-qr::before,
.mini-qr::after {
  content: "";
  display: none;
}

.phone-menu {
  display: grid;
  gap: 10px;
}

.phone-menu div {
  margin: 0;
}

.toggle-screen {
  display: grid;
  align-content: center;
  gap: 18px;
}

.toggle {
  width: 96px;
  height: 50px;
  border-radius: 999px;
  background: #c8d2e0;
  position: relative;
  justify-self: center;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.toggle.on {
  background: var(--green);
}

.toggle.on::after {
  left: 52px;
}

.status-ok {
  color: var(--green);
}

footer {
  width: min(1180px, calc(100% - 32px));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 24px 0 42px;
  color: var(--muted);
}

footer a {
  font-weight: 800;
  color: var(--blue);
}

@media (max-width: 980px) {
  .intro {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .phone-preview {
    order: -1;
  }

  .steps,
  .notice-grid,
  .help-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav,
  .actions,
  .download-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topnav a,
  .actions a,
  .download {
    width: 100%;
  }

  .steps,
  .notice-grid,
  .help-list {
    grid-template-columns: 1fr;
  }

  .step {
    min-height: 0;
  }

  h1 {
    font-size: 40px;
  }
}
