/* =========================================================
   GOOGLE FONTS
   Megrim — Made Livable header wordmark
   Italiana — Editorial headings
   Montserrat — Body text and interface elements
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Italiana&family=Megrim&family=Montserrat:wght@400;500;600;700&display=swap');

/* =================== END GOOGLE FONTS ==================== */


/* =========================================================
   MADE LIVABLE — MAIN STYLESHEET
   ========================================================= */


/* =========================================================
   1. DESIGN VARIABLES
   Brand colors and reusable values
   ========================================================= */

:root {
    --cream: #F5EFE7;
    --burgundy: #681C2A;
    --teal: #006D77;
    --near-black: #211A1B;
    --taupe: #A99B91;
    --brass: #B08A6A;
}

/* ================= END DESIGN VARIABLES ================= */


/* =========================================================
   2. GLOBAL RESET
   Removes browser default spacing and makes sizing predictable
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =================== END GLOBAL RESET ==================== */


/* =========================================================
   3. BASE PAGE STYLES
   Default appearance for the entire website
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cream);
    color: var(--near-black);
    line-height: 1.6;
}

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

/* ================= END BASE PAGE STYLES ================= */


/* =========================================================
   4. TYPOGRAPHY
   Global font assignments
   ========================================================= */

/* Editorial headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Italiana', serif;
    font-weight: 400;
}

/* Body copy and interface text */
body,
button,
input,
textarea {
    font-family: 'Montserrat', sans-serif;
}

/* ==================== END TYPOGRAPHY ===================== */


/* =========================================================
   5. SITE HEADER
   Logo + main navigation
   ========================================================= */

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

    min-height: 92px;

    padding: 12px 48px;

    background-color: var(--burgundy);
    border-bottom: 1px solid rgba(33, 26, 27, 0.12);
}

/* ---------------------------------------------------------
   Header wordmark
   Megrim with split teal + cream lettering
   --------------------------------------------------------- */

.header-wordmark {
    display: inline-block;

    font-family: 'Megrim', sans-serif;
    font-size: 2.5rem;
    line-height: 1;

    letter-spacing: 0.08em;
    white-space: nowrap;

    background: linear-gradient(
        135deg,
        var(--teal) 0%,
        var(--teal) 48%,
        var(--cream) 52%,
        var(--cream) 100%
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;

    /* Make the wordmark wider without making the header taller */
    transform: scaleX(1.32);
    transform-origin: left center;
}

/* ---------------------------------------------------------
   Main navigation
   --------------------------------------------------------- */

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    font-size: 0.78rem;
    font-weight: 600;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: var(--cream);

    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--teal);
}

/* ==================== END SITE HEADER ==================== */


/* =========================================================
   6. HERO SECTION
   Main homepage introduction
   ========================================================= */

.hero {
    position: relative;

    min-height: 72vh;

    display: flex;
    align-items: center;

    padding: 80px 48px;

    overflow: hidden;

    color: var(--cream);
}


/* ---------------------------------------------------------
   Hero background video
   --------------------------------------------------------- */

.hero-video {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    z-index: 0;
}


/* ---------------------------------------------------------
   Hero video overlay
   Adds contrast and Made Livable brand color
   --------------------------------------------------------- */

.hero-overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(33, 26, 27, 0.92) 0%,
        rgba(104, 28, 42, 0.70) 42%,
        rgba(33, 26, 27, 0.20) 100%
    );

    pointer-events: none;

    z-index: 1;
}


/* ---------------------------------------------------------
   Hero content wrapper
   Keeps text above the video and overlay
   --------------------------------------------------------- */

.hero-content {
    position: relative;

    max-width: 720px;

    z-index: 2;
}


/* ---------------------------------------------------------
   Hero eyebrow
   Small introductory line above the headline
   --------------------------------------------------------- */

.eyebrow {
    margin-bottom: 18px;

    font-size: 0.78rem;
    font-weight: 600;

    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: var(--teal);
}


/* ---------------------------------------------------------
   Hero headline
   --------------------------------------------------------- */

.hero h1 {
    margin-bottom: 24px;

    font-size: clamp(3.5rem, 7vw, 7rem);
    line-height: 0.95;

    color: var(--cream);
}


/* ---------------------------------------------------------
   Hero description
   --------------------------------------------------------- */

.hero-description {
    max-width: 560px;
    margin-bottom: 32px;

    font-size: 1rem;
    line-height: 1.8;

    color: rgba(245, 239, 231, 0.82);
}


/* ---------------------------------------------------------
   Hero button
   --------------------------------------------------------- */

