/* ==============================================
   APEX PLANNING — SITE ENHANCEMENTS
   Mobile nav, footer, CTAs, trust, polish
   ============================================== */

/* --- MOBILE HAMBURGER NAV --- */
.apex-hamburger {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 6px;
  z-index: 1100;
  position: relative;
}
.apex-hamburger svg {
  display: block;
  width: 26px;
  height: 26px;
  color: var(--gray-900, #0f172a);
  transition: color 180ms ease;
}
.apex-hamburger[aria-expanded="true"] svg { color: var(--gray-600, #475569); }

@media (max-width: 820px) {
  .apex-hamburger { display: flex; align-items: center; }
  .site-v2 .apex-nav {
    flex-wrap: wrap;
  }
  .site-v2 .apex-nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 16px 0 8px;
    gap: 4px;
    order: 10;
    border-top: 1px solid rgba(226,232,240,0.96);
    margin-top: 12px;
  }
  .site-v2 .apex-nav-links.is-open { display: flex; }
  .site-v2 .apex-nav-links a {
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(226,232,240,0.5);
  }
  .site-v2 .apex-nav-links a:last-child { border-bottom: 0; }
  .site-v2 .apex-nav-links .apex-nav-cta {
    margin-top: 8px;
    text-align: center;
  }
  .site-v2 .apex-nav { align-items: center; }
  .site-v2 .apex-brand-block { flex: 1; }
}

/* --- NAV CTA BUTTON --- */
.site-v2 .apex-nav-links .apex-nav-cta {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  margin-left: 6px;
  transition: transform 180ms ease, box-shadow 180ms ease;
  white-space: nowrap;
}
.site-v2 .apex-nav-links .apex-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15,23,42,0.22);
  color: #fff !important;
}
@media (max-width: 820px) {
  .site-v2 .apex-nav-links .apex-nav-cta {
    margin-left: 0;
    display: block;
    text-align: center;
    padding: 14px 20px;
  }
}

/* --- SITE FOOTER --- */
.apex-site-footer {
  border-top: 1px solid rgba(226,232,240,0.96);
  background: #fafbfc;
  padding: 52px 0 36px;
  margin-top: 0;
}
.apex-site-footer .apex-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
.apex-footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.apex-footer-col h4 {
  font: 700 11px/1.2 Inter, system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 18px;
}
.apex-footer-col a {
  display: block;
  text-decoration: none;
  color: #334155;
  font: 400 14px/1.5 Inter, system-ui, sans-serif;
  padding: 5px 0;
  transition: color 160ms ease;
}
.apex-footer-col a:hover { color: #0f172a; }
.apex-footer-brand {
  font: 700 1.15rem/1.2 Inter, system-ui, sans-serif;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.apex-footer-brand span { font-weight: 300; color: #64748b; }
.apex-footer-desc {
  color: #64748b;
  font: 400 13.5px/1.65 Inter, system-ui, sans-serif;
  max-width: 300px;
  margin-bottom: 18px;
}
.apex-footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  text-decoration: none;
  font: 600 13px/1.2 Inter, system-ui, sans-serif;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.apex-footer-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15,23,42,0.22);
}
.apex-footer-cta-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: #38bdf8;
}
.apex-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(226,232,240,0.96);
  margin-top: 40px;
  padding-top: 24px;
  color: #94a3b8;
  font: 400 12.5px/1.5 Inter, system-ui, sans-serif;
}
.apex-footer-bar a {
  color: #64748b;
  text-decoration: none;
}
.apex-footer-bar a:hover { color: #0f172a; }
.apex-footer-legal-links {
  display: flex;
  gap: 20px;
}
@media (max-width: 820px) {
  .apex-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
}
@media (max-width: 520px) {
  .apex-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .apex-footer-bar { flex-direction: column; gap: 10px; text-align: center; }
}

/* --- HOMEPAGE CTA BAND --- */
.apex-home-cta-band {
  padding: 72px 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  text-align: center;
}
.apex-home-cta-band h2 {
  font: 800 clamp(1.6rem, 3.2vw, 2.4rem)/1.2 Inter, system-ui, sans-serif;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 14px;
}
.apex-home-cta-band p {
  color: rgba(255,255,255,0.72);
  font: 400 16px/1.7 Inter, system-ui, sans-serif;
  max-width: 580px;
  margin: 0 auto 32px;
}
.apex-home-cta-band .apex-cta-btn-light {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font: 700 15px/1.2 Inter, system-ui, sans-serif;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.apex-home-cta-band .apex-cta-btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(0,0,0,0.28);
}
.apex-cta-btn-dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: #38bdf8;
}

