:root {
  --bg: #0A0F1C;
  --bg-soft: #101828;
  --text: #F4F6FB;
  --text-dim: #9AA5B8;
  --accent: #10B981;
  --accent-2: #0EA5A6;
  --grad: linear-gradient(100deg, #0EA5A6, #10B981);
  --radius: 16px;
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; }
a { color: inherit; text-decoration: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 6vw;
  background: rgba(10, 15, 28, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.logo { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.logo span { color: var(--accent); }
.logo .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); margin-left: 3px; }
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 0.9rem; color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; display: block; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--accent);
  padding: 8px 18px; border-radius: 999px;
  transition: background 0.25s;
}
.nav-cta:hover { background: rgba(16, 185, 129, 0.15); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 130px 6vw 150px;
  text-align: center;
}
.hero-inner { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 700; margin-bottom: 22px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--text-dim); max-width: 580px; margin: 0 auto 36px; }
.btn {
  display: inline-block;
  background: var(--grad);
  color: #04120C; font-weight: 600;
  padding: 14px 34px; border-radius: 999px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35); }
.btn-ghost {
  background: none;
  color: var(--text);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: rgba(16, 185, 129, 0.12); box-shadow: none; }
.mid-cta { margin-top: 40px; text-align: center; }

/* Hero feed cards */
.feed-card {
  position: absolute; z-index: 2;
  pointer-events: none;
  opacity: 0; transform: translateY(14px) scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.feed-card.show { opacity: 1; transform: translateY(0) scale(1); }
.fc-inner {
  display: flex; gap: 10px; align-items: center;
  background: rgba(16, 24, 40, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.feed-card.show .fc-inner { animation: float 5s ease-in-out infinite alternate; }
@keyframes float { from { transform: translateY(-6px); } to { transform: translateY(8px); } }
.fc-inner strong { display: block; font-size: 0.9rem; font-weight: 600; }
.fc-inner div span { color: var(--text-dim); }
.fc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); flex: none; }

/* Orbs */
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; z-index: 1; }
.orb-a { width: 480px; height: 480px; background: #0EA5A6; top: -160px; left: -120px; animation: drift-a 18s ease-in-out infinite alternate; }
.orb-b { width: 420px; height: 420px; background: #10B981; bottom: -180px; right: -100px; animation: drift-b 22s ease-in-out infinite alternate; }
@keyframes drift-a { from { transform: translate(0, 0); } to { transform: translate(70px, 50px); } }
@keyframes drift-b { from { transform: translate(0, 0); } to { transform: translate(-60px, -40px); } }

/* Sections */
section { padding: 90px 6vw; }
.section-inner { max-width: 1080px; margin: 0 auto; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 20px; }
.lead { color: var(--text-dim); max-width: 640px; margin-bottom: 48px; }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 32px; }
.metric { border-top: 2px solid var(--accent); padding-top: 16px; }
.metric-value { display: block; font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--accent); }
.metric-label { color: var(--text-dim); font-size: 0.9rem; }

/* Volume chart */
.chart {
  position: relative;
  margin-top: 40px;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 28px;
}
.chart svg { width: 100%; height: auto; display: block; }
.chart.in .chart-line { animation: draw 1.8s ease forwards 0.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart-area { opacity: 0; transition: opacity 1s ease 0.9s; }
.chart.in .chart-area { opacity: 1; }
.chart figcaption { color: var(--text-dim); font-size: 0.9rem; margin-top: 14px; text-align: center; }
.grid-line { stroke: rgba(255, 255, 255, 0.07); }
.grid-text { fill: var(--text-dim); font-size: 11px; font-family: var(--font-body); }
.chart-dot {
  fill: #34D399;
  opacity: 0; transform: scale(0);
  transform-box: fill-box; transform-origin: center;
  transition: opacity 0.4s ease var(--d, 0s), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s);
}
.chart.in .chart-dot { opacity: 1; transform: scale(1); }
.chart-pulse {
  fill: rgba(52, 211, 153, 0.45);
  transform-box: fill-box; transform-origin: center;
  animation: pulse 2.2s ease-in-out infinite;
}
.chart-guide { stroke: rgba(255, 255, 255, 0.18); stroke-dasharray: 3 4; opacity: 0; transition: opacity 0.2s; }
.chart-tip {
  position: absolute; z-index: 3;
  transform: translate(-50%, -100%);
  pointer-events: none;
  background: rgba(16, 24, 40, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0; transition: opacity 0.15s;
}

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 40px; }
.card {
  background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform 0.3s, border-color 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(16, 185, 129, 0.4); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(16, 185, 129, 0.12); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.9rem; }

