/* ── Shared public nav + footer ───────────────────────────────────────────── */

/* ── Nav ─────────────────────────────────────────────────────────────────── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  transition: box-shadow 200ms ease;
}
nav.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  border-bottom-color: transparent;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

.nav-brand-icon {
  width: 30px; height: 30px;
  background: var(--brand);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.nav-brand-icon svg { width: 16px; height: 16px; color: #fff; }

.nav-beta {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--brand);
  background: rgba(74,142,91,.12);
  border: 1px solid rgba(74,142,91,.3);
  border-radius: 4px;
  padding: 2px 5px;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-plain-link {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 150ms ease, background 150ms ease;
  text-decoration: none;
}
.nav-plain-link:hover { color: var(--text); background: rgba(0,0,0,.04); }
.nav-plain-link.active {
  color: var(--brand);
  font-weight: 600;
  background: rgba(74,142,91,.1);
}
.nav-plain-link.active:hover { background: rgba(74,142,91,.14); }

/* ── Dropdown ── */
.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  font-family: inherit;
  transition: color 150ms ease, background 150ms ease;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger[aria-expanded="true"] { color: var(--text); background: rgba(0,0,0,.04); }
.nav-dropdown-trigger.active {
  color: var(--brand);
  font-weight: 600;
  background: rgba(74,142,91,.1);
}
.nav-dropdown-trigger.active:hover,
.nav-dropdown-trigger.active[aria-expanded="true"] { background: rgba(74,142,91,.14); }

.nav-caret {
  width: 12px; height: 12px;
  flex-shrink: 0;
  transition: transform 200ms ease;
}
.nav-dropdown-trigger[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: -12px;
  width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  padding: 8px;
  z-index: 200;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.nav-dropdown-panel.is-open { display: grid; }

.nav-dropdown-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background 130ms ease;
}
.nav-dropdown-item:hover { background: #f5fbf6; }

.nav-dropdown-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.nav-dropdown-icon svg { width: 17px; height: 17px; }

.nav-dropdown-icon--green  { background: rgba(74,142,91,.12);  color: #2d6b45; }
.nav-dropdown-icon--purple { background: rgba(124,58,237,.10); color: #6d28d9; }
.nav-dropdown-icon--amber  { background: rgba(217,119,6,.10);  color: #b45309; }
.nav-dropdown-icon--teal   { background: rgba(13,148,136,.10); color: #0f766e; }
.nav-dropdown-icon--blue   { background: rgba(37,99,235,.10);  color: #1d4ed8; }
.nav-dropdown-icon--slate  { background: rgba(71,85,105,.08);  color: #475569; }

.nav-dropdown-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 1px; }
.nav-dropdown-desc  { display: block; font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }

/* ── Mobile toggle ── */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
}
.nav-mobile-toggle svg { width: 18px; height: 18px; }

/* ── Mobile overlay ── */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.45);
}
.nav-mobile-overlay.is-open { display: block; }

.nav-mobile-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 90vw);
  height: 100%;
  background: #fff;
  overflow-y: auto;
  padding: 0 0 32px;
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
}

.nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.nav-mobile-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
}
.nav-mobile-close svg { width: 20px; height: 20px; }

.nav-mobile-body { padding: 8px 0; }

.nav-mobile-link {
  display: block;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 120ms ease;
}
.nav-mobile-link:hover { background: var(--surface-raised, #f6f8f5); }

.nav-mobile-sub-link {
  padding-left: 32px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

/* Accordion (Features sub-menu) */
.nav-mobile-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 120ms ease;
}
.nav-mobile-accordion-trigger:hover { background: var(--surface-raised, #f6f8f5); }

.nav-mobile-accordion-caret {
  width: 14px; height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 200ms ease;
}
.nav-mobile-accordion-trigger[aria-expanded="true"] .nav-mobile-accordion-caret { transform: rotate(180deg); }

.nav-mobile-accordion-items {
  display: none;
}
.nav-mobile-accordion-items.is-open { display: block; }

.nav-mobile-actions {
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn-ghost { border-color: var(--border); color: var(--text); }
.nav-actions .btn-ghost:hover { border-color: var(--border); background: var(--bg); }

@media (max-width: 600px) {
  nav .nav-links        { display: none; }
  nav .nav-mobile-toggle { display: inline-flex; }
  nav .nav-actions      { display: none; }
}

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

.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.55);
  padding: 48px 5% 32px;
}

.site-footer-inner { max-width: 1100px; margin: 0 auto; }

.site-footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 28px;
}

.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
}

.site-footer-brand-icon {
  width: 26px; height: 26px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}

.site-footer-brand-icon svg { width: 14px; height: 14px; color: #fff; }
.site-footer-tagline        { font-size: 13px; line-height: 1.6; max-width: 220px; }

.footer-col h4               { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 14px; }
.footer-col ul               { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a          { font-size: 13.5px; color: rgba(255,255,255,.55); transition: color var(--transition); text-decoration: none; }
.footer-col ul li a:hover    { color: #fff; }

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

@media (max-width: 900px) {
  .site-footer-top { grid-template-columns: 1fr 1fr; }
}