/* --- HOMEPAGE TRUST BAR --- */
.apex-trust-bar {
  padding: 48px 0;
  background: #fff;
  border-bottom: 1px solid rgba(226,232,240,0.6);
}
.apex-trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.apex-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #475569;
  font: 500 14px/1.4 Inter, system-ui, sans-serif;
}
.apex-trust-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.apex-trust-icon svg {
  width: 20px; height: 20px;
  color: #334155;
}
@media (max-width: 640px) {
  .apex-trust-items { gap: 24px; flex-direction: column; align-items: flex-start; padding: 0 8px; }
}

/* --- SECTION CTA CARD (for articles) --- */
.apex-section-cta-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 24px;
  padding: 40px 36px;
  text-align: center;
  margin-top: 48px;
}
.apex-section-cta-card h3 {
  color: #fff;
  font: 700 1.4rem/1.3 Inter, system-ui, sans-serif;
  margin-bottom: 10px;
}
.apex-section-cta-card p {
  color: rgba(255,255,255,0.72);
  font: 400 15px/1.6 Inter, system-ui, sans-serif;
  max-width: 520px;
  margin: 0 auto 24px;
}
.apex-section-cta-card .apex-cta-btn-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font: 600 14px/1.2 Inter, system-ui, sans-serif;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.apex-section-cta-card .apex-cta-btn-light:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

/* --- HOMEPAGE HERO CTA ROW --- */
.apex-hero-cta-row {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.apex-hero-cta-row .apex-hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font: 700 15px/1.2 Inter, system-ui, sans-serif;
  box-shadow: 0 14px 32px rgba(0,0,0,0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.apex-hero-cta-row .apex-hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.24);
}
.apex-hero-cta-row .apex-hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 16px 24px;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.35);
  color: #fff;
  text-decoration: none;
  font: 500 14px/1.2 Inter, system-ui, sans-serif;
  transition: border-color 180ms ease, background 180ms ease;
}
.apex-hero-cta-row .apex-hero-btn-secondary:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
}
@media (max-width: 520px) {
  .apex-hero-cta-row {
    flex-direction: column;
  }
  .apex-hero-cta-row a { text-align: center; justify-content: center; }
}

/* --- ENHANCED ARTICLE CTA --- */
.site-v2 .apex-article-cta {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 24px;
  padding: 36px 32px;
  margin-top: 40px;
  margin-bottom: 8px;
}
.site-v2 .apex-article-cta h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.site-v2 .apex-article-cta p {
  color: rgba(255,255,255,0.72) !important;
  margin-bottom: 20px;
}
.site-v2 .apex-article-cta .apex-inline-link-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.site-v2 .apex-article-cta .apex-inline-link-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  font: 600 13px/1.2 Inter, system-ui, sans-serif;
  text-decoration: none;
  transition: transform 180ms ease;
}
.site-v2 .apex-article-cta .apex-inline-link-row a:first-child {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.site-v2 .apex-article-cta .apex-inline-link-row a:last-child,
.site-v2 .apex-article-cta .apex-inline-link-row a.apex-cta-link {
  background: #fff;
  color: #0f172a;
}
.site-v2 .apex-article-cta .apex-inline-link-row a:hover {
  transform: translateY(-1px);
}

/* --- FADE-IN ANIMATIONS --- */
@keyframes apexFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.apex-animate-in {
  opacity: 0;
  transform: translateY(18px);
}
.apex-animate-in.is-visible {
  animation: apexFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Staggered delays for grid children */
.apex-animate-in.delay-1 { animation-delay: 0.08s; }
.apex-animate-in.delay-2 { animation-delay: 0.16s; }
.apex-animate-in.delay-3 { animation-delay: 0.24s; }
.apex-animate-in.delay-4 { animation-delay: 0.32s; }

/* --- FOOTER SPACE FOR FIXED CTA --- */
body.site-v2 { padding-bottom: 0; }
.apex-site-footer { margin-bottom: 64px; }
@media (max-width: 640px) {
  .apex-site-footer { margin-bottom: 72px; }
}

/* --- RESOURCES CTA BAND --- */
.apex-resources-cta {
  padding: 56px 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  text-align: center;
}
.apex-resources-cta h2 {
  color: #fff;
  font: 700 clamp(1.4rem, 2.8vw, 2rem)/1.25 Inter, system-ui, sans-serif;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.apex-resources-cta p {
  color: rgba(255,255,255,0.7);
  font: 400 15px/1.6 Inter, system-ui, sans-serif;
  max-width: 480px;
  margin: 0 auto 28px;
}

/* --- SKIP TO CONTENT (a11y) --- */
.apex-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: #0f172a;
  color: #fff;
  font: 600 14px/1.2 Inter, system-ui, sans-serif;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 200ms ease;
}
.apex-skip-link:focus {
  top: 0;
}
