/* ==========================================================================
   VietDev.ai — "Mission control for Texas businesses"
   Design tokens, base, layout, components, pages.
   ========================================================================== */

:root {
  /* Space */
  --bg: #070b1a;
  --bg-deep: #03050d;
  --bg-raised: #0c1330;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(148, 163, 255, 0.16);
  --border-strong: rgba(148, 163, 255, 0.32);

  /* Text (AA on --bg: text 15:1, muted 8:1) */
  --text: #e8ecf8;
  --muted: #a6afcc;
  --dim: #7d87a8;

  /* Accents */
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --violet-text: #b39dfb; /* lighter violet for text on dark (AA) */
  --amber: #f59e0b;
  --amber-hover: #fbb53c;
  --on-amber: #1a1203;
  --danger: #f87171;
  --success: #34d399;

  --glow-cyan: 0 0 24px rgba(34, 211, 238, 0.35);
  --glow-violet: 0 0 32px rgba(139, 92, 246, 0.35);
  --glow-amber: 0 0 28px rgba(245, 158, 11, 0.45);

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shape & rhythm */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 10vw, 120px);
  --header-h: 68px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Starfield + nebula backdrop (fixed, behind everything) */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(245, 158, 11, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}
body::after {
  z-index: -1;
  opacity: 0.7;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, rgba(255,255,255,.8), transparent),
    radial-gradient(1.5px 1.5px at 200px 160px, rgba(186,230,253,.9), transparent),
    radial-gradient(1px 1px at 300px 40px, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 380px 220px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 60px 260px, rgba(221,214,254,.9), transparent),
    radial-gradient(1px 1px at 250px 300px, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 340px 350px, rgba(255,255,255,.5), transparent);
  background-size: 400px 400px;
  animation: drift 180s linear infinite;
}
@keyframes drift { to { background-position: 400px 800px; } }

