/* missionsix.net landing page. Dark is the default theme; light is opt-in. */

:root,
:root[data-theme="dark"] {
  --bg: #05090c;
  --bg-elev: rgba(10, 20, 26, 0.72);
  --bg-solid: #0b161c;
  --line: rgba(120, 200, 210, 0.14);
  --line-strong: rgba(120, 220, 230, 0.32);
  --text: #e3eef0;
  --muted: #8ea7ad;
  --accent: #3fd6c3;      /* glacier teal */
  --accent-2: #4aa8ff;    /* Sound blue */
  --accent-3: #5fd38d;    /* fir green */
  --accent-ink: #03211d;
  --glow: rgba(63, 214, 195, 0.35);
  --scan: rgba(0, 0, 0, 0.18);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef4f3;
  --bg-elev: rgba(255, 255, 255, 0.78);
  --bg-solid: #ffffff;
  --line: rgba(10, 60, 70, 0.12);
  --line-strong: rgba(10, 90, 100, 0.3);
  --text: #0c2127;
  --muted: #4d676d;
  --accent: #0b8f84;
  --accent-2: #1f6fc4;
  --accent-3: #2c8a55;
  --accent-ink: #ffffff;
  --glow: rgba(11, 143, 132, 0.22);
  --scan: rgba(255, 255, 255, 0.0);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

a { color: var(--accent); }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px;
}
.skip:focus { left: 16px; }

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

/* ---------- Background layers ---------- */

#msix {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.scanlines {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, var(--scan) 2px 3px);
  mix-blend-mode: multiply;
}

/* ---------- Header ---------- */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: var(--bg-elev);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font: 500 15px/1 "JetBrains Mono", monospace; letter-spacing: 0.22em;
}
.brand-mark {
  width: 14px; height: 14px; border-radius: 3px;
  background:
    radial-gradient(circle at 25% 25%, var(--accent) 2px, transparent 2.5px),
    radial-gradient(circle at 75% 25%, var(--accent-2) 2px, transparent 2.5px),
    radial-gradient(circle at 25% 75%, var(--accent-3) 2px, transparent 2.5px),
    radial-gradient(circle at 75% 75%, var(--accent) 2px, transparent 2.5px);
  box-shadow: 0 0 12px var(--glow);
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--text); background: var(--line); }
.nav .nav-cta { color: var(--accent); border: 1px solid var(--line-strong); margin-left: 6px; }
.nav .nav-cta:hover { background: var(--accent); color: var(--accent-ink); }

.theme-toggle {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border-radius: 10px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text); cursor: pointer;
  transition: background-color 0.2s, transform 0.3s;
}
.theme-toggle:hover { background: var(--line); }
.theme-toggle:active { transform: rotate(30deg); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
:root[data-theme="dark"] .icon-moon,
:root[data-theme="light"] .icon-sun { display: none; }

/* ---------- Layout ---------- */

main { position: relative; z-index: 2; }

.section {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(80px, 12vw, 140px) clamp(16px, 4vw, 48px);
}

.eyebrow {
  font: 500 12.5px/1.4 "JetBrains Mono", monospace;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 50px); }
.section-sub { color: var(--muted); font-size: 18px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 clamp(16px, 4vw, 48px) clamp(56px, 9vh, 96px);
  max-width: 1180px; margin: 0 auto;
}
.hero-spacer { flex: 1 1 auto; min-height: 50vh; }
.hero-copy { max-width: 760px; will-change: transform, opacity; }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 64px);
  text-wrap: balance;
}
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 620px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.scroll-cue {
  position: absolute; right: clamp(16px, 4vw, 48px); bottom: clamp(56px, 9vh, 96px);
  width: 26px; height: 42px; border: 1.5px solid var(--line-strong); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--accent); border-radius: 2px;
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 10px;
  font: 600 15px/1 "Inter", sans-serif; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s, color 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 8px 28px -8px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px var(--glow); }
.btn-ghost { color: var(--text); border: 1px solid var(--line-strong); background: var(--bg-elev); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 18px 28px; font-size: 18px; word-break: break-all; }

/* ---------- Specs strip ---------- */

.specs {
  position: relative; z-index: 2;
  border-block: 1px solid var(--line);
  background: var(--bg-elev);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.specs ul {
  list-style: none; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px);
  max-width: 1180px;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.specs li { padding: 26px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.specs li:first-child { border-left: 0; padding-left: 0; }
.spec-k { font: 700 28px/1 "Space Grotesk", sans-serif; color: var(--text); }
.spec-v { font-size: 14px; color: var(--muted); }

/* ---------- Service cards ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.card {
  position: relative; overflow: hidden;
  padding: 28px 26px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg-elev);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s;
}
/* Pointer-tracked glow; --mx/--my are set by msix.js. */
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 60%);
  transition: opacity 0.3s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card:hover::before { opacity: 0.55; }
.card > * { position: relative; }
.card-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 10px; margin-bottom: 18px;
  font-size: 20px; color: var(--accent);
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(63, 214, 195, 0.12), rgba(74, 168, 255, 0.08));
}
.card h3 { font-size: 20px; }
.card p { color: var(--muted); font-size: 15.5px; }
.example {
  margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: 14px !important;
}
.example span { font-family: "JetBrains Mono", monospace; color: var(--accent-3); margin-right: 6px; }

