/* =====================================================
   Clean Utility Apps — Shared Site System
   /assets/css/site.css
   ===================================================== */

/* ── Design Tokens ──────────────────────────────────── */
:root {
  --bg-top: #0b1c3a;
  --bg-bottom: #08142b;
  --card: rgba(255, 255, 255, 0.06);
  --card-inner: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --soft: #cbd5e1;
  --muted: #94a3b8;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-light: #dbeafe;
  --blue-outline: #3b82f6;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
  --max-width: 1120px;
  --header-h: 60px;
}

/* ── Base Reset ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%)
    fixed;
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Site Header ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(11, 28, 58, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.site-brand:hover {
  text-decoration: none;
  color: #fff;
  opacity: 0.88;
}

.site-brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.2s,
    color 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
}

.site-nav a.active {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(59, 130, 246, 0.28);
  color: var(--blue-light);
}

/* ── Mobile menu button ─────────────────────────────── */
.site-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  flex-shrink: 0;
  transition: background 0.15s;
}

.site-menu-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-menu-btn svg {
  display: block;
  pointer-events: none;
}

/* ── Page Breadcrumb ────────────────────────────────── */
/* Rendered above the sidebar+content layout on docs pages */
.page-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-breadcrumb a,
.page-breadcrumb .bc-current {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition:
    background 0.13s,
    color 0.13s;
}

.page-breadcrumb a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--blue-light);
  text-decoration: none;
}

.page-breadcrumb .bc-current {
  color: var(--blue-light);
  font-weight: 600;
}

.bc-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  padding: 0 2px;
  user-select: none;
}

/* ── Shared Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition:
    background 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.btn.secondary {
  background: transparent;
  border-color: var(--blue-outline);
  box-shadow: none;
  color: var(--blue-light);
}

.btn.secondary:hover {
  background: rgba(37, 99, 235, 0.12);
}

/* ── Site Footer ────────────────────────────────────── */
.site-footer {
  margin-top: 80px;
  padding: 24px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.site-footer a {
  color: #94a3b8;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--blue-light);
  text-decoration: none;
}

.site-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
}

/* ── Responsive ─────────────────────────────────────── */

/* Tablet and below: hamburger menu */
@media (max-width: 768px) {
  /* Show hamburger, hide inline nav */
  .site-menu-btn {
    display: flex;
  }

  .site-nav {
    /* Drop down as a fixed panel below the sticky header */
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 99;
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px 18px;
    background: rgba(11, 28, 58, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 15px;
    width: 100%;
    color: var(--soft);
  }

  .site-nav a.active {
    color: var(--blue-light);
  }
}

/* Phone */
@media (max-width: 640px) {
  .site-header-inner {
    padding: 0 16px;
  }

  .page-breadcrumb {
    margin-bottom: 14px;
  }

  .site-footer {
    margin-top: 48px;
    padding: 20px 16px;
  }
}
