/* DrGUI Design System
 * One stylesheet, imported by every customer-facing page.
 * Updated 2026-05-16 — see docs/superpowers/specs/2026-05-16-website-redesign-design.md
 */

:root {
  /* Surfaces */
  --bg-base:      #0a0a0f;
  --bg-elevated:  #14141c;
  --bg-hover:     #1c1c26;

  /* Borders */
  --border:       #1f1f2b;
  --border-soft:  #16161f;
  --border-focus: #2ecdcf;

  /* Text */
  --text:         #e8e8ed;
  --text-muted:   #9596a0;
  --text-dim:     #6b6c75;

  /* Brand */
  --accent:       #2ecdcf;
  --accent-deep:  #02898f;
  --accent-dim:   #014d52;
  --accent-glow:  rgba(46, 205, 207, 0.18);

  /* Semantic */
  --success:      #4ade80;
  --warn:         #f59e0b;
  --error:        #f87171;

  /* Type scale (1.250 ratio) */
  --fs-xs: 12px;   --fs-sm: 13px;   --fs-base: 15px;
  --fs-lg: 18px;   --fs-xl: 22px;   --fs-2xl: 28px;
  --fs-3xl: 40px;  --fs-4xl: 56px;

  /* Spacing (4px base) */
  --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-6: 24px; --sp-8: 32px;  --sp-12: 48px; --sp-16: 64px; --sp-24: 96px;

  /* Radii */
  --r-sm: 6px;  --r: 8px;  --r-lg: 12px;  --r-xl: 16px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;  --t: 220ms;
}

/* Light mode (used only by the dashboard's existing toggle) */
:root.light-mode {
  --bg-base:      #fafafa;
  --bg-elevated:  #ffffff;
  --bg-hover:     #f0f0f3;
  --border:       #e4e4ea;
  --border-soft:  #ececf0;
  --text:         #14141c;
  --text-muted:   #5a5b65;
  --text-dim:     #8a8b95;
  --accent-glow:  rgba(2, 137, 143, 0.12);
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg-base);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.55;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

code, pre {
  font-family: 'JetBrains Mono', ui-monospace, SF Mono, Menlo, monospace;
}

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

/* ---------- Layout ---------- */

.container     { max-width: 1120px; margin: 0 auto; padding: 0 var(--sp-6); }
.container-sm  { max-width: 720px;  margin: 0 auto; padding: 0 var(--sp-6); }
.section       { padding: var(--sp-24) 0; }
.section-tight { padding: var(--sp-16) 0; }
.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; gap: var(--sp-3); align-items: center; }

/* ---------- Typography helpers ---------- */

.eyebrow {
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
}
.h1 {
  font-size: var(--fs-4xl); line-height: 1.05; letter-spacing: -0.03em;
  font-weight: 600; color: var(--text); margin: 0;
}
.h2 {
  font-size: var(--fs-3xl); line-height: 1.1; letter-spacing: -0.025em;
  font-weight: 600; margin: 0;
}
.h3 {
  font-size: var(--fs-xl); line-height: 1.2; letter-spacing: -0.015em;
  font-weight: 600; margin: 0;
}
.lede {
  font-size: var(--fs-lg); color: var(--text-muted); max-width: 56ch;
  line-height: 1.5; margin: 0;
}
.muted { color: var(--text-muted); }
.dim   { color: var(--text-dim); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 500 var(--fs-sm)/1 'Inter', sans-serif;
  padding: 10px 16px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #001012; }
.btn-primary:hover { background: #4ed8da; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-hover); border-color: #2a2a36; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 6px 10px; font-size: var(--fs-xs); }
.btn-lg { padding: 12px 20px; font-size: var(--fs-base); }
.btn-danger { background: var(--error); color: #0a0a0f; }
.btn-danger:hover { background: #fb8d8d; }

/* ---------- Cards ---------- */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.card-hover { transition: border-color var(--t-fast) var(--ease); }
.card-hover:hover { border-color: var(--accent-deep); }

/* ---------- Inputs ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .field-label {
  font-size: var(--fs-xs); color: var(--text-muted);
}
.input, .textarea, select.input {
  width: 100%; background: var(--bg-base); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 10px 12px; font: inherit;
  transition: border-color var(--t-fast) var(--ease);
}
.input:focus, .textarea:focus, select.input:focus {
  outline: none; border-color: var(--border-focus);
}
.textarea { resize: vertical; min-height: 80px; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
  background: var(--bg-hover); color: var(--text-muted);
}
.badge-accent { background: var(--accent-glow); color: var(--accent); }
.badge-accent::before {
  content: ''; width: 6px; height: 6px; background: var(--accent);
  border-radius: 50%;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10, 10, 15, 0.72);
  border-bottom: 1px solid var(--border-soft);
}
:root.light-mode .nav { background: rgba(255, 255, 255, 0.82); }
:root.light-mode .btn-secondary:hover { border-color: #c8c9d1; }
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--text); letter-spacing: -0.01em;
  text-decoration: none; font-size: var(--fs-sm);
}
.nav-brand::before {
  content: ''; width: 7px; height: 7px; background: var(--accent);
  border-radius: 50%; box-shadow: 0 0 12px var(--accent-glow);
}
.nav-links { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.nav-link {
  color: var(--text-muted); font-size: var(--fs-sm);
  padding: 6px 10px; text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }

/* ---------- Grid ---------- */

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Decorative ---------- */

.divider { height: 1px; background: var(--border-soft); }
.glow {
  background: radial-gradient(600px circle at 50% 0%,
              var(--accent-glow), transparent 60%);
}
.glow-soft {
  background: radial-gradient(400px circle at 50% 0%,
              var(--accent-glow), transparent 70%);
  opacity: 0.6;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border-soft);
  padding: var(--sp-16) 0 var(--sp-8);
  margin-top: var(--sp-24);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-8);
}
.footer-col h4 {
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  margin: 0 0 var(--sp-3);
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.footer-col a {
  color: var(--text-muted); font-size: var(--fs-sm);
  text-decoration: none;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-soft);
  color: var(--text-dim); font-size: var(--fs-xs);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--sp-3); }
}

/* ---------- Reveal-on-scroll (already used by existing pages) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
