/* ============================================
   V1STAX — Global Stylesheet (Premium UI)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900;1,14..32,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&display=swap');

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

:root {
  --bg:       #07090d;
  --bg2:      #0b0d13;
  --surface:  #0d1018;
  --surface2: #111520;
  --border:   rgba(255,255,255,0.065);
  --border2:  rgba(255,255,255,0.12);
  --text:     #e8eaf0;
  --muted:    #4b5563;
  --muted2:   #64748b;
  --accent:   #6366f1;
  --accent2:  #818cf8;
  --teal:     #2dd4bf;
  --yes:      #22c55e;
  --no:       #ef4444;
  --warn:     #f59e0b;
  --purple:   #a855f7;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -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;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

/* ── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.09); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ── 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(--muted2); 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: 6px;
  font-size: 0.88em;
  border: 1px solid var(--border2);
}

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

/* ── Navigation ─────────────────────────────── */
nav.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,9,13,0.85);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.025), 0 4px 24px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 54px;
}

nav.topnav .nav-brand {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem; font-weight: 900;
  letter-spacing: 0.1em;
  text-decoration: none;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
nav.topnav .nav-brand span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

nav.topnav .nav-links a {
  font-size: 0.75rem; font-weight: 600;
  color: var(--muted2); letter-spacing: 0.06em;
  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: 5.5rem 2rem 4.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background-image:
    radial-gradient(ellipse 60% 80% at 20% 0%, rgba(99,102,241,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 60% 80% at 80% 0%, rgba(45,212,191,0.07) 0%, transparent 65%),
    linear-gradient(180deg, rgba(99,102,241,0.02) 0%, transparent 100%);
  background-size: 200% 200%;
  animation: heroBg 10s 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.025'%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::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.35), transparent);
}

.page-hero h1 {
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent2) 60%, var(--teal) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.9rem; position: relative;
  filter: drop-shadow(0 0 40px rgba(99,102,241,0.25));
}

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

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

.hero-pill {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 20px; padding: 6px 16px;
  font-size: 0.72rem; font-weight: 600; color: var(--muted2);
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.hero-pill:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
  color: var(--text);
}
.hero-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--yes);
  box-shadow: 0 0 6px var(--yes);
  animation: pulse 2s infinite;
}
.hero-pill .dot.warn {
  background: var(--warn);
  box-shadow: 0 0 6px var(--warn);
}
.hero-pill .dot.off  { background: var(--muted); animation: none; box-shadow: none; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }

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

/* ── Section label ───────────────────────────── */
.section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 1.25rem; padding-bottom: 0.6rem;
  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: 18px;
  padding: 1.6rem;
  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: linear-gradient(180deg, var(--accent), var(--accent2));
  opacity: 0; transition: opacity 0.25s;
}
.card::after {
  content: ''; position: absolute;
  inset: 0; border-radius: 18px;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,0.07), transparent);
  opacity: 0; transition: opacity 0.25s; pointer-events: none;
}
.card:hover {
  border-color: rgba(99,102,241,0.3);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.08);
  transform: translateY(-3px);
}
.card:hover::before { opacity: 1; }
.card:hover::after  { opacity: 1; }
.card h3 {
  font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--text);
}
.card p  {
  font-size: 0.87rem; color: var(--muted2);
  margin-bottom: 1rem; line-height: 1.65;
}
.card-link {
  font-size: 0.78rem; font-weight: 700;
  color: var(--accent2); transition: color 0.2s;
  display: inline-flex; align-items: center; gap: 4px;
}
.card-link:hover { color: var(--teal); }

/* ── Badges ──────────────────────────────────── */
.badge {
  display: inline-block; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 0.8rem;
  border: 1px solid;
}
.badge-active  {
  background: rgba(34,197,94,0.08);  color: #4ade80;
  border-color: rgba(34,197,94,0.25);
  box-shadow: 0 0 12px rgba(34,197,94,0.12);
}
.badge-wip     {
  background: rgba(245,158,11,0.08); color: #fbbf24;
  border-color: rgba(245,158,11,0.25);
}
.badge-planned {
  background: rgba(100,116,139,0.08); color: var(--muted2);
  border-color: rgba(100,116,139,0.2);
}
.badge-live    {
  background: rgba(99,102,241,0.1); color: var(--accent2);
  border-color: rgba(99,102,241,0.25);
  box-shadow: 0 0 12px rgba(99,102,241,0.15);
}

/* ── Info block ──────────────────────────────── */
.info-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 1.4rem 1.6rem; margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}
.info-block:hover { border-color: rgba(99,102,241,0.25); }
.info-block h3 { margin-bottom: 0.5rem; color: var(--accent2); }
.info-block p  { color: var(--muted2); }

/* ── Stats strip ─────────────────────────────── */
.stats-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--border); border-radius: 14px;
  overflow: hidden; margin-bottom: 2rem;
  border: 1px solid var(--border);
}
.stat-cell {
  background: var(--surface); padding: 1.1rem 1.25rem; text-align: center;
  transition: background 0.15s;
}
.stat-cell:hover { background: var(--surface2); }
.stat-cell .val {
  font-size: 1.4rem; font-weight: 800; line-height: 1;
  color: var(--text); letter-spacing: -0.02em;
}
.stat-cell .lbl {
  font-size: 0.6rem; color: var(--muted); margin-top: 5px;
  text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600;
}

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

/* ── 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.1);
  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);
  box-shadow: 0 0 12px rgba(99,102,241,0.1);
}
.steps li p { margin: 0; padding-top: 0.3rem; color: var(--muted2); }

/* ── Embed ───────────────────────────────────── */
.embed-wrap {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); margin-top: 1rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* ── 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.75rem; color: var(--muted);
  background: var(--surface);
}
footer a { color: var(--muted); transition: color 0.2s; }
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: 900; color: var(--no); opacity: 0.12; 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.7rem; }
  .page-hero { padding: 3.5rem 1.5rem 3rem; }
  .page-hero h1 { font-size: 2.4rem; }
  .container { padding: 2rem 1.25rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
