/* ---------- Mega menu (shared: home + inner pages) ---------- */
.site-nav { position: relative; }
.site-nav__item { position: relative; display: flex; }
/* Nav links: a glass pill grows in behind the label on hover (replaces the underline). */
.site-nav > a, .site-nav__item > a {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -8px -12px;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color .25s;
}
.site-nav > a::after, .site-nav__item > a::after { content: none; }
.site-nav > a::before, .site-nav__item > a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgb(255 255 255 / .12);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .12);
  opacity: 0;
  transform: scale(.8);
  transition: opacity .3s ease, transform .45s var(--ease-out);
}
.site-nav > a:hover::before, .site-nav > a:focus-visible::before, .site-nav > a[aria-current="page"]::before,
.site-nav__item > a:hover::before, .site-nav__item > a:focus-visible::before, .site-nav__item.is-open > a::before, .site-nav__item > a[aria-current="page"]::before { opacity: 1; transform: scale(1); }
.site-nav > a[aria-current="page"]::before, .site-nav__item > a[aria-current="page"]::before { background: rgb(255 255 255 / .18); }
.site-nav__caret { width: 10px; height: 6px; transition: transform .35s var(--ease-out); }
.site-nav__item.is-open > a .site-nav__caret { transform: rotate(180deg); }
/* Panel: the mobile menu's glass, dropped from the nav pill. A padded hover
   bridge keeps it open while the pointer crosses the gap. Both panels share
   one padding rhythm: 10px frame, 10x12 rows, 44px icon tile. */
.mega {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 30;
  display: grid;
  width: 400px;
  padding: 10px;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 22px;
  background: rgb(12 27 41 / .9);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 60px rgb(7 21 36 / .45);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px) scale(.98);
  transform-origin: top center;
  transition: opacity .25s ease, transform .35s var(--ease-out), visibility 0s linear .25s;
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 20px; }
/* Page scrim: while a panel is open the page behind the header blurs and dims. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgb(7 21 36 / .25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
body:has(.site-nav__item.is-open)::after { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
.site-nav__item.is-open > .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); transition: opacity .3s ease, transform .5s var(--ease-out), visibility 0s; }
.mega__links { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.mega__links li { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .5s var(--ease-out); }
.site-nav__item.is-open .mega__links li { opacity: 1; transform: none; }
.site-nav__item.is-open .mega__links li:nth-child(2) { transition-delay: .04s; }
.site-nav__item.is-open .mega__links li:nth-child(3) { transition-delay: .08s; }
.site-nav__item.is-open .mega__links li:nth-child(4) { transition-delay: .12s; }
.mega__links a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  transition: background-color .25s;
}
.mega__links a:hover, .mega__links a:focus-visible { background: rgb(255 255 255 / .08); }
.mega__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: 12px;
  background: rgb(255 255 255 / .06);
  color: var(--blue-300);
  transition: background-color .3s, border-color .3s, color .3s, transform .45s var(--ease-out);
}
.mega__icon svg { width: 22px; height: 22px; }
.mega__links a:hover .mega__icon, .mega__links a:focus-visible .mega__icon { background: var(--blue-300); border-color: var(--blue-300); color: var(--navy-950); transform: scale(1.06); }
.mega__text { display: grid; gap: 2px; min-width: 0; }
.mega__text b { font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.mega__text span { color: rgb(255 255 255 / .62); font-size: 12px; line-height: 1.4; }
.mega__go { width: 18px; height: 18px; color: var(--blue-300); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .4s var(--ease-out); }
.mega__links a:hover .mega__go, .mega__links a:focus-visible .mega__go { opacity: 1; transform: none; }
.mega__all { display: inline-flex; align-items: center; gap: 10px; margin: 8px 12px 4px; padding-top: 12px; border-top: 1px solid rgb(255 255 255 / .14); color: var(--blue-300); font-size: 12.5px; font-weight: 700; }
.mega__all svg { width: 18px; height: 18px; transition: transform .35s var(--ease-out); }
.mega__all:hover svg { transform: translateX(3px); }
/* The panel links must not inherit the nav link pill/underline. */
.mega a { position: static; margin: 0; font-size: inherit; font-weight: inherit; white-space: normal; }
.mega a::after, .mega a::before { content: none; }
/* Mobile menu: everything fits one phone screen. Sub-links are chips, the two
   contact links share the last row, and the quick-contact bar steps aside
   while the menu is open. The scroll is only a safety net for short screens. */
