/* Site header and mega menu: loaded ONLY when SITE.features.newNav is on (src/layouts/Base.astro links it).
   Kept out of the Astro bundle on purpose: Astro 4 bundles an imported component's CSS and scripts
   into every page whether or not it renders, so a flag-off build would still have changed all 223
   pages (measured 2026-10-15). Markup lives in src/components/SiteNav.astro. */
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/SourceSerif4-latin.woff2') format('woff2');
  font-weight: 200 900; font-style: normal; font-display: swap;
}
.sx-navroot {
  --sx-forest: #21312F; --sx-cream: #FFFDF8; --sx-coral: #FF8B64; --sx-tan: #C98A6B;
  --sx-head: #DDA88A;   /* panel headings: --sx-tan measured 3.91:1 on the panel glow, this is 5.34:1 */
  --sx-label: 12px; --sx-track: 1.68px;
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

/* Bar: fixed and ~60px tall like the header it replaces, so inner pages keep their layout. */
.sx-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; gap: clamp(10px, 2vw, 28px);
  padding: 10px clamp(18px, 3vw, 40px);
  background: rgba(26, 39, 37, .94);
  backdrop-filter: saturate(1.1) blur(10px); -webkit-backdrop-filter: saturate(1.1) blur(10px);
  box-shadow: 0 1px 0 rgba(255, 253, 248, .06);
}
.sx-mark {
  display: block; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 2px;
  background: url('/brand/seo-elite-agency-mark.png') no-repeat center / contain;
}
.sx-menu { display: flex; align-items: center; gap: clamp(2px, .6vw, 8px); margin: 0 auto; }
.sx-right { display: flex; align-items: center; gap: 12px; }
.sx-top {
  color: #fff; text-decoration: none;
  font-size: var(--sx-label); letter-spacing: var(--sx-track); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: 999px;
  transition: background .2s ease;
}
/* Hover gains a quiet ground. Text color never changes. */
.sx-top:hover, .sx-top:focus-visible, .sx-item.is-open > .sx-top, .sx-top.is-active { background: rgba(255, 253, 248, .10); color: #fff; }
.sx-top:focus-visible, .sx-mm a:focus-visible, .sx-navcta:focus-visible, .sx-burger:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sx-caret {
  width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); opacity: .75; transition: transform .25s ease, margin .25s ease;
}
.sx-item.is-open .sx-caret { transform: rotate(225deg); margin-top: 3px; }
.sx-navcta {
  white-space: nowrap; background: var(--sx-coral); color: var(--sx-forest); text-decoration: none;
  font-size: var(--sx-label); letter-spacing: var(--sx-track); text-transform: uppercase; font-weight: 600;
  padding: 12px 18px; border-radius: 999px; transition: transform .2s ease;
}
.sx-navcta:hover { transform: translateY(-1px); color: var(--sx-forest); }