img, svg, video { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #67e8f9; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--on-amber); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; position: relative; }
.section--tight { padding: calc(var(--section-y) * 0.6) 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; box-shadow: var(--glow-cyan); }
.gradient-text {
  background: linear-gradient(90deg, var(--cyan), var(--violet-text) 55%, var(--amber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 640px; }

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--surface-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--_bg); color: var(--text);
  font: 600 1rem/1 var(--font-display); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { color: var(--text); border-color: var(--cyan); box-shadow: var(--glow-cyan); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { --_bg: var(--amber); color: var(--on-amber); border-color: transparent; box-shadow: 0 0 0 0 rgba(245,158,11,0); }
.btn--primary:hover { --_bg: var(--amber-hover); color: var(--on-amber); border-color: transparent; box-shadow: var(--glow-amber); }
.btn--ghost { --_bg: transparent; }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 0.92rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .icon { width: 20px; height: 20px; }

/* ---------- Glass cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card--hover:hover { border-color: rgba(34, 211, 238, 0.45); transform: translateY(-4px); box-shadow: 0 20px 50px -20px rgba(34,211,238,.35); }
.card h3 { margin-top: 4px; }
.card p { color: var(--muted); margin-bottom: 0; }
.card-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 20px;
  background: radial-gradient(circle at 30% 30%, rgba(34,211,238,.25), rgba(139,92,246,.18));
  border: 1px solid rgba(34,211,238,.35);
  color: var(--cyan);
  box-shadow: inset 0 0 20px rgba(34,211,238,.15);
}
.card-icon .icon { width: 26px; height: 26px; }
.card-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 18px; font-weight: 600; text-decoration: none; }
.card-link::after { content: "→"; transition: transform .2s; }
.card-link:hover::after { transform: translateX(4px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(7, 11, 26, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.25rem/1 var(--font-display); letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; }
.brand .brand-tld { color: var(--cyan); }

.nav-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--border); border-radius: 12px; color: var(--text); cursor: pointer;
}
.nav-toggle .bar, .nav-toggle .bar::before, .nav-toggle .bar::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, background .2s;
}
.nav-toggle .bar::before, .nav-toggle .bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bar::before { top: -6px; }
.nav-toggle .bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  position: fixed; inset: var(--header-h) 0 auto 0;
  background: rgba(5, 8, 20, 0.97);
  border-bottom: 1px solid var(--border);
  padding: 16px var(--gutter) 24px;
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.site-nav a:not(.btn) {
  display: block; padding: 12px 8px; color: var(--muted); text-decoration: none; font-weight: 500; border-radius: 8px;
}
.site-nav a:not(.btn):hover { color: var(--text); }
.site-nav a:not(.btn)[aria-current="page"] { color: var(--cyan); }
.site-nav .btn { margin-top: 12px; width: 100%; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; padding: 0; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 4px; }
  .site-nav a:not(.btn) { padding: 8px 14px; font-size: 0.95rem; }
  .site-nav .btn { margin: 0 0 0 12px; width: auto; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 10vw, 120px); overflow: hidden; }
.hero .container { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero .container { grid-template-columns: 1.15fr 0.85fr; } }
.hero h1 { margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 36px; color: var(--dim); font-size: 0.92rem; }
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: var(--glow-cyan); }
.hero-meta { list-style: none; padding: 0; }

/* Orbital system illustration */
.orbit-system { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto; }
.orbit-system .ring {
  position: absolute; inset: var(--inset); border-radius: 50%;
  border: 1px dashed rgba(148,163,255,.28);
  animation: spin var(--speed) linear infinite;
}
.orbit-system .ring::after {
  content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--dot); box-shadow: 0 0 16px var(--dot);
}
.orbit-system .ring:nth-child(1) { --inset: 0%; --speed: 40s; --dot: var(--violet); }
.orbit-system .ring:nth-child(2) { --inset: 14%; --speed: 26s; --dot: var(--cyan); animation-direction: reverse; }
.orbit-system .ring:nth-child(3) { --inset: 28%; --speed: 18s; --dot: var(--amber); }
.orbit-core {
  position: absolute; inset: 38%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #67e8f9, var(--cyan) 30%, var(--violet) 80%);
  box-shadow: 0 0 60px rgba(34,211,238,.5), 0 0 120px rgba(139,92,246,.4);
  display: grid; place-items: center; color: #04121a;
}
.orbit-core svg { width: 46%; height: 46%; }
.orbit-label {
  position: absolute; padding: 6px 12px; font-size: 0.78rem; font-weight: 600; font-family: var(--font-display);
  background: rgba(12,19,48,.85); border: 1px solid var(--border-strong); border-radius: 999px; white-space: nowrap;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Value strip ---------- */
.value-strip { border-block: 1px solid var(--border); background: rgba(12,19,48,.45); }
.value-strip ul { list-style: none; margin: 0; padding: 28px 0; display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .value-strip ul { grid-template-columns: repeat(4, 1fr); } }
.value-strip li { display: flex; gap: 12px; align-items: flex-start; }
.value-strip strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.value-strip span { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.value-strip .icon { color: var(--cyan); margin-top: 2px; }

/* ---------- AI spotlight ---------- */
.spotlight { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .spotlight { grid-template-columns: 1fr 1fr; } }
.feature-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.feature-list li { display: flex; gap: 16px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.feature-list h3 { font-size: 1.08rem; margin: 0 0 4px; }
.feature-list p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.feature-list .icon { color: var(--cyan); margin-top: 2px; }

.console { border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: rgba(5,9,24,.85); box-shadow: var(--glow-violet); overflow: hidden; }
.console-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); font: 600 0.8rem var(--font-display); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); }
.console-bar i:nth-child(1) { background: #f87171; } .console-bar i:nth-child(2) { background: var(--amber); } .console-bar i:nth-child(3) { background: var(--success); }
.console-bar span { margin-left: auto; color: var(--success); }
.console-body { padding: 20px; display: grid; gap: 12px; font-size: 0.94rem; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; line-height: 1.45; }
.msg small { display: block; font-size: 0.72rem; color: var(--dim); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .06em; }
.msg--in { background: var(--surface-strong); border: 1px solid var(--border); justify-self: start; border-bottom-left-radius: 4px; }
.msg--ai { background: rgba(34,211,238,.12); border: 1px solid rgba(34,211,238,.35); justify-self: end; border-bottom-right-radius: 4px; }
.msg--human { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); justify-self: end; border-bottom-right-radius: 4px; }
.msg-system { text-align: center; font-size: 0.78rem; color: var(--amber); letter-spacing: .05em; }

/* ---------- Process timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: step; position: relative; }
@media (min-width: 960px) {
  .timeline { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .timeline::before { content: ""; position: absolute; top: 28px; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, var(--cyan), var(--violet), var(--amber)); opacity: .6; }
}
.timeline li { position: relative; counter-increment: step; text-align: left; }
@media (min-width: 960px) { .timeline li { text-align: center; } }
.timeline .node {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-raised); border: 1px solid var(--cyan); box-shadow: var(--glow-cyan);
  font: 700 1.1rem var(--font-display); color: var(--cyan); margin-bottom: 16px; position: relative; z-index: 1;
}
@media (min-width: 960px) { .timeline .node { margin: 0 auto 18px; } }
.timeline li:last-child .node { border-color: var(--amber); color: var(--amber); box-shadow: var(--glow-amber); }
.timeline h3 { font-size: 1.1rem; margin-bottom: 6px; }
.timeline p { color: var(--muted); font-size: 0.93rem; margin: 0; }
@media (max-width: 959px) {
  .timeline li { padding-left: 76px; min-height: 56px; }
  .timeline .node { position: absolute; left: 0; top: 0; }
  .timeline li:not(:last-child)::after { content: ""; position: absolute; left: 28px; top: 60px; bottom: -16px; width: 1px; background: linear-gradient(var(--cyan), transparent); }
}

/* ---------- Industries ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; list-style: none; padding: 0; margin: 0; }
.chips li {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 500;
}
.chips .icon { width: 20px; height: 20px; color: var(--violet-text); }

/* ---------- Testimonials ---------- */
.quote { display: flex; flex-direction: column; gap: 20px; }
.quote blockquote { margin: 0; font-size: 1.05rem; color: var(--text); }
.quote blockquote::before { content: "“"; display: block; font: 700 3rem/0.6 var(--font-display); color: var(--cyan); margin-bottom: 12px; }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; color: var(--muted); font-size: 0.92rem; }
.quote figcaption strong { color: var(--text); display: block; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem var(--font-display); background: linear-gradient(135deg, var(--cyan), var(--violet)); color: #050816; }
.placeholder-note { text-align: center; color: var(--dim); font-size: 0.82rem; margin-top: 20px; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 32px; border: 1px solid var(--border-strong);
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 64px);
  background:
    radial-gradient(600px 300px at 50% 120%, rgba(245,158,11,.25), transparent 70%),
    radial-gradient(500px 300px at 0% 0%, rgba(34,211,238,.18), transparent 70%),
    radial-gradient(500px 300px at 100% 0%, rgba(139,92,246,.25), transparent 70%),
    rgba(12,19,48,.6);
}
.cta-band p { color: var(--muted); max-width: 560px; margin: 0 auto 32px; font-size: 1.1rem; }
.cta-band .hero-actions { justify-content: center; margin-top: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(64px, 10vw, 112px) 0 clamp(40px, 6vw, 64px); text-align: center; }
.page-hero .lead { margin: 0 auto; }

/* ---------- Services page ---------- */
.service-detail { display: grid; gap: 40px; align-items: center; padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 16px); }
.service-detail:last-child { border-bottom: 0; }
@media (min-width: 960px) {
  .service-detail { grid-template-columns: 1fr 1fr; gap: 72px; }
  .service-detail:nth-child(even) .service-visual { order: -1; }
}
.service-visual {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 50%, rgba(34,211,238,.18), transparent 55%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 38px, rgba(148,163,255,.12) 39px 40px),
    rgba(12,19,48,.5);
  display: grid; place-items: center; overflow: hidden;
}
.service-visual .icon { width: 30%; height: 30%; color: var(--cyan); filter: drop-shadow(0 0 18px rgba(34,211,238,.6)); }
.check-list { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; color: var(--muted); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(34,211,238,.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322D3EE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
  border: 1px solid rgba(34,211,238,.5);
}
.service-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }

