﻿/* ==========================================================
   PorchLight / Renter Navigator Header
   Global Component
   Mobile First
   ========================================================== */


/* ==========================================================
   Header
   ========================================================== */

.pl-header {
    position: relative;
    z-index: 100;
    width: 100%;
    background: var(--pl-blue);
}


.pl-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}


/* ==========================================================
   Logo
   ========================================================== */

.pl-header__logo {
    display: block;
    width: 110px;
}


    .pl-header__logo img {
        display: block;
        width: 100%;
        height: auto;
    }


/* ==========================================================
   Hamburger
   ========================================================== */

.pl-header__menu-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 48px;
    height: 48px;
    gap: 6px;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
}


    .pl-header__menu-button span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--pl-gold);
        transition: transform 200ms ease, opacity 200ms ease;
    }


    /* ==========================================================
   Hamburger -> X
   ========================================================== */

    .pl-header__menu-button[aria-expanded="true"]
    span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }


    .pl-header__menu-button[aria-expanded="true"]
    span:nth-child(2) {
        opacity: 0;
    }


    .pl-header__menu-button[aria-expanded="true"]
    span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }


/* ==========================================================
   Mobile Navigation
   ========================================================== */

.pl-header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 1rem calc(var(--grid-gutter) / 2);
    background: var(--pl-navy);
    text-align: center;
}


    .pl-header__nav.is-open {
        display: flex;
    }


    .pl-header__nav a {
        display: block;
        padding: 1.25rem 0;
        color: var(--pl-white);
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.2;
        text-decoration: none;
        text-transform: uppercase;
        transition: color .3s ease, color .3s ease;
    }


        .pl-header__nav a:hover {
            color: var(--pl-gold);
            text-decoration: underline;
        }


    /* ==========================================================
   Call to Action
   ========================================================== */

    .pl-header__nav .pl-header__cta {
        margin: 0.75rem auto;
        padding: 0.9rem 1.25rem;
        border-radius: 0.65rem;
        background: var(--pl-gold);
        color: var(--pl-navy);
        text-align: center;
        max-width: 188px;
    }


        .pl-header__nav .pl-header__cta:hover {
            color: var(--pl-navy);
            text-decoration: none;
        }


/* ==========================================================
   Desktop

   900px intentionally matches Chota's md breakpoint.
   ========================================================== */

@media (min-width: 900px) {

    .pl-header__inner {
        min-height: 122px;
    }


    .pl-header__logo {
        width: auto;
        height: 88px;
    }


    .pl-header__menu-button {
        display: none;
    }


    .pl-header__nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        padding: 0;
        background: transparent;
    }

        .pl-header__nav a {
            padding: 0;
            color: #FCF7F4;
            text-align: center;
            font-family: var(--font-family-body);
            font-size: 18px;
            font-style: normal;
            font-weight: 700;
            line-height: normal;
            letter-spacing: 0.9px;
            text-transform: uppercase;
        }


        .pl-header__nav .pl-header__cta {
            margin: 0;
            padding: 0.8rem 1.35rem;
        }
}


/* ==========================================================
   Reduced Motion
   ========================================================== */

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

    .pl-header__menu-button span {
        transition: none;
    }
}
