/* ==========================================================================
   Chartplotter — лендинг. Стилистика основного приложения:
   тёмная стеклянная тема, фирменный градиент green→teal→blue, палитра глубин.
   ========================================================================== */

:root {
  --bg:        #0a0b0e;
  --bg-2:      #0e1015;
  --bg-3:      #14161c;
  --card:      rgba(20, 22, 28, 0.62);
  --card-2:    rgba(26, 29, 37, 0.72);
  --stroke:    rgba(255, 255, 255, 0.08);
  --stroke-2:  rgba(255, 255, 255, 0.14);
  --text:      #e9edf3;
  --muted:     #97a0af;
  --muted-2:   #949cab; /* контраст ≥4.5:1 на фоне и карточках (WCAG AA) */

  --green:     #7bff66;
  --teal:      #48e0b0;
  --blue:      #3d7bff;
  --gold:      #d8a94e;
  --danger:    #ff4d57;
  --warn:      #ffc53d;
  --magenta:   #ff45d0;

  /* палитра глубин из приложения */
  --d0: #46e6c8; --d1: #2fbcd0; --d2: #2b8fc6; --d3: #2d68b6; --d4: #2d4ea0; --d5: #243a86;

  --grad:      linear-gradient(120deg, #7bff66 0%, #48e0b0 52%, #3d7bff 100%);
  --grad-soft: linear-gradient(120deg, rgba(123,255,102,.16), rgba(61,123,255,.16));

  --radius:    24px;
  --radius-sm: 16px;
  --shadow:    0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-2:  0 40px 120px rgba(0, 0, 0, 0.6);
  --blur:      blur(20px) saturate(150%);
  --maxw:      1200px;
  --ease:      cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "SF Pro Display", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: block; }

/* Мягкий фоновый градиент под всей страницей */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1200px 820px at 78% -8%, #16202f 0%, transparent 58%),
    radial-gradient(1000px 700px at 8% 12%, #101a17 0%, transparent 55%),
    linear-gradient(180deg, #0a0b0e 0%, #0b0d11 100%);
}

/* ==========================================================================
   WebGL «живая карта глубин» — фон hero
   ========================================================================== */
/* Абсолютное позиционирование: фон покрывает только зону hero и уезжает
   при скролле, не просвечивая сквозь нижние секции. body { position: relative } */
#bathy {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100vh;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.1s ease;
}
#bathy.is-ready { opacity: 1; }

.hero-scrim {
  position: absolute; top: 0; left: 0; right: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,11,14,.55) 0%, rgba(10,11,14,.2) 30%, rgba(10,11,14,.72) 82%, var(--bg) 100%),
    radial-gradient(70% 60% at 24% 42%, rgba(10,11,14,.55), transparent 70%);
  height: 100vh;
}

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn {
  --b: 0;
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 650; font-size: 15px; letter-spacing: .1px;
  padding: 12px 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .16s var(--ease), box-shadow .25s var(--ease), background .25s ease, border-color .25s ease, opacity .2s;
  will-change: transform;
}
.btn__ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn__ico--r { width: 17px; height: 17px; }
.btn:active { transform: scale(.96); }

