/* =================================
   CODCHEM HEADER
   Design: pink brand gradient
================================= */


/* Astra's theme-wide link defaults can force an underline back on
   hover/focus; keep every header + mobile-overlay link/button clear
   of it regardless of state. */

.codchem-header a,
.codchem-header a:hover,
.codchem-header a:focus,
.codchem-header button,
#codchem-mobile-overlay a,
#codchem-mobile-overlay a:hover,
#codchem-mobile-overlay a:focus {

    text-decoration: none;

}

/* Default: a normal full-width header, flush against the top of the page */

.codchem-header {

    position: fixed;
    top: 0;
    left: 0;

    transform: translateX(0);

    width: 100%;
    max-width: none;

    z-index: 9999;

    border-radius: 0;

    background: rgba(255, 255, 255, .42);

    -webkit-backdrop-filter: saturate(220%) blur(28px);
    backdrop-filter: saturate(220%) blur(28px);

    border: 1px solid rgba(255, 255, 255, .5);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .65),
        0 12px 34px -18px rgba(13, 19, 33, .35);

    transition:
        top .5s var(--codchem-ease),
        left .5s var(--codchem-ease),
        transform .5s var(--codchem-ease),
        width .5s var(--codchem-ease),
        max-width .5s var(--codchem-ease),
        border-radius .5s var(--codchem-ease),
        background .45s var(--codchem-ease),
        box-shadow .45s var(--codchem-ease),
        border-color .45s var(--codchem-ease);

}


/* Once scrolled past the hero section, morph into the floating rounded card */

body.codchem-header-visible .codchem-header {

    top: 16px;
    left: 50%;

    transform: translateX(-50%);

    width: calc(100% - 32px);
    max-width: 1260px;

    border-radius: 20px;

}


/* stays fixed and visible at all times while scrolling — always in view */

body.codchem-scrolled .codchem-header {

    background: rgba(255, 255, 255, .68);

    border-color: var(--codchem-line);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .65),
        0 18px 50px -34px rgba(13, 19, 33, .85);

}


.codchem-header-container {

    max-width: 1200px;

    margin: auto;

    padding: 16px 30px;

    display: flex;

    align-items: center;

    gap: 16px;

    transition:
        padding .4s var(--codchem-ease);

}


body.codchem-scrolled .codchem-header-container {

    padding-top: 10px;

    padding-bottom: 10px;

}


/* Reserve space so the fixed floating header doesn't overlap page content */

.site-content {

    padding-top: 104px;

}


/* scroll progress line */

.codchem-progress {

    position: absolute;

    left: 0;

    bottom: -1px;

    height: 2px;

    width: 100%;

    transform: scaleX(0);

    transform-origin: left;

    background: linear-gradient(90deg, var(--codchem-red), var(--codchem-orange), var(--codchem-gold));

    z-index: 5;

}



/* ===============================
   LOGO
================================ */


.codchem-logo {

    flex: none;

}


.codchem-logo a {

    display: flex;

    align-items: center;

    gap: 12px;

    text-decoration: none;

    white-space: nowrap;

}


.codchem-logo img {

    max-width: 180px;

    transition:
        transform .5s var(--codchem-ease);

}


.codchem-logo a:hover img {

    transform: scale(1.06);

}


body.codchem-scrolled .codchem-logo img {

    transform: scale(.92);

}



/* ===============================
   MENU — top level links + gliding spotlight pill
================================ */


.codchem-menu {

    position: relative;

    display: flex;

    align-items: center;

    gap: 2px;

    margin: 0 auto 0 8px;

    padding: 0;

    list-style: none;

}


.codchem-menu > .menu-item {

    position: relative;

}


.codchem-menu > .menu-item > .menu-link {

    position: relative;

    z-index: 2;

    display: flex;

    align-items: center;

    gap: 6px;

    padding: 8px 10px;

    border-radius: 999px;

    font-size: 14px;

    font-weight: 500;

    color: rgba(13, 19, 33, .72);

    text-decoration: none;

    white-space: nowrap;

    transition:
        color .35s var(--codchem-ease);

}


