/* Downlink — marketing site design system.
   Identity: "the flight plan" — sectional-chart dark sky, serpentine survey
   paths that draw themselves, waypoint dots, golden-hour warmth on CTAs. */

:root {
  --bg: #070d16;
  --bg-2: #0a1220;
  --panel: #0d1524;
  --panel-2: #131e31;
  --line: #1e2c44;
  --line-bright: #2b3f61;
  --text: #e6edf6;
  --mute: #93a6bf;
  --accent: #38bdf8;
  --accent-2: #0ea5e9;
  --gold: #fbbf24;
  --ok: #34d399;
  --ink: #04121f;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* sectional-chart backdrop: faint grid + ambient glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(14, 165, 233, 0.13), transparent 65%),
    radial-gradient(700px 420px at 0% 30%, rgba(56, 189, 248, 0.07), transparent 60%),
    radial-gradient(800px 500px at 100% 90%, rgba(251, 191, 36, 0.05), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; position: relative; }
a { color: var(--accent); text-decoration: none; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent));
  border-radius: 2px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; color: #fff; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; margin: 18px 0; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; margin: 14px 0 10px; }
h3 { font-size: 1.15rem; font-weight: 700; }
.sub { color: var(--mute); font-size: 1.1rem; max-width: 640px; }
em { font-style: normal; color: var(--accent); }
.gold-em { font-style: normal; color: var(--gold); }

/* ── nav ── */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 13, 22, 0.75);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 64px;
}
.logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo i.lk { color: var(--accent); font-style: normal; }
.logo svg { display: block; }
.nav nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav nav a {
  color: var(--mute);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease;
}
.nav nav a:hover { color: var(--text); }
.nav nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }

/* ── buttons ── */
.btn {
  display: inline-block;
  border-radius: 11px;
  padding: 13px 24px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--ink);
  box-shadow: 0 4px 24px -6px rgba(14, 165, 233, 0.55);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px -6px rgba(14, 165, 233, 0.7); }
.btn.ghost { border: 1px solid var(--line-bright); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn.small { padding: 9px 16px; font-size: 0.88rem; border-radius: 9px; }

/* ── title typewriter ── */
/* pre-hide only when JS is active so no-JS keeps the title visible */
.js .type-title { visibility: hidden; }
.js .type-title.typing, .js .type-title.typed { visibility: visible; }
.type-caret {
  display: inline-block;
  width: 3px;
  height: 0.92em;
  margin-left: 4px;
  vertical-align: baseline;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .js .type-title { visibility: visible; }
  .type-caret { display: none; }
}

/* ── hero ── */
.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; }

/* ambient blurred drone footage behind the hero */
.hero-bg {
  position: absolute;
  inset: -6% -3%;              /* overscan so the blur has no bare edges */
  width: 106%;
  height: 112%;
  object-fit: cover;
  z-index: 0;
  filter: blur(12px) saturate(1.08) brightness(0.78);
  transform: translateZ(0) scale(1.04);
  pointer-events: none;
}
/* just enough darkening for the copy to stay crisp, footage stays readable */
.hero-bg-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7,13,22,.82) 0%, rgba(7,13,22,.52) 42%, rgba(7,13,22,.22) 100%),
    linear-gradient(to bottom, rgba(7,13,22,.2) 0%, rgba(7,13,22,0) 32%, rgba(7,13,22,.42) 80%, var(--bg) 100%);
}
@media (max-width: 720px) {
  .hero-bg-veil { background:
    linear-gradient(to bottom, rgba(7,13,22,.5) 0%, rgba(7,13,22,.66) 55%, var(--bg) 100%); }
}
@media (prefers-reduced-motion: reduce) { .hero-bg { display: none; } }
.hero-copy { max-width: 720px; position: relative; z-index: 2; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { margin-top: 14px; color: var(--mute); font-size: 0.85rem; }

/* the serpentine flight path that draws itself */
.fp {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.fp path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 7;
  opacity: 0.5;
}
.fp circle { fill: var(--accent); opacity: 0; }
.fp.draw path {
  stroke-dashoffset: 1400;
  animation: fp-draw 3.2s cubic-bezier(0.3, 0, 0.2, 1) forwards;
}
.fp.draw circle { animation: fp-dot 0.4s ease forwards; }
.fp.draw circle:nth-of-type(1) { animation-delay: 0.5s; }
.fp.draw circle:nth-of-type(2) { animation-delay: 1s; }
.fp.draw circle:nth-of-type(3) { animation-delay: 1.5s; }
.fp.draw circle:nth-of-type(4) { animation-delay: 2s; }
.fp.draw circle:nth-of-type(5) { animation-delay: 2.5s; }
.fp.draw circle:nth-of-type(6) { animation-delay: 2.9s; }
@keyframes fp-draw { to { stroke-dashoffset: 0; } }
@keyframes fp-dot { to { opacity: 0.85; } }

/* ── screenshot frames ── */
.shot {
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(56, 189, 248, 0.06);
  position: relative;
}
.shot::before {
  content: "";
  display: block;
  height: 34px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  background-image: radial-gradient(circle 5px at 20px 17px, #ef4444 5px, transparent 6px),
    radial-gradient(circle 5px at 40px 17px, #fbbf24 5px, transparent 6px),
    radial-gradient(circle 5px at 60px 17px, #34d399 5px, transparent 6px);
}
.shot img { width: 100%; display: block; }
.shot.bare::before { display: none; }

/* floating verdict chips over the hero shot */
.float-chip {
  position: absolute;
  z-index: 3;
  background: rgba(13, 21, 36, 0.92);
  border: 1px solid var(--line-bright);
  border-radius: 99px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: chip-float 5s ease-in-out infinite;
}
.float-chip .dot { width: 8px; height: 8px; border-radius: 99px; }
.float-chip.ok { color: var(--ok); }
.float-chip.ok .dot { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.float-chip.gold { color: var(--gold); }
.float-chip.gold .dot { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.float-chip:nth-child(2) { animation-delay: 2.5s; }
@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ── stat strip ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 56px;
}
.stat-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-align: center;
}
.stat-tile b { display: block; font-size: 1.7rem; color: #fff; letter-spacing: -0.02em; }
.stat-tile span { color: var(--mute); font-size: 0.84rem; }

/* ── cards ── */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 44px; }
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.65);
}
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--mute); font-size: 0.94rem; }

