/* ─── Shared Design Tokens + Nav + Footer ─── */
/* Single source of truth for fast-draft.com and /docs */

:root {
  /* Marketing page tokens (dark) */
  --bg-primary: #0D1117;
  --bg-secondary: #161B22;
  --bg-card: #1C2128;
  --bg-card-hover: #21262D;
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-muted: #484F58;
  --accent: #007AFF;
  --accent-hover: #0071EB;
  --accent-glow: rgba(108, 92, 231, 0.2);
  --accent-2: #5AC8FA;
  --border: #30363D;
  --border-light: #21262D;
  --success: #34C759;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);
  --font: 'Geist Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', sans-serif;
  --mono: 'Geist Mono', 'SF Mono', SFMono-Regular, ui-monospace, 'JetBrains Mono', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}


/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ─── Keyboard Accessibility ─── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Shared Nav ─── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}
/* Home page starts transparent, gets frosted on scroll */
.site-nav.nav-transparent {
  background: transparent;
  border-bottom-color: transparent;
}
.site-nav.nav-transparent.scrolled {
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}
.logo-icon { font-size: 1.4rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--text-primary); font-weight: 600; }

.btn-nav {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  font-size: 0.85rem;
  transition: background var(--transition), transform var(--transition) !important;
}
.btn-nav:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
}

/* ─── Mobile Menu ─── */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Shared Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-primary); }
.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}
.footer-copy a {
  color: var(--text-secondary);
}

/* ─── Site Theme Toggle Button ─── */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: var(--bg-card-hover, rgba(255,255,255,0.08));
  border-color: var(--accent, #6C5CE7);
  box-shadow: 0 0 16px rgba(108, 92, 231, 0.15);
}
.theme-toggle-btn:active {
  transform: scale(0.9);
}

/* ─── Gradient text utility ─── */
.gradient-text {
  background: linear-gradient(135deg, #6C5CE7, #0A84FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Shared Responsive ─── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: flex; }

}
