/* TABZOID — site stylesheet
   Clean, light aesthetic matching the home page. */

:root {
  --bg: #ffffff;
  --ink: #2b2b2b;
  --muted: #5c5c5c;
  --accent: #6b3fe4;
  --accent-dark: #5a31c8;
  --border: #ececf3;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── header (sticky, two-tier nav) ───────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 10px;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.brand img {
  display: block;
  width: auto;
  height: clamp(22px, 4vw, 28px);
  user-select: none;
  -webkit-user-drag: none;
}

.brand:hover,
.brand:focus-visible {
  opacity: 0.78;
  outline: none;
}

/* tier 1: main sections */
nav.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
}

nav.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 999px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

nav.main-nav a:hover,
nav.main-nav a:focus-visible {
  color: var(--accent);
  background: rgba(107, 63, 228, 0.08);
  outline: none;
}

nav.main-nav a.current {
  color: var(--accent);
  background: rgba(107, 63, 228, 0.12);
  font-weight: 600;
}

/* tier 2: current section's sub-pages */
nav.sub-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 2px;
  width: 100%;
  max-width: 920px;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
}

nav.sub-nav a {
  font-size: 0.83rem;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 999px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

nav.sub-nav a:hover,
nav.sub-nav a:focus-visible {
  color: var(--accent);
  background: rgba(107, 63, 228, 0.06);
  outline: none;
}

nav.sub-nav a.current {
  color: var(--accent);
  font-weight: 600;
}

/* ── page header (centered) ─────────────────────────────── */

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

main h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}

/* ── footer ─────────────────────────────────────────────── */

footer.site {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 28px 24px 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

footer.site nav.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
}

footer.site nav.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 5px 12px;
  border-radius: 999px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

footer.site nav.footer-nav a:hover,
footer.site nav.footer-nav a:focus-visible {
  color: var(--accent);
  background: rgba(107, 63, 228, 0.06);
  outline: none;
}

footer.site p {
  margin: 0;
}

footer.site p a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

footer.site p a:hover,
footer.site p a:focus-visible {
  color: var(--accent);
  outline: none;
}

footer.site .social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

footer.site .social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

footer.site .social svg {
  width: 20px;
  height: 20px;
  display: block;
}

footer.site .social:hover,
footer.site .social:focus-visible {
  color: var(--accent);
  background: rgba(107, 63, 228, 0.08);
  transform: translateY(-2px);
  outline: none;
}

footer.site .social:focus-visible {
  box-shadow: 0 0 0 3px rgba(107, 63, 228, 0.35);
}

/* ── sitemap page ───────────────────────────────────────── */

main.sitemap {
  display: block;
  text-align: left;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}

main.sitemap h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 32px;
  text-align: left;
}

.sitemap-group {
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.sitemap-group:last-child {
  border-bottom: none;
}

.sitemap-group .section {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.sitemap-group a.section:hover,
.sitemap-group a.section:focus-visible {
  color: var(--accent);
  outline: none;
}

.sitemap-group ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.sitemap-group li a {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.sitemap-group li a:hover,
.sitemap-group li a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}
