/* === Navigation === */
.nav {
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(14, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-elevated);
}

/* === Sub Navigation (analytics pages) === */
.sub-nav {
  position: sticky;
  top: var(--nav-height);
  z-index: 290;
  background: rgba(14, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.sub-nav-inner {
  display: flex;
  gap: 0.25rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.sub-nav-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.sub-nav-link:hover,
.sub-nav-link.active {
  color: var(--text);
  background: var(--bg-elevated);
}

/* Offset time-filter-bar when sub-nav is present */
.has-sub-nav .time-filter-bar {
  top: calc(var(--nav-height) + 37px);
}

/* === Hero === */
.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hero-stat {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* === Time Filter Bar (sticky) === */
.time-filter-bar {
  position: sticky;
  top: var(--nav-height);
  z-index: 250;
  background: rgba(14, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.time-filter-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.time-filter-bar .filter-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.25rem;
}

.time-btn {
  padding: 0.3125rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.time-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.time-btn.active {
  background: var(--bg-elevated);
  border-color: #388bfd;
  color: #58a6ff;
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 0.5rem;
}

.map-btn {
  padding: 0.3125rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.map-btn.active {
  background: var(--bg-elevated);
  border-color: #388bfd;
  color: #58a6ff;
}

/* === Sections === */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-subtle);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.section-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 520px;
  line-height: 1.5;
}

/* === Compact Hero (sub-pages) === */
.hero-compact {
  padding: 2.5rem 0 2rem;
}

.hero-compact .hero-title {
  font-size: 2rem;
  margin-bottom: 0.375rem;
}

.hero-compact .hero-subtitle {
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

/* === Footer === */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.footer-muted {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
