@font-face {
  font-family: "Onest";
  src: url("fonts/Onest.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #F3F1EC;
  --surface: #FFFFFF;
  --surface-sunken: #E8E4DC;
  --surface-card: #FFFFFF;
  --line: rgba(22, 24, 28, 0.08);
  --line-strong: rgba(22, 24, 28, 0.16);
  --text: #16181C;
  --text-muted: #5F6470;
  --accent: #1E7A52;
  --accent-hover: #165C3E;
  --accent-soft: #DDEEE4;
  --on-accent: #FFFFFF;
  --warn: #8F550B;
  --warn-soft: #F4E5CB;
  --info: #3A57A6;
  --info-soft: #E0E6F4;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(22, 24, 28, 0.04), 0 2px 8px rgba(22, 24, 28, 0.02);
  --shadow-md: 0 12px 32px -4px rgba(22, 24, 28, 0.06), 0 4px 12px -2px rgba(22, 24, 28, 0.03);
  --shadow-lg: 0 24px 48px -12px rgba(22, 24, 28, 0.08), 0 8px 24px -4px rgba(22, 24, 28, 0.04);

  --font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-base: 0.25s cubic-bezier(0.2, 0, 0, 1);
  --transition-spring: 0.4s cubic-bezier(0.3, 1.25, 0.5, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --surface: #1F1D1A;
    --surface-sunken: #2E2B27;
    --surface-card: #1F1D1A;
    --line: rgba(255, 248, 235, 0.08);
    --line-strong: rgba(255, 248, 235, 0.16);
    --text: #F1EDE5;
    --text-muted: #A8A399;
    --accent: #5BC08F;
    --accent-hover: #73D1A3;
    --accent-soft: rgba(91, 192, 143, 0.15);
    --on-accent: #0B1A12;
    --warn: #E5AC55;
    --warn-soft: rgba(229, 172, 85, 0.15);
    --info: #9DB1F0;
    --info-soft: rgba(147, 169, 238, 0.15);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 32px -4px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Якоря (#android, #iphone…) не прячутся под липкой шапкой */
[id] {
  scroll-margin-top: 96px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 241, 236, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: border-color var(--transition-base), background-color var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .header {
    background: rgba(21, 20, 18, 0.88);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  transition: transform var(--transition-base), background-color var(--transition-base), box-shadow var(--transition-base);
  box-shadow: 0 2px 8px rgba(30, 122, 82, 0.2);
}

.header-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 122, 82, 0.28);
}

/* Hero Section */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.hero-badge-indicator {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--accent);
  flex-shrink: 0;
}

.hero-title {
  font-size: 54px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 36px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 600;
  transition: transform var(--transition-base), background-color var(--transition-base), box-shadow var(--transition-base);
  box-shadow: 0 8px 24px rgba(30, 122, 82, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30, 122, 82, 0.32);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: background-color var(--transition-base), transform var(--transition-base);
}

.btn-secondary:hover {
  background: var(--line-strong);
  transform: translateY(-1px);
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* Phone Showcase Section */
.showcase {
  padding: 40px 0 96px;
}

.showcase-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-mockup-frame {
  position: relative;
  width: 320px;
  height: 640px;
  background: var(--surface);
  border-radius: 48px;
  box-shadow: var(--shadow-lg), 0 0 0 10px var(--surface), 0 0 0 12px var(--line-strong);
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px 24px;
  border: 1px solid var(--line);
}

.phone-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 20px;
  background: #16181C;
  border-radius: var(--radius-full);
  z-index: 10;
}

.phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.phone-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.phone-app-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.phone-header-icon {
  color: var(--text-muted);
}

.phone-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto 0;
}

.phone-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  transition: all var(--transition-base);
}

.phone-status-pill.status-off {
  background: var(--surface-sunken);
  color: var(--text-muted);
}

.phone-status-pill.status-connecting {
  background: var(--warn-soft);
  color: var(--warn);
}

.phone-status-pill.status-on {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}

.status-connecting .status-dot {
  animation: pulse-dot 1.2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* The Big Vertical Switch Component */
.phone-switch-container {
  margin: 12px 0 24px;
}

.phone-switch {
  position: relative;
  width: 104px;
  height: 184px;
  border-radius: 52px;
  background: var(--surface-sunken);
  padding: 8px;
  cursor: pointer;
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
  outline: none;
  border: 2px solid transparent;
}

.phone-switch:focus-visible {
  border-color: var(--accent);
}

.phone-switch.switch-on {
  background: var(--accent);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.18);
}

.phone-switch.switch-connecting {
  background: var(--warn);
}

.phone-knob {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-spring), background-color var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .phone-knob {
    background: #F3EFE7;
  }
}

.switch-on .phone-knob {
  transform: translateY(-80px);
}

.phone-knob-icon {
  width: 32px;
  height: 32px;
  color: #5F6470;
  transition: color var(--transition-base), transform var(--transition-base);
}

.switch-on .phone-knob-icon {
  color: var(--accent);
}

.switch-connecting .phone-knob-icon {
  color: var(--warn);
  animation: spin 1.2s infinite linear;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.phone-title-status {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.phone-body-status {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 220px;
}

.phone-footer {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
}

.phone-footer-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.phone-footer-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.showcase-hint {
  margin-top: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
}

/* Sections General */
.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: 38px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

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

/* What Works Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.service-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.service-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.service-icon-telegram { background: #E8F6FE; }
.service-icon-whatsapp { background: #E7F8EE; }
.service-icon-youtube { background: #FDECEC; }
.service-icon-ai { background: #EDF5F2; }

@media (prefers-color-scheme: dark) {
  .service-icon-box { background: var(--surface-sunken); }
}

.service-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.service-detail {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Direct Routing Special Card */
.direct-routing-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 36px;
}

.direct-routing-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.direct-routing-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.direct-routing-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* How to connect */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.step-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.step-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

.bot-cta-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 44px;
  text-align: center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  max-width: 680px;
  margin: 0 auto;
}

