/* ═══════════════════════════════════════════════════════════════
   AllotmentTips — MEGA NAV + EXPANDABLE FOOTER
   Structure modelled on ukhomeenergy.co.uk, rendered in the
   AllotmentTips dark-green / terracotta system.
   Generated markup lives in build_nav.py — edit there, not here.

   NOTE: pages carry an inline <style> copy of the design system, so
   this file is linked AFTER it and uses explicit hex values rather
   than custom properties (token names vary page to page).
   ═══════════════════════════════════════════════════════════════ */

:root {
  --nv-dark: #17281c;
  --nv-green: #2f6b3f;
  --nv-sage: #cfe3d4;
  --nv-terracotta: #a8451a;
  --nv-cream: #f6f7f6;
  --nv-cream-2: #eef1ee;
  --nv-border: #d6dbd7;
  --nv-ink-mid: #3a4a3f;
  --nv-muted: #55625a;
  --nv-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --nv-body: 'Public Sans', 'Helvetica Neue', Arial, sans-serif;
  --nv-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── HEADER SHELL (normalised across both legacy nav variants) ── */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--nv-dark);
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
header.site-header .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 64px;
}
header.site-header .nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #fff;
  font-family: var(--nv-display);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}
header.site-header .nav-logo:hover { text-decoration: none; }
header.site-header .nav-logo svg { width: 28px; height: 28px; }

header.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: static;
  background: none;
  flex-direction: row;
}
header.site-header .nav-links > li {
  position: static;
  border: 0;
  margin: 0;
}
header.site-header .nav-links > li > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-family: var(--nv-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nv-sage);
  text-decoration: none;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}
header.site-header .nav-links > li > a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); text-decoration: none; }

.mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 8px 12px;
  font-family: var(--nv-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nv-sage);
  background: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.mega-trigger::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.65;
  transition: transform 0.22s var(--nv-ease);
}
.mega-trigger:hover,
.mega-trigger[aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, 0.08); }
.mega-trigger[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); opacity: 0.9; }

header.site-header .nav-links .current > .mega-trigger,
header.site-header .nav-links .current > a {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--nv-terracotta);
}

/* ── MEGA PANEL ── */
.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  background: #fff;
  border-top: 3px solid var(--nv-green);
  border-bottom: 1px solid var(--nv-border);
  box-shadow: 0 20px 44px -26px rgba(23, 40, 28, 0.45);
  z-index: 310;
  text-align: left;
}
.mega[hidden] { display: none; }
.mega-container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.mega-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 32px 0 28px;
}
.mega-intro { display: flex; flex-direction: column; align-items: flex-start; }
.mega-intro-title {
  font-family: var(--nv-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--nv-dark);
  text-decoration: none;
}
.mega-intro-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.mega .mega-intro p {
  margin: 8px 0 0;
  font-family: var(--nv-body);
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--nv-muted);
  max-width: 30ch;
}
.mega-intro-cta {
  margin-top: auto;
  padding-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--nv-body);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--nv-terracotta);
  text-decoration: none;
}
.mega-intro-cta:hover { text-decoration: none; }
.mega-intro-cta svg { width: 13px; height: 13px; transition: transform 0.22s var(--nv-ease); }
.mega-intro-cta:hover svg { transform: translate(2px, -2px); }

.mega-kicker {
  font-family: var(--nv-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--nv-terracotta);
  margin: 0 0 13px;
}
.mega .mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.mega .mega-col li { margin: 0; }
.mega .mega-col a {
  font-family: var(--nv-body);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--nv-ink-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.mega .mega-col a:hover { color: var(--nv-green); text-decoration: underline; text-underline-offset: 3px; }

.mega-bar { background: var(--nv-cream-2); border-top: 1px solid var(--nv-border); }
.mega-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 13px 0; }
.mega-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--nv-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--nv-green);
  text-decoration: none;
}
.mega-bar svg { width: 13px; height: 13px; transition: transform 0.22s var(--nv-ease); }
.mega-bar a:hover { color: var(--nv-terracotta); text-decoration: none; }
.mega-bar a:hover svg { transform: translate(2px, -2px); }

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; }

