/* =========================================================================
   NAV.CSS
   Styles for partials/nav.ejs (ticker strip + main navbar) and
   partials/footer.ejs. Kept together since both are "chrome" that wraps
   every page, not just the homepage.
   ========================================================================= */


/* ---- fixed brand mark colors — never theme-dependent ---- */
:root {
  --brand-mark-blue-a: #93DF13;  /* blue-600 */
  --brand-mark-blue-b: #A9EE34;  /* blue-400 */
  --brand-mark-gold:   #C6A052;  /* gold-500 */
}

/* ---------------------------- ticker strip ---------------------------- */
.ticker-strip {
  background: var(--midnight);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  height: 34px;
  display: flex;
  align-items: center;
}

.ticker-strip::before,
.ticker-strip::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}
.ticker-strip::before { left: 0; background: linear-gradient(90deg, var(--midnight), transparent); }
.ticker-strip::after  { right: 0; background: linear-gradient(270deg, var(--midnight), transparent); }

.ticker-track {
  display: flex;
  align-items: center;
  gap: var(--sp-7);
  white-space: nowrap;
  animation: ticker-scroll 95s linear infinite;
  will-change: transform;
  padding-left: 100%;
}
.ticker-strip:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted-300);
}
.ticker-item .sym { color: var(--white); font-weight: 600; }
.ticker-item .chg { font-weight: 600; }
.ticker-item .chg.up::before { content: "▲ "; font-size: 9px; }
.ticker-item .chg.down::before { content: "▼ "; font-size: 9px; }

/* ------------------------------- navbar -------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12,32,23,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-base), box-shadow var(--transition-base), padding var(--transition-base);
}
.site-nav.is-scrolled {
  background: rgba(12,32,23,0.94);
  box-shadow: 0 8px 28px rgba(2,8,20,0.4);
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--sp-5);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: nowrap;
}

/* .nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--white);
  flex-shrink: 1;
  min-width: 0;
}
.nav-brand .brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

 */

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  color: var(--white);
  flex-shrink: 1;
  min-width: 0;
  text-decoration: none;
}

.nav-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);      /* neutral chip, a shade above midnight */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-blue-glow);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.nav-brand .brand-mark svg {
  width: 20px;
  height: 20px;
}
.nav-brand .brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 45%, transparent 60%);
  transform: translateX(-120%);
  animation: brand-shine 5s ease-in-out infinite;
}
@keyframes brand-shine {
  0%, 60% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.nav-brand .brand-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
}
.nav-brand .brand-text {
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--white);              /* inherits: white on landing */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-brand .brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted-300);          /* softer, but still theme-appropriate */
  text-transform: uppercase;
}



.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 5px;
}
.nav-links a {
  position: relative;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted-100);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.nav-links a.active {
  color: var(--on-lime);
  background: var(--gradient-blue);
  box-shadow: var(--shadow-blue-glow);
}

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.nav-actions .btn-ghost { color: var(--muted-100); }

/* animated 3-bar / X toggle — kept as a real button, not an icon font glyph,
   so it stays crisp and can morph into an X without a second font glyph */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.03);
  color: var(--white);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.nav-toggle .bar-stack { width: 18px; height: 13px; position: relative; }
.nav-toggle .bar-stack span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform var(--transition-fast), opacity var(--transition-fast), top var(--transition-fast);
}
.nav-toggle .bar-stack span:nth-child(1) { top: 0; }
.nav-toggle .bar-stack span:nth-child(2) { top: 5.5px; }
.nav-toggle .bar-stack span:nth-child(3) { top: 11px; }
.nav-toggle[aria-expanded="true"] .bar-stack span:nth-child(1) { top: 5.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar-stack span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar-stack span:nth-child(3) { top: 5.5px; transform: rotate(-45deg); }

/* ------------------------- mobile drawer (redesigned) ------------------------- */
/* Slide-in panel from the right, pinned to the full viewport — no longer
   depends on the header's height, so no scroll/resize JS is needed to
   position it. This is intentionally a different visual language from the
   desktop pill-nav: full-bleed, icon-led rows, its own header + backdrop. */

.nav-mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 18, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 98;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.nav-mobile-backdrop.is-open {
  display: block;
  opacity: 1;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 400px);
  background: var(--surface-0, #0b1a30);
  z-index: 101;
  border-left: 1px solid var(--border-subtle);
  box-shadow: -20px 0 60px rgba(2, 8, 20, 0.5);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-mobile.is-open {
  display: flex;
  transform: translateX(0);
}

.nav-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.nav-mobile-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-mobile-body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  flex: 1;
}

.nav-mobile-list { display: flex; flex-direction: column; gap: 4px; }
.nav-mobile-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--muted-100);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.nav-mobile-list a .icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-300);
  font-size: 14px;
  flex-shrink: 0;
}
.nav-mobile-list a .arrow {
  margin-left: auto;
  font-size: 12px;
  opacity: 0;
  transform: translateX(-6px);
  transition: all var(--transition-fast);
  color: var(--blue-300);
}
.nav-mobile-list a:hover,
.nav-mobile-list a:active {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}
.nav-mobile-list a.active {
  background: var(--gradient-blue);
  color: var(--on-lime);
  box-shadow: var(--shadow-blue-glow);
}
.nav-mobile-list a.active .icon-circle { background: rgba(12,33,23,0.18); color: var(--on-lime); }
.nav-mobile-list a:hover .arrow,
.nav-mobile-list a.active .arrow { opacity: 1; transform: translateX(0); }
.nav-mobile-list a.active .arrow { color: var(--on-lime); }

