/* ==========================================================================
   AI-Based Autonomous Navigation System · project site
   Pure CSS: no frameworks, no external fonts, works on GitHub Pages.
   ========================================================================== */
:root {
  --bg: #070b14;
  --bg2: #0b1222;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-b: rgba(255, 255, 255, 0.09);
  --text: #e6edf7;
  --muted: #8a97ad;
  --cyan: #00e5ff;
  --violet: #a855f7;
  --green: #34d399;
  --amber: #f4a261;
  --red: #ff4d6d;
  --grad: linear-gradient(120deg, #00e5ff 0%, #a855f7 60%, #ff4d6d 100%);
  --radius: 18px;
  --shadow: 0 20px 60px -20px rgba(0, 229, 255, 0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {          /* ambient aurora */
  content: "";
  position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 30% at 15% 10%, rgba(0, 229, 255, 0.16), transparent 70%),
    radial-gradient(35% 30% at 85% 20%, rgba(168, 85, 247, 0.18), transparent 70%),
    radial-gradient(40% 35% at 50% 90%, rgba(255, 77, 109, 0.10), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
  filter: blur(20px);
}
@keyframes aurora {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.08) rotate(3deg); }
}
#bg-particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: rgba(0, 229, 255, 0.08); color: #9ff3ff; padding: 2px 7px; border-radius: 6px; font-size: .88em; }
.muted { color: var(--muted); }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 200%; animation: gradshift 8s ease infinite;
}
@keyframes gradshift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.section { padding: 110px 0; position: relative; }
.center { text-align: center; }
h1 { font-size: clamp(2.2rem, 5.4vw, 4.2rem); line-height: 1.08; margin: .2em 0 .4em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin: 0 0 .3em; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; margin: .2em 0 .4em; }
.sub { color: var(--muted); max-width: 720px; margin: 0 0 42px; font-size: 1.07rem; }
.lead { font-size: 1.12rem; color: #c3cee0; max-width: 620px; }
.note { color: var(--muted); font-size: .92rem; margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--panel-b); background: var(--panel); color: var(--text);
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: transform .25s, box-shadow .25s, background .25s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; background: rgba(255,255,255,.08); box-shadow: 0 10px 30px -10px rgba(0,229,255,.4); }
.btn-primary { background: var(--grad); background-size: 200% 200%; animation: gradshift 6s ease infinite; color: #04101a; border: 0; }
.btn-primary:hover { color: #04101a; }
.btn-small { padding: 8px 14px; font-size: .85rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.cta-band .cta { justify-content: center; }

/* ---------- nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .3s, backdrop-filter .3s, box-shadow .3s; }
.nav.scrolled { background: rgba(7, 11, 20, .72); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--panel-b); }
.nav-inner { display: flex; align-items: center; gap: 22px; height: 70px; }
.brand { font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); animation: blink 2.4s infinite; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: #b8c4d8; font-size: .92rem; }
.nav-links a:hover { color: var(--cyan); text-decoration: none; }
.burger { display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 34px; position: relative; }
.burger span { display: block; height: 2px; background: var(--text); margin: 7px 0; transition: .3s; }
@media (max-width: 860px) {
  .nav-links { position: fixed; top: 70px; right: 0; left: 0; flex-direction: column; background: rgba(7,11,20,.96); padding: 18px 6vw; transform: translateY(-120%); transition: transform .35s; margin: 0; }
  .nav-links.open { transform: translateY(0); }
  .burger { display: block; }
  .nav-inner .btn { margin-left: auto; }
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; min-height: 100vh; padding-top: 110px; padding-bottom: 60px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: #9ff3ff; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border: 1px solid rgba(0,229,255,.25); border-radius: 999px; background: rgba(0,229,255,.06); margin: 0; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 100% { box-shadow: 0 0 0 14px rgba(52,211,153,0); } }
.typing { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--cyan); min-height: 1.6em; margin: 18px 0 0; font-size: 1rem; }
.caret { animation: blink 1s steps(1) infinite; margin-left: 2px; }
.hero-card {
  position: relative; border-radius: var(--radius); padding: 14px; background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--panel-b); box-shadow: var(--shadow); transform-style: preserve-3d;
}
.hero-card canvas { width: 100%; aspect-ratio: 1 / 1; display: block; border-radius: 12px; background: #050912; }
.glow-ring { position: absolute; inset: -40px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(0,229,255,.35), transparent 30%, rgba(168,85,247,.35), transparent 60%); filter: blur(40px); z-index: -1; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-hud { display: flex; justify-content: space-between; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; color: var(--muted); padding: 10px 6px 2px; letter-spacing: .08em; }
.hero-hud span:last-child { color: var(--green); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 120px; } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 10px; }
.stat { padding: 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--panel-b); text-align: left; transition: transform .3s, border-color .3s; }
.stat:hover { transform: translateY(-4px); border-color: rgba(0,229,255,.35); }
.stat .num { font-size: 2.4rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--muted); font-size: .93rem; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- cards ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid3.small { margin-top: 26px; }
@media (max-width: 960px) { .grid3, .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid3, .grid4 { grid-template-columns: 1fr; } }
.card, .mini {
  position: relative; padding: 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--panel-b);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s, border-color .3s, box-shadow .3s;
  overflow: hidden;
}
.card::after, .mini::after {   /* spotlight that follows the cursor */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(0,229,255,.12), transparent 60%);
}
.card:hover::after, .mini:hover::after { opacity: 1; }
.card:hover { border-color: rgba(0,229,255,.35); box-shadow: 0 25px 50px -25px rgba(0,229,255,.35); }
.card p, .mini span { color: #b4bfd1; margin: 0 0 12px; font-size: .96rem; }
.mini { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.mini b { color: var(--cyan); }
.mini span { margin: 0; }
.ico { font-size: 2rem; margin-bottom: 10px; display: inline-block; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- pipeline flow ---------- */
.flow { padding: 26px 10px 10px; border-radius: var(--radius); background: rgba(255,255,255,.025); border: 1px solid var(--panel-b); }
.flow svg { width: 100%; height: auto; display: block; }
.flow .links path { fill: none; stroke: rgba(0,229,255,.25); stroke-width: 3; stroke-dasharray: 8 10; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -36; } }
.flow .node rect { fill: rgba(12,20,36,.9); stroke: url(#gl); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: nodepulse 3.6s ease-in-out infinite; animation-delay: var(--d); }
.flow .node text { fill: var(--text); font-size: 18px; font-weight: 700; text-anchor: middle; }
.flow .node text.sm { font-size: 12px; font-weight: 400; fill: var(--muted); }
.flow .loop-label { fill: var(--muted); font-size: 14px; }
@keyframes nodepulse { 0%,100% { filter: none; } 50% { filter: drop-shadow(0 0 10px rgba(168,85,247,.55)); } }
.flow .node rect { stroke: #00e5ff; }

/* ---------- replay ---------- */
.replay-wrap {
  padding: 16px; border-radius: 22px; background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.015));
  border: 1px solid var(--panel-b); box-shadow: var(--shadow); transform: perspective(1200px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
  transition: transform .2s;
}
#replay { width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 78vh; display: block; border-radius: 14px; background: #050912; margin: 0 auto; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.controls input[type=range] { flex: 1 1 220px; accent-color: var(--cyan); }
.speed { color: var(--muted); font-size: .88rem; display: flex; gap: 8px; align-items: center; }
select { background: var(--bg2); color: var(--text); border: 1px solid var(--panel-b); border-radius: 8px; padding: 6px 8px; font-family: inherit; }
.hud-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 14px; }
.hud-grid div { background: rgba(255,255,255,.035); border: 1px solid var(--panel-b); border-radius: 12px; padding: 10px 12px; }
.hud-grid span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.hud-grid b { font-variant-numeric: tabular-nums; font-size: 1.02rem; }
.hud-grid b.flash { color: var(--amber); animation: flashpop .6s ease; }
@keyframes flashpop { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
@media (max-width: 700px) { .hud-grid { grid-template-columns: repeat(3, 1fr); } }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.event { padding: 16px 18px; border-radius: 14px; background: var(--panel); border-left: 3px solid var(--amber); }
.event b { display: block; }
.event span { color: var(--muted); font-size: .9rem; }

/* ---------- journey ---------- */
.journey { list-style: none; padding: 0; margin: 0; position: relative; max-width: 860px; }
.journey::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--cyan), var(--violet)); opacity: .6; }
.journey li { display: flex; gap: 22px; margin-bottom: 28px; position: relative; }
.journey .step { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--bg2); border: 2px solid var(--cyan); color: var(--cyan); box-shadow: 0 0 20px rgba(0,229,255,.35); }
.journey b { font-size: 1.1rem; }
.journey p { color: #b4bfd1; margin: 4px 0 0; }
.journey i { color: var(--green); font-style: normal; font-weight: 600; }

/* ---------- benchmark ---------- */
.bench-card { padding: 26px; border-radius: 22px; background: var(--panel); border: 1px solid var(--panel-b); }
.bench-head { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.bench-head span { color: var(--muted); font-size: .9rem; display: block; margin-bottom: 8px; }
.bench-head canvas { width: 100%; height: 220px; display: block; }
.bench-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.bench-stats div { background: rgba(255,255,255,.03); border-radius: 12px; padding: 14px; border: 1px solid var(--panel-b); }
.bench-stats b { font-size: 1.4rem; display: block; font-variant-numeric: tabular-nums; }
.bench-stats span { color: var(--muted); font-size: .82rem; }
@media (max-width: 800px) { .bench-head { grid-template-columns: 1fr; } .bench-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.shot { margin: 0; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--panel-b); cursor: zoom-in; transition: transform .35s, box-shadow .35s; }
.shot:hover { transform: translateY(-5px) scale(1.01); box-shadow: 0 25px 50px -20px rgba(168,85,247,.45); }
.shot img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #0b1222; }
.shot figcaption { padding: 12px 14px; color: #b4bfd1; font-size: .9rem; }
.shot.wide { grid-column: 1 / -1; }
.shot.wide img { aspect-ratio: 16 / 7; object-position: center; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }
.lightbox { position: fixed; inset: 0; background: rgba(3,6,12,.92); display: grid; place-items: center; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .3s; padding: 4vw; cursor: zoom-out; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); transform: scale(.94); transition: transform .35s; }
.lightbox.open img { transform: scale(1); }

/* ---------- code ---------- */
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .code-grid { grid-template-columns: 1fr; } }
.codebox { border-radius: 16px; overflow: hidden; border: 1px solid var(--panel-b); background: #050912; }
.codehead { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: rgba(255,255,255,.04); color: var(--muted); font-size: .85rem; }
.codebox pre { margin: 0; padding: 18px; overflow-x: auto; color: #cfe9ff; font-size: .92rem; }
.copy { background: var(--panel); border: 1px solid var(--panel-b); color: var(--text); border-radius: 8px; padding: 4px 12px; cursor: pointer; font-family: inherit; font-size: .8rem; transition: .2s; }
.copy:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- hardware / roadmap ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 40px; } }
.pins { width: 100%; border-collapse: collapse; margin-top: 10px; background: var(--panel); border-radius: 12px; overflow: hidden; }
.pins th, .pins td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--panel-b); }
.pins th { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.roadmap { list-style: none; padding: 0; margin: 0; }
.roadmap li { padding: 12px 16px 12px 44px; margin-bottom: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--panel-b); position: relative; }
.roadmap li::before { content: "○"; position: absolute; left: 16px; color: var(--muted); }
.roadmap li.done { border-color: rgba(52,211,153,.3); }
.roadmap li.done::before { content: "✓"; color: var(--green); font-weight: 800; }

/* ---------- CTA band / footer ---------- */
.cta-band { background: radial-gradient(60% 80% at 50% 0%, rgba(168,85,247,.18), transparent 70%); border-top: 1px solid var(--panel-b); }
.footer { border-top: 1px solid var(--panel-b); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer a { color: #9ff3ff; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.in.card, .reveal.in.mini { transform: perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