.codchem-menu > .menu-item > .menu-link:hover,
.codchem-menu > .menu-item:focus-within > .menu-link {

    color: var(--codchem-ink);

}


.codchem-menu > .current-menu-item > .menu-link,
.codchem-menu > .current-menu-ancestor > .menu-link {

    color: var(--codchem-ink);

    font-weight: 600;

}


/* caret for items with a dropdown */

.codchem-menu > .menu-item-has-children > .menu-link::before {

    content: "";

    width: 6px;

    height: 6px;

    order: 2;

    margin-left: 2px;

    border-right: 1.6px solid currentColor;

    border-bottom: 1.6px solid currentColor;

    transform: rotate(45deg) translateY(-1px);

    opacity: .5;

    transition:
        transform .4s var(--codchem-ease),
        opacity .3s;

}


.codchem-menu > .menu-item-has-children:hover > .menu-link::before {

    transform: rotate(225deg) translateY(-3px);

    opacity: 1;

}


/* gradient underline sweep */

.codchem-menu > .menu-item > .menu-link::after {

    content: "";

    position: absolute;

    left: 16px;

    right: 16px;

    bottom: 4px;

    height: 2px;

    border-radius: 2px;

    background: linear-gradient(90deg, var(--codchem-red), var(--codchem-orange), var(--codchem-gold));

    transform: scaleX(0);

    transform-origin: right;

    transition:
        transform .5s var(--codchem-ease);

}


.codchem-menu > .menu-item > .menu-link:hover::after,
.codchem-menu > .current-menu-item > .menu-link::after,
.codchem-menu > .current-menu-ancestor > .menu-link::after {

    transform: scaleX(1);

    transform-origin: left;

}


/* the pill that glides between items on hover */

.codchem-pill {

    position: absolute;

    z-index: 1;

    top: 50%;

    left: 0;

    height: 38px;

    width: 0;

    transform: translateY(-50%);

    border-radius: 999px;

    background: rgba(13, 19, 33, .055);

    opacity: 0;

    pointer-events: none;

    transition:
        width .45s var(--codchem-ease),
        left .45s var(--codchem-ease),
        opacity .3s ease;

}



/* ===============================
   DROPDOWNS (active once a menu item has children)
================================ */


.codchem-menu .sub-menu {

    position: absolute;

    top: calc(100% + 14px);

    left: 0;

    min-width: 250px;

    margin: 0;

    padding: 10px;

    list-style: none;

    background: rgba(255, 255, 255, .96);

    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);

    border: 1px solid var(--codchem-line);

    border-radius: 18px;

    box-shadow: 0 30px 70px -34px rgba(13, 19, 33, .6), 0 2px 6px rgba(13, 19, 33, .05);

    opacity: 0;

    visibility: hidden;

    transform: translateY(12px) scale(.985);

    transition:
        opacity .38s var(--codchem-ease),
        transform .38s var(--codchem-ease),
        visibility .38s;

    z-index: 60;

}


/* invisible hover bridge so the pointer can travel down to the dropdown */

.codchem-menu > .menu-item-has-children::after {

    content: "";

    position: absolute;

    left: 0;

    right: 0;

    top: 100%;

    height: 16px;

}


.codchem-menu > .menu-item-has-children:hover > .sub-menu,
.codchem-menu > .menu-item-has-children:focus-within > .sub-menu {

    opacity: 1;

    visibility: visible;

    transform: translateY(0) scale(1);

}


.codchem-menu .sub-menu > .menu-item {

    opacity: 0;

    transform: translateY(10px);

    transition:
        opacity .4s var(--codchem-ease),
        transform .4s var(--codchem-ease);

}


.codchem-menu > .menu-item-has-children:hover > .sub-menu > .menu-item,
.codchem-menu > .menu-item-has-children:focus-within > .sub-menu > .menu-item {

    opacity: 1;

    transform: none;

}


