:root {
  --bg: #10141a;
  --bg-elevated: #171d26;
  --bg-soft: #1e2633;
  --text: #eef2f6;
  --muted: #9aa7b8;
  --line: rgba(238, 242, 246, 0.12);
  --accent: #d4a017;
  --accent-strong: #f0b429;
  --accent-dim: rgba(212, 160, 23, 0.16);
  --wa: #25d366;
  --tg: #2aabee;
  --radius: 14px;
  --header-h: 68px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(212, 160, 23, 0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 20%, rgba(58, 92, 140, 0.18), transparent 55%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(16, 20, 26, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.logo-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent-strong), #8a6410);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav {
  display: none;
  gap: 22px;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.nav.is-open {
  display: flex;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0;
  padding: 8px 16px 16px;
  background: rgba(16, 20, 26, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav.is-open a {
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}

.nav.is-open a:last-child {
  border-bottom: none;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-phone {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--accent-strong);
}

body.nav-open {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 6vw, 64px) clamp(16px, 4vw, 40px) clamp(40px, 7vw, 72px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, var(--bg) 100%),
    repeating-linear-gradient(
      -18deg,
      transparent 0 18px,
      rgba(255, 255, 255, 0.015) 18px 19px
    );
  pointer-events: none;
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

.brand-line {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: -0.03em;
  animation: rise 0.7s ease both;
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(1.7rem, 5.4vw, 3.2rem);
  margin-bottom: 16px;
  animation: rise 0.8s ease 0.08s both;
}

.hero-lead {
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  margin-bottom: 28px;
  animation: rise 0.8s ease 0.16s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: rise 0.8s ease 0.24s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--accent-strong);
  color: #1a1405;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #ffc94a;
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: rgba(238, 242, 246, 0.28);
}

.hero-visual {
  min-height: 260px;
  display: grid;
  place-items: center;
  animation: rise 0.9s ease 0.2s both;
}

.scale-scene {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1.05;
}

/* Весовой индикатор (верх) */
.indicator {
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  width: min(72%, 290px);
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(160deg, #202836, #12171f);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  z-index: 1;
}

.indicator::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.indicator-dot {
  position: absolute;
  top: 12px;
  left: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 10px var(--accent-strong);
  animation: blink 2s ease-in-out infinite;
}

.indicator-weight {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent-strong);
  text-shadow: 0 0 20px rgba(212, 160, 23, 0.35);
}

.indicator-unit {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

/* Сигнал между пультом и индикатором */
.signal {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(212, 160, 23, 0.3);
  animation: pulse 2.4s ease-out infinite;
  z-index: 0;
}

.signal::before,
.signal::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 2px solid rgba(212, 160, 23, 0.45);
}

.signal::after {
  inset: 15px;
  background: var(--accent);
  border: none;
  box-shadow: 0 0 16px rgba(212, 160, 23, 0.55);
}

/* Пульт (низ) */
.remote {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(52%, 200px);
  padding: 20px 18px 22px;
  border-radius: 26px;
  background: linear-gradient(165deg, #2b3647, #161d27);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 2;
}

.remote-antenna {
  position: absolute;
  top: -16px;
  right: 24px;
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, #5a6a80, #2b3647);
}

.remote-antenna::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 10px var(--accent-strong);
}

.remote-screen {
  padding: 12px 14px;
  border-radius: 12px;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.remote-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.remote-value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-strong);
  font-size: 1rem;
}

.remote-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.key {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(180deg, #333f52, #212a37);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.key:hover {
  filter: brightness(1.12);
}

.key:active,
.key.is-pressed {
  transform: translateY(1px) scale(0.96);
  filter: brightness(0.92);
}

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

.key-up {
  color: var(--accent-strong);
}

.key-down {
  color: #8fb4ff;
}

.key-ok {
  background: linear-gradient(180deg, var(--accent-strong), #a9780f);
  color: #1a1405;
}

.section {
  padding: clamp(56px, 9vw, 96px) clamp(16px, 4vw, 40px);
}

.section-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.section h2 {
  font-size: clamp(1.45rem, 3.6vw, 2.2rem);
  max-width: 18ch;
}

.section-lead {
  max-width: 46rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  margin-bottom: 0;
}

.about {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.how {
  background: var(--bg-elevated);
}

.steps {
  display: grid;
  gap: 28px;
  margin-top: 36px;
  counter-reset: none;
}

.steps li {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.step-num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent-strong);
  letter-spacing: 0.08em;
}

.steps h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.steps p {
  color: var(--muted);
  margin: 0;
  max-width: 36rem;
}

.feature-list {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}

.feature-list li {
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}

.feature-list h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.feature-list p {
  margin: 0;
  color: var(--muted);
}

.compat {
  background:
    linear-gradient(180deg, transparent, rgba(212, 160, 23, 0.04)),
    var(--bg-elevated);
}

.compat-grid {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}

.compat-grid article {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.compat-grid h3 {
  font-size: 1.1rem;
}

.compat-grid p {
  margin: 0;
  color: var(--muted);
}

.contacts {
  padding-bottom: calc(clamp(56px, 9vw, 96px) + 72px);
}

.contacts-inner {
  text-align: left;
}

.contact-actions {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(238, 242, 246, 0.28);
}

.contact-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.contact-link.phone .contact-value {
  color: var(--accent-strong);
}

.contact-link.wa {
  border-color: rgba(37, 211, 102, 0.28);
}

.contact-link.tg {
  border-color: rgba(42, 171, 238, 0.28);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px clamp(16px, 4vw, 40px) 36px;
}

.footer-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner .logo {
  color: var(--text);
}

.footer-inner a {
  color: var(--accent-strong);
  font-weight: 600;
  width: fit-content;
}

.footer-note {
  width: min(100%, var(--max));
  margin: 18px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fab-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.fab-wa {
  background: var(--wa);
}

.fab-tg {
  background: var(--tg);
}

.fab-phone {
  background: var(--accent);
  color: #1a1405;
  font-size: 1.05rem;
}

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

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.25);
    opacity: 0;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

/* Tablet */
@media (min-width: 720px) {
  .nav,
  .nav.is-open {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 22px;
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
  }

  .nav.is-open a,
  .nav a {
    padding: 0;
    border: none;
    font-weight: 400;
    color: var(--muted);
  }

  .nav-toggle {
    display: none;
  }

  .header-phone {
    font-size: 0.95rem;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .steps li {
    border-top: none;
    padding-top: 0;
    padding-right: 12px;
    border-right: 1px solid var(--line);
  }

  .steps li:last-child {
    border-right: none;
  }

  .feature-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 32px;
  }

  .compat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .compat-grid article {
    border-top: none;
    padding-top: 0;
    padding-right: 16px;
    border-right: 1px solid var(--line);
  }

  .compat-grid article:last-child {
    border-right: none;
  }

  .contact-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacts {
    padding-bottom: clamp(56px, 9vw, 96px);
  }

  .fab {
    right: 20px;
    bottom: 20px;
  }
}

/* Desktop */
@media (min-width: 980px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
  }

  .hero-visual {
    min-height: 420px;
  }

  .scale-scene {
    width: min(100%, 460px);
  }

  .footer-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
  }

  .footer-inner p {
    margin: 0;
    justify-self: center;
    text-align: center;
  }
}

/* Narrow phones */
@media (max-width: 420px) {
  .site-header {
    padding: 0 12px;
  }

  .header-phone {
    font-size: 0.82rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .fab-btn {
    width: 44px;
    height: 44px;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brand-line,
  .hero h1,
  .hero-lead,
  .hero-cta,
  .hero-visual,
  .reveal,
  .signal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