.packages { align-items: stretch; }
.package { display: flex; flex-direction: column; }
.package .tier { font: 600 .8rem var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); }
.package h3 { font-size: 1.8rem; margin: 8px 0; }
.package .price { font: 600 1rem var(--font-display); color: var(--amber); margin-bottom: 16px; }
.package .check-list { flex: 1; }
.package--featured { border-color: rgba(245,158,11,.55); box-shadow: 0 0 0 1px rgba(245,158,11,.2), 0 30px 80px -30px rgba(245,158,11,.4); }
.package--featured .tier { color: var(--amber); }
.badge { position: absolute; top: -13px; right: 24px; padding: 4px 12px; border-radius: 999px; background: var(--amber); color: var(--on-amber); font: 700 .75rem var(--font-display); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .fieldset-legend { font-weight: 600; font-size: 0.95rem; }
.req { color: var(--amber); margin-left: 2px; }
.hint { color: var(--dim); font-size: 0.85rem; font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 16px;
  font: inherit; color: var(--text);
  background: rgba(3,5,13,.6); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 140px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A6AFCC' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.select option { background: var(--bg-raised); color: var(--text); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(148,163,255,.5); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.2); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.error-msg { color: var(--danger); font-size: 0.86rem; min-height: 0; }
.error-msg:empty { display: none; }

.check-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .check-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .check-grid { grid-template-columns: repeat(3, 1fr); } }
.check-tile { position: relative; }
.check-tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.check-tile label {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface);
  font-weight: 500; transition: border-color .2s, background .2s, box-shadow .2s;
}
.check-tile .icon { color: var(--violet-text); }
.check-tile input:hover + label { border-color: rgba(34,211,238,.5); }
.check-tile input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }
.check-tile input:checked + label { border-color: var(--cyan); background: rgba(34,211,238,.1); box-shadow: inset 0 0 0 1px var(--cyan), var(--glow-cyan); }
.check-tile input:checked + label .icon { color: var(--cyan); }

