/* ==========================================================
   TRUOS — AI training for commercial teams
   Enterprise-premium. Stripe/Linear energy.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Dark (default) */
  --bg: #0A0B0D;
  --bg-elevated: #111215;
  --bg-panel: #16181C;
  --bg-hover: #1C1F24;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #F2F3F5;
  --text-muted: #8B8F98;
  --text-dim: #5B5F68;
  --accent: #D4F547;       /* Electric Lime */
  --accent-ink: #0A0B0D;
  --paper: #F5F1EA;        /* certificate / editorial */
  --success: #5CE6A1;
  --warn: #F5B547;
  --danger: #F26D6D;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.5);

  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

[data-theme="light"] {
  --bg: #FAFAF7;
  --bg-elevated: #FFFFFF;
  --bg-panel: #FFFFFF;
  --bg-hover: #F2F1EC;
  --border: rgba(10,11,13,0.08);
  --border-strong: rgba(10,11,13,0.14);
  --text: #0A0B0D;
  --text-muted: #5B5F68;
  --text-dim: #8B8F98;
  --shadow-sm: 0 1px 2px rgba(10,11,13,0.06);
  --shadow: 0 8px 24px rgba(10,11,13,0.08);
  --shadow-lg: 0 24px 60px rgba(10,11,13,0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}

/* Subtle grain on dark surfaces */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
[data-theme="light"] body::before { opacity: 0.02; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

/* ---------------- Typography helpers ---------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.code {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}
.serif { font-family: var(--font-serif); font-weight: 400; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }
h1 { font-size: 64px; line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: 40px; line-height: 1.08; letter-spacing: -0.028em; }
h3 { font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }

p { margin: 0; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,245,71,0.25); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 6px; }

/* ---------------- Cards / surfaces ---------------- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.hairline { border-top: 1px solid var(--border); }

/* ---------------- Shared nav ---------------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-link {
  font-size: 14px; color: var(--text-muted);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }

/* ---------------- Tweaks panel ---------------- */
.tweaks {
  position: fixed; bottom: 20px; right: 20px;
  width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  font-size: 13px;
}
.tweaks-title {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  font-weight: 600;
}
.tweak-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.tweak-row:first-of-type { border-top: none; }
.tweak-label { color: var(--text-muted); font-size: 12px; }
.tweak-swatches { display: flex; gap: 6px; }
.swatch {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}
.swatch.on { border-color: var(--text); }
.toggle {
  width: 36px; height: 20px; border-radius: 10px;
  background: var(--bg-hover);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.toggle::after {
  content: ''; position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text);
  transition: transform 0.15s;
}
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(16px); background: var(--accent-ink); }

/* ---------------- Progress bits ---------------- */
.progress-bar {
  height: 4px; border-radius: 2px;
  background: var(--bg-hover);
  overflow: hidden;
}
.progress-bar > span {
  display: block; height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.badge.accent { background: color-mix(in oklab, var(--accent) 15%, transparent); color: var(--accent); }
.badge.success { background: color-mix(in oklab, var(--success) 15%, transparent); color: var(--success); }
.badge.paid { background: var(--bg-hover); color: var(--text); }

/* ---------------- Utility ---------------- */
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.center { text-align: center; }
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.flex-1 { flex: 1; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------------- Scrollbar ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
