/* ---------------------------- CSS RERSET ------------------------------- */

*, *:before, *:after {
    box-sizing: border-box;
}
* {
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    background-color: #FAF7F2;
    overflow-x: hidden;
}
img {
    max-width: 100%;
    display: block;
}
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* accessibility for keyboards */
a:focus {
  outline: 2px solid #1E1E1E;
  outline-offset: 2px;
}

button {
    cursor: pointer;
}

/* ---------------------------- FONTS ------------------------------- */

@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/inter-regular-webfont.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/inter-medium-webfont.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/inter-semibold-webfont.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Playfair Display";
    src: url("../assets/fonts/playfairdisplay-bold-webfont.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------------------------- FONT SIZING ------------------------------- */

h1 , h2 , h3 , h4 {
    font-family: "Playfair Display";
    color: #1E1E1E;
}

p { 
    font-family: "Inter";
    font-weight: 400;
    line-height: 1.6;
    font-size: 1rem;
    color: #1E1E1E;
}

h1 {
    font-size: 2.6rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.3rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.4rem;
    line-height: 1.3;
}

h4 {
    font-size: 1.1rem;
    line-height: 1.3;
}

a {
    font-family: "Inter";
    font-weight: 400;
    line-height: 1.6;
    color: #008080;
    text-decoration: none;
}

ul, li {
    list-style: none;
}

/* ---------------------------- SPACING ------------------------------- */

.container {
    padding: 3rem 1rem;
}

/* ----------------------- FADE IN ANIMATION --------------------- */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------- BUTTONS ------------------------------- */

.btn {
    font-weight: 600;
    color: white;
    background-color: #008080;
    padding: 1rem;
    border-radius: 5px;
    text-transform: uppercase;
    width: fit-content;
    font-size: 15px;
    transition: background-color 0.3s ease;
}

.btn {
    touch-action: manipulation;
}

.btn:hover {
    background-color: #006666;
}

.btn.btn-secondary {
    background-color: rgba(255, 255, 255, 0);
    border: 2px solid #008080;
    padding: 0.8rem;
    color: #1E1E1E;
}

/* ----------------------- HEADER --------------------- */

.site-header {
    background-color: #1E1E1E; /* Charcoal */
    position: sticky;
    top: 0;
    z-index: 10;
}

.container.header-inner {
    padding: 1rem;
}

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

.logo img {
    height: 45px;
    width: 150px;
}

/* Toggle visible on mobile */
.nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle svg {
    width: 35px;
    height: 35px;
    stroke: #008080; /* Teal accent */
}

/* Mobile sliding panel */
.nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;

    background: #1E1E1E;
    padding: 2rem;

    transform: translateX(100%);
    transition: transform 0.3s ease;

    z-index: 20;
}

/* Open state */
.nav.active {
    transform: translateX(0);
}


.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;

    z-index: 15;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


.sub-nav-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sub-nav-list > li:first-child {
    padding-top: 1rem;
}

.sub-nav-link {
    color: white;
    font-size: 0.95rem;
    padding-left: 1rem;
}

.has-submenu.open .sub-nav-list {
    max-height: 500px; /* enough to show all items */
}

.nav-item-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.has-submenu.open .submenu-toggle {
    transform: rotate(45deg);
}
.submenu-toggle {
    transition: transform 0.3s ease;
}

/* Mobile nav layout */
.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-link {
    color: #FFFFFF; /* White text */
    text-decoration: none;
}


/* ----------------------- FOOTER --------------------- */

.footer {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: #1E1E1E;
}

.main-footer {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-branding {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-branding img {
    height: 45px;
    width: 150px;
}

.footer-branding p {
    color: white;
}

.footer-services,
.footer-quick-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-services h4,
.footer-quick-links h4 {
    color: white;
}

.footer-signature::before {
    content: "";
    display: block;
    margin-bottom: 1rem;
    height: 1px;
    width: 100%;
    background-color: #FAF7F2;
}

.footer-signature p{
    color: white;
    text-align: center;
}

.footer-services ul > li > a,
.footer-quick-links ul > li > a {
    font-weight: 500;
}

.footer-services ul > li > a:hover,
.footer-quick-links ul > li > a:hover {
    color: #006666;
    text-decoration: underline;
}

/* ---------------------------- TABLET ------------------------------- */

@media (min-width: 768px) {

    .container {
        padding: 3rem 4rem;
    }

    .container.header-inner {
        padding: 1rem 4rem;
    }

    .main-footer {
        flex-direction: row;
    }

    .footer-branding,
    .footer-services,
    .footer-quick-links {
        flex: 1;
    }

    .footer-branding {
        padding-right: 2rem;
    }

}

/* ---------------------------- LAPTOP ------------------------------- */

@media (min-width: 1024px) {

    p { 
        font-family: "Inter";
        font-weight: 400;
        line-height: 1.6;
        font-size: 1.2rem;
    }

    h1 {
        font-size: 3rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 2.3rem;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    h4 {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .container {
        padding: 4rem 6rem;
    }

    /* ---------------------- Header --------------------------------- */

    .nav {
        position: static;
        height: auto;
        width: auto;
        transform: none;
        background: none;
        padding: 0;
        display: block;
    }

    .nav-list {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }

    .nav-list a {
        font-weight: 500;
    }

    /* only top-level nav links */
    .nav-list > li > a.nav-link,
    .nav-item-with-toggle > a.nav-link {
        position: relative;
        display: inline-block;
        color: #FFFFFF;
        font-weight: 500;
        font-size: 1.2rem;
    }

    /* underline */
    .nav-list > li > a.nav-link::after,
    .nav-item-with-toggle > a.nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 0;
        height: 2px;
        background-color: #008080;
        transition: width 0.3s ease;
    }

    .nav-list > li > a.nav-link:hover::after,
    .nav-item-with-toggle > a.nav-link:hover::after {
        width: 100%;
    }

    .nav-list > li > a.nav-link:hover,
    .nav-item-with-toggle > a.nav-link:hover {
        color: #008080;
    }

    .has-submenu {
        position: relative;
    }

    .has-submenu::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 10px; /* bridge height */
    }

    .sub-nav-list {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;

        background: #1E1E1E;
        padding: 1rem;

        display: flex;
        flex-direction: column;
        gap: 0.5rem;

        min-width: 220px;

        max-height: none;
        overflow: visible;

        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);

        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .sub-nav-list a {
        font-size: 1.1rem;
    }

    .sub-nav-list a:hover {
        color: #008080;
    }

    .has-submenu:hover .sub-nav-list {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .submenu-toggle,
    .nav-toggle,
    .nav-overlay {
        display: none;
    }


    /* Footer spacing */
    .footer-branding {
        padding-right: 4rem;
        padding-left: 6rem;
    }
}

/* ---------------------------- DESKTOP ------------------------------- */

@media (min-width: 1440px) {

    p { 
        font-family: "Inter";
        font-weight: 400;
        line-height: 1.6;
        font-size: 1.2rem;
    }

    h1 {
        font-size: 3.6rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 2.3rem;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    h4 {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .container {
        padding: 4rem 12rem 4rem 12rem;
    }

    .container.header-inner {
        padding: 1rem 12rem;
    }

    .logo img {
        height: 55px;
        width: auto;
    }

    .footer-branding {
        padding-right: 4rem;
        padding-left: 8rem;
    }

}

/* ---------------------------- WIDE DESKTOP ------------------------------- */

@media (min-width: 1920px) { 

    .footer-branding {
        padding-right: 12rem;
        padding-left: 12rem;
    }

}