.btn--primary {
  color: #06210a;
  background: var(--grad);
  background-size: 160% 160%;
  box-shadow: 0 10px 30px rgba(72, 224, 176, .28), inset 0 1px 0 rgba(255,255,255,.35);
  animation: gradShift 8s ease infinite;
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(72, 224, 176, .42), inset 0 1px 0 rgba(255,255,255,.4); }
@keyframes gradShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.btn--glass, .btn--ghost {
  color: var(--text);
  background: var(--card);
  border-color: var(--stroke-2);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.btn--glass:hover, .btn--ghost:hover { background: rgba(40,44,54,.7); border-color: rgba(255,255,255,.24); transform: translateY(-2px); }
.btn--ghost { padding: 9px 16px; font-size: 14px; }

.btn--lg { padding: 15px 26px; font-size: 16px; }
.btn--xl { padding: 18px 34px; font-size: 18px; border-radius: 999px; }

/* ==========================================================================
   Навигация
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 20px;
  padding: 16px clamp(16px, 4vw, 40px);
  transition: padding .3s var(--ease), background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-top: 11px; padding-bottom: 11px;
  background: rgba(10, 11, 14, .72);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom-color: var(--stroke);
}
.nav__brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.nav__logo { border-radius: 9px; }
.nav__name { font-weight: 750; font-size: 19px; letter-spacing: -.2px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--muted); font-size: 15px; font-weight: 550; transition: color .2s; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 2px; background: var(--grad); border-radius: 2px; transition: right .3s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { right: 0; }
.nav__cta { margin-left: 8px; }

/* ==========================================================================
   Общие блоки секций
   ========================================================================== */
.section {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(64px, 10vw, 130px) clamp(18px, 5vw, 40px);
}
.section__head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.kicker {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--teal); margin-bottom: 16px;
}
.section__title {
  font-size: clamp(30px, 5.2vw, 52px); line-height: 1.08; font-weight: 780; letter-spacing: -1.2px;
}
.section__sub { margin-top: 18px; font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); line-height: 1.6; }

.grad-text {
  background: var(--grad); background-size: 180% 180%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradShift 9s ease infinite;
}

/* Анимация появления при скролле (скрываем только если работает JS — иначе
   контент остаётся видимым при отключённом JavaScript) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: var(--maxw); margin: 0 auto;
  padding: 120px clamp(18px, 5vw, 40px) 80px;
}
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 60px); align-items: center;
}
.hero__copy { max-width: 560px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600; letter-spacing: .3px; color: var(--text);
  padding: 7px 14px 7px 11px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--stroke-2);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  margin-bottom: 24px;
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.8); } }

.hero__title {
  font-size: clamp(40px, 8.4vw, 78px); line-height: 1.02; font-weight: 800; letter-spacing: -2.2px;
}
.hero__lead { margin-top: 22px; font-size: clamp(16px, 2.4vw, 20px); color: var(--muted); max-width: 500px; }
.hero__actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero__meta {
  margin-top: 30px; list-style: none; display: flex; flex-wrap: wrap; gap: 12px 22px;
}
.hero__meta li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 550; }
.hero__meta svg { width: 17px; height: 17px; fill: none; stroke: var(--teal); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- 3D-макет телефона ---- */
.hero__device { position: relative; display: grid; place-items: center; perspective: 1400px; min-height: 560px; }
.phone {
  position: relative;
  width: clamp(230px, 26vw, 290px); aspect-ratio: 9 / 19.3;
  transform-style: preserve-3d;
  transform: rotateY(-16deg) rotateX(6deg) rotateZ(1deg);
  transition: transform .25s var(--ease);
  animation: floatY 6s ease-in-out infinite;
}
@keyframes floatY { 0%,100% { translate: 0 -6px; } 50% { translate: 0 10px; } }
.phone__glow {
  position: absolute; inset: -18% -12%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(72,224,176,.34), rgba(61,123,255,.16) 55%, transparent 78%);
  filter: blur(18px); animation: pulseGlow 7s ease-in-out infinite;
}
@keyframes pulseGlow { 0%,100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.phone__frame {
  position: absolute; inset: 0; border-radius: 42px; padding: 10px;
  background: linear-gradient(155deg, #2a2e38, #0c0e12 46%, #16191f);
  box-shadow: var(--shadow-2), inset 0 0 0 1.5px rgba(255,255,255,.08), inset 0 2px 6px rgba(255,255,255,.06);
}
.phone__notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 22px; background: #05060a; border-radius: 0 0 14px 14px; z-index: 6;
}
.phone__screen {
  position: relative; width: 100%; height: 100%; border-radius: 33px; overflow: hidden;
  background: #0c1018; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6);
}

/* мини-карта глубин */
.mini-map { position: absolute; inset: 0; }
.mini-map__water {
  position: absolute; inset: 0;
  background:
    radial-gradient(130% 96% at 52% 44%,
      var(--d5) 0%, var(--d5) 14%, var(--d4) 27%, var(--d3) 42%,
      var(--d2) 57%, var(--d1) 72%, var(--d0) 87%, #2f7a6e 96%, #1f4a44 100%);
}
.mini-map__water::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 55% at 30% 24%, rgba(255,255,255,.06), transparent 60%);
  mix-blend-mode: screen;
}
.mini-map__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mm-contours ellipse { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1; }
.mm-fairway-halo { fill: none; stroke: rgba(6,14,20,.45); stroke-width: 9; stroke-linecap: round; }
.mm-route { fill: none; stroke: var(--magenta); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 9 8; filter: drop-shadow(0 0 4px rgba(255,69,208,.6)); animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -34; } }
.mm-dest path { fill: var(--danger); stroke: #1a0f0f; stroke-width: 1.5; }
.mm-dest__c { fill: #1a0f0f; }

.mm-vessel { position: absolute; left: 12.5%; bottom: 6%; width: 34px; height: 34px; }
.mm-vessel__cone {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-50%,-50%) rotate(-34deg);
  border-left: 15px solid transparent; border-right: 15px solid transparent;
  border-bottom: 46px solid rgba(123,255,102,.22); transform-origin: 50% 100%;
}
.mm-vessel__dot {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--green);
  border: 2.5px solid #06210a; box-shadow: 0 0 0 3px rgba(123,255,102,.28), 0 0 14px rgba(123,255,102,.7);
}