.nav-mobile-prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mprice-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
}
.mprice-sym { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted-300); }
.mprice-val { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--white); font-weight: 600; }
.mprice-chg { font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.mprice-chg.up { color: #22c55e; }
.mprice-chg.down { color: #ef4444; }

.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: auto;
}

.nav-mobile-foot {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted-500);
  font-size: var(--fs-xs);
}
.nav-mobile-foot a {
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  color: var(--muted-300);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn-primary { padding: 9px 14px; font-size: var(--fs-xs); }
}

@media (max-width: 480px) {
  .nav-inner { height: 64px; padding: 0 var(--sp-4); gap: var(--sp-2); }
  .nav-brand { font-size: var(--fs-sm); gap: 8px; }
  /* .nav-brand .brand-mark { width: 32px; height: 32px; font-size: 13px; } */
  .nav-brand .brand-text { max-width: 34vw; }

  .nav-brand .brand-mark { width: 32px; height: 32px; }
  .nav-brand .brand-mark svg { width: 17px; height: 17px; }

  .nav-actions { gap: 8px; }
  .nav-actions .btn-primary span.btn-label-full { display: none; }
  .ticker-strip { height: 28px; }
  .ticker-track { gap: var(--sp-5); }
  .nav-mobile { width: 100vw; border-left: none; }
}

/* ================================ FOOTER ================================ */
.site-footer {
  background: var(--midnight);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--sp-9);
  position: relative;
}

.footer-cta {
  max-width: var(--max-width);
  margin: 0 auto var(--sp-9);
  padding: var(--sp-7) var(--sp-6);
  background: var(--gradient-hero);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.footer-cta h3 { font-size: var(--fs-2xl); max-width: 480px; }
.footer-cta form { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-cta input[type="email"] {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 13px 20px;
  color: var(--white);
  min-width: 260px;
  font-size: var(--fs-sm);
}
.footer-cta input[type="email"]::placeholder { color: var(--muted-500); }

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  display: flex;
  gap: var(--sp-7);
  flex-wrap: wrap;
  justify-content: space-between;
  padding-bottom: var(--sp-8);
}

.footer-brand { max-width: 300px; }
.footer-brand .nav-brand { margin-bottom: var(--sp-4); }
.footer-brand p { color: var(--muted-300); font-size: var(--fs-sm); }

.footer-socials { display: flex; gap: 10px; margin-top: var(--sp-5); }
.footer-socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-100);
  transition: all var(--transition-fast);
}
.footer-socials a:hover { color: var(--navy-950); background: var(--blue-400); border-color: var(--blue-400); transform: translateY(-3px); }

.footer-col h4 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-500);
  margin-bottom: var(--sp-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--muted-100); font-size: var(--fs-sm); transition: color var(--transition-fast); }
.footer-col a:hover { color: var(--blue-300); }
.footer-col .contact-line { display: flex; align-items: center; gap: 8px; color: var(--muted-100); font-size: var(--fs-sm); }

.footer-disclaimer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--sp-5);
  font-size: var(--fs-xs);
  color: var(--muted-500);
  max-width: var(--max-width);
  margin: 0 auto;
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: var(--sp-5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: var(--fs-xs);
  color: var(--muted-500);
}
.footer-bottom .legal-links { display: flex; gap: var(--sp-5); }

@media (max-width: 700px) {
  .footer-cta { flex-direction: column; align-items: flex-start; }
  .footer-cta form { width: 100%; }
  .footer-cta input[type="email"] { flex: 1; min-width: 0; }
}