/* Unified site navigation.
   The homepage keeps its own fixed, transparent-over-hero nav (css/home.css); its
   <body> carries class "has-hero", so the inner-page DESKTOP rules here are scoped to
   body:not(.has-hero) and never touch it. Inner pages get the same bar as a solid,
   in-flow header (matching the old .topnav's static behaviour, so it never clashes with
   climate.html's fixed .place-sticky). The mobile menu (bottom) is SHARED by every page.
   Desktop link/gap rules live inside @media(min-width:801px) so the shared mobile rules
   can override them without a specificity fight. Self-contained: fonts/colours use token
   fallbacks so it renders identically wherever it loads. */

/* ============ inner-page bar chrome (all widths) ============ */
body:not(.has-hero) .nav {
  position: relative; z-index: 80; height: 78px; color: #fff;
  background: linear-gradient(180deg, rgba(1,14,22,.96), rgba(1,20,28,.88));
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 30px rgba(1,14,22,.12);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
body:not(.has-hero) .nav .shell {
  width: min(1380px, calc(100% - 48px)); margin: auto; height: 100%;
  display: flex; align-items: center;
}
body:not(.has-hero) .wordmark {
  display: flex; align-items: center; gap: 10px; height: 62px;
  border-bottom: 0; transition: opacity .2s, transform .2s;
}
body:not(.has-hero) .wordmark:hover { opacity: .88; transform: translateY(-1px); }
body:not(.has-hero) .wordmark img { width: auto; height: 56px; flex: 0 0 auto; object-fit: contain; }
/* kill the old nav's mini warming-stripe pseudo-icon (style.css .wordmark::before) so only the pin shows */
.wordmark::before { content: none !important; display: none !important; }
body:not(.has-hero) .brand-name {
  color: #fff; font: 700 13px/1.03 var(--font-head, "Poppins", sans-serif);
  letter-spacing: -.02em; text-transform: uppercase;
}
body:not(.has-hero) .brand-name small {
  margin-top: 4px; color: var(--canopy, #CAD668);
  font: 500 7px/1 var(--font-mono, "IBM Plex Mono", monospace); letter-spacing: .11em;
}
body:not(.has-hero) .nav-cta {
  display: inline-flex; align-items: center; border: 1px solid transparent; border-radius: var(--r-md, 10px);
  background: var(--teal, #4A7A5E); color: #fff; white-space: nowrap;
  font-family: var(--font-head, "Poppins", sans-serif); font-weight: 600; letter-spacing: 0; text-transform: none;
  transition: background .2s, transform .2s, box-shadow .2s;
}
body:not(.has-hero) .nav-cta:hover {
  background: var(--canopy, #CAD668); color: var(--navy, #012231);
  transform: translateY(-2px); box-shadow: 0 9px 24px rgba(202,214,104,.16);
}
body:not(.has-hero) .wordmark:focus-visible,
body:not(.has-hero) .nav-cta:focus-visible { outline: 2px solid var(--canopy, #CAD668); outline-offset: 3px; }

/* ============ inner-page desktop layout (≥ 801px only) ============ */
@media (min-width: 801px) {
  body:not(.has-hero) .nav .shell { gap: 30px; }
  body:not(.has-hero) .brand-name { display: flex; flex-direction: column; }
  body:not(.has-hero) .navlinks {
    display: flex; align-items: center; gap: 5px; margin: auto; padding: 0 5px; height: 40px;
    border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.035);
  }
  body:not(.has-hero) .navlinks a {
    position: relative; display: flex; align-items: center; height: 30px; padding: 0 13px;
    border-radius: 999px; border-bottom: 0; color: #aebbb7;
    font: 500 8px var(--font-mono, "IBM Plex Mono", monospace); letter-spacing: .11em; text-transform: uppercase;
    transition: color .2s, background .2s, transform .2s;
  }
  body:not(.has-hero) .navlinks a:after {
    content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; border-radius: 50%;
    background: var(--canopy, #CAD668); opacity: 0; transform: translate(-50%, 5px) scale(.4);
    transition: opacity .2s, transform .25s;
  }
  body:not(.has-hero) .navlinks a:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateY(-1px); }
  body:not(.has-hero) .navlinks a:hover:after,
  body:not(.has-hero) .navlinks a.active:after { opacity: 1; transform: translate(-50%, 0) scale(1); }
  body:not(.has-hero) .navlinks a.active { color: var(--canopy, #CAD668); background: rgba(202,214,104,.09); }
  body:not(.has-hero) .navlinks a:focus-visible { outline: 2px solid var(--canopy, #CAD668); outline-offset: 3px; }
}
@media (min-width: 801px) and (max-width: 1000px) {
  body:not(.has-hero) .navlinks { gap: 1px; }
  body:not(.has-hero) .navlinks a { padding: 0 8px; font-size: 7px; }
  body:not(.has-hero) .nav .shell { gap: 16px; }
}

/* ============ toggle button (all widths; hidden until mobile) ============ */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 9px; background: none; border: 0; cursor: pointer; flex: 0 0 auto;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ mobile menu (≤ 800px, SHARED by every page) ============ */
@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav .shell { gap: 10px; }
  .wordmark { margin-right: auto; }              /* push CTA + toggle to the right */
  .brand-name { display: none; }                 /* icon-only lockup — room for CTA + toggle on narrow screens */
  body:not(.has-hero) .wordmark img { height: 46px; }
  .nav-cta { padding: 8px 14px; font-size: 12px; }
  /* links drop into a panel; ".nav .navlinks" (0,2,0) beats home.css's ".navlinks{display:none}" */
  .nav .navlinks {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 10px;
    height: auto; border: 0; border-radius: 0;
    background: rgba(1,14,22,.98); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,.08); box-shadow: 0 20px 40px rgba(1,14,22,.35);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open .navlinks { opacity: 1; visibility: visible; transform: none; }
  .nav .navlinks a {
    display: flex; align-items: center; height: auto; padding: 13px 14px; border-radius: 8px;
    border-bottom: 0; color: #dbe4df; font: 500 11px var(--font-mono, "IBM Plex Mono", monospace);
    letter-spacing: .08em; text-transform: uppercase;
  }
  .nav .navlinks a:after { display: none; }
  .nav .navlinks a.active { color: var(--canopy, #CAD668); background: rgba(202,214,104,.1); }
}

/* ============ shared CTA refinement (both homepage + inner) ============ */
@media (min-width: 801px) { .nav-cta { padding: 9px 16px; font-size: 13px; } }

/* ============ unified footer (shared by every page) ============ */
.footer { background: linear-gradient(150deg, #1A3D35, #010E16 120%); color: #fff; padding: 64px 0 30px; }
.footer .shell { width: min(1380px, calc(100% - 48px)); margin: auto; }
.footer-grid { display: grid; grid-template-columns: 210px 1fr; gap: 64px; align-items: center; }
.footer-brand { display: flex; }
.footer img { width: 168px; height: auto; background: none; padding: 0; filter: none; mix-blend-mode: normal; }
.footer .kicker { color: var(--canopy, #CAD668); font: 500 11px var(--font-mono, "IBM Plex Mono", monospace); letter-spacing: .16em; text-transform: uppercase; }
.footer h2 { margin: 12px 0 16px; color: #fff; font: 700 clamp(26px, 3vw, 40px)/1.05 var(--font-head, "Poppins", sans-serif); letter-spacing: -.02em; }
.footer p { max-width: 680px; margin: 0; color: #9fb0aa; line-height: 1.7; font-size: 14px; }
.footer a { color: var(--canopy, #CAD668); border-bottom: 0; font-weight: 600; }
.footer a:hover { text-decoration: underline; }
.footer-bottom { grid-column: 1 / -1; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: #7f918b; font: 500 11px var(--font-mono, "IBM Plex Mono", monospace); letter-spacing: .04em; }
.footer-bottom a { color: #aebbb7; font-weight: 500; }
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; align-items: start; }
  .footer-bottom { flex-direction: column; gap: 10px; margin-top: 30px; }
}
