/* Hillegass House theme - Version 4.0b */

/* Local typography */

@font-face {
    font-family: Sansita;
    src: url('../fonts/Sansita-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito Sans';
    src: url('../fonts/NunitoSans.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

/* Theme variables */

:root {
    --color-brown: #583b1f;
    --color-cream: #eae6e1;
    --color-footer: #e5e0da;
    --color-accent: #ebeaef;
    --font-heading: Sansita, Georgia, serif;
    --font-body: 'Nunito Sans', Arial, sans-serif;
    --grid-gap: 11px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--color-brown);
    background: var(--color-footer);
    font: 400 16px/1.5 var(--font-body);
}

/* Header */

header {
    background: var(--color-brown);
    text-align: center;
    padding: 24px 4vw;
}

header a {
    color: var(--color-accent);
    text-decoration: none;
    font: 700 clamp(16px, 1.872vw, 28px)/1.2
          var(--font-heading);
    letter-spacing: -.02em;
}

/* Typography */

h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0;
    line-height: 1.14;
}

h3 {
    font-size: clamp(28px, 2.713vw, 42px);
}

h2 {
    font-size: clamp(30px, 3.433vw, 52px);
}

p {
    margin: 0 0 16px;
}

p:last-child {
    margin-bottom: 0;
}

/* Content sections */

.sq-section {
    background: var(--color-cream);
    padding: 41.5px 0;
}

.sq-dark {
    background: var(--color-brown);
    color: var(--color-cream);
}

.sq-grid {
    max-width: 1600px;
    margin: auto;
}

.sq-grid > div {
    min-width: 0;
}

.sq-heading {
    text-align: center;
}

.sq-dark .sq-text {
    text-align: center;
}

.sqsrte-large {
    font-size: clamp(19px, 1.753vw, 27px);
    line-height: 1.5;
}

/* Image handling */

.sq-photo {
    min-height: 0;
    overflow: hidden;
}

.sq-photo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.sq-cover img {
    object-fit: cover;
    object-position: center;
}

/* Application button */

.sq-application {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sq-application a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: var(--color-accent);
    color: var(--color-brown);
    border-radius: 300px;
    text-decoration: none;
    width: 100%;
    min-height: 60px;
    line-height: 1.4;
}

/* Contact section */

footer {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 5vw;
    align-items: start;
    padding: 6vw 4vw;
    text-align: center;
}

footer h3 {
    margin-bottom: 28px;
}

footer a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}

/* Desktop: preserve original Fluid Engine grid */

@media (min-width: 1100px) {
    .sq-grid {
        display: grid;
        gap: var(--grid-gap);

        grid-template-columns:
            minmax(calc(4vw - 11px), 1fr)
            repeat(24, minmax(0, 1fr))
            minmax(calc(4vw - 11px), 1fr);

        grid-template-rows:
            repeat(
                var(--desktop-rows),
                minmax(
                    calc(min(1500px, 92vw) * .0215),
                    auto
                )
            );
    }

    .sq-grid > div {
        grid-area: var(--desktop-area);
    }

    .sq-photo img {
        width: 100%;
        height: 100%;
    }

    .sq-application a {
        height: 100%;
    }
}

/* Tablet: flexible two-column layout */

@media (min-width: 768px) and (max-width: 1099px) {
    .sq-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
        padding: 0 6vw;
        align-items: center;
    }

    .sq-heading {
        grid-column: 1 / -1;
    }

    .sq-cover img {
        aspect-ratio: 1.5;
    }

    .sq-dark .sq-grid {
        grid-template-columns: minmax(0, 480px);
        justify-content: center;
    }

    .sq-application a {
        max-width: 280px;
    }

    footer h2 {
        font-size: clamp(22px, 3vw, 34px);
    }
}

/* Mobile: vertically stacked content */

@media (max-width: 767px) {
    header {
        padding: 24px 6vw;
    }

    .sq-section {
        padding: 30px 0;
    }

    .sq-grid {
        display: flex;
        flex-direction: column;
        padding: 0 6vw;
        gap: 24px;
    }

    .sq-application a {
        max-width: 280px;
    }

    footer {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 48px 6vw;
    }

    footer h2 {
        font-size: clamp(16px, 5.5vw, 30px);
        line-height: 1.25;
    }
}
