:root {
  --bg: #061018;
  --bg-elev: #0a1c28;
  --text: #e8f4f8;
  --muted: #8ba3b5;
  --teal: #00d4aa;
  --aqua: #38bdf8;
  --detect: #7CFC00;
  --detect-warm: #ff9f43;
  --line: rgba(255, 255, 255, 0.1);
  --font: 'Montserrat', sans-serif;
  --radius: 20px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

/* ===== Topbar ===== */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: linear-gradient(180deg, rgba(6, 16, 24, 0.92), rgba(6, 16, 24, 0.4) 70%, transparent);
  backdrop-filter: blur(8px);
}

.topbar a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.25s ease;
}

.topbar > a:first-child,
.topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: #042018;
  background: linear-gradient(115deg, var(--teal), var(--aqua));
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 212, 170, 0.28);
}

.topbar > a:first-child:hover,
.topbar-back:hover {
  color: #042018;
  filter: brightness(1.06);
}

.topbar a:hover { color: var(--teal); }

.topbar > a:first-child:hover,
.topbar-back:hover { color: #042018; }

.topbar-nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: hero-ken 22s ease-in-out infinite alternate;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 16, 24, 0.88) 0%, rgba(6, 16, 24, 0.55) 45%, rgba(6, 16, 24, 0.25) 100%),
    linear-gradient(0deg, rgba(6, 16, 24, 0.95) 0%, rgba(6, 16, 24, 0.35) 42%, transparent 70%);
  pointer-events: none;
}

.hero-scan {
  position: absolute;
  inset: 12% 8% 18% 8%;
  border: 1px solid rgba(124, 252, 0, 0.28);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(124, 252, 0, 0.08), inset 0 0 40px rgba(124, 252, 0, 0.04);
  pointer-events: none;
  opacity: 0.55;
  animation: scan-pulse 4s ease-in-out infinite;
}

.hero-scan::before,
.hero-scan::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--detect);
}

.hero-scan::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.hero-scan::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px 28px 72px;
}

.hero-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--detect);
  margin-bottom: 16px;
  opacity: 0;
  animation: fade-up 0.8s ease 0.1s forwards;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  max-width: 14ch;
  opacity: 0;
  animation: fade-up 0.85s ease 0.2s forwards;
}

.hero-title span {
  background: linear-gradient(115deg, var(--teal), var(--aqua) 60%, var(--detect));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 38ch;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  margin-bottom: 32px;
  opacity: 0;
  animation: fade-up 0.9s ease 0.35s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  animation: fade-up 0.9s ease 0.5s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.btn-primary {
  color: #061018;
  background: var(--teal);
  box-shadow: 0 12px 32px rgba(0, 212, 170, 0.28);
  animation: cta-pulse 2.8s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #1de0b8;
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  border-color: rgba(0, 212, 170, 0.45);
  color: var(--teal);
  transform: translateY(-2px);
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 96px 28px;
}

.section-inner { max-width: var(--max); margin: 0 auto; }

.section-head { max-width: 640px; margin-bottom: 44px; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.section-lead { color: var(--muted); font-size: 1.05rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
}

.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

.prose h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.prose p, .prose li { color: var(--muted); font-size: 0.98rem; }
.prose ul { list-style: none; display: grid; gap: 12px; margin-top: 16px; }

.prose li {
  position: relative;
  padding-left: 18px;
}

.prose li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--detect);
  box-shadow: 0 0 10px rgba(124, 252, 0, 0.45);
}

.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  position: relative;
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.media-frame:hover img { transform: scale(1.05); }

.media-frame--detect {
  box-shadow: 0 0 0 1px rgba(124, 252, 0, 0.2), 0 20px 50px rgba(0, 0, 0, 0.35);
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pair figcaption,
.caption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Problem */
.problem {
  background:
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(255, 159, 67, 0.08), transparent 55%),
    var(--bg);
}

/* Solution */
.solution {
  background: linear-gradient(180deg, var(--bg), var(--bg-elev) 50%, var(--bg));
}

/* Demo */
.demo-video {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid rgba(124, 252, 0, 0.25);
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 212, 170, 0.08);
}

.demo-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

.demo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 14px 0 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

