/* =====================================================
   home.css
   Things only the home page uses:
   the hero and the three zig-zag sections
   ===================================================== */


/* ---------- Main area ---------- */
.flex-container {
    display: flex;
    flex-direction: column;
    gap: 100px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px 120px;
}


/* ---------- Hero (the first thing people see) ---------- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding-top: 100px;
}

.hero h1 {
    max-width: 18ch;
    font-size: 3.75rem;
}

.hero .button {
    min-height: 52px;
    padding: 0 28px;
    font-size: 1.125rem;
}

/* ---------- Images (the size is locked, no matter the picture) ---------- */
img {
    width: 400px;
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--corner);
    border: 2px solid var(--cyan);
}

/* ---------- Sections (text / image, image / text, text / image) ---------- */
.top-group,
.middle-group,
.bottom-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
    
}

.top-group h2,
.middle-group h2,
.bottom-group h2 {
    flex: 1;
    max-width: 30ch;
}

.image-container {
    display: grid;
    text-align: center;
}
figcaption {
    font-size: 15px;
    color: gray;
}

/* little colored line under every h2 */
h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    margin-top: 16px;
    background: var(--cyan);
    border-radius: 2px;
}


/* ---------- Phones and small screens ---------- */
@media (max-width: 800px) {
    .flex-container {
        gap: 64px;
        padding: 0 20px 80px;
    }

    .hero {
        padding-top: 56px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .top-group,
    .middle-group,
    .bottom-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    /* picture goes on top of the text in every section */
    .top-group img,
    .bottom-group img {
        order: -1;
    }
}