.checkbox { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checkbox input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--cyan); cursor: pointer; }
.checkbox span { color: var(--muted); font-size: 0.95rem; }
.checkbox strong { color: var(--text); }

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio-pill label { display: inline-flex; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 500; font-size: 0.95rem; }
.radio-pill input:checked + label { border-color: var(--cyan); background: rgba(34,211,238,.12); color: var(--cyan); }
.radio-pill input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }

.dropzone {
  position: relative; display: grid; place-items: center; gap: 6px; text-align: center; padding: 28px 16px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: rgba(3,5,13,.4); color: var(--muted);
  transition: border-color .2s, background .2s;
}
.dropzone.is-drag { border-color: var(--cyan); background: rgba(34,211,238,.08); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .icon { width: 32px; height: 32px; color: var(--cyan); }
.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 0.9rem; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 8px; background: var(--surface); }
.file-list button { background: none; border: 0; color: var(--danger); cursor: pointer; font: inherit; }

.form-alert { padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid; font-size: 0.95rem; }
.form-alert--error { border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.1); color: #fecaca; }
.form-alert--success { border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.1); color: #a7f3d0; }
.form-alert[hidden] { display: none; }

/* ---------- Intake (mission) form ---------- */
.mission { max-width: 880px; margin: 0 auto; }
.mission-panel { padding: clamp(24px, 4vw, 48px); }
.mission-progress { position: relative; margin: 36px 0 40px; }
.mission-progress ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; z-index: 1; }
.mission-progress li { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 0.8rem; color: var(--dim); font-weight: 600; font-family: var(--font-display); }
.mission-progress .planet {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-raised); border: 1px solid var(--border-strong); transition: all .4s ease;
}
.mission-progress li.is-done .planet { border-color: var(--cyan); background: rgba(34,211,238,.18); color: var(--cyan); }
.mission-progress li.is-current .planet { border-color: var(--amber); background: rgba(245,158,11,.18); box-shadow: var(--glow-amber); color: var(--amber); }
.mission-progress li.is-current, .mission-progress li.is-done { color: var(--text); }
.mission-progress .track { position: absolute; top: 20px; left: 12.5%; right: 12.5%; height: 2px; background: var(--border); border-radius: 2px; }
.mission-progress .track-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: linear-gradient(90deg, var(--cyan), var(--amber)); border-radius: 2px; transition: width .6s cubic-bezier(.6,.0,.2,1); }
.mission-progress .rocket {
  position: absolute; top: -52px; left: 0%; width: 26px; height: 26px; margin-left: -13px; color: var(--amber);
  transition: left .6s cubic-bezier(.6,.0,.2,1); filter: drop-shadow(0 0 8px rgba(245,158,11,.8)); z-index: 2;
}
.mission-progress .step-label { display: none; }
@media (min-width: 560px) { .mission-progress .step-label { display: block; } }
.mission-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.mission-step[hidden] { display: none; }
.mission-step > legend { font: 700 clamp(1.4rem, 3vw, 1.9rem)/1.2 var(--font-display); margin-bottom: 6px; padding: 0; }
.mission-step > .step-intro { color: var(--muted); margin-bottom: 28px; }
.mission-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.mission-nav [data-next], .mission-nav [data-submit] { margin-left: auto; }

