/* Compact glass header and shared navigation, at every viewport width. */
.header.compact-header {
  position: fixed;
  z-index: 70;
  top: 20px;
  left: 50%;
  width: min(260px, calc(100% - 32px));
  min-height: 60px;
  padding: 8px 16px 8px 28px;
  gap: 22px;
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow:none;
  isolation: isolate;
  background: transparent !important;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.compact-header > .brand, .compact-header > .brand img { width: 100px; height: 38px; }
.glass-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.header.compact-header > .nav-fx {
  background: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  filter: url(#k-glass-distortion);
}
.header.compact-header > .nav-tint { background: #00000040; }
html[data-theme=light] .header.compact-header > .nav-tint { background: #ffffff59; }
/* Keep the original glass refraction, without an outline around the pill. */
.header.compact-header > .nav-shine { display: none; border: 0; background: none; box-shadow: none; }
.header.compact-header > .nav-shine::after { content: none; border: 0; }
.compact-header > .menu-button {
  display: grid;
  margin-left: auto;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transition: background .25s, transform .25s;
}
.compact-header > .menu-button:hover { background: #ffffff12; }
html[data-theme=light] .compact-header > .menu-button:hover { background: #1717140d; }
.compact-header > .menu-button:active { transform: scale(.94); }
.compact-header .menu-lines {
  width: 24px;
  height: 2px;
  background: linear-gradient(currentColor, currentColor) left center / 14px 2px no-repeat;
}
.compact-header .menu-lines::before, .compact-header .menu-lines::after {
  width: 24px;
  height: 2px;
  transition: transform .32s var(--ease), top .32s var(--ease);
}
.compact-header .menu-lines::before { top: -6px; }
.compact-header .menu-lines::after { top: 6px; }
.compact-header .menu-button[aria-expanded=true] .menu-lines { background: transparent; }
.compact-header .menu-button[aria-expanded=true] .menu-lines::before { top: 0; transform: rotate(45deg); }
.compact-header .menu-button[aria-expanded=true] .menu-lines::after { top: 0; transform: rotate(-45deg); }
.mega-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: transparent;
  color: rgba(0,0,0,.62);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.mega-backdrop > svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.mega-backdrop path { fill: currentColor; }
html[data-theme=light] .mega-backdrop { color: rgba(248,246,237,.78); }
.mega-menu {
  position: fixed;
  z-index: 65;
  top: 98px;
  left: 50%;
  width: min(1080px, calc(100% - 48px));
  max-height: calc(100dvh - 122px);
  overflow: hidden;
  transform: translateX(-50%);
  border: 0;
  border-radius: 28px;
  padding: 0;
  --ink: #fffce0;
  --muted: #d0d0c4;
  isolation: isolate;
  background: transparent;
  color: var(--ink);
  box-shadow:none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-theme=light] .mega-menu { --ink: #171714; --muted: #48483f; background: transparent; box-shadow:none; }
/* Real glass layers match the header; the content scrolls independently. */
.mega-glass { position: absolute; z-index: 0; inset: 0; border-radius: inherit; pointer-events: none; }
.mega-menu > .mega-glass-fx {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  filter: url(#k-glass-distortion);
}
.mega-glass-tint { background: #10110fa6; }
html[data-theme=light] .mega-glass-tint { background: #f8f6edbd; }
.mega-menu-content {
  position: relative;
  z-index: 1;
  max-height: inherit;
  padding: 30px 34px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #ffc52e transparent;
}
.mega-topline { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 24px; }
.mega-topline h2 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.mega-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.mega-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); box-shadow:none; }
.mega-grid { display: grid; grid-template-columns: 1.05fr 1.05fr .95fr; gap: 36px; }
.mega-menu .mega-links { display: flex; position: static; flex-direction: column; align-items: stretch; gap: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
.mega-menu .mega-links > a {
  position: relative;
  display: block;
  width: fit-content;
  padding: 5px 0;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -.055em;
  color: var(--ink);
  transition: color .2s;
}
.mega-menu .mega-links > a:is(:hover, :focus-visible) { color: var(--brand-text); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .mega-menu .mega-links > a:is(:hover, :focus-visible) {
    background-image: linear-gradient(110deg,
      var(--brand-text) 0%, var(--brand-text) 39%,
      #ffc52e 45%, #fff5bd 49%, #fffbee 51%,
      #ffc52e 55%, var(--brand-text) 61%, var(--brand-text) 100%);
    background-size: 300% 100%;
    background-repeat: no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: menu-text-glare 1.8s linear infinite;
  }
}
@keyframes menu-text-glare {
  from { background-position: 100% 50%; }
  to { background-position: 0% 50%; }
}
.mega-menu .mega-links > a::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 6px 12px; border-radius: 50%; background: var(--brand); opacity: 0; }
.mega-menu .mega-links > a:is(:hover, :focus-visible)::after { opacity: 1; }
.mega-services { border-left: 1px solid var(--line); padding-left: 30px; }
.mega-services h3 { margin: 8px 0 17px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.mega-service-links { display: flex; flex-direction: column; align-items: stretch; }
.mega-services a { display: block; width: fit-content; padding: 6px 0; font-size: 14px; line-height: 1.4; transition: color .2s; }
.mega-services a:hover { color:var(--brand-text); }
.mega-feature { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow: hidden; padding: 22px; border-radius: 17px; background: #ffc52e0c; }
.mega-feature::before { content: ''; position: absolute; width: 200px; height: 200px; border: 1px solid #ffc52e22; border-radius: 50%; right: -42px; top: 50px; pointer-events: none; }
.mega-feature h3 { position: relative; z-index: 1; max-width: 190px; font-size: 30px; line-height: 1.12; letter-spacing: -.05em; }
.mega-feature img { position: relative; align-self: center; width: 160px; height: 150px; object-fit: contain; transform: rotate(-8deg); transition: transform .7s var(--ease); }
.mega-feature:hover img { transform: rotate(4deg) translateY(-5px); }
.mega-feature > a { position: relative; width: fit-content; padding: 8px 0 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mega-feature > a:hover { color:var(--brand-text); border-color: var(--brand-text); }
.mega-bottomline { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.mega-bottomline > a { font-size: 12px; overflow-wrap: anywhere; }
.mega-bottomline > a:hover { color:var(--brand-text); }
.mega-appearance { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.mega-appearance .theme-button { width: 36px; height: 36px; margin: 0; color: var(--ink); }
html.mega-menu-open { overflow: hidden; }
html.mega-menu-open .mega-menu { animation: none; }
html.mega-menu-open .mega-backdrop { animation: none; }
html.mega-menu-open .mega-grid > * { animation: mega-content .55s var(--ease) both; }
html.mega-menu-open .mega-grid > :nth-child(2) { animation-delay: .055s; }
html.mega-menu-open .mega-grid > :nth-child(3) { animation-delay: .1s; }
@keyframes mega-content { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width:700px) {
  .header.compact-header { top: 16px; min-height: 56px; width: min(244px, calc(100% - 32px)); padding: 6px 14px 6px 26px; }
  .mega-menu { top: 88px; width: calc(100% - 28px); max-height: calc(100dvh - 102px); padding: 0; border-radius: 24px; }
  .mega-menu-content { padding: 23px 24px 16px; }
  .mega-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .mega-menu .mega-links > a { font-size: clamp(26px, 4.8vw, 34px); padding-block: 6px; }
  .mega-services { padding-left: 22px; }
  .mega-services a { font-size: 13px; padding-block: 6px; }
  .mega-feature { grid-column: 1/-1; display: block; min-height: 116px; padding: 20px; }
  .mega-feature h3 { font-size: 27px; max-width: calc(100% - 110px); }
  .mega-feature img { position: absolute; right: 22px; bottom: -7px; width: 110px; height: 120px; opacity: .9; }
  .mega-feature > a { display: inline-block; margin-top: 12px; max-width: calc(100% - 100px); }
  .mega-topline { padding-bottom: 20px; }
  .mega-status { display: none; }
  .mega-bottomline { margin-top: 20px; }
}
@media(max-width:480px) {
  .mega-menu-content { padding-inline: 22px; }
  .mega-grid { grid-template-columns: 1fr; gap: 22px; }
  .mega-menu .mega-links { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .mega-menu .mega-links > a { font-size: 28px; }
  .mega-services { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
  .mega-services h3 { margin: 0 0 12px; }
  .mega-service-links { gap: 2px; }
  .mega-services a { padding-block: 7px; }
  .mega-feature { display: block; }
  .mega-feature h3 { max-width: calc(100% - 80px); font-size: 25px; }
  .mega-feature img { right: 12px; width: 90px; height: 108px; }
  .mega-feature > a { display: inline-block; margin: 12px 0 0; }
  .mega-bottomline { align-items: flex-start; gap: 12px; }
  .mega-bottomline > a { max-width: 180px; font-size: 11px; padding-top: 9px; }
  .mega-appearance > span { display: none; }
}
@media(prefers-reduced-motion:reduce) {
  .mega-menu .mega-links > a:is(:hover, :focus-visible) {
    animation: none;
    background-image: none;
    -webkit-text-fill-color: var(--brand-text);
  }
  html.mega-menu-open .mega-menu, html.mega-menu-open .mega-backdrop, html.mega-menu-open .mega-grid > * { animation: none; }
  .mega-menu *, .compact-header .menu-button, .compact-header .menu-lines::before, .compact-header .menu-lines::after { transition: none; }
}
@media(prefers-reduced-transparency:reduce),(forced-colors:active) {
  .mega-menu, html[data-theme=light] .mega-menu { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mega-menu > .mega-glass-fx { filter: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mega-glass-tint, html[data-theme=light] .mega-glass-tint { background: var(--surface); }
  .mega-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .header.compact-header, html[data-theme=light] .header.compact-header { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .header.compact-header > .nav-fx { filter: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .header.compact-header > .nav-tint, html[data-theme=light] .header.compact-header > .nav-tint { background: var(--surface); }
}
@media(forced-colors:active) {
  .mega-backdrop > svg { display: none; }
  .mega-menu .mega-links > a:is(:hover, :focus-visible) {
    animation: none;
    background-image: none;
    -webkit-text-fill-color: LinkText;
    color: LinkText;
  }
}

/* Use pixel-width scrollbars where supported; Firefox falls back to thin. */
@supports selector(::-webkit-scrollbar) {
  .mega-menu-content { scrollbar-width: auto !important; }
  .mega-menu-content::-webkit-scrollbar { width: 2px !important; height: 2px !important; }
  .mega-menu-content::-webkit-scrollbar-track, .mega-menu-content::-webkit-scrollbar-corner { background: transparent; }
  .mega-menu-content::-webkit-scrollbar-thumb { background: #ffc52e; border: 0; border-radius: 2px; }
  .mega-menu-content::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
}

/* A logo stays a logo on hover; keep its keyboard focus indicator. */
.brand,.brand:is(:hover,:focus-visible){text-decoration:none;border-bottom:0}