/* ---------- Tiers ---------- */

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.tier {
  display: flex; flex-direction: column;
  padding: 32px 28px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--bg-elev);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tier h3 { font-size: 30px; margin-bottom: 6px; }
.tier > p { color: var(--muted); }
.tier ul { list-style: none; padding: 0; margin: 8px 0 28px; flex: 1; }
.tier li { padding: 9px 0 9px 26px; position: relative; border-top: 1px solid var(--line); font-size: 15.5px; }
.tier li::before {
  content: ""; position: absolute; left: 4px; top: 17px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--glow);
}
.tier-tag { font: 500 12px/1 "JetBrains Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 16px; }
.tier-featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-solid), var(--bg-solid)) padding-box,
    linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3)) border-box;
  box-shadow: 0 30px 80px -40px var(--glow);
}

/* ---------- Process ---------- */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 21px; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0.6;
}
.steps li { position: relative; padding: 0 20px 0 0; }
.step-n {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-solid); border: 1px solid var(--line-strong);
  font: 500 13px/1 "JetBrains Mono", monospace; color: var(--accent);
  margin-bottom: 18px; position: relative;
}
.steps h3 { font-size: 20px; }
.steps p { color: var(--muted); font-size: 15px; }

/* ---------- About + ridges ---------- */

.about { overflow: visible; }
.ridges {
  position: absolute; left: 50%; bottom: 0; width: 100vw; height: 320px;
  transform: translateX(-50%); pointer-events: none; z-index: -1;
}
.ridge { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.ridge path { fill: none; stroke-width: 1.5; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.ridge-3 path { stroke: var(--accent-2); opacity: 0.35; }
.ridge-2 path { stroke: var(--accent); opacity: 0.6; stroke-width: 2; }
.ridge-1 path { stroke: var(--accent-3); opacity: 0.45; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; padding-bottom: 180px; }
.about h2 { font-size: clamp(30px, 4.4vw, 50px); }
.about-grid > div:first-child p { color: var(--muted); font-size: 18px; }

.coords {
  border: 1px solid var(--line); border-radius: 16px; padding: 26px;
  background: var(--bg-elev);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-family: "JetBrains Mono", monospace;
}
.coords-head { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.cities { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.cities li { font-size: 14.5px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.cities li::before { content: "▸ "; color: var(--accent-3); }
.coords-foot { font-size: 12px; color: var(--muted); margin: 0; }

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

.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details {
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elev);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 0 22px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 28px 20px 0; position: relative;
  font: 600 17px/1.4 "Space Grotesk", sans-serif;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font: 400 22px/1 "JetBrains Mono", monospace; color: var(--accent); transition: transform 0.25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 8px; }

/* ---------- Contact ---------- */

.contact-panel {
  text-align: center; max-width: 820px; margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 64px);
  border-radius: 24px; border: 1px solid var(--line-strong);
  background:
    radial-gradient(600px circle at 50% 0%, var(--glow), transparent 70%),
    var(--bg-elev);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.contact-panel h2 { font-size: clamp(30px, 4.6vw, 52px); }
.contact-panel > p { color: var(--muted); font-size: 18px; max-width: 580px; margin-inline: auto; }
.contact-panel .btn { margin: 14px 0 18px; }
.contact-note { font-size: 14px !important; }

/* ---------- Footer ---------- */

.footer {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  max-width: 1180px; margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.footer p { margin: 0; }
.footer-links { display: flex; gap: 20px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---------- Scroll reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.cards .reveal:nth-child(3n+2), .tiers .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.cards .reveal:nth-child(3n), .tiers .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.steps .reveal:nth-child(4) { transition-delay: 0.24s; }
.steps .reveal:nth-child(5) { transition-delay: 0.32s; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .cards, .tiers { grid-template-columns: 1fr 1fr; }
  .tiers .tier-featured { grid-column: span 2; order: -1; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { left: 21px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps li { padding: 0 0 0 64px; }
  .step-n { position: absolute; left: 0; top: -6px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .specs ul { grid-template-columns: 1fr 1fr; }
  .specs li:nth-child(3) { border-left: 0; padding-left: 0; }
  .specs li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .nav a:not(.nav-cta) { display: none; }
  .cards, .tiers { grid-template-columns: 1fr; }
  .tiers .tier-featured { grid-column: auto; }
  .scroll-cue { display: none; }
  .brand { letter-spacing: 0.14em; }
}

@media (max-width: 420px) {
  .nav-cta { display: none; }
}

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