/* карточка манёвра в телефоне */
.mm-maneuver {
  position: absolute; top: 30px; left: 10px; right: 10px; z-index: 5;
  display: flex; align-items: center; gap: 8px; padding: 8px 9px;
  background: rgba(18,20,26,.74); border: 1px solid var(--stroke); border-radius: 15px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 20px rgba(0,0,0,.4);
}
.mm-maneuver__ic { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; font-size: 18px; font-weight: 700; color: var(--green); background: rgba(123,255,102,.16); border-radius: 9px; }
.mm-maneuver__txt { flex: 1 1 auto; min-width: 0; }
.mm-maneuver__dist { font-size: 16px; font-weight: 700; letter-spacing: -.3px; line-height: 1; }
.mm-maneuver__sub { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.mm-depthbadge { flex: 0 0 auto; text-align: center; padding: 4px 8px; border-radius: 9px; background: rgba(61,123,255,.16); border: 1px solid rgba(61,123,255,.35); }
.mm-depthbadge__val { font-size: 14px; font-weight: 700; color: #9fc0ff; line-height: 1; }
.mm-depthbadge__cap { font-size: 6.5px; color: var(--muted); margin-top: 2px; }

.mm-compass { position: absolute; top: 88px; left: 10px; z-index: 5; width: 34px; height: 34px; border-radius: 50%; background: rgba(18,20,26,.74); border: 1px solid var(--stroke); display: grid; place-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mm-compass svg { width: 34px; height: 34px; }
.mm-c-ring { fill: none; stroke: var(--stroke-2); stroke-width: 1.5; }
.mm-c-n { fill: var(--danger); }
.mm-c-s { fill: var(--muted); }
.mm-c-rose { transform-box: fill-box; transform-origin: center; animation: roseSpin 14s linear infinite; }
@keyframes roseSpin { to { transform: rotate(360deg); } }

.mm-legend { position: absolute; left: 10px; bottom: 92px; z-index: 5; padding: 7px 9px; background: rgba(18,20,26,.74); border: 1px solid var(--stroke); border-radius: 11px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mm-legend__title { font-size: 8px; color: var(--muted); margin-bottom: 5px; }
.mm-legend__scale { display: flex; gap: 3px; }
.mm-legend__scale span { font-size: 7px; color: #cfd6e0; width: 15px; height: 15px; display: grid; place-items: center; border-radius: 4px; background: var(--c); color: #08121a; font-weight: 700; }

.mm-dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; height: 128px; display: grid; place-items: center; background: linear-gradient(180deg, transparent, rgba(8,10,14,.82) 46%); }
.mm-speedo { position: relative; width: 108px; height: 108px; }
.mm-speedo__svg { width: 100%; height: 100%; overflow: visible; }
.mm-speedo__track { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 12; stroke-linecap: round; }
.mm-speedo__fill { fill: none; stroke-width: 12; stroke-linecap: round; stroke-dasharray: 402; stroke-dashoffset: 402; filter: drop-shadow(0 0 6px rgba(72,224,176,.5)); }
.mm-speedo__center { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.mm-speedo__val { font-size: 30px; font-weight: 750; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.mm-speedo__unit { font-size: 9px; color: var(--muted); margin-top: 2px; }

/* плашки у телефона */
.device-badge {
  position: absolute; z-index: 8; padding: 11px 15px; border-radius: 15px;
  background: var(--card-2); border: 1px solid var(--stroke-2);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
.device-badge__k { font-size: 11px; color: var(--teal); font-weight: 700; letter-spacing: .3px; }
.device-badge__v { font-size: 14px; font-weight: 650; margin-top: 2px; }
.device-badge--depth { top: 12%; left: -6%; animation: floatY 7s ease-in-out infinite; }
.device-badge--route { bottom: 14%; right: -4%; animation: floatY 8s ease-in-out .8s infinite; }

/* индикатор прокрутки */
.hero__scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--stroke-2); border-radius: 14px; display: grid; justify-items: center; padding-top: 7px; }
.hero__scroll span { width: 4px; height: 8px; border-radius: 2px; background: var(--teal); animation: scrollDot 1.8s var(--ease) infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 80%,100% { opacity: 0; transform: translateY(12px); } }

/* ==========================================================================
   Бегущая строка
   ========================================================================== */
.marquee { position: relative; z-index: 1; overflow: hidden; padding: 26px 0; border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); background: rgba(12,14,19,.5); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__row { display: inline-flex; align-items: center; gap: 22px; white-space: nowrap; animation: marquee 34s linear infinite; }
.marquee__row span { font-size: clamp(18px, 3vw, 26px); font-weight: 700; letter-spacing: -.4px; color: #cdd4de; }
.marquee__row i { color: var(--teal); font-style: normal; font-size: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Возможности
   ========================================================================== */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat {
  position: relative; padding: 26px 22px 24px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--stroke);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  overflow: hidden; transition: transform .3s var(--ease), border-color .3s ease, box-shadow .3s ease;
}
.feat::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(120% 90% at 12% 0%, rgba(72,224,176,.16), transparent 60%);
  background: radial-gradient(120% 90% at 12% 0%, color-mix(in srgb, var(--accent, #48e0b0) 16%, transparent), transparent 60%);
}
.feat:hover { border-color: rgba(72,224,176,.45); border-color: color-mix(in srgb, var(--accent, #48e0b0) 45%, transparent); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.feat:hover::before { opacity: 1; }
.feat__ico {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 18px;
  /* fallback-first: движки без color-mix оставляют rgba-значение, а не отбрасывают всё правило */
  background: rgba(72,224,176,.12);
  background: color-mix(in srgb, var(--accent, #48e0b0) 15%, rgba(255,255,255,.02));
  border: 1px solid rgba(72,224,176,.3);
  border: 1px solid color-mix(in srgb, var(--accent, #48e0b0) 30%, transparent);
}
.feat__ico svg { width: 25px; height: 25px; fill: none; stroke: var(--accent, #48e0b0); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feat h3 { font-size: 18.5px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 8px; position: relative; }
.feat p { font-size: 14.5px; color: var(--muted); line-height: 1.55; position: relative; }

/* ==========================================================================
   Глубины
   ========================================================================== */
.depth__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 70px); align-items: center; }
.depth__list { list-style: none; margin: 26px 0 30px; display: grid; gap: 13px; }
.depth__list li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #d3d9e2; }
.chk { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; background: var(--grad-soft); border: 1px solid rgba(72,224,176,.4); position: relative; }
.chk::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px; border: solid var(--teal); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.depth__legend { padding: 18px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--stroke); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.depth__legend-title { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 11px; }
.depth__legend-bar { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--d0), var(--d1), var(--d2), var(--d3), var(--d4), var(--d5)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.depth__legend-marks { display: flex; justify-content: space-between; margin-top: 9px; font-size: 12px; color: var(--muted-2); }

.depth__viz { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--stroke-2); box-shadow: var(--shadow-2); background: #0a1420; }
#depth-canvas { width: 100%; height: 100%; display: block; }
.depth__viz-tag { position: absolute; right: 16px; bottom: 16px; padding: 12px 16px; border-radius: 14px; background: rgba(10,12,17,.7); border: 1px solid rgba(61,123,255,.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: right; }
.depth__viz-tag-val { font-size: 26px; font-weight: 750; color: #9fc0ff; line-height: 1; font-variant-numeric: tabular-nums; }
.depth__viz-tag-cap { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ==========================================================================
   Приборы
   ========================================================================== */
.instruments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.instr {
  padding: 30px 24px 26px; border-radius: var(--radius); text-align: center;
  background: var(--card); border: 1px solid var(--stroke);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: transform .3s var(--ease), border-color .3s ease, box-shadow .3s ease;
}
.instr:hover { border-color: var(--stroke-2); box-shadow: 0 22px 54px rgba(0,0,0,.45); }
.instr__stage { display: grid; place-items: center; height: 200px; }
.instr__label { margin-top: 18px; font-size: 18px; font-weight: 700; }
.instr__desc { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* gauge (спидометр) */
.gauge { position: relative; width: 190px; height: 190px; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge__track { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 16; stroke-linecap: round; }
.gauge__fill { fill: none; stroke-width: 16; stroke-linecap: round; stroke-dasharray: 566; stroke-dashoffset: 566; filter: drop-shadow(0 0 8px rgba(72,224,176,.45)); transition: stroke-dashoffset .1s linear; }
.gauge__center { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.gauge__val { font-size: 52px; font-weight: 780; letter-spacing: -2px; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge__unit { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* компас */
.compass-big { position: relative; width: 190px; height: 190px; }
.compass-big svg { width: 100%; height: 100%; }
.cb-ring { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 2; }
.cb-hub { fill: rgba(255,255,255,.04); stroke: rgba(255,255,255,.1); }
.cb-ticks line { stroke: rgba(255,255,255,.4); }
.cb-north { fill: var(--danger); }
.cb-south { fill: var(--muted); }
#compass-rose-big { transform-box: fill-box; transform-origin: center; }
.compass-big__mark { position: absolute; top: -3px; left: 50%; transform: translateX(-50%); width: 3px; height: 16px; background: #fff; border-radius: 2px; box-shadow: 0 0 8px rgba(255,255,255,.5); }
.compass-big__read { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; font-size: 34px; font-weight: 300; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.compass-big__read em { font-size: 16px; color: var(--muted); font-style: normal; font-weight: 400; }

/* топливо */
.fuel { width: 100%; max-width: 230px; text-align: left; }
.fuel__head { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.fuel__ico { width: 20px; height: 20px; fill: none; stroke: var(--green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fuel__headline { margin: 14px 0 12px; font-size: 30px; font-weight: 750; letter-spacing: -1px; }
.fuel__headline i { color: var(--muted-2); font-style: normal; margin: 0 4px; }
.fuel__scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted-2); margin-bottom: 6px; }
.fuel__track { height: 16px; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.4); }
.fuel__fill { height: 100%; width: 0%; border-radius: 9px; background: var(--grad); box-shadow: 0 0 14px rgba(72,224,176,.5); transition: width 1.4s var(--ease); }

/* ==========================================================================
   Офлайн
   ========================================================================== */
.offline { text-align: center; }
.offline__inner {
  position: relative; max-width: 860px; margin: 0 auto;
  padding: clamp(44px, 7vw, 78px) clamp(24px, 5vw, 56px); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(20,26,38,.7), rgba(14,16,22,.65));
  border: 1px solid var(--stroke-2); overflow: hidden;
  box-shadow: var(--shadow);
}
.offline__inner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 70% at 50% 0%, rgba(61,123,255,.16), transparent 65%); }
.offline__badge { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--stroke-2); font-size: 14px; font-weight: 600; color: var(--teal); margin-bottom: 20px; }
.offline__badge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.offline__sub { max-width: 620px; margin-left: auto; margin-right: auto; position: relative; }
.offline__stats { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(28px, 6vw, 68px); margin-top: 40px; }
.ostat__num { font-size: clamp(34px, 6vw, 52px); font-weight: 800; letter-spacing: -1.5px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ostat__cap { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ==========================================================================
   Скачать
   ========================================================================== */
.download { display: grid; place-items: center; }
.download__card {
  position: relative; width: 100%; max-width: 880px; text-align: center;
  padding: clamp(44px, 7vw, 76px) clamp(24px, 5vw, 60px); border-radius: 32px;
  background: linear-gradient(165deg, rgba(22,28,40,.72), rgba(12,14,20,.72));
  border: 1px solid var(--stroke-2); overflow: hidden; box-shadow: var(--shadow-2);
}
.download__glow { position: absolute; top: -40%; left: 50%; transform: translateX(-50%); width: 120%; height: 90%; background: radial-gradient(closest-side, rgba(72,224,176,.22), transparent 70%); pointer-events: none; animation: pulseGlow 8s ease-in-out infinite; }
.download__logo { position: relative; width: 108px; height: 108px; margin: 0 auto 22px; filter: drop-shadow(0 14px 40px rgba(0,0,0,.5)); }
.download .kicker, .download .section__title, .download .section__sub { position: relative; }
.download .section__sub { max-width: 520px; margin-left: auto; margin-right: auto; }
.download .btn--xl { position: relative; margin-top: 34px; }
.download__meta { position: relative; margin-top: 16px; font-size: 13.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; text-align: left; }
.step { padding: 22px 20px; border-radius: var(--radius-sm); background: rgba(255,255,255,.03); border: 1px solid var(--stroke); }
.step__n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 750; font-size: 16px; color: #06210a; background: var(--grad); margin-bottom: 14px; }
.step__t { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.step__d { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ==========================================================================
   Подвал
   ========================================================================== */
.footer {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  padding: 46px clamp(18px, 5vw, 40px); border-top: 1px solid var(--stroke);
  display: flex; align-items: center; gap: 24px 40px; flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 13px; margin-right: auto; }
.footer__brand img { border-radius: 10px; }
.footer__name { font-weight: 750; font-size: 17px; }
.footer__tag { font-size: 13px; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__links a { font-size: 13.5px; color: var(--muted); transition: color .2s; padding: 8px 0; } /* увеличенная тап-зона */
.footer__links a:hover { color: var(--text); }
.footer__copy { width: 100%; font-size: 12.5px; color: var(--muted-2); padding-top: 8px; }

/* ==========================================================================
   Фокус клавиатуры — единый фирменный индикатор (WCAG 2.4.7)
   ========================================================================== */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.btn:focus-visible,
.nav__brand:focus-visible,
.nav__links a:focus-visible,
.footer__links a:focus-visible,
.hero__scroll:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
/* мышью фокус-кольцо не показываем (используем :focus-visible, не убираем outline совсем) */

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 940px) {
  .nav__links { display: none; }
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { max-width: 640px; margin: 0 auto; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__actions, .hero__meta { justify-content: center; }
  .hero__device { min-height: 520px; margin-top: 10px; order: -1; }
  .phone { transform: rotateY(-10deg) rotateX(4deg); }
  .depth__grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .instruments { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .device-badge--depth { left: 0; }
  .device-badge--route { right: 0; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 100px; }
  .hero__meta { gap: 10px 16px; }
  .device-badge { display: none; }
  .btn--lg { padding: 14px 22px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Уважение к prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .phone { animation: none; }
}