.codchem-menu .sub-menu > .menu-item:nth-child(1) { transition-delay: .05s; }
.codchem-menu .sub-menu > .menu-item:nth-child(2) { transition-delay: .09s; }
.codchem-menu .sub-menu > .menu-item:nth-child(3) { transition-delay: .13s; }
.codchem-menu .sub-menu > .menu-item:nth-child(4) { transition-delay: .17s; }
.codchem-menu .sub-menu > .menu-item:nth-child(5) { transition-delay: .21s; }
.codchem-menu .sub-menu > .menu-item:nth-child(6) { transition-delay: .25s; }


.codchem-menu .sub-menu .menu-link {

    position: relative;

    display: flex;

    align-items: center;

    padding: 11px 14px 11px 26px;

    border-radius: 12px;

    font-size: 14px;

    font-weight: 500;

    color: rgba(13, 19, 33, .7);

    text-decoration: none;

    white-space: nowrap;

    transition:
        background .3s var(--codchem-ease),
        color .3s,
        transform .35s var(--codchem-ease);

}


.codchem-menu .sub-menu .menu-link::before {

    content: "";

    position: absolute;

    left: 12px;

    top: 50%;

    margin-top: -3px;

    width: 6px;

    height: 6px;

    border-radius: 50%;

    background: linear-gradient(135deg, var(--codchem-red), var(--codchem-gold));

    transform: scale(0);

    transition:
        transform .35s var(--codchem-ease);

}


.codchem-menu .sub-menu .menu-link:hover {

    color: var(--codchem-ink);

    transform: translateX(4px);

    background: linear-gradient(90deg, rgba(236, 8, 114, .08), rgba(255, 159, 209, .06));

}


.codchem-menu .sub-menu .menu-link:hover::before {

    transform: scale(1);

}


/* keep the last dropdowns inside the viewport */

.codchem-menu > .menu-item:nth-last-child(-n+2) .sub-menu {

    left: auto;

    right: 0;

}


/* mega menu — add the "mega-menu" CSS class to a parent item in Appearance > Menus */

.codchem-menu > .mega-menu {

    position: static;

}


.codchem-menu > .mega-menu > .sub-menu {

    left: 50%;

    right: auto;

    width: min(780px, calc(100vw - 48px));

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 2px;

    padding: 16px;

    transform: translateX(-50%) translateY(12px) scale(.985);

}


.codchem-menu > .mega-menu:hover > .sub-menu,
.codchem-menu > .mega-menu:focus-within > .sub-menu {

    transform: translateX(-50%) translateY(0) scale(1);

}


.codchem-menu > .mega-menu > .sub-menu .menu-link {

    white-space: normal;

}



/* ===============================
   HEADER EXTRAS — phone + CTA
================================ */


.codchem-header-extras {

    display: flex;

    align-items: center;

    gap: 14px;

    margin-left: auto;

    flex: none;

}


.codchem-phone {

    font-size: 13.5px;

    font-weight: 500;

    color: rgba(13, 19, 33, .55);

    text-decoration: none;

    white-space: nowrap;

    transition: color .3s;

}


.codchem-phone:hover {

    color: var(--codchem-red);

}


.codchem-cta {

    position: relative;

    overflow: hidden;

    isolation: isolate;

    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 11px 20px;

    border-radius: 999px;

    font-size: 13.5px;

    font-weight: 600;

    color: #fff;

    text-decoration: none;

    white-space: nowrap;

    background: var(--codchem-ink);

    transition:
        transform .4s var(--codchem-ease),
        box-shadow .4s var(--codchem-ease);

}


.codchem-cta::before {

    content: "";

    position: absolute;

    inset: 0;

    z-index: -1;

    background: linear-gradient(120deg, var(--codchem-red), var(--codchem-orange), var(--codchem-gold));

    transform: translateY(101%);

    transition: transform .45s var(--codchem-ease);

}


.codchem-cta:hover {

    color: #fff;

    transform: translateY(-2px);

    box-shadow: 0 14px 30px -14px rgba(236, 8, 114, .9);

}


