/* Header Navigation 
=============================== */
#primary-nav {
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    background: transparent;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
    padding: 0;
}

/* Header layout 
------------------------------- */
.site-header {
    position: fixed;
    background: var(--bg-80);
    backdrop-filter: blur(8px);
    padding: 0.5em; /* desktop only */
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo 
------------------------------- */
.header-brand {
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.header-brand .custom-logo {
    max-height: 100px;
    width: auto;
    display: block;
}
.header-brand a:hover {
    filter: brightness(1);
}
.mobile-nav-brand {
    display: none;
}

/* Main Nav + CTA button
------------------------------- */
.header-nav {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    width: auto;
    height: auto;
    flex: 1;
    display: flex;
    justify-content: right;
    gap: 3em;
}

/* Main Nav */
.nav-links,
.nav-menu {
    display: flex;
    align-items: center;
    gap: 3em;
}

.mobile-nav-inner {
    display: flex;
    gap: 2em;
}

/* CTA button */
.header-cta {
    background: var(--tertiary-100);
    color: var(--primary-100);
    outline: 1px solid var(--tertiary-100);
}
.header-cta:hover {
    filter: brightness(0.9);
}

/* Hamburger button - Hidden
------------------------------- */
.nav-toggle {
    display: none;
    background: transparent;
    padding: 12px 6px 6px;
    border: 0;
    cursor: pointer;
    color: var(--primary-100);   
}
.nav-toggle .icon { 
    display: block; 
}
.nav-toggle .icon-close { 
    display: none; 
}

/* Accessibility helper */
.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border:0;
}

/* Main Content 
=============================== */
.main-content {
    padding-top: 92px;
}

/* Pre-Footer Section 
=============================== */
.pre-footer-cta {
    background: linear-gradient(0deg, var(--bg-accent-yl) 75%, var(--bg-100) 100%);
    text-align: center;
    padding: 100px 2em;
}
.cta-inner {
    max-width: 900px;
    margin: auto;
}
.cta-inner p {
    margin-bottom: 2em;
}
/* CTA button */
.footer-cta {
    margin: auto;
}
.cta-inner a:hover {
    filter: brightness(0.9);
}

/* Footer Section 
=============================== */
footer {
    background: var(--bg-100);
    margin: 0;
}
footer h3 {
    margin: 0;
}
.footer-top,
.footer-bottom {
    display: flex;
    justify-content: space-between;
}

/* Footer Top */
.footer-top {
    padding: 3em 1em;
    max-width: 1160px;
    margin: auto;
}
.footer-links {
    /* display: grid;
    grid-template-columns: 1fr 1fr; */
    display: flex;
    gap: 2em;
}
.footer-links ul {
    margin: 0;
    padding-right: 3em;
}
.footer-links li {
    margin-bottom: 0.6em;
}

/* Footer Newsletter */
.input-wrapper {
    position: relative;
    width: 450px;
    display: flex;
    align-items: center;
    border: 1px solid var(--outline-80);
    border-radius: 999px;
}
.input-wrapper input {
    width: 100%;
    padding: 1em;
    border: none;
    outline: none;
    font-size: 1em;
    background-color: var(--white);
    border-radius: 999px;
}
.input-wrapper button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    border: none;
    background-color: var(--white);
    border-radius: 0 999px 999px 0;
    padding: 1em 1.5em 1em 1em;
    cursor: pointer;
}
.input-wrapper button svg {
    margin-top: 6px;
}
.footer-newsletter h3 {
    margin-bottom: 0.5em;
}

/* Newsletter Button */
.footer-newsletter .pill {
    background-color: var(--white);
    outline: 1px solid var(--outline-100);
    transition: all 0.3s ease;
    gap: 1em;
}
.footer-newsletter .pill:hover {
    background-color: var(--outline-80);
    outline: 1px solid var(--outline-80);
    filter: brightness(1)
}

/* Footer Bottom */
.footer-bottom {
    align-items: center;
    border-top: 1px solid var(--outline-80);
}
.footer-bottom-container {
    width: 1160px;
    display: flex;
    justify-content: space-between;
    margin: auto;
    padding: 0.5em 1em;
}
.footer-bottom a {
    font-weight: 400;
}
.footer-socials,
.footer-copyright {
    display: flex;
    align-items: center;
    gap: 2em;
    font-size: 0.8em;
}
.footer-copyright,
.footer-copyright a {
    color: var(--secondary-100);
}
.footer-socials {
    margin-top: 0.4em;
}

