/* ============================================
   MEGA MENU — Architectural White-Print
   Full drawing-sheet treatment: grid, border frame,
   title block sidebar, zone headings, tick marks.
   ============================================ */

/* The nav list and mega items stretch to the full header height so the
   active button's bottom edge meets the panel's top edge with no gap.
   position:static on the LI keeps the panel positioning relative to .header. */
.nav__list {
    align-self: stretch;
}

.nav__item--mega {
    position: static;
    align-self: stretch;
    display: flex;
    align-items: stretch;
}

.nav__trigger {
    cursor: pointer;
}

.nav__item--mega.is-active .nav__chevron {
    transform: rotate(180deg);
}

/* Active trigger stays at full opacity — it visually merges with the panel */
.nav__item--mega.is-active .nav__link {
    opacity: 1;
}


/* ---- Active Trigger Tab — merges with panel top ---- */

.nav__item--mega .nav__trigger {
    /* Keep text vertically centered inside the now full-height button */
    padding-top: 0;
    padding-bottom: 0;
    /* Stacking context so the tab pseudo stays inside the button */
    position: relative;
    isolation: isolate;
    transition: opacity var(--duration-base) var(--ease-out);
}

/* The visual tab is drawn as a ::before pseudo so we can shrink it
   vertically (start it 20px below the header top) while the click area
   stays full-height. The pseudo extends 1.5px below the button to cover
   the panel's top border in the button's x-range. */
.nav__item--mega .nav__trigger::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    /* Extends through the 6px gap + 1.5px panel border to merge with the panel */
    bottom: -7.5px;
    border-radius: 22px 22px 0 0;
    background: transparent;
    box-shadow: none;
    z-index: -1;
    pointer-events: none;
    /* Clip the shadow's downward bleed — the bottom edge merges into the
       panel and shouldn't cast any glow into it. */
    clip-path: inset(-100px -100px 0 -100px);
    transition:
        background 0.7s var(--ease-out-expo),
        box-shadow 0.7s var(--ease-out-expo);
}

/* When active, raise the trigger above the panel and fade in the tab fill */
.nav__item--mega.is-active .nav__trigger {
    z-index: calc(var(--z-fixed) + 1);
}

.nav__item--mega.is-active .nav__trigger::before {
    background: #FFFFFF;
    box-shadow:
        0 -4px 16px rgba(10, 17, 25, 0.04),
        -3px 0 12px rgba(10, 17, 25, 0.03),
         3px 0 12px rgba(10, 17, 25, 0.03);
}

/* Suppress the vertical dividers next to the active tab — they would
   draw a hairline against the rounded outline. */
.nav__item--mega.is-active::before,
.nav__item--mega.is-active + .nav__item::before {
    opacity: 0;
}


/* ---- Panel ---- */
.mega-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 16px;
    right: 16px;
    width: auto;
    background: #FFFFFF;
    box-shadow:
        0 1px 0 rgba(10, 17, 25, 0.08),
        0 48px 100px rgba(10, 17, 25, 0.18);
    border-radius: 24px;
    border: 1.5px solid rgba(10, 17, 25, 0.18);
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
        opacity 0.3s var(--ease-out-expo),
        transform 0.3s var(--ease-out-expo),
        visibility 0s linear 0.3s;
    pointer-events: none;
    z-index: var(--z-fixed);
}

.mega-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
        opacity 0.3s var(--ease-out-expo),
        transform 0.3s var(--ease-out-expo),
        visibility 0s linear 0s;
    pointer-events: auto;
}


/* ---- Layout ---- */
.mega-panel__layout {
    display: flex;
    align-items: stretch;
    border-radius: inherit;
    overflow: hidden;
}


/* ---- Sidebar — Title Block Panel ---- */
.mega-panel__sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #E8443A;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    border: none;
}