.codchem-cta:hover::before {

    transform: translateY(0);

}



/* ===============================
   HAMBURGER (mobile)
================================ */


.codchem-mobile-toggle {

    display: none;

    margin-left: auto;

    width: 46px;

    height: 46px;

    padding: 0;

    border: 1px solid var(--codchem-line);

    border-radius: 14px;

    background: rgba(255, 255, 255, .7);

    align-items: center;

    justify-content: center;

    cursor: pointer;

    transition:
        background .3s,
        border-color .3s,
        transform .3s var(--codchem-ease);

}


.codchem-mobile-toggle:hover {

    transform: scale(1.05);

}


.codchem-bars {

    position: relative;

    width: 20px;

    height: 14px;

    display: block;

}


.codchem-bars i {

    position: absolute;

    left: 0;

    height: 2px;

    border-radius: 2px;

    background: var(--codchem-ink);

    transition:
        transform .45s var(--codchem-ease),
        width .45s var(--codchem-ease),
        opacity .3s;

}


.codchem-bars i:nth-child(1) { top: 0; width: 20px; }
.codchem-bars i:nth-child(2) { top: 6px; width: 14px; }
.codchem-bars i:nth-child(3) { top: 12px; width: 20px; }


.codchem-mobile-toggle:hover .codchem-bars i:nth-child(2) {

    width: 20px;

}


body.codchem-menu-open .codchem-bars i {

    background: #fff;

}


body.codchem-menu-open .codchem-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.codchem-menu-open .codchem-bars i:nth-child(2) { opacity: 0; transform: translateX(-10px); }
body.codchem-menu-open .codchem-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


body.codchem-menu-open .codchem-mobile-toggle {

    background: transparent;

    border-color: rgba(255, 255, 255, .25);

}



/* ===============================
   FULL-SCREEN MOBILE OVERLAY
================================ */


#codchem-mobile-overlay {

    position: fixed;

    inset: 0;

    z-index: 9998;

    background: radial-gradient(120% 90% at 85% 0%, #1b2438 0%, #0d1321 55%, #080b12 100%);

    clip-path: circle(0% at calc(100% - 46px) 46px);

    transition: clip-path .85s var(--codchem-ease);

    overflow-y: auto;

    overscroll-behavior: contain;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 110px 26px 60px;

}


body.codchem-menu-open #codchem-mobile-overlay {

    clip-path: circle(150% at calc(100% - 46px) 46px);

}


#codchem-mobile-overlay::before {

    content: "";

    position: absolute;

    top: -120px;

    right: -120px;

    width: 380px;

    height: 380px;

    border-radius: 50%;

    filter: blur(110px);

    opacity: .45;

    pointer-events: none;

    background: radial-gradient(circle, var(--codchem-orange), transparent 65%);

}


.codchem-ov-list {

    list-style: none;

    margin: 0;

    padding: 0;

    position: relative;

    z-index: 2;

}


.codchem-ov-list > li {

    border-bottom: 1px solid rgba(255, 255, 255, .08);

    opacity: 0;

    transform: translateY(26px);

    transition:
        opacity .6s var(--codchem-ease),
        transform .6s var(--codchem-ease);

    transition-delay: calc(.07s * var(--i));

}


body.codchem-menu-open .codchem-ov-list > li {

    opacity: 1;

    transform: none;

}


.codchem-ov-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 14px;

}


.codchem-ov-row > a {

    flex: 1;

    display: block;

    padding: 17px 0;

    text-decoration: none;

    font-size: 26px;

    font-weight: 600;

    letter-spacing: -.01em;

    color: rgba(255, 255, 255, .9);

    transition:
        color .3s,
        transform .4s var(--codchem-ease);

}


.codchem-ov-row > a:hover {

    color: var(--codchem-gold);

    transform: translateX(8px);

}


.codchem-ov-num {

    font-size: 11px;

    font-weight: 600;

    letter-spacing: .2em;

    color: rgba(255, 255, 255, .28);

    min-width: 26px;

}


