/* ==========================================================================
   Pyek AI — Navigation & Footer
   ========================================================================== */

/* ---------- Top bar ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-ink);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}
.site-nav.scrolled {
  background: rgba(11, 41, 69, 0.98);
  box-shadow: var(--shadow-sm);
}
.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

/* ---------- Logo ---------- */
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  color: #fff;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: #fff; }
.nav-brand img, .nav-brand svg { height: 40px; width: auto; }

/* ---------- Desktop nav ---------- */
.nav-links {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
}
.nav-links li { margin: 0; }
.nav-links a {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-size: var(--fs-sm);
  padding: 8px 0;
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: #fff; font-weight: 600; }

.nav-cta {
  display: none;
  align-items: center;
  gap: var(--space-3);
}
@media (min-width: 1024px) { .nav-cta { display: flex; } }

/* ---------- Mobile toggle ---------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  color: #fff;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }
@media (min-width: 768px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Mobile panel ---------- */
/* The panel is a position:fixed sibling of the nav content, but the parent
   .site-nav uses backdrop-filter which makes it a containing block for fixed
   descendants. Anchoring with top/bottom would resolve against the 72px nav,
   collapsing the panel. Use an explicit height instead.
   100dvh accounts for mobile browser chrome (URL bar) appearing/disappearing. */
.nav-panel {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  height: calc(100dvh - var(--nav-height));
  background: var(--color-ink);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-6);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 220ms ease;
  z-index: 99;
}
@supports not (height: 100dvh) {
  .nav-panel { height: calc(100vh - var(--nav-height)); }
}
.nav-panel[aria-hidden="false"] { transform: translateX(0); }
.nav-panel ul { list-style: none; padding: 0; margin: 0 0 var(--space-6); }
.nav-panel li { margin: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.nav-panel li:last-child { border-bottom: 0; }
.nav-panel a {
  display: block;
  padding: var(--space-4) 0;
  color: #fff;
  font-weight: 600;
  font-size: var(--fs-md);
}
.nav-panel a:hover { color: var(--color-accent); }
.nav-panel .btn { width: 100%; margin-top: var(--space-3); }
@media (min-width: 768px) {
  .nav-panel { display: none; }
}

body.nav-open { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: #CBD5E1;
  padding: var(--space-16) 0 var(--space-8);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-about h4 { color: #fff; margin-bottom: var(--space-3); font-size: var(--fs-md); }
.footer-about p { color: #94A3B8; margin-bottom: var(--space-4); max-width: 360px; }

.footer-col h5 {
  color: #fff;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0; }
.footer-col a {
  color: #CBD5E1;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  min-height: 44px;
  line-height: 1.3;
}
.footer-col a:hover { color: var(--color-accent); }
@media (min-width: 768px) {
  .footer-col a { display: inline-flex; min-height: 0; }
  .footer-col li { margin-bottom: var(--space-2); }
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94A3B8;
  font-size: var(--fs-xs);
  text-align: center;
  align-items: center;
}
.footer-bottom p { margin: 0; color: #94A3B8; }
.footer-bottom a { color: #94A3B8; }
.footer-bottom a:hover { color: var(--color-accent); }
/* NOTE: The .footer-disclaimer class is defined here but intentionally not used in the
   website HTML. The "Prepared by Pyek Financial, LLC using assistance of AI-enabled
   productivity tools" footnote is required on documents produced for clients, but does
   not apply to the public-facing website. */
.footer-disclaimer {
  font-style: italic;
  opacity: 0.8;
}

/* ---------- Announcement bar (optional) ---------- */
.announce {
  background: var(--color-accent-dark);
  color: #fff;
  text-align: center;
  font-size: var(--fs-sm);
  padding: var(--space-2) var(--space-4);
}
.announce a { color: #fff; text-decoration: underline; }