/* ── split feature rows ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
  margin-top: 40px;
}
.split + .split { margin-top: 96px; }
.split.flip > :first-child { order: 2; }
ul.check { list-style: none; margin-top: 18px; }
ul.check li {
  padding: 9px 0 9px 34px;
  position: relative;
  color: var(--mute);
  font-size: 0.98rem;
}
ul.check li strong { color: var(--text); }
ul.check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 7px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--ok);
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.caption { font-size: 0.82rem; color: var(--mute); margin-top: 10px; }

/* ── pricing ── */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; align-items: stretch; }
.price-card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
}
.price-card:hover { transform: translateY(-5px); box-shadow: 0 22px 54px -20px rgba(0, 0, 0, 0.7); }
.price-card.featured {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 24px 64px -24px rgba(14, 165, 233, 0.45);
}
.price-card.featured::before {
  content: "MOST POPULAR";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 99px;
  letter-spacing: 0.08em;
}
.price-card h3 { font-size: 1.05rem; }
.price { font-size: 2.6rem; font-weight: 800; color: #fff; margin-top: 8px; letter-spacing: -0.03em; }
.price small { font-size: 1rem; color: var(--mute); font-weight: 500; }
.annual { font-size: 0.8rem; color: var(--mute); margin-bottom: 16px; }
.price-card .check { flex: 1; }
.price-card .btn { text-align: center; margin-top: 20px; }

/* comparison table */
.compare { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: 0.93rem; }
.compare th, .compare td { padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.compare th { color: #fff; font-size: 0.95rem; }
.compare td:first-child, .compare th:first-child { text-align: left; color: var(--text); }
.compare td { color: var(--mute); }
.compare .yes { color: var(--ok); font-weight: 700; }
.compare .no { color: #46586f; }
.compare tr:hover td { background: rgba(56, 189, 248, 0.03); }
.table-scroll { overflow-x: auto; }

/* ── FAQ ── */
.faq { max-width: 780px; margin: 40px auto 0; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq details[open] { border-color: var(--line-bright); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  padding: 18px 20px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--mute); font-size: 0.95rem; padding: 0 20px 18px; }

/* ── CTA band ── */
.cta-band {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 50% 120%, rgba(14, 165, 233, 0.18), transparent 70%),
    var(--bg-2);
  text-align: center;
}
.cta-band .sub { margin: 0 auto; }

/* ── footer ── */
footer.site {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  color: var(--mute);
  font-size: 0.86rem;
}
footer.site .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
footer.site a { color: var(--mute); }
footer.site a:hover { color: var(--accent); }

/* ── showcase media (generated drone footage) ── */
.media-hero {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line-bright);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
}
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.media-grid figure { margin: 0; }
.media-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.media-grid img:hover { transform: scale(1.02); }
.media-grid figcaption { font-size: 0.8rem; color: var(--mute); margin-top: 8px; text-align: center; }
@media (max-width: 920px) { .media-grid { grid-template-columns: 1fr; } }

/* ── scroll reveal ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ── section divider: waypoint dots ── */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: var(--line-bright);
  padding: 0 0 8px;
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  width: 120px;
  background: linear-gradient(90deg, transparent, var(--line-bright));
}
.divider::after { transform: scaleX(-1); }

@media (max-width: 920px) {
  .grid3, .pricing { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.flip > :first-child { order: 0; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .nav nav { gap: 14px; }
  .nav nav a:not(.btn) { display: none; }
  section { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .fp.draw path, .fp.draw circle, .float-chip { animation: none; }
  .fp path { stroke-dashoffset: 0 !important; }
  .fp circle { opacity: 0.85; }
  html { scroll-behavior: auto; }
}
