:root {
  --bg: #f6f7f9;
  --bg-alt: #eef1f4;
  --ink: #1c2330;
  --ink-soft: #55606e;
  --accent: #d6452e;
  --accent-dark: #b83824;
  --line: #dfe3e8;
  --hero-from: #10151f;
  --hero-to: #1c2637;
  --card-bg: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 21, 31, 0.10);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
}

.brand img { border-radius: 6px; }

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a:hover { color: var(--accent); }

.nav-links a.active { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: #f2f4f8;
  padding: 72px 0 0;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.4px;
  color: #c9d2e0;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.5px;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 30px;
  font-size: 17px;
  color: #aeb9c9;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn-secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-big { padding: 16px 28px; font-size: 16px; }

.hero-shot { margin: 0 auto; max-width: 960px; padding: 0 20px; }
.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 60px rgba(0, 0, 0, 0.45);
}
.hero-shot figcaption {
  padding: 10px 14px;
  background: var(--hero-to);
  color: #9aa6b8;
  font-size: 13px;
  text-align: left;
  border-radius: 0 0 16px 16px;
}

/* ---------- Секции ---------- */

.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.4px;
  text-align: center;
}

.section-sub {
  margin: 0 auto 40px;
  max-width: 620px;
  text-align: center;
  color: var(--ink-soft);
}

.intro-copy {
  max-width: 780px;
  margin: 0 auto 40px;
  color: var(--ink-soft);
  font-size: 16px;
}

.intro-copy p { margin: 0 0 14px; }
.intro-copy p:last-child { margin-bottom: 0; }

.tracker-categories { margin-top: 40px; }

/* Как работает */

.flow {
  display: grid;
  grid-template-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
  gap: 16px;
  align-items: stretch;
  margin: 0 0 48px;
}

.flow-step {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
}

.flow-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.flow-step h3 { margin: 0 0 8px; font-size: 17px; }
.flow-step p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: var(--accent);
}

/* Карточки */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* Врезка-акцент */
.callout {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.callout h3 { margin: 0 0 10px; font-size: 18px; }
.callout p { margin: 0 0 12px; font-size: 15px; color: var(--ink-soft); }
.callout p:last-child { margin-bottom: 0; }
.callout code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

.steps code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

.steps .inline-link, .note .inline-link { font-weight: 600; }

/* Что нужно */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.two-col h3 { margin: 0 0 12px; font-size: 18px; }

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding: 6px 0 6px 26px;
  color: var(--ink-soft);
  font-size: 15px;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.checklist strong { color: var(--ink); }

.code {
  background: #141a26;
  color: #d7e0ee;
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  margin: 14px 0 0;
}

.code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Скачать */

.download-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.note { text-align: center; color: var(--ink-soft); font-size: 14px; margin: 0; }

/* Шаги */

.steps {
  max-width: 720px;
  margin: 0 auto 48px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 52px;
  font-size: 15.5px;
  color: var(--ink-soft);
  list-style: none;
}

.steps li strong { color: var(--ink); }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Скриншоты */

.shot {
  margin: 0;
  max-width: 920px;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.shot figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-align: center;
}

/* Контакты */

.contacts {
  text-align: center;
  font-size: 17px;
}

.contacts a { color: var(--accent); text-decoration: none; }
.contacts a:hover { text-decoration: underline; }

/* Подвал */

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

.site-footer p { margin: 4px 0; }

.attribution { font-size: 12.5px; color: #8b94a1; }

/* ---------- Внутренние страницы ---------- */

.page-hero {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: #f2f4f8;
  padding: 56px 0 64px;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.5vw, 38px);
  letter-spacing: -0.5px;
}

.page-hero p {
  max-width: 620px;
  margin: 0 auto;
  font-size: 16px;
  color: #aeb9c9;
}

/* Карточки-продукты (фото + текст) */

.two-col-product {
  align-items: center;
}

.two-col-product h2 { margin: 0 0 12px; font-size: clamp(22px, 2.6vw, 30px); }
.two-col-product h3 { margin: 24px 0 10px; font-size: 17px; }
.two-col-product p { color: var(--ink-soft); font-size: 15px; }

.status-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(214, 69, 46, 0.10);
  color: var(--accent-dark);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.15px;
}

