/* ============================================================
   CascadiaAI — Staging Chrome Override
   Loaded after prod-styles.css + assets/styles.css on the home page.
   Ensures staging chrome (nav + buttons + footer) ALWAYS wins over
   any production classes that share names (.btn-primary, .nav-toggle, etc).
   Higher specificity + later load order = guaranteed precedence.
   ============================================================ */

/* ---- Body-wide button overrides (covers both prod sections + my chrome) ---- */
body a.btn-primary,
body a.btn-secondary,
body a.btn-ghost,
body .btn-primary,
body .btn-secondary,
body .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1),
              background-color 180ms cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  white-space: nowrap;
  font-family: "Inter", "Helvetica Neue", system-ui, sans-serif;
}
body a.btn-primary,
body .btn-primary {
  background: linear-gradient(135deg, #2a6cff 0%, #6e5cff 100%);
  color: #f3f6ff;
  box-shadow: 0 8px 24px rgba(42, 108, 255, 0.32);
}
body a.btn-primary:hover,
body .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(42, 108, 255, 0.45);
  color: #f3f6ff;
}
body a.btn-secondary,
body .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
  color: #f3f6ff;
}
body a.btn-secondary:hover,
body .btn-secondary:hover {
  border-color: #5a8bff;
  background: rgba(255, 255, 255, 0.04);
  color: #f3f6ff;
}
body a.btn-ghost,
body .btn-ghost {
  background: transparent;
  color: rgba(243, 246, 255, 0.74);
  padding: 10px 14px;
}
body a.btn-ghost:hover,
body .btn-ghost:hover {
  color: #f3f6ff;
}

/* ---- Nav ---- */
body .nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(6, 10, 26, 0.92) 0%, rgba(6, 10, 26, 0.7) 100%);
  border-bottom: 1px solid rgba(120, 157, 255, 0.14);
  /* backdrop-filter deliberately omitted — known to cause blank-page render
     failures on iOS Safari 14-17 when combined with overflow-x: hidden on a
     sticky-positioned ancestor. The opaque background above is sufficient. */
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: opacity 280ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
body .nav[data-nav-state="fading"] {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}
body .nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
body .nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #f3f6ff;
  text-decoration: none;
}
body .nav .brand img {
  width: 34px;
  height: 32px;
}
body .nav .brand-mark {
  font-family: "Space Grotesk", "Inter Tight", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #f3f6ff;
}
body .nav .nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.95rem;
}
body .nav .nav-links a {
  color: rgba(243, 246, 255, 0.74);
  text-decoration: none;
  padding: 6px 2px;
  position: relative;
}
body .nav .nav-links a:hover { color: #f3f6ff; }
body .nav .nav-links a.is-active {
  color: #f3f6ff;
}
body .nav .nav-links a.is-active::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #2a6cff, #34e2df);
  border-radius: 2px;
}
body .nav .nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ---- Footer ---- */
body footer.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 64px 0 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 10, 26, 0.6) 100%);
  margin-top: 96px;
}
body footer.footer .footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
}
body footer.footer .footer-col h5 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 246, 255, 0.5);
  margin-bottom: 14px;
}
body footer.footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body footer.footer .footer-col a {
  color: rgba(243, 246, 255, 0.74);
  text-decoration: none;
  font-size: 0.92rem;
}
body footer.footer .footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  color: rgba(243, 246, 255, 0.5);
}

/* ---- Mobile ---- */
@media (max-width: 880px) {
  body .nav .nav-links { display: none; }
  body .nav .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #09152b;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 16px;
  }
  body .nav .nav-toggle {
    display: inline-flex !important;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f3f6ff;
    border-radius: 8px;
    padding: 6px 10px;
    min-height: 0;
    min-width: 0;
    font-size: inherit;
    font-weight: inherit;
  }
  body .nav .nav-cta .btn-secondary { display: none; }
}
@media (max-width: 600px) {
  body footer.footer .footer-meta { flex-direction: column; gap: 12px; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  body .nav[data-nav-state="fading"] { opacity: 1 !important; transform: none !important; pointer-events: auto !important; }
}