.hero-button {
    display: inline-block;

    padding: 14px 22px;

    border: 1px solid var(--cream);

    font-size: 0.76rem;
    font-weight: 600;

    letter-spacing: 0.10em;
    text-transform: uppercase;

    color: var(--cream);

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.hero-button:hover {
    background-color: var(--cream);
    color: var(--burgundy);
}

/* ==================== END HERO SECTION ==================== */
/* =========================================================
   7. CATEGORY NAVIGATION
   Main Made Livable problem territories
   ========================================================= */

.category-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);

    background-color: var(--cream);

    border-top: 1px solid rgba(33, 26, 27, 0.10);
    border-bottom: 1px solid rgba(33, 26, 27, 0.10);
}


/* ---------------------------------------------------------
   Individual category
   --------------------------------------------------------- */

.category-item {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-height: 140px;

    padding: 24px 18px;

    text-align: center;

    border-right: 1px solid rgba(33, 26, 27, 0.10);

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.category-item:last-child {
    border-right: none;
}


/* ---------------------------------------------------------
   Category title
   --------------------------------------------------------- */

.category-title {
    margin-bottom: 8px;

    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 0.10em;
    text-transform: uppercase;

    color: var(--burgundy);
}


/* ---------------------------------------------------------
   Category description
   --------------------------------------------------------- */

.category-description {
    font-size: 0.66rem;
    line-height: 1.6;

    color: rgba(33, 26, 27, 0.68);
}


/* ---------------------------------------------------------
   Category hover
   --------------------------------------------------------- */

.category-item:hover {
    background-color: var(--burgundy);
}

.category-item:hover .category-title,
.category-item:hover .category-description {
    color: var(--cream);
}

/* ================= END CATEGORY NAVIGATION ================= */


/* =========================================================
   8. FEATURED GUIDES
   Primary editorial content
   ========================================================= */

.featured-guides {
    padding: 90px 48px 100px;

    background-color: var(--cream);
}


/* ---------------------------------------------------------
   Section heading
   --------------------------------------------------------- */

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 38px;
}

.section-eyebrow {
    margin-bottom: 8px;

    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: var(--burgundy);
}

.section-heading h2 {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    line-height: 1;

    color: var(--near-black);
}

.section-link {
    padding-bottom: 5px;

    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 0.10em;
    text-transform: uppercase;

    color: var(--burgundy);
}


/* ---------------------------------------------------------
   Featured article grid
   --------------------------------------------------------- */

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 28px;
}


/* ---------------------------------------------------------
   Temporary image placeholders
   --------------------------------------------------------- */

.image-placeholder {
    aspect-ratio: 16 / 10;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    background-color: rgba(104, 28, 42, 0.10);

    font-size: 0.68rem;
    font-weight: 600;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: var(--burgundy);
}


/* ---------------------------------------------------------
   Article category
   --------------------------------------------------------- */

.article-category {
    margin-bottom: 9px;

    font-size: 0.66rem;
    font-weight: 700;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: var(--teal);
}


/* ---------------------------------------------------------
   Article title
   --------------------------------------------------------- */

.featured-card h3 {
    margin-bottom: 12px;

    font-size: clamp(1.5rem, 2vw, 2.1rem);
    line-height: 1.08;
}

.featured-card h3 a {
    transition: color 0.2s ease;
}

.featured-card h3 a:hover {
    color: var(--burgundy);
}


/* ---------------------------------------------------------
   Article description
   --------------------------------------------------------- */

.article-description {
    max-width: 90%;

    font-size: 0.84rem;
    line-height: 1.7;

    color: rgba(33, 26, 27, 0.70);
}

/* ================= END FEATURED GUIDES ================= */


/* =========================================================
   9. EDITORIAL BRAND BAND
   Dark branded visual break
   ========================================================= */

.editorial-band {
    position: relative;

    min-height: 360px;

    display: flex;
    align-items: center;

    padding: 70px 48px;

    overflow: hidden;

    background: linear-gradient(
        90deg,
        var(--burgundy) 0%,
        #3b131b 58%,
        var(--near-black) 100%
    );

    color: var(--cream);
}


/* ---------------------------------------------------------
   Editorial content
   --------------------------------------------------------- */

.editorial-band-content {
    position: relative;

    max-width: 760px;

    z-index: 1;
}

.editorial-band .section-eyebrow {
    color: var(--cream);
    opacity: 0.72;
}

.editorial-band h2 {
    margin-bottom: 22px;

    font-size: clamp(2.8rem, 5vw, 5.5rem);
    line-height: 0.98;

    color: var(--cream);
}

.editorial-band-note {
    font-size: 0.78rem;
    font-weight: 500;

    letter-spacing: 0.10em;
    text-transform: uppercase;

    color: rgba(245, 239, 231, 0.72);
}

/* ================= END EDITORIAL BRAND BAND ================= */

/* =========================================================
   10. SMALL PROBLEM, BIG DIFFERENCE
   Compact practical topic discovery
   ========================================================= */

