/* TeachTools brand stylesheet — single source of truth.
 * Loaded by every page in public/. Defines design tokens, base typography,
 * and primitives that override per-page hex/font drift.
 *
 * Brand reference: dashboard (index.html). Colors derive from #667eea (primary).
 */

:root {
  --primary: #667eea;
  --primary-dark: #5568d3;
  --primary-light: #f0f4ff;
  --secondary: #764ba2;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --bg-dark: #0f172a;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --border: #e2e8f0;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

/* Force the dashboard's system font stack everywhere. Pages may set their
 * own font-family on body or specific elements; this wins because the
 * stylesheet is loaded last, and !important guards against per-page drift. */
html,
body {
  font-family: var(--font-system) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings use the same font stack — no display serifs (Instrument Serif,
 * Fraunces) or geometric display fonts (Syne, Space Grotesk).
 * Color is intentionally NOT set here: many pages have dark/gradient hero
 * sections that rely on inherited light text. Color stays per-page. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-system) !important;
  letter-spacing: -0.01em;
}

/* Selection color matches the brand. */
::selection {
  background: rgba(102, 126, 234, 0.2);
  color: var(--text-primary);
}

/* ====== Shared site header (.tt-header) — propagated from homepage ====== */
.tt-header {
  height: 72px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: none;
  transition: box-shadow 0.3s ease;
}
.tt-header.scrolled { box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06); }
.tt-header .header-left { display: flex; align-items: center; gap: 40px; }
.tt-header .logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 800; font-size: 1.3rem;
  color: #0f172a; transition: transform 0.2s ease;
}
.tt-header .logo:hover { transform: scale(1.02); }
.tt-header .logo img { height: 32px; width: auto; }
.tt-header nav { display: flex; gap: 32px; }
.tt-header nav a {
  text-decoration: none; color: #475569;
  font-weight: 500; font-size: 0.95rem; transition: color 0.2s ease;
}
.tt-header nav a:hover,
.tt-header nav a.active { color: #667eea; }
.tt-header nav a.active { font-weight: 600; }
.tt-header .header-right { display: flex; align-items: center; gap: 12px; }
.tt-header .btn-secondary,
.tt-header .btn-primary {
  padding: 10px 22px; border-radius: 14px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border: none; cursor: pointer; transition: all 0.2s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.tt-header .btn-secondary {
  background: white; color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
}
.tt-header .btn-secondary:hover { background: rgba(15, 23, 42, 0.04); }
.tt-header .btn-primary {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.2), rgba(255,255,255,0) 50%),
    linear-gradient(135deg, #5B7FF6 0%, #8B5CF6 50%, #EC4899 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}
.tt-header .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.3);
}
@media (max-width: 768px) {
  .tt-header { padding: 0 16px; }
  .tt-header nav { display: none; }
  .tt-header .header-left { gap: 0; }
}