.review { display: grid; gap: 16px; margin-bottom: 28px; }
.review-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; background: var(--surface); }
.review-block header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-block h3 { font-size: 1rem; margin: 0; color: var(--cyan); letter-spacing: .04em; }
.review-block button { background: none; border: 0; color: var(--muted); font: 600 0.85rem var(--font-body); cursor: pointer; text-decoration: underline; }
.review-block dl { margin: 0; display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 6px 16px; font-size: 0.94rem; }
.review-block dt { color: var(--dim); }
.review-block dd { margin: 0; word-break: break-word; }
.consents { display: grid; gap: 16px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: rgba(3,5,13,.45); }
.turnstile-wrap { margin-top: 24px; min-height: 65px; }

.success-screen { text-align: center; padding: clamp(24px, 6vw, 56px) 0; }
.success-screen .rocket-launch { width: 120px; height: 120px; margin: 0 auto 24px; color: var(--amber); filter: drop-shadow(0 0 24px rgba(245,158,11,.7)); animation: liftoff 2.4s ease-in-out infinite; }
@keyframes liftoff { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.success-screen .ref { display: inline-block; margin: 8px 0 24px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-strong); font-family: var(--font-display); color: var(--cyan); }

/* ---------- Modal ---------- */
.modal { padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-raised); color: var(--text); width: min(760px, calc(100vw - 32px)); max-height: min(85vh, 900px); }
.modal::backdrop { background: rgba(3,5,13,.75); backdrop-filter: blur(4px); }
.modal-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; background: var(--bg-raised); border-bottom: 1px solid var(--border); z-index: 1; }
.modal-head h2 { font-size: 1.3rem; margin: 0; }
.modal-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: 1.4rem; line-height: 1; }
.modal-body { padding: 24px; overflow: auto; }
.modal-foot { position: sticky; bottom: 0; padding: 16px 24px; background: var(--bg-raised); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

/* ---------- Legal pages ---------- */
.legal { display: grid; gap: 40px; }
@media (min-width: 960px) { .legal { grid-template-columns: 260px 1fr; gap: 64px; } }
.toc { align-self: start; }
@media (min-width: 960px) { .toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; } }
.toc details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; }
.toc summary { font: 600 0.85rem var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); cursor: pointer; }
.toc ol { margin: 14px 0 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: 0.92rem; }
.toc a { color: var(--muted); text-decoration: none; display: block; padding: 3px 0; }
.toc a:hover, .toc a.is-active { color: var(--cyan); }
.legal-body { max-width: 760px; }
.legal-body section { scroll-margin-top: calc(var(--header-h) + 16px); padding-bottom: 12px; }
.legal-body h2 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); margin-top: 40px; padding-top: 8px; }
.legal-body section:first-of-type h2 { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--muted); }
.legal-body strong { color: var(--text); }
.notice { display: flex; gap: 12px; padding: 16px 20px; border-radius: var(--radius); border: 1px solid rgba(245,158,11,.45); background: rgba(245,158,11,.08); color: #fde68a; font-size: 0.94rem; margin-bottom: 32px; }
.notice .icon { color: var(--amber); }

/* ---------- About / Contact ---------- */
.stat-row { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; }
.stat strong { display: block; font: 700 clamp(1.8rem, 4vw, 2.6rem)/1.1 var(--font-display); color: var(--cyan); }
.stat span { color: var(--muted); font-size: 0.92rem; }

.contact-layout { display: grid; gap: 32px; }
@media (min-width: 960px) { .contact-layout { grid-template-columns: 1.2fr 0.8fr; } }
.contact-info { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 18px; }
.contact-info li { display: flex; gap: 14px; }
.contact-info .icon { color: var(--cyan); margin-top: 2px; }
.contact-info strong { display: block; font-family: var(--font-display); }
.contact-info span, .contact-info a { color: var(--muted); }
.map { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--border-strong); border-radius: var(--radius); filter: invert(0.9) hue-rotate(180deg) saturate(0.6) brightness(0.9); }