.codchem-ov-toggle {

    width: 38px;

    height: 38px;

    flex: none;

    border: 1px solid rgba(255, 255, 255, .18);

    border-radius: 50%;

    background: transparent;

    color: #fff;

    cursor: pointer;

    display: grid;

    place-items: center;

    transition: .35s var(--codchem-ease);

}


.codchem-ov-toggle span {

    position: relative;

    width: 12px;

    height: 12px;

    display: block;

}


.codchem-ov-toggle span::before,
.codchem-ov-toggle span::after {

    content: "";

    position: absolute;

    left: 0;

    top: 5px;

    width: 12px;

    height: 2px;

    background: #fff;

    border-radius: 2px;

    transition: transform .4s var(--codchem-ease);

}


.codchem-ov-toggle span::after {

    transform: rotate(90deg);

}


.codchem-ov-item.open .codchem-ov-toggle {

    background: var(--codchem-red);

    border-color: var(--codchem-red);

    transform: rotate(180deg);

}


.codchem-ov-item.open .codchem-ov-toggle span::after {

    transform: rotate(0deg);

}


.codchem-ov-sub {

    list-style: none;

    margin: 0;

    padding: 0 0 6px;

    max-height: 0;

    overflow: hidden;

    transition: max-height .55s var(--codchem-ease);

}


.codchem-ov-item.open .codchem-ov-sub {

    max-height: 520px;

}


.codchem-ov-sub a {

    display: block;

    padding: 9px 0 9px 18px;

    text-decoration: none;

    font-size: 15px;

    color: rgba(255, 255, 255, .55);

    border-left: 1px solid rgba(255, 255, 255, .12);

    transition:
        color .3s,
        border-color .3s,
        padding-left .3s var(--codchem-ease);

}


.codchem-ov-sub a:hover {

    color: #fff;

    border-color: var(--codchem-gold);

    padding-left: 24px;

}


.codchem-ov-foot {

    margin-top: 34px;

    display: flex;

    flex-wrap: wrap;

    gap: 14px;

    align-items: center;

    position: relative;

    z-index: 2;

    opacity: 0;

    transform: translateY(20px);

    transition:
        opacity .6s var(--codchem-ease) .5s,
        transform .6s var(--codchem-ease) .5s;

}


body.codchem-menu-open .codchem-ov-foot {

    opacity: 1;

    transform: none;

}


.codchem-ov-foot a {

    padding: 13px 24px;

    border-radius: 999px;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

}


.codchem-ov-foot .codchem-ov-call {

    border: 1px solid rgba(255, 255, 255, .22);

    color: #fff;

}


.codchem-ov-foot .codchem-ov-quote {

    background: linear-gradient(120deg, var(--codchem-red), var(--codchem-orange));

    color: #fff;

}


.codchem-ov-tag {

    width: 100%;

    margin-top: 8px;

    font-size: 12px;

    letter-spacing: .22em;

    text-transform: uppercase;

    color: rgba(255, 255, 255, .3);

}


body.codchem-menu-open {

    overflow: hidden;

}



/* ===============================
   RESPONSIVE SWITCH
================================ */


@media (max-width: 1240px) {

    .codchem-menu,
    .codchem-header-extras,
    .codchem-pill {

        display: none !important;

    }

    .codchem-mobile-toggle {

        display: flex;

    }

}


@media (min-width: 1241px) {

    #codchem-mobile-overlay {

        display: none;

    }

}



/* ===============================
   ACCESSIBILITY
================================ */


.codchem-menu a:focus-visible,
.codchem-ov-row > a:focus-visible,
.codchem-mobile-toggle:focus-visible {

    outline: 2px solid var(--codchem-gold);

    outline-offset: 3px;

    border-radius: 8px;

}


@media (prefers-reduced-motion: reduce) {

    .codchem-header,
    .codchem-menu *,
    .codchem-ov-list *,
    #codchem-mobile-overlay {

        transition-duration: .01ms !important;

    }

}