.small-problems {
    padding: 90px 48px 100px;

    background-color: var(--cream);
}


/* ---------------------------------------------------------
   Small problem grid
   --------------------------------------------------------- */

.small-problem-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);

    gap: 22px;
}


/* ---------------------------------------------------------
   Small problem placeholder
   Temporary visual block until photography is added
   --------------------------------------------------------- */

.small-problem-placeholder {
    aspect-ratio: 4 / 3;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 16px;

    background-color: rgba(0, 109, 119, 0.08);

    border: 1px solid rgba(33, 26, 27, 0.08);

    font-size: 0.64rem;
    font-weight: 600;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: var(--teal);
}


/* ---------------------------------------------------------
   Small problem title
   --------------------------------------------------------- */

.small-problem-card h3 {
    font-size: 1.15rem;
    line-height: 1.18;

    color: var(--near-black);
}

.small-problem-card h3 a {
    transition: color 0.2s ease;
}

.small-problem-card h3 a:hover {
    color: var(--burgundy);
}

/* ============ END SMALL PROBLEM, BIG DIFFERENCE ============ */

/* =========================================================
   11. TESTED IN A TRUCK
   Future real-world product and systems testing
   ========================================================= */

.tested-section {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 80px;

    align-items: center;

    padding: 100px 48px;

    background:
        linear-gradient(
            135deg,
            #073f44 0%,
            #052f33 48%,
            var(--near-black) 100%
        );

    color: var(--cream);
}


/* ---------------------------------------------------------
   Tested section content
   --------------------------------------------------------- */

.tested-content {
    max-width: 760px;
}

.tested-section .section-eyebrow {
    color: rgba(245, 239, 231, 0.72);
}

.tested-section h2 {
    margin-bottom: 26px;

    font-size: clamp(3rem, 5vw, 5.5rem);
    line-height: 0.98;

    color: var(--cream);
}

.tested-description {
    max-width: 650px;
    margin-bottom: 18px;

    font-size: 0.95rem;
    line-height: 1.8;

    color: rgba(245, 239, 231, 0.82);
}

.tested-note {
    max-width: 620px;
    margin-bottom: 32px;

    font-size: 0.78rem;
    line-height: 1.7;

    color: rgba(245, 239, 231, 0.60);
}


/* ---------------------------------------------------------
   Tested button
   --------------------------------------------------------- */

.tested-button {
    display: inline-block;

    padding: 14px 22px;

    border: 1px solid rgba(245, 239, 231, 0.80);

    font-size: 0.76rem;
    font-weight: 600;

    letter-spacing: 0.10em;
    text-transform: uppercase;

    color: var(--cream);

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.tested-button:hover {
    background-color: var(--cream);
    color: #073f44;
}


/* ---------------------------------------------------------
   Testing checklist
   --------------------------------------------------------- */

.tested-checklist {
    padding: 36px;

    border: 1px solid rgba(245, 239, 231, 0.20);

    background-color: rgba(245, 239, 231, 0.04);
}

.tested-checklist-title {
    margin-bottom: 20px;

    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: var(--cream);
}

.tested-checklist ul {
    list-style: none;
}

.tested-checklist li {
    padding: 12px 0;

    border-bottom: 1px solid rgba(245, 239, 231, 0.10);

    font-size: 0.86rem;
    line-height: 1.5;

    color: rgba(245, 239, 231, 0.78);
}

.tested-checklist li:last-child {
    border-bottom: none;
}

/* ================= END TESTED IN A TRUCK ================= */

/* =========================================================
   12. SITE FOOTER
   Brand information, navigation, and legal links
   ========================================================= */

.site-footer {
    padding: 70px 48px 28px;

    background-color: var(--near-black);
    color: var(--cream);
}


/* ---------------------------------------------------------
   Footer grid
   --------------------------------------------------------- */

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;

    padding-bottom: 60px;
}


/* ---------------------------------------------------------
   Footer brand
   --------------------------------------------------------- */

.footer-brand {
    max-width: 340px;
}

/* ---------------------------------------------------------
   Footer wordmark
   Matches the Made Livable header identity
   --------------------------------------------------------- */

.footer-wordmark {
    display: inline-block;
    margin-bottom: 22px;

    font-family: 'Megrim', sans-serif;
    font-size: 2.5rem;
    line-height: 1;
    letter-spacing: 0.08em;
    white-space: nowrap;

    background: linear-gradient(
        90deg,
        var(--teal) 0%,
        var(--teal) 34%,
        var(--cream) 34%,
        var(--cream) 100%
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;

    transform: scaleX(1.32);
    transform-origin: left center;
}

.footer-brand p {
    max-width: 290px;

    font-size: 0.82rem;
    line-height: 1.8;

    color: rgba(245, 239, 231, 0.65);
}


/* ---------------------------------------------------------
   Footer navigation columns
   --------------------------------------------------------- */

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 10px;
}

