/* ============================================================
   XR INDUSTRIAL — design system
   Dark industrial HUD: near-black steel, holographic cyan,
   amber status accents. Matches AR overlay UI in brand media.
   ============================================================ */

:root {
  --bg: #04070b;
  --bg-2: #0a1119;
  --panel: rgba(11, 21, 32, 0.72);
  --panel-solid: #0b1520;
  --line: rgba(96, 216, 255, 0.26);
  --line-strong: rgba(96, 216, 255, 0.55);
  --cyan: #4fd8ff;
  --cyan-bright: #a8ecff;
  --cyan-dim: #2a8db3;
  --amber: #ffb347;
  --text: #dcebf5;
  --muted: #8fa6b8;
  --font-display: "Chakra Petch", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
  --max-w: 1180px;
  --clip-corner: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 500px at 85% -10%, rgba(79, 216, 255, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(79, 216, 255, 0.05), transparent 55%),
    linear-gradient(rgba(96, 216, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 216, 255, 0.028) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(79, 216, 255, 0.35); color: #fff; }

img, video { max-width: 100%; display: block; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-bright); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: #f2fafe;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); letter-spacing: 0.5px; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; letter-spacing: 0.4px; }

.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 62ch; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.tag::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--line-strong);
  box-shadow: 0 0 8px rgba(79, 216, 255, 0.8);
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 7, 11, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand img { width: 40px; height: 40px; border: 1px solid var(--line); }
.brand:hover { color: var(--cyan-bright); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid transparent;
}
.nav-links a:hover { color: var(--cyan-bright); border-color: var(--line); }
.nav-links a[aria-current="page"] { color: var(--cyan); border-color: var(--line); background: rgba(79, 216, 255, 0.06); }
.nav-links .nav-cta {
  color: #04121a;
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 600;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.nav-links .nav-cta:hover { background: var(--cyan-bright); color: #04121a; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  padding: 9px 14px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #04070b;
    border-bottom: 1px solid var(--line);
    padding: 10px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 10px; }
  .nav-links .nav-cta { margin-top: 10px; text-align: center; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4,7,11,0.68) 0%, rgba(4,7,11,0.55) 45%, var(--bg) 100%),
    linear-gradient(90deg, rgba(4,7,11,0.75) 0%, rgba(4,7,11,0.15) 70%);
}

.hero-inner { padding: 110px 0 90px; max-width: 780px; }
.hero h1 { margin: 0 0 22px; text-shadow: 0 2px 30px rgba(0,0,0,0.6); }
.hero .lead { color: #c3d6e2; text-shadow: 0 1px 18px rgba(0,0,0,0.7); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
}
.hero-chips span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--cyan-bright);
  border: 1px solid var(--line);
  background: rgba(6, 14, 21, 0.65);
  padding: 7px 13px;
}
.hero-chips .chip-amber { color: var(--amber); border-color: rgba(255, 179, 71, 0.35); }

.scanline {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79,216,255,0.7), transparent);
  animation: scan 9s linear infinite;
  opacity: 0.5;
  z-index: -1;
}
@keyframes scan {
  0% { top: 0%; }
  100% { top: 100%; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 28px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--cyan); color: #04121a; }
.btn-primary:hover { background: var(--cyan-bright); color: #04121a; }
.btn-ghost {
  color: var(--cyan);
  border: 1px solid var(--line-strong);
  background: rgba(6, 14, 21, 0.5);
}
.btn-ghost:hover { color: var(--cyan-bright); border-color: var(--cyan); }

/* ---------- sections ---------- */

.section { padding: 96px 0; }
.section-alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head h2 { margin-bottom: 14px; }

/* ---------- HUD panels ---------- */

.hud-panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 30px;
}
.hud-panel::before, .hud-panel::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  pointer-events: none;
}
.hud-panel::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
}
.hud-panel::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
}

/* ---------- mission ---------- */

