/* ============================================================================
   HyperX static site styles — no secrets, no backend code, no build step.
   Plain CSS, mobile-first, responsive, light/dark aware.
   ==========================================================================*/

:root {
  --bg: #0b0e14;
  --bg-alt: #10141d;
  --surface: #141922;
  --border: #232a36;
  --text: #e6e9ef;
  --muted: #98a2b3;
  --brand: #6ee7b7;
  --brand-strong: #34d399;
  --brand-contrast: #05261c;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --focus: #7dd3fc;
  --radius: 14px;
  --wrap: 72rem;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Global guard: the status panel uses the native `hidden` attribute, but
   .status-grid sets display:grid, so enforce hidden everywhere. */
[hidden] { display: none !important; }

/* Unavailable message under the status grid (set by app.js). */
.status-unavailable {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.9rem;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--brand); color: var(--brand-contrast);
  padding: 0.6rem 1rem; z-index: 20; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); font-size: 1.25rem; }
.brand-name { letter-spacing: -0.01em; }
.nav { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--muted); font-size: 0.95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }

.hero {
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  background:
    radial-gradient(60rem 30rem at 15% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent),
    radial-gradient(50rem 26rem at 100% 0%, color-mix(in srgb, var(--focus) 12%, transparent), transparent);
}
.eyebrow { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: 0.75rem; }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: var(--muted); max-width: 46rem; }
.hero-note { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.2rem; border-radius: 10px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.04s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-contrast); }
.btn-primary:hover { background: var(--brand-strong); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); text-decoration: none; }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.85rem; }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-lede { color: var(--muted); max-width: 44rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.card h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.card p { color: var(--muted); margin: 0 0 0.75rem; }
.card p:last-child { margin-bottom: 0; }

.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap;
}
.badge-live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.badge-progress { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.badge-planned { color: var(--muted); }

/* ---- Status panel ---- */
.status-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.25rem;
  max-width: 40rem;
}
.status-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border);
}
.status-line:last-of-type { border-bottom: none; }
.status-label { color: var(--muted); font-size: 0.9rem; }
.status-value { font-weight: 600; font-family: var(--mono); font-size: 0.95rem; text-align: right; }
.status-ok { color: var(--ok); }
.status-warn { color: var(--warn); }
.status-bad { color: var(--danger); }
.status-refresh-wrap { margin-top: 1rem; }
.status-detail { margin-top: 0.75rem; color: var(--muted); font-size: 0.9rem; }

/* Status head: state text + re-check button on one row */
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.status-state { margin: 0; font-weight: 700; color: var(--muted); }
.status-state[data-kind="good"] { color: var(--ok); }
.status-state[data-kind="bad"] { color: var(--danger); }
.status-state[data-kind="unavailable"] { color: var(--warn); }

/* Status grid: revealed once a valid health response arrives */
.status-grid { display: grid; grid-template-columns: 1fr; margin-top: 0.75rem; }

/* Per-value health coloring set by app.js via data-ok */
.status-value[data-ok="true"] { color: var(--ok); }
.status-value[data-ok="false"] { color: var(--danger); }

/* Small button variant (status re-check) */
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.9rem; }

/* Honest caveat line under the status panel */
.status-note { color: var(--muted); font-size: 0.85rem; margin-top: 0.75rem; }

/* Roadmap two-column comparison + generic bullet list */
.grid-roadmap { align-items: start; }
.bullets { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.bullets li { margin-bottom: 0.4rem; }
.card .bullets { margin-bottom: 0; }

/* ---- Steps ---- */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1.1rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--brand-contrast);
  font-weight: 800;
  font-size: 0.95rem;
}
.steps p { color: var(--muted); margin: 0; }

/* ---- Roadmap ---- */
.roadmap { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.85rem; }
.roadmap li { display: flex; align-items: flex-start; gap: 0.75rem; color: var(--text); }
.roadmap .badge { flex: none; margin-top: 0.1rem; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-note { opacity: 0.75; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .nav { gap: 0.9rem; }
  .nav a { font-size: 0.9rem; }
  .status-line { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .status-value { text-align: left; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