/* Convertkit Newsletter
=============================== */
.footer-newsletter-form {
    max-width: 400px;
    width: 100%;
}

.formkit-form[data-uid="5ff7ac551c"] .formkit-submit {
    background-color: var(--accent-yl) !important;
    border-radius: 999px !important;
    font-size: 1em !important;
    font-weight: 700 !important;
}

.formkit-field .formkit-input{
    border-radius: 999px !important;
    padding: 1em 1.5em !important;
    border-color: var(--outline-80) !important;
    padding: 1em 1.5em !important;
    color: var(--secondary-100) !important;
    font-size: 1em !important;
}

.formkit-submit span {
    padding: 1em 1.5em !important;
}

.footer-newsletter-form button,
.footer-newsletter-form input[type="submit"] {
    width: 100%;
    border: 0;
    border-radius: 999px;
    background-color: var(--accent-yl) !important;
    border-radius: 999px !important;
    font-size: 1em !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}

.formkit-form[data-uid="5ff7ac551c"] .formkit-powered-by-convertkit-container {
    display: none !important;
}

/* Large Screens 
=============================== */
@media only screen and (max-width: 1200px) {
    .site-header {
        padding: 0.5em 1em;
    }
}

/* Small Screens
=============================== */
@media only screen and (max-width: 997px) {
    .site-header {
        position: fixed;
        padding: 0.5em 1em;
    }

    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .header-brand {
        order: 1;
        flex: 0 0 auto;
    }

    .header-brand .custom-logo {
        max-height: 72px;
        width: auto;
        display: block;
    }

    .nav-toggle {
        order: 2;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        position: relative;
        z-index: 1003;
    }

    .nav-toggle .icon-close {
        display: none;
    }

    .nav-toggle.is-open .icon-hamburger {
        display: none;
    }

    .nav-toggle.is-open .icon-close {
        display: block;
    }

    /* force mobile nav hidden by default */
    #primary-nav.header-nav {
        display: none !important;
    }

    /* only show when opened */
    #primary-nav.header-nav.is-open {
        display: flex !important;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100dvh;
        z-index: 1002;
        background: var(--bg-100);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 1.5rem;
        padding: 5em 1.5rem 2rem;
        overflow-y: auto;
        justify-content: start;
    }

    #primary-nav.header-nav.is-open .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin: 0 0 1rem;
        padding: 0;
    }

    #primary-nav.header-nav.is-open .nav-menu li {
        margin: 0;
    }

    #primary-nav.header-nav.is-open .nav-menu a,
    #primary-nav.header-nav.is-open .header-cta {
        line-height: 1.2;
        text-decoration: none;
        color: var(--primary-100);
    }

    #primary-nav.header-nav.is-open .nav-menu a {
        font-size: 1.3em;
        font-family: "Noto Serif", serif;
    }

    #primary-nav.header-nav.is-open .header-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.5rem;
    }

    body.menu-open {
        overflow: hidden;
        height: 100vh;
    }
    body.menu-open .header-brand {
        display: none;
    }

    .mobile-nav-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        gap: 2rem;
        width: 100%;
    }

    .mobile-nav-brand {
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 0 0 1rem;
    }

    .mobile-nav-brand .logo-link,
    .mobile-nav-brand .custom-logo-link {
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }

    .mobile-nav-brand .custom-logo {
        max-height: 72px;
        width: auto;
        display: block;
    }
}

@media only screen and (max-width: 768px) {
    .pre-footer-cta {
        padding: 40px 2em 60px;
    }
    .footer-newsletter h3 {
        font-size: 1.3em;
        margin-bottom: 0.8em;
    }
    .footer-top {
        display: grid;
        grid-template-columns: 2fr 1fr;
    }
    .footer-links {
        gap: 0;
        flex-direction: column;
    }
    .footer-links ul {
        padding-right: 0;
    }
}

@media only screen and (max-width: 480px) {
    .footer-top {
        display: flex;
    }
    .footer-copyright {
        flex-direction: column;
        gap: 8px;
        height: 90px;
    }
    .footer-copyright a {
        text-decoration: underline;
    }
    .footer-copyright p:nth-of-type(2) {
        display: none;
    }
}