:root {
    --cream: #fafaf7;
    --dark: #121416;
    --yellow: #f2a900;
    --amber: #b87700;
    --grey: #ecece7;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--dark);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.wrap {
    max-width: 1280px;
    margin: auto;
    padding-left: 40px;
    padding-right: 40px;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 18px 40px;
    border-bottom: 1px solid #0002;
    background: #fafaf7f2;
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

    .brand strong {
        font-size: 21px;
        letter-spacing: -1px;
    }

    .brand span {
        margin-top: 7px;
        color: #d89000;
        text-transform: uppercase;
        letter-spacing: 7px;
        font-size: 11px;
        font-weight: 700;
    }

.site-header nav {
    margin-left: auto;
    display: flex;
    gap: 24px;
    font-size: 14px;
}

.pill {
    display: inline-block;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    border: 0;
}

.dark {
    background: var(--dark);
    color: white;
}

.menu {
    display: none;
}

/* HERO */

.hero {
    min-height: 82vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 90px;
    padding-bottom: 45px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 12px;
    font-weight: 800;
    color: var(--amber);
}

h1 {
    font-size: clamp(70px, 10vw, 145px);
    line-height: 0.78;
    letter-spacing: -8px;
    text-transform: uppercase;
    margin: 20px 0;
}

.hero-foot {
    border-top: 2px solid;
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

    .hero-foot h2 {
        font-size: 38px;
        margin: 0;
    }

    .hero-foot b {
        display: inline-grid;
        place-items: center;
        background: var(--yellow);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        margin-left: 12px;
    }

/* SECTIONS */

.section {
    padding-top: 110px;
    padding-bottom: 110px;
}

.dark-section {
    background: var(--dark);
    color: white;
}

.grey-section {
    background: var(--grey);
}

.white-section {
    background: white;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.display {
    font-size: clamp(52px, 7vw, 92px);
    line-height: 0.9;
    letter-spacing: -5px;
    text-transform: uppercase;
    margin: 0;
}

.large {
    font-size: 22px;
}

.muted {
    color: #121416a8;
}

.muted-light {
    color: #ffffffb0;
}

.white,
.black {
    color: inherit;
}

/* ROUTES */

.routes {
    border-top: 1px solid;
}

    .routes a {
        display: grid;
        grid-template-columns: 60px 1fr 1fr 50px;
        gap: 20px;
        align-items: center;
        padding: 32px 15px;
        border-bottom: 1px solid #0004;
    }

        .routes a:hover {
            background: var(--yellow);
        }

    .routes strong {
        font-size: 30px;
        letter-spacing: -1px;
    }

/* IMAGES */

.image-box {
    min-height: 420px;
}

    .image-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .image-box.panel img {
        object-fit: contain;
        padding: 30px;
    }

/* CHIPS */

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 30px;
}

    .chips span {
        border: 1px solid #0005;
        border-radius: 999px;
        padding: 8px 14px;
        font-weight: 700;
        font-size: 14px;
    }

/* PRODUCT GRID */

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #0002;
    margin-top: 50px;
}

    .product-grid article {
        background: var(--cream);
        padding: 45px;
    }

    .product-grid em {
        font-style: normal;
        font-size: 68px;
        font-weight: 900;
        letter-spacing: -4px;
    }

/* CARDS */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 50px;
}

    .cards article {
        min-height: 280px;
        border-radius: 24px;
        padding: 30px;
        background: var(--dark);
        color: white;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

        .cards article:nth-child(even) {
            background: var(--grey);
            color: var(--dark);
        }

    .cards small {
        color: var(--yellow);
        font-weight: 800;
    }

    .cards h3 {
        font-size: 30px;
        margin: 90px 0 0;
    }

/* GALLERY */

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 50px;
}

    .gallery figure {
        margin: 0;
        background: #ffffff0d;
    }

    .gallery img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        display: block;
    }

    .gallery figcaption {
        padding: 16px;
        font-weight: 700;
    }

.yellow {
    color: var(--yellow);
}

/* CONTACT FORM */

.contact {
    background: var(--yellow);
}

form {
    background: var(--cream);
    padding: 40px;
    border-radius: 30px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 22px;
}

input,
textarea,
select {
    width: 100%;
    border: 0;
    border-bottom: 2px solid;
    padding: 12px 2px;
    background: transparent;
    outline: none;
    margin-top: 5px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* FOOTER */

footer {
    background: var(--dark);
    color: white;
    padding: 50px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

.inverse span {
    color: var(--yellow);
}

.legal {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #fff3;
    color: #fff7;
    font-size: 12px;
}

/* PRODUCT FAMILIES */

.product-families article {
    min-height: 520px;
}

.product-families img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #fafaf7;
    border-radius: 14px;
    margin-bottom: 22px;
}

.product-families article:nth-child(2) {
    background: #121416;
    color: white;
}

    .product-families article:nth-child(2) p {
        color: #fff9;
    }

.product-families article small {
    color: #f2a900;
}

.product-families h3 {
    margin-top: 12px;
}

/* TABLET AND MOBILE */

@media (max-width: 900px) {

    .site-header nav {
        display: none;
    }

    .menu {
        display: block;
        margin-left: auto;
    }

    .site-header > .pill {
        display: none;
    }

    .wrap {
        padding-left: 22px;
        padding-right: 22px;
    }

    .site-header {
        padding: 16px 22px;
    }

    .split,
    .product-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .routes a {
        grid-template-columns: 40px 1fr 30px;
    }

        .routes a span {
            display: none;
        }

    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
    }

    .display {
        letter-spacing: -3px;
    }

    .hero-foot {
        align-items: flex-start;
        gap: 25px;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    /*
     * Add breathing room above "SOLAR IS PRETTY SIMPLE."
     * This targets only the black section immediately after #home.
     */
    #home + .dark-section {
        padding-top: 35px;
        padding-bottom: 35px;
    }

    /*
     * In the lightweight section, place the text above the image.
     * The HTML contains the image first and the text second, so
     * column-reverse swaps their visual order on tablet/mobile.
     */
    #lightweight > .wrap.split {
        display: flex;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 30px;
    }
}

/* SMALL MOBILE */

@media (max-width: 560px) {

    h1 {
        letter-spacing: -5px;
    }

    .cards,
    .gallery {
        grid-template-columns: 1fr;
    }

    .section {
        padding-top: 75px;
        padding-bottom: 75px;
    }

    .display {
        font-size: 48px;
    }

    .hero {
        min-height: 72vh;
    }

    .image-box {
        min-height: 300px;
    }
}