/* Title block cells — stacked rows with borders */
.mega-panel__sidebar-eyebrow {
    display: block;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mega-panel__sidebar-stat {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: var(--font-light);
    color: #FFFFFF;
    line-height: 1;
    letter-spacing: -0.04em;
    padding: 20px 20px 16px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mega-panel__sidebar-desc {
    font-family: var(--font-body);
    font-size: 0.78rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
    flex: 1;
    margin: 0;
    letter-spacing: 0.005em;
    padding: 16px 20px;
}

.mega-panel__sidebar-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: stretch;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #FFFFFF;
    background: transparent;
    padding: 16px 20px;
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0;
    margin-top: auto;
    align-self: stretch;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.mega-panel__sidebar-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.mega-panel__sidebar-cta i {
    font-size: 0.85rem;
}


/* ---- Body — Drawing Area with Grid ---- */
.mega-panel__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: #FFFFFF;
    background-image:
        linear-gradient(rgba(10, 17, 25, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 17, 25, 0.025) 1px, transparent 1px),
        linear-gradient(rgba(10, 17, 25, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 17, 25, 0.01) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px;
    border-radius: 0;
    position: relative;
}

/* Soft white fade that wipes the grid out right beneath the active tab.
   --mega-tab-x is set by mega-menu.js based on the active button's
   horizontal center, in body-local coordinates. */
.mega-panel__body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: radial-gradient(
        ellipse 200px 90px at var(--mega-tab-x, 50%) 0,
        #FFFFFF 0%,
        rgba(255, 255, 255, 0.9) 30%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.mega-panel__body .mega-panel__inner {
    flex: 1;
}


/* ---- Inner Grid ---- */
.mega-panel__inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.5fr;
    gap: var(--space-16);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-16) var(--space-12) var(--space-12);
    position: relative;
}

.mega-panel__inner--projects {
    grid-template-columns: 0.8fr 0.8fr 2fr;
}


/* ---- Column Headings — Zone Markers ---- */
.mega-panel__heading {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: var(--font-bold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(10, 17, 25, 0.95);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: none;
    display: block;
    position: relative;
}



/* ---- Links ---- */
.mega-panel__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mega-panel__links li {
    opacity: 0;
    transform: translateY(6px);
}

.mega-panel.is-open .mega-panel__links li {
    animation: megaLinkIn 0.4s var(--ease-out-expo) forwards;
}

.mega-panel.is-open .mega-panel__links li:nth-child(1) { animation-delay: 0.04s; }
.mega-panel.is-open .mega-panel__links li:nth-child(2) { animation-delay: 0.07s; }
.mega-panel.is-open .mega-panel__links li:nth-child(3) { animation-delay: 0.10s; }
.mega-panel.is-open .mega-panel__links li:nth-child(4) { animation-delay: 0.13s; }
.mega-panel.is-open .mega-panel__links li:nth-child(5) { animation-delay: 0.16s; }
.mega-panel.is-open .mega-panel__links li:nth-child(6) { animation-delay: 0.19s; }

@keyframes megaLinkIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-panel__links a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: rgba(10, 17, 25, 0.6);
    text-decoration: none;
    border-bottom: none;
    transition: color 0.2s ease;
    line-height: var(--leading-snug);
    letter-spacing: 0.02em;
    overflow: hidden;
    position: relative;
    padding-left: 16px;
}

/* Dimension tick mark */
.mega-panel__links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 8px;
    height: 0.5px;
    background: rgba(10, 17, 25, 0.25);
    transition: width 0.25s ease, background 0.25s ease;
}

.mega-panel__links a:hover {
    color: #E8443A;
}

.mega-panel__links a:hover::before {
    width: 12px;
    background: #E8443A;
}

.mega-panel__link-text {
    display: block;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mega-panel--ready .mega-panel__links a:hover .mega-panel__link-text {
    transform: translateX(4px);
}

.mega-panel__links a i {
    display: none;
}


/* ---- Text Columns — fade grid behind content ---- */
.mega-panel__col {
    position: relative;
    z-index: 1;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.85) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    padding: var(--space-2);
    margin: calc(-1 * var(--space-2));
}

/* Reset for image / logo columns — let the grid show through */
.mega-panel__col--featured,
.mega-panel__col--gallery,
.mega-panel__col--logos {
    background: none;
    padding: 0;
    margin: 0;
}


/* ---- Featured Image — Drawing Sheet ---- */
.mega-panel__col--featured {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    background: #fafaf8;
    border-top: 0.5px solid #c8c8c8;
}

.mega-panel__featured {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    overflow: hidden;
}

.mega-panel__featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.mega-panel__featured:hover img {
    transform: scale(1.03);
}

/* Top + bottom edge panels */
.mega-panel__featured::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(
            to bottom,
            #fafaf8 0px, #fafaf8 28px,
            transparent 28px,
            transparent calc(100% - 28px),
            #fafaf8 calc(100% - 28px), #fafaf8 100%
        );
}

/* Tick marks — top, bottom, left edges */
.mega-panel__featured::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background:
        repeating-linear-gradient(90deg, #bbb 0px, #bbb 1px, transparent 1px, transparent 36px) 0 0 / 100% 8px no-repeat,
        repeating-linear-gradient(90deg, #bbb 0px, #bbb 1px, transparent 1px, transparent 36px) 0 100% / 100% 8px no-repeat;
}

/* Title block — bottom-right corner stamp */
.mega-panel__featured-overlay {
    display: none;
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(250, 250, 248, 0.95);
    border-top: 1.5px solid #c8c8c8;
    border-left: 1.5px solid #c8c8c8;
    padding: 10px 14px;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 5;
}

.mega-panel__featured-tag {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #888;
    background: none;
    padding: 0;
    padding-bottom: 4px;
    margin-bottom: 2px;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.mega-panel__featured-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    letter-spacing: -0.01em;
}


/* ---- Project Image Grid — Drawing Sheets ---- */
.mega-panel__col--gallery {
    grid-column: span 1;
}

.mega-panel__image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.mega-panel__grid-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: block;
    background: #fafaf8;
    border-top: 0.5px solid #c8c8c8;
}