.status-badge-muted {
  background: var(--bg-alt);
  color: var(--ink-soft);
}

.two-col-product .lead { font-size: 16px; }

.mode-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.mode-item {
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.mode-item strong { color: var(--ink); }
.mode-item p { margin: 5px 0 0; font-size: 14.5px; }

.purchase-callout { margin-top: 32px; }

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

.button-row .btn { padding: 10px 14px; font-size: 14px; }

/* Спецификации */

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
}

.specs dt, .specs dd {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}

.specs dt { color: var(--ink-soft); font-weight: 500; }
.specs dd { text-align: right; }

/* Цена */

.price {
  margin: 22px 0 6px;
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.note-left { text-align: left; margin: 14px 0 0; }

/* Сетка трекеров */

.tracker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.photo-card {
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s;
}

.photo-card:hover { transform: translateY(-3px); }

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e2e6ec;
}

.photo-card figcaption {
  padding: 12px 16px 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

.photo-card figcaption strong,
.photo-card figcaption span { display: block; }

.photo-card figcaption strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 15px;
}

.firmware-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.firmware-card-primary { border-top: 3px solid var(--accent); }

.card .firmware-label {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.firmware-stats {
  margin: 20px 0 0;
  border-top: 1px solid var(--line);
}

.firmware-stats dt,
.firmware-stats dd {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}

.firmware-stats dt { color: var(--ink-soft); }
.firmware-stats dd { text-align: right; font-weight: 700; }

.firmware-access { margin-top: 24px; }
.firmware-access .btn { margin-top: 6px; }

/* CTA-блок */

.cta {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: #f2f4f8;
  padding: 64px 0;
  text-align: center;
}

.cta h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.4px;
}

.cta p {
  max-width: 560px;
  margin: 0 auto 28px;
  color: #aeb9c9;
}

/* Карточки-ссылки */

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.card-link:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card-link h3 { color: var(--ink); }

.card-link-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.card-link-more:hover { text-decoration: underline; }

/* Разное */

.sub-heading {
  margin: 48px 0 0;
  font-size: 24px;
  letter-spacing: -0.4px;
  text-align: center;
}

.inline-link { color: var(--accent); text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

.pub-meta {
  margin: 6px 0 10px;
  font-size: 13px;
  color: #8b94a1;
}

.shot-mobile { max-width: 380px; }

/* Появление при скролле */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
  .flow {
    grid-template-columns: 1fr 20px 1fr;
    grid-template-areas:
      "s1 a1 s2"
      ". a2 ."
      "s3 a3 s4";
    gap: 16px 20px;
  }
  .flow > :nth-child(1) { grid-area: s1; }
  .flow > :nth-child(2) { grid-area: a1; }
  .flow > :nth-child(3) { grid-area: s2; }
  .flow > :nth-child(4) { grid-area: a2; transform: rotate(90deg); }
  .flow > :nth-child(5) { grid-area: s3; }
  .flow > :nth-child(6) { grid-area: a3; }
  .flow > :nth-child(7) { grid-area: s4; }
}

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .tracker-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; grid-template-areas: none; gap: 12px; }
  .flow > *:nth-child(n) { grid-area: auto; transform: none; }
  .flow > .flow-arrow { justify-content: center; transform: rotate(90deg); }
  .two-col { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 14px;
    display: none;
  }

  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 10px 0; }

  .cards { grid-template-columns: 1fr; }
  .tracker-grid { grid-template-columns: 1fr; }
  .firmware-grid { grid-template-columns: 1fr; }
  .button-row .btn { width: 100%; text-align: center; }
  .hero { padding-top: 48px; }
  .section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}