/* ── MOBILE DRAWER ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--nv-cream);
  padding: 18px 22px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s var(--nv-ease), visibility 0.28s;
}
.mobile-menu.open { transform: translateX(0); visibility: visible; }
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--nv-border);
}
.mobile-menu-brand {
  font-family: var(--nv-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nv-dark);
}
.mobile-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--nv-dark);
  cursor: pointer;
  padding: 4px 8px;
}
.m-acc { border-bottom: 1px solid var(--nv-border); }
.m-acc > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  font-family: var(--nv-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nv-dark);
  cursor: pointer;
  list-style: none;
}
.m-acc > summary::-webkit-details-marker { display: none; }
.m-acc > summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.8px solid var(--nv-muted);
  border-bottom: 1.8px solid var(--nv-muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.22s var(--nv-ease);
}
.m-acc[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.m-acc-body { padding: 0 0 14px 2px; }
.m-acc-body .mega-kicker { margin: 12px 0 6px; }
.mobile-menu .m-acc-body ul,
.mobile-menu .m-flat {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mobile-menu .m-acc-body li,
.mobile-menu .m-flat li { margin: 0; }
.mobile-menu .m-acc-body a {
  display: block;
  padding: 7px 0;
  font-family: var(--nv-body);
  font-size: 0.94rem;
  line-height: 1.45;
  font-weight: 400;
  color: var(--nv-ink-mid);
  text-decoration: none;
}
.mobile-menu .m-flat a {
  display: block;
  padding: 15px 0;
  font-family: var(--nv-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nv-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--nv-border);
}
.mobile-cta {
  display: block;
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 6px;
  background: var(--nv-terracotta);
  color: #fff;
  font-family: var(--nv-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.mobile-cta:hover { text-decoration: none; }

/* ── FOOTER: 5 columns, accordion under 640px ── */
footer.site-footer { background: #101c14; color: #b9c9bd; padding: 3rem 1.5rem 1.5rem; margin-top: 0; }
footer.site-footer .footer-inner { max-width: 1100px; margin: 0 auto; }
footer.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 2.5rem;
}
.footer-brand-logo {
  font-family: var(--nv-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.footer-brand-desc { font-family: var(--nv-body); font-size: 0.88rem; line-height: 1.65; color: #9aa89e; margin: 0; }

footer.site-footer .footer-col { border: 0; }
footer.site-footer .footer-col > summary {
  display: block;
  list-style: none;
  cursor: default;
}
footer.site-footer .footer-col > summary::-webkit-details-marker { display: none; }
footer.site-footer .footer-col > summary h3 {
  font-family: var(--nv-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 14px;
}
footer.site-footer .footer-col ul { list-style: none; margin: 0; padding: 0; }
footer.site-footer .footer-col li { margin: 0 0 8px; }
footer.site-footer .footer-col a {
  font-family: var(--nv-body);
  font-size: 0.85rem;
  line-height: 1.45;
  color: #9aa89e;
  text-decoration: none;
}
footer.site-footer .footer-col a:hover { color: #fff; text-decoration: none; }

footer.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 0;
  text-align: left;
  font-family: var(--nv-body);
  font-size: 0.8rem;
  color: #8fa394;
}
footer.site-footer .footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 14px; }
footer.site-footer .footer-legal a { font-size: 0.8rem; color: #9aa89e; text-decoration: none; }
footer.site-footer .footer-legal a:hover { color: #fff; }
footer.site-footer .footer-disclaimer { font-size: 0.78rem; line-height: 1.6; color: #7d8f83; margin: 0; max-width: 90ch; }
footer.site-footer .footer-copy { margin: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 1080px) {
  .mega-inner { grid-template-columns: 1fr 1fr 1fr; gap: 30px; }
  .mega-intro { grid-column: 1 / -1; }
  .mega .mega-intro p { max-width: 55ch; }
  .mega-intro-cta { margin-top: 14px; padding-top: 0; }
  footer.site-footer .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
}
@media (max-width: 900px) {
  .mega { display: none !important; }
  header.site-header .nav-links { display: none !important; }
  .nav-hamburger { display: flex; }
  footer.site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 640px) {
  footer.site-footer .footer-grid { grid-template-columns: 1fr; gap: 0; margin-bottom: 28px; }
  footer.site-footer .footer-grid > .footer-brand { margin-bottom: 24px; }
  footer.site-footer .footer-col { border-top: 1px solid rgba(255, 255, 255, 0.09); }
  footer.site-footer .footer-col > summary {
    cursor: pointer;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  footer.site-footer .footer-col > summary h3 { margin-bottom: 0; color: rgba(255, 255, 255, 0.85); }
  footer.site-footer .footer-col > summary::after {
    margin-right: 3px;
    content: '';
    width: 8px;
    height: 8px;
    border-right: 1.8px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1.8px solid rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.22s var(--nv-ease);
  }
  footer.site-footer .footer-col[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
  footer.site-footer .footer-col ul { padding-bottom: 16px; }
}
@media (max-width: 380px) {
  header.site-header .nav-inner { padding: 0 1rem; }
  header.site-header .nav-logo { font-size: 1.15rem; }
  .mobile-menu { padding: 18px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .mega-trigger::after,
  .m-acc > summary::after,
  footer.site-footer .footer-col > summary::after,
  .mega-bar svg,
  .mega-intro-cta svg,
  .mobile-menu { transition: none; }
}