/* Inner corners only */
.mega-panel__grid-item:nth-child(1) { border-radius: 0 0 var(--radius-lg) 0; }
.mega-panel__grid-item:nth-child(2) { border-radius: 0 0 0 var(--radius-lg); }
.mega-panel__grid-item:nth-child(3) { border-radius: 0 var(--radius-lg) 0 0; }
.mega-panel__grid-item:nth-child(4) { border-radius: var(--radius-lg) 0 0 0; }
.mega-panel__grid-item:nth-child(5) { grid-column: 1 / -1; border-radius: var(--radius-lg) var(--radius-lg) 0 0; aspect-ratio: 21 / 9; }

.mega-panel__grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out-expo);
}

.mega-panel__grid-item:hover img {
    transform: scale(1.04);
}

/* Top + bottom edge panels */
.mega-panel__grid-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(
            to bottom,
            #fafaf8 0px, #fafaf8 16px,
            transparent 16px,
            transparent calc(100% - 16px),
            #fafaf8 calc(100% - 16px), #fafaf8 100%
        );
}

/* Tick marks — top, bottom edges */
.mega-panel__grid-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    border-radius: inherit;
    background:
        repeating-linear-gradient(90deg, #bbb 0px, #bbb 1px, transparent 1px, transparent 36px) 0 0 / 100% 8px no-repeat,
        repeating-linear-gradient(90deg, #bbb 0px, #bbb 1px, transparent 1px, transparent 36px) 0 100% / 100% 8px no-repeat;
}

/* Label — title block stamp in corner */
.mega-panel__grid-item span {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 5;
    background: rgba(250, 250, 248, 0.92);
    border-top: 1px solid #c8c8c8;
    border-left: 1px solid #c8c8c8;
    padding: 4px 8px;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #888;
}


/* ---- Client Logos ---- */
.mega-panel__col--logos {
    display: flex;
    flex-direction: column;
}

.mega-panel__logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    align-items: center;
    justify-items: center;
}

.mega-panel__logo-grid img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.8) sepia(100%) hue-rotate(3deg) saturate(600%);
    opacity: 0.6;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.mega-panel__logo-grid img:hover {
    filter: grayscale(100%) brightness(0.8) sepia(100%) hue-rotate(3deg) saturate(600%);
    opacity: 1;
}


/* ---- Bottom Bar — Drawing Sheet Footer ---- */
.mega-panel__bottom-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-12);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-4) var(--space-12);
    border-top: 1.5px solid rgba(10, 17, 25, 0.15);
}

.mega-panel__bottom-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(10, 17, 25, 0.6);
    padding: var(--space-3) var(--space-4);
    border-radius: 0;
    transition: color 0.2s ease;
}

.mega-panel__bottom-link:hover {
    color: #E8443A;
}

.mega-panel__bottom-link i {
    font-size: 1rem;
}


/* ---- Contact Strip — Title Block Row ---- */
.mega-panel__contact-strip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    border-top: 1px solid rgba(10, 17, 25, 0.10);
    background: #FFFFFF;
    position: relative;
    z-index: 2;
}

.mega-panel__contact-offices {
    display: flex;
    align-items: center;
    gap: 0;
}

.mega-panel__contact-office {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 16px var(--space-8);
}

.mega-panel__contact-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: var(--font-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(10, 17, 25, 0.38);
    line-height: 1;
}

.mega-panel__contact-office a {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: var(--font-medium);
    letter-spacing: 0.03em;
    color: rgba(10, 17, 25, 0.65);
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.2;
}

.mega-panel__contact-office a:hover {
    color: var(--color-text-primary);
}

.mega-panel__contact-item {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: var(--font-medium);
    letter-spacing: 0.03em;
    color: rgba(10, 17, 25, 0.55);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 16px var(--space-8);
}