.demo-meta strong { color: var(--teal); font-weight: 600; }

/* Metrics */
.metrics {
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(0, 212, 170, 0.1), transparent 55%),
    var(--bg);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.metric-card {
  padding: 24px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(12, 28, 42, 0.65);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(124, 252, 0, 0.15);
}

.metric-value {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--teal), var(--aqua));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* App */
.app {
  background: linear-gradient(180deg, var(--bg), #071820 40%, var(--bg));
}

.app-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
  align-items: start;
}

.app-shot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  min-width: 0;
}

.app-shot-figure {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(6, 16, 24, 0.85);
  overflow: hidden;
}

.app-shot-figure img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
  object-position: center top;
  border-radius: 12px;
  background: #0b1520;
  transition: transform 0.45s ease;
}

.app-shot:hover .app-shot-figure img {
  transform: scale(1.02);
}

.app-shot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-shot-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--aqua);
}

.app-shot-btn {
  flex: 0 0 auto;
  padding: 10px 16px;
  font-size: 0.8rem;
}

.feature-chips {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  width: 100%;
}

.feature-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 212, 170, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: var(--teal);
  box-sizing: border-box;
  word-break: break-word;
}

/* Environment */
.env-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.env-grid .media-frame { min-height: 280px; }
.env-grid .media-frame img { min-height: 280px; }

/* Results */
.results {
  background:
    radial-gradient(ellipse 50% 40% at 70% 30%, rgba(56, 189, 248, 0.08), transparent 55%),
    var(--bg);
}

.results-list {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

.results-list li {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12, 28, 42, 0.55);
  color: var(--muted);
  list-style: none;
}

.results-list strong { color: var(--text); }

/* Contacts */
.contacts {
  position: relative;
  padding: 100px 28px;
  overflow: hidden;
}

.contacts-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.contacts-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(0.9);
}

.contacts-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 16, 24, 0.75), rgba(6, 16, 24, 0.92));
}

.contacts-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}

.contacts-inner .section-title { margin-left: auto; margin-right: auto; }

.contact-lines {
  display: grid;
  gap: 10px;
  margin: 28px auto 32px;
  max-width: 420px;
  color: var(--muted);
}

.contact-lines a {
  color: var(--aqua);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.contact-lines a:hover {
  color: var(--teal);
  border-color: rgba(0, 212, 170, 0.5);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 28px 48px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer .btn-ghost {
  min-height: 52px;
  padding: 12px 22px;
  font-size: 1rem;
  border-color: rgba(0, 212, 170, 0.45);
  color: var(--teal);
  background: rgba(0, 212, 170, 0.1);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 16, 0.82);
  backdrop-filter: blur(8px);
}

.modal.is-open { display: flex; }

.modal-card {
  width: min(960px, 100%);
  background: #0a1620;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: fade-up 0.35s ease both;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 { font-size: 0.95rem; }

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-card video {
  width: 100%;
  max-height: 70vh;
  background: #000;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--d, 0) * 70ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-ken {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.16) translate3d(-2%, -1%, 0); }
}

@keyframes scan-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 12px 32px rgba(0, 212, 170, 0.25); }
  50% { box-shadow: 0 12px 40px rgba(0, 212, 170, 0.45), 0 0 24px rgba(124, 252, 0, 0.15); }
}

@media (max-width: 900px) {
  .topbar-nav { display: none; }
  .split, .split--reverse, .pair, .metric-grid, .app-shots, .env-grid {
    grid-template-columns: 1fr;
  }
  .split--reverse { direction: ltr; }
  .hero-content {
    padding: 100px 20px 56px;
    text-align: left;
  }
  .hero-scan { display: none; }
  .section { padding: 72px 20px; }
  .env-grid .media-frame,
  .env-grid .media-frame img { min-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img,
  .hero-scan,
  .btn-primary,
  .hero-kicker,
  .hero-title,
  .hero-lead,
  .hero-actions,
  .modal-card { animation: none !important; }
  .hero-kicker, .hero-title, .hero-lead, .hero-actions { opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .media-frame img, .btn, .app-shot-figure img { transition: none; }
  .media-frame:hover img,
  .app-shot:hover .app-shot-figure img { transform: none; }
}
