:root {
  --bg: #050b18;
  --bg-2: #081329;
  --panel: rgba(14, 30, 60, 0.62);
  --panel-solid: #0d1d3a;
  --line: rgba(120, 170, 255, 0.16);
  --line-strong: rgba(120, 170, 255, 0.32);
  --text: #eaf2ff;
  --muted: #9db0cf;
  --blue: #2f80ff;
  --blue-2: #3fb6ff;
  --cyan: #67e0ff;
  --glow: 0 0 40px rgba(47, 128, 255, 0.35);
  --radius: 18px;
  --page: min(100% - 32px, 1180px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(47, 128, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(63, 182, 255, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: 'Outfit', 'Inter', sans-serif; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: var(--page); margin: 0 auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 11, 24, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.brand span b { color: var(--blue-2); font-weight: 700; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(47, 128, 255, 0.14); }
.nav-actions { display: flex; gap: 10px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 10px; width: 42px; height: 42px; font-size: 1.2rem; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s; cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 0 55px rgba(63, 182, 255, 0.55); }
.btn-ghost { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { background: rgba(47, 128, 255, 0.12); }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }
.btn svg { width: 18px; height: 18px; }

/* Hero */
.hero { position: relative; min-height: calc(100vh - 70px); display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url('img/hero.webp') center/cover no-repeat; transform: scale(1.05); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 11, 24, 0.94) 0%, rgba(5, 11, 24, 0.6) 45%, rgba(5, 11, 24, 0.15) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.hero-content { position: relative; padding: 80px 0; max-width: 720px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(47, 128, 255, 0.10); color: var(--cyan); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 10px #3ee08f; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; margin: 22px 0 18px; }
.grad { background: linear-gradient(120deg, #fff 0%, var(--cyan) 45%, var(--blue) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 1.15rem; max-width: 600px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-code { margin-top: 28px; display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.hero-code code { color: var(--text); font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; font-size: 1rem; letter-spacing: 0.06em; }
.copy-btn { background: rgba(47, 128, 255, 0.18); border: 1px solid var(--line-strong); color: var(--text); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 0.8rem; cursor: pointer; }

/* Sections */
section { position: relative; }
.section { padding: 100px 0; }
.section-head { max-width: 700px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.eyebrow { color: var(--blue-2); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; margin: 12px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }

/* Stats strip */
.stats { margin-top: -60px; position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 24px; }
.stat b { display: block; font-family: 'Outfit', sans-serif; font-size: 2.1rem; font-weight: 800; color: #fff; }
.stat span { color: var(--muted); font-size: 0.9rem; }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 28px; }
.icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(47, 128, 255, 0.3), rgba(63, 182, 255, 0.12)); border: 1px solid var(--line-strong); margin-bottom: 18px; color: var(--cyan); }
.icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.25rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.96rem; }

/* Systems split */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; color: var(--muted); }
.check-list li::before { content: ''; flex: 0 0 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: rgba(47, 128, 255, 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367e0ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/13px no-repeat; border: 1px solid var(--line-strong); }
.check-list li b { color: var(--text); }

.console { padding: 22px; font-size: 0.9rem; }
.console-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.console-head b { font-family: 'Outfit', sans-serif; font-size: 1.05rem; }
.live { display: inline-flex; align-items: center; gap: 6px; color: #3ee08f; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.log { display: grid; gap: 10px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.8rem; }
.log div { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(5, 11, 24, 0.55); border: 1px solid var(--line); color: var(--muted); }
.log time { color: var(--blue-2); flex: 0 0 auto; }
.log .tag { color: #fff; font-weight: 700; flex: 0 0 auto; }

/* Departments */
.depts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dept { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.dept-top { display: flex; align-items: center; gap: 16px; }
.dept-logo { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 16px; display: grid; place-items: center; background: rgba(5, 11, 24, 0.6); border: 1px solid var(--line); overflow: hidden; }
.dept-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.dept-logo .abbr { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--cyan); }
.dept h3 { font-size: 1.15rem; }
.dept small { color: var(--blue-2); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.dept p { color: var(--muted); font-size: 0.94rem; flex: 1; }
.dept .btn { align-self: flex-start; }
.center-actions { display: flex; justify-content: center; margin-top: 40px; }

/* Overlay showcase */
.overlay-strip { display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.overlay-strip figure { margin: 0; flex: 0 0 210px; scroll-snap-align: start; }
.overlay-strip img { width: 100%; height: 400px; object-fit: contain; border-radius: 16px; background: rgba(5, 11, 24, 0.6); border: 1px solid var(--line); padding: 10px; }
.overlay-strip figcaption { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 8px; }

/* Join the force */
.join { padding: 56px; text-align: center; background: linear-gradient(135deg, rgba(47, 128, 255, 0.22), rgba(63, 182, 255, 0.06)), var(--panel); }
.join h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin: 10px 0 12px; }
.join p { color: var(--muted); max-width: 600px; margin: 0 auto; }
.join-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery.large { grid-template-columns: repeat(3, 1fr); }
.shot { position: relative; margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; aspect-ratio: 16 / 10; background: var(--panel-solid); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.shot:hover img { transform: scale(1.06); }
.shot figcaption { position: absolute; inset: auto 0 0 0; padding: 26px 14px 10px; background: linear-gradient(0deg, rgba(5, 11, 24, 0.92), transparent); font-weight: 600; font-size: 0.88rem; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(2, 6, 14, 0.92); padding: 24px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 88vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }

/* Page header */
.page-head { padding: 90px 0 50px; border-bottom: 1px solid var(--line); background: radial-gradient(700px 300px at 50% 0%, rgba(47, 128, 255, 0.22), transparent 70%); text-align: center; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; margin: 14px 0 12px; }
.page-head p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

/* Rules */
.rules-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.rules-toc { position: sticky; top: 96px; padding: 18px; display: grid; gap: 4px; }
.rules-toc a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: 0.92rem; }
.rules-toc a:hover { color: var(--text); background: rgba(47, 128, 255, 0.12); }
.rule-group { padding: 30px; margin-bottom: 20px; scroll-margin-top: 96px; }
.rule-group h2 { font-size: 1.5rem; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.rule-group h2 .num { font-size: 0.85rem; color: var(--cyan); background: rgba(47, 128, 255, 0.16); border: 1px solid var(--line-strong); border-radius: 8px; padding: 2px 10px; }
.rule { padding: 14px 0; border-top: 1px solid var(--line); }
.rule:first-of-type { border-top: 0; padding-top: 0; }
.rule b { display: block; margin-bottom: 4px; }
.rule p { color: var(--muted); font-size: 0.95rem; }
.notice { padding: 18px 22px; margin-bottom: 24px; border-left: 3px solid var(--blue-2); color: var(--muted); }
.notice b { color: var(--text); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.faq details { padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--blue-2); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); margin-top: 10px; font-size: 0.95rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 50px 0 30px; background: rgba(3, 7, 16, 0.6); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer p { color: var(--muted); font-size: 0.92rem; margin-top: 12px; max-width: 340px; }
.footer h4 { margin: 0 0 12px; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-2); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--muted); font-size: 0.93rem; }
.footer ul a:hover { color: var(--text); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.82rem; flex-wrap: wrap; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Responsive */
@media (max-width: 1020px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links, .nav.open .nav-actions { display: flex; }
  .nav.open .nav-inner { flex-wrap: wrap; height: auto; padding: 14px 0; }
  .nav.open .nav-links { flex-direction: column; width: 100%; order: 3; margin: 8px 0 0; }
  .nav.open .nav-actions { width: 100%; order: 4; padding-bottom: 6px; }
  .features, .depts { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .gallery, .gallery.large { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-toc { position: static; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 70px 0; }
  .features, .depts, .footer-grid { grid-template-columns: 1fr; }
  .join { padding: 36px 20px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .stat b { font-size: 1.7rem; }
  .rule-group { padding: 22px; }
}

/* Department card buttons */
.dept-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* CAD countdown */
.cad-head { padding-bottom: 70px; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 150px)); gap: 14px; justify-content: center; margin: 40px auto 0; }
.countdown .card { padding: 22px 10px; text-align: center; }
.countdown b { display: block; font-family: 'Outfit', sans-serif; font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.countdown span { display: block; margin-top: 8px; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.countdown-done { margin-top: 30px !important; color: var(--cyan) !important; font-weight: 600; }
@media (max-width: 640px) { .countdown { gap: 8px; } .countdown .card { padding: 16px 4px; } }

/* Overlay download page */
.dl-hero { padding-top: 80px; }
.dl-title { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; margin: 16px 0 16px; }
.dl-hero .lead { color: var(--muted); font-size: 1.1rem; max-width: 560px; }
.dl-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; max-width: 520px; }
.dl-details .card { padding: 14px 16px; }
.dl-details span { display: block; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.dl-details b { display: block; margin-top: 4px; font-family: 'Outfit', sans-serif; font-size: 1.15rem; }
.dl-fine { color: var(--muted); font-size: 0.9rem; margin-top: 18px !important; }
.dl-fine a { color: var(--cyan); }
.dl-shot { display: grid; place-items: center; }
.dl-shot img { max-height: 560px; width: auto; filter: drop-shadow(0 30px 60px rgba(47, 128, 255, 0.35)); }
.icon b { font-family: 'Outfit', sans-serif; font-size: 1.2rem; }
@media (max-width: 640px) { .dl-details { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .dl-details .card { padding: 10px; } .dl-shot img { max-height: 420px; } }

/* Clearwater Systems: big highlights and the live feed */
.systems { display: grid; gap: 14px; margin-top: 26px; }
.system { display: flex; gap: 16px; align-items: flex-start; }
.system .icon { flex: 0 0 48px; margin: 0; }
.system b { display: block; font-family: 'Outfit', sans-serif; font-size: 1.12rem; margin-bottom: 2px; }
.system p { color: var(--muted); font-size: 0.95rem; }
.console-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.console-stats div { padding: 12px; border-radius: 12px; background: rgba(5, 11, 24, 0.55); border: 1px solid var(--line); }
.console-stats b { display: block; font-family: 'Outfit', sans-serif; font-size: 1.5rem; color: #fff; font-variant-numeric: tabular-nums; }
.console-stats span { color: var(--muted); font-size: 0.78rem; }
.log { max-height: 380px; overflow-y: auto; }
.log .log-empty { justify-content: center; color: var(--muted); font-family: 'Inter', sans-serif; }
.log .new { animation: feedIn .6s ease; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.live.off { color: var(--muted); }
.live.off::before { animation: none; }

/* Nav sign-in */
.nav-signin.signed-in { padding: 5px 14px 5px 5px; }
.nav-signin img { width: 26px; height: 26px; border-radius: 50%; }