/* Floating AI chat bubble (mockup) */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  border: 0; cursor: pointer; color: #04121a;
  background: radial-gradient(circle at 35% 30%, #67e8f9, var(--cyan) 40%, var(--violet));
  box-shadow: 0 0 0 0 rgba(34,211,238,.5), 0 10px 30px rgba(0,0,0,.4);
  display: grid; place-items: center; animation: pulse 2.6s ease-out infinite;
}
.chat-fab .icon { width: 28px; height: 28px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,211,238,.5), 0 10px 30px rgba(0,0,0,.4); } 70% { box-shadow: 0 0 0 18px rgba(34,211,238,0), 0 10px 30px rgba(0,0,0,.4); } 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0), 0 10px 30px rgba(0,0,0,.4); } }
.chat-panel {
  position: fixed; right: 16px; bottom: 92px; z-index: 60; width: min(360px, calc(100vw - 32px));
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: rgba(8,12,30,.97);
  box-shadow: var(--glow-violet), 0 30px 60px rgba(0,0,0,.5); overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-panel .console-body { max-height: 320px; overflow: auto; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input .input { min-height: 42px; padding: 8px 14px; }
.chat-input .btn { min-height: 42px; padding: 8px 14px; }
.chat-note { padding: 0 16px 12px; font-size: 0.75rem; color: var(--dim); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: rgba(3,5,13,.7); padding: 56px 0 28px; margin-top: var(--section-y); font-size: 0.94rem; }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: 0.82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer p { color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--dim); font-size: 0.86rem; }
.footer-bottom nav { display: flex; gap: 18px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.lost { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.lost .big { font: 700 clamp(5rem, 20vw, 10rem)/1 var(--font-display); }