.mission-quote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  font-weight: 500;
  line-height: 1.5;
  color: #eaf6fc;
  max-width: 60ch;
}
.mission-quote em { color: var(--cyan); font-style: normal; }
.mission-src {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- two worlds ---------- */

.worlds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.world-card {
  position: relative;
  display: block;
  min-height: 340px;
  border: 1px solid var(--line);
  overflow: hidden;
  color: var(--text);
  clip-path: var(--clip-corner);
  background: var(--panel-solid);
}
.world-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.5s ease;
}
.world-card:hover img { opacity: 0.7; transform: scale(1.03); }
.world-card .world-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 340px;
  padding: 30px;
  background: linear-gradient(180deg, rgba(4,7,11,0.15) 30%, rgba(4,7,11,0.9) 85%);
}
.world-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.world-card p { color: #b9cdd9; max-width: 46ch; }
.world-card .world-link {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.world-card:hover .world-link { color: var(--cyan-bright); }

@media (max-width: 860px) {
  .worlds-grid { grid-template-columns: 1fr; }
}

/* ---------- capability cards ---------- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.cap-card {
  display: flex;
  flex-direction: column;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  clip-path: var(--clip-corner);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.cap-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.cap-card img { aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--line); }
.cap-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cap-body .cap-id {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--amber);
}
.cap-body p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.cap-body .cap-more {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap-card img { aspect-ratio: 16 / 9; }
}

/* ---------- detail sections (solution pages) ---------- */

.detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 70px 0;
  border-bottom: 1px solid rgba(96, 216, 255, 0.12);
}
.detail:last-of-type { border-bottom: none; }
.detail.flip .detail-media { order: 2; }
.detail-media img {
  border: 1px solid var(--line);
  clip-path: var(--clip-corner);
}
.detail-body h2 { margin: 6px 0 16px; }
.detail-body p { color: var(--muted); margin-bottom: 14px; }
.detail-body ul { list-style: none; margin-top: 8px; }
.detail-body li {
  position: relative;
  padding: 7px 0 7px 26px;
  color: var(--text);
  font-size: 0.98rem;
}
.detail-body li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--cyan);
}

@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; gap: 28px; }
  .detail.flip .detail-media { order: 0; }
}

/* ---------- video gallery ---------- */

.demo-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 26px;
}
.demo-wide { grid-column: span 12; }
.demo-tall { grid-column: span 6; }
.demo-card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  clip-path: var(--clip-corner);
}
.demo-card video {
  width: 100%;
  background: #000;
}
.demo-wide video { aspect-ratio: 16 / 9; }
.demo-tall video { aspect-ratio: 9 / 16; max-height: 640px; margin: 0 auto; }
.demo-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.demo-meta h3 { font-size: 1rem; }
.demo-meta span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  white-space: nowrap;
}

@media (min-width: 900px) {
  .demo-wide { grid-column: span 12; }
  .demo-tall { grid-column: span 6; }
}
@media (max-width: 700px) {
  .demo-tall { grid-column: span 12; }
}

/* ---------- FAQ ---------- */

.faq-list { max-width: 820px; display: grid; gap: 14px; }
.faq-item {
  border: 1px solid var(--line);
  background: var(--panel);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: #eaf6fc;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 1.1rem;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 22px 20px; color: var(--muted); }

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  padding: 90px 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 50% 120%, rgba(79, 216, 255, 0.12), transparent 70%),
    var(--bg-2);
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--muted); max-width: 54ch; margin: 0 auto 30px; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-line {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid rgba(96, 216, 255, 0.12);
  font-size: 1rem;
}
.contact-line .k {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 110px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: #030509;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text); font-size: 0.95rem; }
.footer-grid a:hover { color: var(--cyan); }
.footer-brand p { color: var(--muted); font-size: 0.92rem; max-width: 40ch; margin-top: 14px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(96, 216, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- breadcrumbs ---------- */

.crumbs {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 22px 0 0;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--cyan); }
.crumbs span { color: var(--cyan); }

/* ---------- page hero (interior pages) ---------- */

.page-hero { padding: 70px 0 40px; }
.page-hero h1 { margin-bottom: 18px; }

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scanline { display: none; }
  .btn:hover, .cap-card:hover { transform: none; }
}