.mega-panel__contact-item a {
    font-family: var(--font-body);
    color: rgba(10, 17, 25, 0.55);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mega-panel__contact-item a:hover {
    color: var(--color-text-primary);
}

.mega-panel__contact-item i {
    font-size: 1rem;
    opacity: 0.4;
}

.mega-panel__contact-sep {
    width: 1px;
    height: 100%;
    min-height: 28px;
    background: rgba(10, 17, 25, 0.10);
}


/* ============================================
   ARCHITECTURAL DRAWING SHEET TREATMENT
   ============================================ */

/* Arch frame — overlays entire panel */
.mega-panel__arch-frame {
    position: absolute;
    inset: 8px;
    pointer-events: none;
    z-index: 10;
    border: 1px solid rgba(10, 17, 25, 0.12);
    opacity: 0;
    transition: opacity 0.4s ease 0.15s;
}

.mega-panel.is-open .mega-panel__arch-frame {
    opacity: 1;
}

/* Thin horizontal rules — title-block separators */
.mega-panel__arch-frame::before,
.mega-panel__arch-frame::after {
    content: '';
    position: absolute;
    left: 36px;
    right: 36px;
    height: 1px;
    background: rgba(10, 17, 25, 0.1);
}
.mega-panel__arch-frame::before { top: 12px; }
.mega-panel__arch-frame::after  { bottom: 12px; }

/* L-bracket corners */
.mega-panel__corner {
    position: absolute;
    display: block;
    width: 36px;
    height: 36px;
}

.mega-panel__corner--tl {
    top: -1px; left: -1px;
    border-top:  1.5px solid rgba(10, 17, 25, 0.35);
    border-left: 1.5px solid rgba(10, 17, 25, 0.35);
}
.mega-panel__corner--tr {
    top: -1px; right: -1px;
    border-top:   1.5px solid rgba(10, 17, 25, 0.35);
    border-right: 1.5px solid rgba(10, 17, 25, 0.35);
}
.mega-panel__corner--bl {
    bottom: -1px; left: -1px;
    border-bottom: 1.5px solid rgba(10, 17, 25, 0.3);
    border-left:   1.5px solid rgba(10, 17, 25, 0.3);
}
.mega-panel__corner--br {
    bottom: -1px; right: -1px;
    border-bottom: 1.5px solid rgba(10, 17, 25, 0.25);
    border-right:  1.5px solid rgba(10, 17, 25, 0.25);
}

/* Cross registration marks at corner tips */
.mega-panel__corner::before,
.mega-panel__corner::after {
    content: '';
    position: absolute;
    background: rgba(10, 17, 25, 0.4);
}
.mega-panel__corner::before { width: 10px; height: 1px; }
.mega-panel__corner::after  { width: 1px; height: 10px; }

.mega-panel__corner--tl::before { bottom: -0.5px; right: -5px; }
.mega-panel__corner--tl::after  { right:  -0.5px; bottom: -5px; }
.mega-panel__corner--tr::before { bottom: -0.5px; left: -5px; }
.mega-panel__corner--tr::after  { left:   -0.5px; bottom: -5px; }
.mega-panel__corner--bl::before { top: -0.5px; right: -5px; }
.mega-panel__corner--bl::after  { right: -0.5px; top: -5px; }
.mega-panel__corner--br::before { top: -0.5px; left: -5px; }
.mega-panel__corner--br::after  { left: -0.5px; top: -5px; }

/* Sheet annotation labels */
.mega-panel__arch-info {
    position: absolute;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(10, 17, 25, 0.5);
    white-space: nowrap;
}
.mega-panel__arch-info--tl {
    top: 5px;
    left: 44px;
}
.mega-panel__arch-info--br {
    bottom: 5px;
    right: 44px;
}

/* Sidebar — tick marks on right edge */
.mega-panel__sidebar::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 8px;
    width: 100%;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.2) 0px, rgba(255, 255, 255, 0.2) 1px,
        transparent 1px, transparent 36px
    );
    pointer-events: none;
    z-index: 1;
}

.mega-panel__sidebar::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    height: 8px;
    width: 100%;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.2) 0px, rgba(255, 255, 255, 0.2) 1px,
        transparent 1px, transparent 36px
    );
    pointer-events: none;
    z-index: 1;
}

/* Inner grid — thin top rule */
.mega-panel__inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--space-12);
    right: var(--space-12);
    height: 1px;
    background: rgba(10, 17, 25, 0.08);
}


/* ---- Overlay ---- */
.mega-overlay {
    position: fixed;
    top: 88px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease, visibility 0s linear 0.35s;
    z-index: calc(var(--z-fixed) - 1);
    pointer-events: none;
}

.mega-overlay.is-active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: opacity 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease, visibility 0s linear 0s;
    pointer-events: auto;
}


/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .mega-panel { transition: none; }
    .mega-panel__links li {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}

/* ---- Mobile ---- */
@media (max-width: 1023px) {
    .mega-panel,
    .mega-overlay {
        display: none !important;
    }
}