.footer-heading {
    margin-bottom: 8px;

    font-size: 0.68rem;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: var(--brass);
}

.footer-column a {
    font-size: 0.78rem;

    color: rgba(245, 239, 231, 0.72);

    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--cream);
}


/* ---------------------------------------------------------
   Footer bottom bar
   --------------------------------------------------------- */

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-top: 24px;

    border-top: 1px solid rgba(245, 239, 231, 0.12);

    font-size: 0.68rem;

    color: rgba(245, 239, 231, 0.45);
}

/* ==================== END SITE FOOTER ==================== */

/* =========================================================
   13. RESPONSIVE / MOBILE
   ========================================================= */

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 1024px) {

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

    .main-nav {
        gap: 18px;
    }

    .main-nav a {
        font-size: 0.64rem;
    }

    .hero {
        padding: 70px 32px;
    }

    .category-strip {
        grid-template-columns: repeat(4, 1fr);
    }

    .category-item {
        min-height: 120px;
        border-bottom: 1px solid rgba(33, 26, 27, 0.10);
    }
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 768px) {

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

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;

        padding: 18px 20px;
    }

    .header-wordmark {
        font-size: 2rem;
        transform: scaleX(1.22);
        transform-origin: left center;
    }

    .main-nav {
        width: 100%;

        display: flex;
        flex-wrap: wrap;

        gap: 10px 18px;
    }

    .main-nav a {
        font-size: 0.62rem;
    }


    /* =========================
       Hero
       ========================= */

    .hero {
        min-height: 68vh;

        padding: 64px 22px;

        align-items: flex-end;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: clamp(3rem, 15vw, 4.5rem);
        line-height: 0.96;
    }

    .hero-description {
        max-width: 100%;
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .hero-button {
        padding: 13px 18px;
        font-size: 0.68rem;
    }

    .hero-video {
        object-position: center center;
    }


    /* =========================
       Category Navigation
       ========================= */

    .category-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-item {
        min-height: 110px;
        padding: 20px 14px;
    }

    .category-title {
        font-size: 0.66rem;
    }

    .category-description {
        font-size: 0.61rem;
        line-height: 1.5;
    }
    /* =========================
       Mobile overflow protection
       ========================= */

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }


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

    .site-header {
        min-height: auto;
        width: 100%;
        padding: 20px 22px;
        gap: 16px;
    }

    .header-wordmark {
        max-width: 100%;
        font-size: 1.65rem;
        transform: none;
    }

    .main-nav {
        display: none;
    }


    /* =========================
       Featured Guides
       ========================= */

    .featured-guides {
        padding: 64px 22px 72px;
    }

    .section-heading {
        display: block;
        margin-bottom: 32px;
    }

    .section-heading h2 {
        max-width: 100%;
        font-size: clamp(2.8rem, 13vw, 4rem);
        line-height: 0.98;
    }

    .section-link {
        display: inline-block;
        margin-top: 20px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .featured-card {
        min-width: 0;
    }

    .featured-card h3 {
        font-size: 2rem;
    }

    .article-description {
        max-width: 100%;
    }


    /* =========================
       Editorial Brand Band
       ========================= */

    .editorial-band {
        min-height: auto;
        padding: 64px 22px;
    }

    .editorial-band-content {
        max-width: 100%;
    }

    .editorial-band h2 {
        font-size: clamp(2.8rem, 13vw, 4rem);
    }


    /* =========================
       Small Problem. Big Difference.
       ========================= */

    .small-problems {
        padding: 64px 22px 72px;
    }

    .small-problem-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 16px;
    }

    .small-problem-card {
        min-width: 0;
    }

    .small-problem-card h3 {
        font-size: 1rem;
    }


    /* =========================
       Tested in a Truck
       ========================= */

    .tested-section {
        grid-template-columns: 1fr;
        gap: 42px;

        padding: 72px 22px;
    }

    .tested-content {
        max-width: 100%;
        min-width: 0;
    }

    .tested-section h2 {
        font-size: clamp(2.8rem, 13vw, 4rem);
        line-height: 1;
    }

    .tested-description,
    .tested-note {
        max-width: 100%;
    }

    .tested-checklist {
        width: 100%;
        padding: 24px 20px;
    }


    /* =========================
       Footer
       ========================= */

    .site-footer {
        padding: 56px 22px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;

        padding-bottom: 44px;
    }

    .footer-brand {
        width: 100%;
        max-width: 100%;
    }

    .footer-wordmark {
        max-width: 100%;
        font-size: 1.65rem;
        transform: none;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* =================== END RESPONSIVE / MOBILE =================== */