/* Product dashboard mockup */
.dash {
  display: grid; grid-template-columns: 190px 1fr;
  margin-top: 40px;
  background: #0C1220;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  font-size: 0.85rem;
  user-select: none;
}
.dash-side {
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(16, 24, 40, 0.5);
  padding: 20px 0;
}
.dash-brand { font-family: var(--font-head); font-weight: 700; padding: 0 20px 16px; }
.dash-brand span { color: var(--accent); }
.dash-brand .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); margin-left: 2px; }
.dash-menu { list-style: none; }
.dash-menu li { padding: 9px 20px; color: var(--text-dim); border-left: 2px solid transparent; }
.dash-menu li.active { color: var(--text); background: rgba(16, 185, 129, 0.1); border-left-color: var(--accent); }
.dash-user { margin-top: auto; padding: 18px 20px 0; display: flex; gap: 10px; align-items: center; color: var(--text-dim); }
.dash-user span {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--grad); color: #04120C; font-weight: 600; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}
.dash-main { padding: 20px; min-width: 0; }
.dash-top { display: flex; gap: 10px; margin-bottom: 14px; }
.dash-filter { flex: 1; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 8px 12px; color: var(--text-dim); }
.dash-apply { background: var(--grad); color: #04120C; font-weight: 600; border-radius: 8px; padding: 8px 22px; }
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.kpi { background: var(--bg-soft); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 10px; padding: 14px 16px; }
.kpi-label { display: block; color: var(--text-dim); font-size: 0.75rem; }
.kpi-value { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; margin: 2px 0; white-space: nowrap; }
.kpi-delta { color: #34D399; font-size: 0.75rem; }
.dash-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.dash-card {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
  grid-column: span 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
}
.dash-wide { grid-column: span 4; display: block; }
.dc-label { display: block; width: 100%; color: var(--text-dim); font-size: 0.75rem; }
.dc-value { font-family: var(--font-head); font-weight: 600; white-space: nowrap; }
.dc-bars { display: flex; gap: 8px; align-items: flex-end; height: 72px; margin-top: 12px; }
.dc-bars i {
  flex: 1; height: calc(var(--h) * 100%);
  background: linear-gradient(180deg, #34D399, #0EA5A6);
  border-radius: 4px 4px 0 0;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.dash.in .dc-bars i { transform: scaleY(1); }
.dc-bars i:nth-child(2) { transition-delay: 0.08s; }
.dc-bars i:nth-child(3) { transition-delay: 0.16s; }
.dc-bars i:nth-child(4) { transition-delay: 0.24s; }
.dc-bars i:nth-child(5) { transition-delay: 0.32s; }
.dc-bars i:nth-child(6) { transition-delay: 0.4s; }
.dc-bars i:nth-child(7) { transition-delay: 0.48s; }
.dash-spark { display: block; }
.dc-spark { width: 100%; height: 40px; margin-top: 12px; }
.dc-spark polyline { stroke: #34D399; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.dc-pie { width: 44px; height: 44px; border-radius: 50%; margin-left: auto; background: conic-gradient(var(--pie)); }

/* Why pillars */
.why { background: var(--bg-soft); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.pillar { border-top: 2px solid var(--accent); padding-top: 18px; }
.pillar h3 { font-size: 1.2rem; margin-bottom: 8px; }
.pillar p { color: var(--text-dim); font-size: 0.9rem; }

/* Coverage map */
.coverage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.coverage-text p { color: var(--text-dim); max-width: 460px; }
.cities {
  color: var(--text) !important;
  font-family: var(--font-head); font-size: 0.9rem;
  margin-top: 18px;
  display: flex; align-items: center;
}
.cities-road { color: var(--text-dim) !important; margin-top: 8px; }
.dot-live, .dot-road { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; }
.dot-live { background: var(--accent); }
.dot-road { border: 1.5px solid rgba(16, 185, 129, 0.55); }
.coverage-map svg { width: 100%; max-width: 420px; margin: 0 auto; display: block; }
#latam-map .dot { fill: rgba(16, 185, 129, 0.28); }
#latam-map .city {
  fill: var(--accent);
  transform-box: fill-box; transform-origin: center;
  animation: pulse 2.4s ease-in-out infinite;
}
#latam-map .city-road { fill: rgba(16, 185, 129, 0.5); }
@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.7); }
}

/* CTA */
.cta { text-align: center; padding: 120px 6vw; }
.cta p { color: var(--text-dim); margin-bottom: 32px; }
.cta-mail { margin: 16px 0 0 !important; font-size: 0.9rem; }
.trust-strip {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 10px 12px; justify-content: center;
  margin-top: 44px;
  color: var(--text-dim); font-size: 0.8rem;
}
.trust-strip li { border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 6px 14px; }

/* Footer */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 6vw;
  display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between; align-items: center;
}
.footer-links { display: flex; gap: 22px; color: var(--text-dim); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-legal { display: flex; gap: 18px; color: var(--text-dim); font-size: 0.8rem; }
.footer-legal a:hover { color: var(--text); }
.copyright { color: var(--text-dim); font-size: 0.8rem; width: 100%; margin-top: 12px; }

/* Reveal (контракт с script.js: .reveal скрыт, .reveal.in показан) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Adaptive */
@media (max-width: 1240px) {
  .feed { display: none; }
}
@media (max-width: 1080px) {
  .metrics, .pillars { grid-template-columns: repeat(2, 1fr); }
  .coverage-grid { grid-template-columns: 1fr; }
  .coverage-map svg { max-width: 320px; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 12px 6vw 20px;
    background: var(--bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 8px 0; }
  .nav-cta { margin-top: 8px; }
  .grid-text { font-size: 17px; }
  .m-hide { display: none; }
  .hero { padding: 90px 6vw 110px; }
  .cards, .metrics, .pillars { grid-template-columns: 1fr; }
  section { padding: 64px 6vw; }
  .dash { grid-template-columns: 1fr; font-size: 0.8rem; }
  .dash-side { display: none; }
  .dash-kpis { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-wide, .dash-spark { grid-column: span 2; }
  .dash-filter:nth-child(3) { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
  .feed-card { transition: none; }
  .feed-card.show .fc-inner { animation: none; }
  #latam-map .city { animation: none; }
  .chart-line { animation: none; }
  .chart-area { opacity: 1; transition: none; }
  .chart-dot { opacity: 1; transform: none; transition: none; }
  .chart-pulse { animation: none; }
  .dc-bars i { transform: none; transition: none; }
}