.mobile-nav { grid-template-columns: 1fr 1fr; column-gap: 6px; max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; }
.mobile-nav > * { grid-column: 1 / -1; }
.mobile-nav > a { padding: 8px 16px; }
.mobile-nav__subs { display: grid; gap: 6px; padding: 0 6px 8px; }
.mobile-nav__subs--pairs { grid-template-columns: 1fr 1fr; }
/* Sub-links: the desktop panel row (icon tile + label) on a card, so each reads as a button. */
.mobile-nav .mobile-nav__subs a { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1px solid rgb(255 255 255 / .12); border-radius: 14px; background: rgb(255 255 255 / .05); font-size: 13.5px; line-height: 1.25; letter-spacing: -.01em; }
.mobile-nav .mobile-nav__subs a:active { background: rgb(255 255 255 / .1); }
.mobile-nav__subs b { font-weight: 600; }
.mobile-nav__subs .mega__icon { width: 36px; height: 36px; border-radius: 10px; }
.mobile-nav__subs .mega__icon svg { width: 19px; height: 19px; }
.mobile-nav > a:nth-last-child(-n + 2) { grid-column: auto; margin-top: 6px; padding: 12px 10px; border: 1px solid rgb(255 255 255 / .16); background: rgb(255 255 255 / .06); font-size: 14px; text-align: center; white-space: nowrap; }
.mobile-nav > a:nth-last-child(2) { border-color: transparent; background: var(--blue-300); color: var(--navy-950); }
body:has(.menu-toggle[aria-expanded="true"]) .mobile-cta { transform: translateY(calc(100% + 32px)); visibility: hidden; }
@media (hover: none) { .mega::before { display: none; } }
@media (prefers-reduced-motion: reduce) { .mega, .mega__links li, .mega__icon, .mega__go, .site-nav > a::before, .site-nav__item > a::before { transition: none; } }

/* Framed photos: the image whole, in a rounded frame, no fade. */
.split--wide { grid-template-columns: minmax(0, 560fr) minmax(0, 640fr); gap: 80px; }
.frame { overflow: hidden; border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.frame img { width: 100%; height: auto; display: block; }
.frame--tall { max-width: 520px; justify-self: end; }
.big-figure { display: grid; gap: 8px; padding-top: 8px; }
.big-figure strong { color: var(--navy-800); font-size: clamp(72px, 8vw, 120px); font-weight: 500; line-height: .9; letter-spacing: -.08em; }
.big-figure span { max-width: 26ch; color: var(--slate-600); font-size: 14px; font-weight: 600; line-height: 1.4; }
.energy__winter { margin-top: var(--section-y); }
.energy__winter .split__copy { gap: 28px; }
.page-section:not(.page-section--sky, .page-section--navy) + .page-section:not(.page-section--sky, .page-section--navy) { padding-top: 0; }
@media (max-width: 1099px) {
  .split--wide { grid-template-columns: 1fr; gap: 40px; }
  .frame--tall { max-width: 100%; justify-self: stretch; }
  .energy__winter .frame--tall { max-width: 420px; }
}

/* Services v2: every photo the same size, same side, same crop. */
.service:not(.service--text) { grid-template-columns: minmax(0, 1fr) 460px; gap: 56px; align-items: center; }
.service:nth-child(even):not(.service--text) .service__media { order: 0; }
.service__media { order: 2; align-self: center; }
.service__media img { aspect-ratio: 4 / 3; height: auto; }
.service__body { max-width: 640px; }
@media (max-width: 1099px) {
  .service:not(.service--text) { grid-template-columns: 1fr; gap: 28px; }
  .service__media { order: 0; }
  .service__media img { aspect-ratio: 16 / 9; }
}
.service:not(.service--text) .service__body { grid-column: 1; grid-row: 1; }
.service:not(.service--text) .service__media, .service:nth-child(even):not(.service--text) .service__media { grid-column: 2; grid-row: 1; order: 0; }
@media (max-width: 1099px) {
  .service:not(.service--text) .service__media, .service:nth-child(even):not(.service--text) .service__media { grid-column: 1; grid-row: 1; }
  .service:not(.service--text) .service__body { grid-row: 2; }
}