.bot-cta-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.bot-cta-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* Download Section / Page */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.download-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.download-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.download-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.download-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-sunken);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.badge-soon {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  color: var(--text-muted);
}

.badge-version {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
}

.download-platform {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.download-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 600;
  transition: background-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  width: 100%;
  box-shadow: 0 2px 8px rgba(30, 122, 82, 0.2);
}

.download-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 122, 82, 0.28);
}

.download-btn-secondary {
  background: var(--surface-sunken);
  color: var(--text);
  box-shadow: none;
}

.download-btn-secondary:hover {
  background: var(--line-strong);
  color: var(--text);
  box-shadow: none;
}

.download-btn.disabled,
.download-btn:disabled {
  opacity: 0.6;
  pointer-events: none;
  background: var(--surface-sunken);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.sha-pending {
  color: var(--text-muted);
  font-style: italic;
  user-select: none;
}

.sha-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
}

.sha-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sha-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.4;
  user-select: all;
}

.copy-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-base);
}

.copy-btn:hover {
  background: var(--accent-soft);
}

.instruction-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.instruction-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.windows-notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid rgba(143, 85, 11, 0.12);
}

.windows-notice strong {
  display: block;
  margin-bottom: 4px;
}

/* Страница загрузок: Android и iPhone рядом, Windows — строкой ниже */
.download-grid-page {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

.download-grid-page .download-card-wide {
  grid-column: 1 / -1;
}

.download-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.download-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.instruction-box ol {
  margin: 0 0 0 18px;
}

.instruction-box li {
  margin-bottom: 6px;
}

.instruction-box li:last-child {
  margin-bottom: 0;
}

.instruction-box ul {
  margin: 6px 0 0 16px;
}

.instruction-box a,
.download-desc a,
.principle-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.instruction-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
}

.instruction-box + .instruction-box {
  margin-top: 12px;
}

/* Где работает: честно о сетях (D-034) */
.network-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.network-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.network-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

.network-mark-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.network-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.network-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Principles */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.principle-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 20px;
}

.principle-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.principle-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.principle-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Support Section */
.support-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.support-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.support-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.support-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 28px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  transition: all var(--transition-base);
}

.support-btn:hover {
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-1px);
}

/* Legal Pages (Privacy, Terms) */
.legal-page {
  padding: 64px 0 96px;
}

.legal-header {
  margin-bottom: 40px;
}

.legal-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text);
}

.legal-meta {
  font-size: 14px;
  color: var(--text-muted);
}

.draft-badge {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 36px;
  border: 1px solid rgba(143, 85, 11, 0.15);
  width: 100%;
}

.draft-badge svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.legal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  max-width: 860px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 12px;
}

.legal-content p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 20px 24px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  color: var(--text);
}

.legal-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.legal-table th,
.legal-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.legal-table th {
  background: var(--surface-sunken);
  font-weight: 700;
  color: var(--text);
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table td {
  color: var(--text-muted);
  line-height: 1.5;
}

.legal-table td:first-child {
  color: var(--text);
  font-weight: 600;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 404 Page */
.error-page {
  padding: 120px 0;
  text-align: center;
}

.error-code {
  font-size: 96px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.error-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.error-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 36px;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  transition: color var(--transition-base);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 16px;
}

/* Reveal on scroll: без JS блоки видны сразу */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.2, 0, 0, 1), transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.js .reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .status-connecting .status-dot {
    animation: none !important;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-title {
    font-size: 40px;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
  .principles-grid {
    grid-template-columns: 1fr;
  }
  .network-grid {
    grid-template-columns: 1fr;
  }
  .download-grid-page {
    grid-template-columns: 1fr;
  }
  .direct-routing-card {
    flex-direction: column;
    text-align: center;
    padding: 28px;
  }
  /* На узком экране в шапке остаётся только «Скачать» */
  .nav {
    gap: 0;
  }
  .nav-link {
    display: none;
  }
  .nav-link.nav-keep {
    display: inline;
  }
  .header-inner {
    gap: 16px;
  }
  .header-inner .nav {
    margin-left: auto;
  }
  .legal-content {
    padding: 32px 24px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }
  .header-inner {
    height: 64px;
  }
  .logo {
    font-size: 19px;
  }
  .header-cta {
    padding: 0 16px;
  }
  .download-card {
    padding: 24px;
  }
  .hero {
    padding: 56px 0 40px;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero-subtitle {
    font-size: 16px;
  }
  .btn-primary {
    width: 100%;
    font-size: 16px;
    height: 52px;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 64px 0;
  }
  .section-title {
    font-size: 28px;
  }
  .section-desc {
    font-size: 16px;
  }
  .direct-routing-content h3 {
    font-size: 19px;
  }
  .bot-cta-box,
  .support-card {
    padding: 32px 20px;
  }
  .bot-cta-title,
  .support-title {
    font-size: 22px;
  }
  .support-btn {
    width: 100%;
    justify-content: center;
  }
  .footer-links {
    gap: 32px;
  }
  .legal-title {
    font-size: 28px;
  }
}

.legal-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-sunken);
}

.section-desc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.instruction-box p + p,
.instruction-box ul + p,
.instruction-box p + ul {
  margin-top: 8px;
}