/* Panels */
.sx-mm {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  width: min(var(--sx-w, 1120px), calc(100vw - 32px)); padding-top: 10px;   /* hover bridge */
}
.sx-mm[hidden] { display: none; }
.sx-mm[data-w="industries"] { --sx-w: 1040px; }
.sx-mm[data-w="protection"], .sx-mm[data-w="resources"], .sx-mm[data-w="locations"] { --sx-w: 820px; }
.sx-mm[data-w="company"] { --sx-w: 680px; }
.sx-card {
  display: grid; grid-template-columns: 272px 1fr; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(110% 80% at 0% 0%, rgba(255, 139, 100, .11), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(201, 138, 107, .07), transparent 60%),
    linear-gradient(180deg, #22322f 0%, #1a2725 100%);
  border: 1px solid rgba(255, 253, 248, .10);
  box-shadow: 0 40px 90px -34px rgba(0, 0, 0, .6);
  color: var(--sx-cream);
}
/* Position only, never opacity: a transition from 0 does not run in a hidden document, which once
   left a panel invisible while it still caught clicks. */
.sx-item.is-open .sx-card { animation: sxIn .22s cubic-bezier(.22, 1, .36, 1); }
@keyframes sxIn { from { transform: translateY(-8px); } to { transform: translateY(0); } }
.sx-aside { padding: 30px 28px; display: grid; align-content: start; gap: 14px; background: rgba(255, 253, 248, .035); border-right: 1px solid rgba(255, 253, 248, .08); }
.sx-stat { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.sx-num { font-weight: 300; font-size: 48px; line-height: .9; letter-spacing: -.03em; color: var(--sx-tan); }
.sx-unit { font-style: italic; font-size: 15px; color: rgba(255, 253, 248, .78); }
.sx-brand { display: flex; align-items: center; gap: 10px; font-size: 26px; letter-spacing: -.01em; color: #fff; }
.sx-shield { width: 22px; height: 26px; flex: 0 0 auto; background: var(--sx-coral); clip-path: polygon(50% 0, 100% 16%, 100% 52%, 50% 100%, 0 52%, 0 16%); }
.sx-lede { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(255, 253, 248, .88); }
.sx-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sx-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: rgba(255, 253, 248, .06); display: block; }
.sx-portrait img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block; background: rgba(255, 253, 248, .06); }
.sx-cta, .sx-more {
  justify-self: start; color: #fff; text-decoration: none; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255, 253, 248, .38); padding-bottom: 3px; transition: border-color .2s ease;
}
.sx-cta:hover, .sx-more:hover { border-bottom-color: #fff; color: #fff; }
.sx-arrow { transition: transform .22s cubic-bezier(.22, 1, .36, 1); }
.sx-cta:hover .sx-arrow, .sx-more:hover .sx-arrow { transform: translateX(4px); }
.sx-main { padding: 28px 30px 24px; display: grid; grid-template-rows: 1fr auto; gap: 20px; }
.sx-cols { display: grid; gap: 10px 28px; }
.sx-cols-4 { grid-template-columns: repeat(4, 1fr); }
.sx-cols-3 { grid-template-columns: repeat(3, 1fr); }
.sx-cols-2 { grid-template-columns: repeat(2, 1fr); }
.sx-cols-1 { grid-template-columns: 1fr; }
.sx-h { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--sx-head); margin: 0 0 10px; }
.sx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.sx-link { position: relative; display: inline-block; padding: 6px 0; color: #fff; text-decoration: none; font-size: 15px; line-height: 1.35; }
.sx-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform .28s cubic-bezier(.22, 1, .36, 1); }
.sx-link:hover, .sx-link:focus-visible, .sx-link.is-current { color: #fff; }
.sx-link:hover::after, .sx-link:focus-visible::after, .sx-link.is-current::after { transform: scaleX(1); }
.sx-ext { font-size: 11px; margin-left: 5px; opacity: .7; display: inline-block; transform: translateY(-1px); }
.sx-foot { display: flex; gap: 24px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid rgba(255, 253, 248, .08); }
.sx-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Mobile drawer */
.sx-burger { display: none; width: 42px; height: 42px; border-radius: 999px; border: 0; cursor: pointer; background: rgba(255, 253, 248, .10); position: relative; }
.sx-burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: #fff; transition: transform .25s ease, top .25s ease; }
.sx-burger span:first-child { top: 17px; }
.sx-burger span:last-child { top: 24px; }
.sx-burger[aria-expanded="true"] span:first-child { top: 20.5px; transform: rotate(45deg); }
.sx-burger[aria-expanded="true"] span:last-child { top: 20.5px; transform: rotate(-45deg); }
.sx-drawer { position: fixed; inset: 0; z-index: 59; overflow-y: auto; background: linear-gradient(180deg, #22322f, #1a2725); padding: 80px 22px 40px; color: var(--sx-cream); }
.sx-drawer[hidden] { display: none; }
.sx-dsec summary { list-style: none; cursor: pointer; color: #fff; font-size: 22px; padding: 16px 0; border-bottom: 1px solid rgba(255, 253, 248, .10); display: flex; justify-content: space-between; align-items: center; }
.sx-dsec summary::-webkit-details-marker { display: none; }
.sx-dsec summary::after { content: '+'; font-size: 22px; opacity: .7; }
.sx-dsec[open] summary::after { content: '\2212'; }
.sx-dsec ul { list-style: none; margin: 0; padding: 8px 0 14px; }
.sx-dsec a { display: block; color: #fff; text-decoration: none; padding: 10px 0; font-size: 16px; }
.sx-dsec a.sx-dmore { color: var(--sx-head); }
.sx-dplain { display: block; color: #fff; text-decoration: none; font-size: 22px; padding: 16px 0; border-bottom: 1px solid rgba(255, 253, 248, .10); }
.sx-dcta { display: block; margin-top: 28px; text-align: center; text-decoration: none; background: var(--sx-coral); color: var(--sx-forest); padding: 17px; border-radius: 999px; font-size: var(--sx-label); letter-spacing: var(--sx-track); text-transform: uppercase; font-weight: 600; }

/* MEASURED in the preview: the full bar needs 1,122px, so the drawer takes over below 1,180px. */
@media (max-width: 1180px) {
  .sx-menu, .sx-navcta { display: none; }
  .sx-burger { display: block; }
  .sx-right { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-item.is-open .sx-card { animation: none; }
  .sx-link::after, .sx-arrow, .sx-caret, .sx-burger span { transition: none; }
}
html.sx-drawer-open, html.sx-drawer-open body { overflow: hidden; }
