/* ============================================
   V1STAX — Global Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');

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

:root {
  --bg:       #0f1117;
  --surface:  #1a1d27;
  --surface2: #1f2235;
  --border:   #2a2d3a;
  --text:     #e2e8f0;
  --muted:    #64748b;
  --accent:   #6366f1;
  --accent2:  #818cf8;
  --teal:     #2dd4bf;
  --yes:      #22c55e;
  --no:       #ef4444;
  --warn:     #f59e0b;
  --purple:   #a855f7;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ── Typography ─────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

h1 { font-size: 2.4rem; color: var(--text); }
h2 { font-size: 1.3rem; color: var(--accent2); margin-bottom: 1rem; }
h3 { font-size: 1rem; color: var(--text); }

p  { color: var(--text); margin-bottom: 1rem; }
a  { color: var(--accent2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--teal); }

code {
  font-family: "SF Mono", "Fira Code", monospace;
  background: var(--surface2);
  color: var(--teal);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-size: 0.88em;
  border: 1px solid var(--border);
}

ul { padding-left: 1.4rem; color: var(--text); }
ul li { margin-bottom: 0.4rem; }

/* ── Navigation ─────────────────────────────── */
nav.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,17,23,0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 52px;
}

nav.topnav .nav-brand {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem; font-weight: 700;
  color: var(--text); letter-spacing: 0.1em;
  text-decoration: none;
}
nav.topnav .nav-brand span { color: var(--accent); }

nav.topnav .nav-links {
  display: flex; gap: 1.75rem; list-style: none;
}

nav.topnav .nav-links a {
  font-size: 0.78rem; font-weight: 600;
  color: var(--muted); letter-spacing: 0.05em;
  text-transform: uppercase; transition: color 0.2s;
}
nav.topnav .nav-links a:hover,
nav.topnav .nav-links a.active { color: var(--text); }

/* ── Hero ────────────────────────────────────── */
.page-hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background-size: 200% 200%;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(99,102,241,0.14) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 0%, rgba(45,212,191,0.08) 0%, transparent 60%),
    linear-gradient(180deg, rgba(99,102,241,0.03) 0%, transparent 100%);
  animation: heroBg 8s ease infinite alternate;
  position: relative; overflow: hidden;
}
@keyframes heroBg {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.page-hero h1 {
  font-size: 3.2rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem; position: relative;
}

.page-hero .tagline {
  color: var(--muted); font-size: 1rem;
  max-width: 520px; margin: 0 auto; position: relative;
}

.page-hero .hero-meta {
  display: flex; justify-content: center; gap: 10px;
  margin-top: 1.5rem; flex-wrap: wrap; position: relative;
}

.hero-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 14px;
  font-size: 0.72rem; font-weight: 600; color: var(--muted);
}
.hero-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--yes); animation: pulse 2s infinite;
}
.hero-pill .dot.warn { background: var(--warn); }
.hero-pill .dot.off  { background: var(--muted); animation: none; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── Container ───────────────────────────────── */
.container { max-width: 1000px; margin: 0 auto; padding: 3rem 2rem; }

/* ── Section label ───────────────────────────── */
.section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 1.25rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Card grid ───────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem; margin-top: 1.25rem;
}

/* ── Cards ───────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem;
  position: relative; overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.card::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); opacity: 0; transition: opacity 0.25s;
}
.card:hover {
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 0 24px rgba(99,102,241,0.08);
  transform: translateY(-2px);
}
.card:hover::before { opacity: 1; }
.card h3 { font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--text); }
.card p  { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.6; }
.card-link {
  font-size: 0.8rem; font-weight: 700;
  color: var(--accent2); transition: color 0.2s;
}
.card-link:hover { color: var(--teal); }

/* ── Badges ──────────────────────────────────── */
.badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px; margin-bottom: 0.75rem;
}
.badge-active  { background: rgba(34,197,94,0.12);  color: var(--yes);    border: 1px solid rgba(34,197,94,0.25); }
.badge-wip     { background: rgba(245,158,11,0.12); color: var(--warn);   border: 1px solid rgba(245,158,11,0.25); }
.badge-planned { background: rgba(100,116,139,0.12);color: var(--muted);  border: 1px solid rgba(100,116,139,0.25); }
.badge-live    { background: rgba(99,102,241,0.12); color: var(--accent2);border: 1px solid rgba(99,102,241,0.25); }

/* ── Info block ──────────────────────────────── */
.info-block {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 10px;
  padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.info-block h3 { margin-bottom: 0.5rem; color: var(--accent2); }

/* ── Stats strip ─────────────────────────────── */
.stats-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 2rem;
}
.stat-cell { background: var(--surface); padding: 1rem 1.25rem; text-align: center; }
.stat-cell .val { font-size: 1.4rem; font-weight: 700; line-height: 1; color: var(--text); }
.stat-cell .lbl { font-size: 0.62rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Tables ──────────────────────────────────── */
.cmd-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.9rem; }
.cmd-table th {
  text-align: left; padding: 0.6rem 1rem; color: var(--muted);
  font-family: 'Orbitron', sans-serif; font-size: 0.65rem;
  letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--border);
}
.cmd-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.cmd-table td:first-child { color: var(--teal); font-family: "SF Mono", monospace; font-size: 0.88rem; }
.cmd-table tr:last-child td { border-bottom: none; }
.cmd-table tr:hover td { background: var(--surface2); }

/* ── Steps ───────────────────────────────────── */
.steps { counter-reset: step; list-style: none; padding: 0; margin-top: 1rem; }
.steps li { counter-increment: step; display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 1.5rem; }
.steps li::before {
  content: counter(step); flex-shrink: 0; width: 2rem; height: 2rem;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.3);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; color: var(--accent2);
}
.steps li p { margin: 0; padding-top: 0.3rem; color: var(--muted); }

/* ── Embed ───────────────────────────────────── */
.embed-wrap { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); margin-top: 1rem; }

/* ── Footer ──────────────────────────────────── */
footer {
  border-top: 1px solid var(--border); padding: 1.5rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: var(--muted); background: var(--surface);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ── 404 ─────────────────────────────────────── */
.error-page { text-align: center; padding: 8rem 2rem; }
.error-code { font-family: 'Orbitron', sans-serif; font-size: 6rem; font-weight: 700; color: var(--no); opacity: 0.15; line-height: 1; }
.error-title { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; color: var(--no); margin-top: -1rem; margin-bottom: 1rem; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 640px) {
  nav.topnav { padding: 0 1.25rem; }
  nav.topnav .nav-links { gap: 1rem; }
  nav.topnav .nav-links a { font-size: 0.72rem; }
  .page-hero { padding: 3.5rem 1.5rem 3rem; }
  .page-hero h1 { font-size: 2.2rem; }
  .container { padding: 2rem 1.25rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
