/* ---------- Theme Tokens ---------- */
:root {
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0,0,0,.12);
  --border: rgba(15, 23, 42, .12);
  --border-2: rgba(15, 23, 42, .18);

  --accent1: #7c3aed;
  --accent2: #22c55e;
  --accent3: #06b6d4;

  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

html[data-theme="light"] {
  --bg: #f7f8fc;
  --fg: #0b1220;
  --muted: #475569;

  --card: rgba(255,255,255,.72);
  --card2: rgba(255,255,255,.92);

  --grid: rgba(15, 23, 42, .08);
  --orbA: rgba(6, 182, 212, .22);
  --orbB: rgba(124, 58, 237, .18);

  --btnText: #0b1220;
  --btnGhostBg: rgba(15, 23, 42, .05);
  --btnGhostBorder: rgba(15, 23, 42, .14);
}

html[data-theme="dark"] {
  --bg: #0b1020;
  --fg: #e9eefc;
  --muted: #a8b3d6;

  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.10);

  --grid: rgba(255,255,255,.06);
  --orbA: rgba(6, 182, 212, .26);
  --orbB: rgba(124, 58, 237, .26);

  --border: rgba(255,255,255,.12);
  --border-2: rgba(255,255,255,.20);
  --shadow: 0 20px 60px rgba(0,0,0,.35);

  --btnText: #ffffff;
  --btnGhostBg: rgba(255,255,255,.06);
  --btnGhostBorder: rgba(255,255,255,.22);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.grid {
  position: absolute; inset: -2px;
  background:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 40% 10%, black 0%, transparent 60%);
  opacity: .55;
}

.orb {
  position: absolute;
  width: 520px; height: 520px; border-radius: 999px;
  filter: blur(55px);
  opacity: .9;
}
.orb-a { left: -140px; top: -180px; background: radial-gradient(circle, var(--orbA), transparent 60%); }
.orb-b { right: -160px; bottom: -240px; background: radial-gradient(circle, var(--orbB), transparent 60%); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 16px;
}

.nav { display: flex; gap: 16px; }
.nav a { color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--fg); }

.header-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- Logo ---------- */
.brand { display: flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 1px; }
.logo-square {
  width: 16px; height: 16px; border-radius: 4px;
  background: linear-gradient(135deg, var(--accent3), var(--accent1));
  box-shadow: 0 0 18px color-mix(in oklab, var(--accent1) 55%, transparent);
}
.logo-text {
  font-size: 18px;
  background: linear-gradient(90deg, var(--fg), color-mix(in oklab, var(--fg) 60%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  border: 1px solid var(--btnGhostBorder);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--btnGhostBg);
  color: var(--btnText);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--border-2); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent1), var(--accent3));
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(124,58,237,.18);
}
.btn-primary:hover { box-shadow: 0 16px 40px rgba(124,58,237,.28); }

.btn-secondary { background: color-mix(in oklab, var(--card2) 75%, transparent); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  border: none;
  color: #06101f;
  box-shadow: 0 12px 30px rgba(34,197,94,.18);
}
.btn-accent:hover { box-shadow: 0 16px 40px rgba(34,197,94,.26); }

.btn-theme {
  min-width: 112px;
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 34px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: start; }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border);
  padding: 8px 12px; border-radius: 999px;
  background: color-mix(in oklab, var(--card2) 65%, transparent);
  color: var(--muted);
  font-weight: 700; font-size: 13px;
}
.dot {
  width: 8px; height: 8px; border-radius: 99px;
  background: var(--accent2);
  box-shadow: 0 0 18px rgba(34,197,94,.45);
}

h1 {
  margin: 18px 0 12px;
  font-size: 54px; line-height: 1.02;
  letter-spacing: -1px;
}
.gradient {
  background: linear-gradient(135deg, var(--accent2), var(--accent3), var(--accent1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 58ch; }

.hero-cta { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

.hero-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.metric { padding: 14px; }
.metric-kpi { font-size: 22px; font-weight: 900; }
.metric-label { color: var(--muted); font-size: 12px; margin-top: 4px; }

.hero-card { padding: 16px; }

/* ---------- Terminal ---------- */
.terminal { border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.term-top {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: color-mix(in oklab, var(--card2) 60%, transparent);
  border-bottom: 1px solid var(--border);
}
.term-dot { width: 10px; height: 10px; border-radius: 99px; }
.term-dot.red { background: #ef4444; }
.term-dot.yellow { background: #f59e0b; }
.term-dot.green { background: #22c55e; }
.term-title { margin-left: 6px; color: var(--muted); font-weight: 800; font-size: 12px; }
.term-body {
  margin: 0; padding: 12px 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px; line-height: 1.55;
  color: color-mix(in oklab, var(--fg) 88%, transparent);
  background: color-mix(in oklab, var(--bg) 84%, transparent);
}

/* ---------- Badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge {
  padding: 7px 10px; border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card2) 65%, transparent);
  color: var(--muted);
  font-weight: 800; font-size: 12px;
}

/* ---------- Sections ---------- */
.section { padding: 52px 0; }
h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.6px; }
.sub { margin: 0 0 22px; color: var(--muted); line-height: 1.6; }

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

.feature { padding: 18px; }
.feature h3 { margin: 2px 0 10px; }
.feature p { margin: 0 0 12px; color: var(--muted); line-height: 1.6; }
.feature ul { margin: 0; padding-left: 18px; color: color-mix(in oklab, var(--fg) 82%, transparent); }
.feature li { margin: 8px 0; }

/* ---------- Status ---------- */
.status-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.status-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card2) 65%, transparent);
}
.status-card { padding: 18px; }
.status-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.status-row:last-child { border-bottom: none; }
.ok { color: #16a34a; font-weight: 900; }

.events { margin: 10px 0 0; padding-left: 18px; color: color-mix(in oklab, var(--fg) 78%, transparent); }
.events .time { color: var(--muted); margin-right: 8px; }

.footnote { margin-top: 14px; color: var(--muted); font-size: 13px; }

/* ---------- Contact ---------- */
.contact-card { padding: 18px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.label { color: var(--muted); font-size: 12px; margin-bottom: 6px; font-weight: 700; }
.link { font-weight: 900; }
.muted { color: var(--muted); }

.footer {
  margin-top: 20px; padding: 16px 2px;
  color: var(--muted);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.sep { opacity: .4; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 14px; }
  h1 { font-size: 42px; }
  .hero-metrics { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
