/* =========================================================
   J TAYLOR GROUNDWORKS
   Complete stylesheet
   ========================================================= */


/* ---------------------------------------------------------
   RESET
   --------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    color: #333;
    background: #f7f5f0;
    line-height: 1.7;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}


/* ---------------------------------------------------------
   TYPOGRAPHY
   --------------------------------------------------------- */

h1,
h2,
h3 {
    margin-top: 0;
}

h1,
h2 {
    font-family: "Libre Baskerville", Georgia, serif;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin-bottom: 30px;
}

h3 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 12px;
}


/* ---------------------------------------------------------
   LAYOUT
   --------------------------------------------------------- */

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}


/* ---------------------------------------------------------
   HEADER / NAVIGATION
   --------------------------------------------------------- */

header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);

    border-bottom: 1px solid #ddd;
}

.nav {
    min-height: 80px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* Logo */

.logo {
    text-decoration: none;
    color: #333;

    line-height: 1.1;

    flex-shrink: 0;
}

.logo span {
    display: block;

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

    letter-spacing: 0.2em;
}

.logo strong {
    display: block;

    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 1.55rem;
}


/* Navigation */

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;

    gap: 0 25px;
}

nav a {
    position: relative;

    text-decoration: none;
    color: #333;

    padding: 8px 0;

    white-space: nowrap;
}

nav a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 2px;

    background: #456b3f;

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.25s ease;
}

nav a:hover::after {
    transform: scaleX(1);
}


/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

.hero {
    min-height: 90vh;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.55),
            rgba(0, 0, 0, 0.48)
        ),
        url("../images/hero.webp") center center / cover no-repeat;
}

.hero-overlay {
    min-height: 90vh;

    display: flex;
    align-items: center;

    color: white;
}

.hero-content {
    text-align: center;

    padding-top: 40px;
    padding-bottom: 40px;
}

.hero h1 {
    margin-bottom: 25px;

    font-family: "Libre Baskerville", Georgia, serif;

    font-size: clamp(3.2rem, 8vw, 6rem);
    line-height: 0.98;

    color: white;
}

.hero p {
    max-width: 700px;

    margin: 0 auto 30px;

    font-size: clamp(1rem, 2vw, 1.2rem);
}


/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */

.buttons,
.contact-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 15px;
}

.button {
    display: inline-block;

    padding: 14px 28px;

    border-radius: 50px;

    background: #456b3f;
    color: white;

    text-decoration: none;
    font-weight: 700;

    border: 2px solid transparent;

    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.button:hover {
    background: #355834;
    color: white;

    transform: translateY(-3px);
}


/* Transparent button in hero */

.button.outline {
    background: transparent;

    color: white;

    border-color: rgba(255, 255, 255, 0.8);
}

.button.outline:hover {
    background: rgba(255, 255, 255, 0.15);

    color: white;

    border-color: white;
}


/* White button in contact section */

.contact .button {
    background: white;
    color: #355834;
}

.contact .button:hover {
    background: #f2f2f2;
    color: #355834;
}


/* ---------------------------------------------------------
   WELCOME / INTRO
   --------------------------------------------------------- */

.welcome {
    padding: 110px 0;
    background: #f7f5f0;
}

.two-column {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 70px;

    align-items: center;
}

.two-column p {
    max-width: 650px;
}

.two-column img {
    width: 100%;

    border-radius: 16px;
}


/* ---------------------------------------------------------
   SERVICES
   --------------------------------------------------------- */

.services {
    padding: 110px 0;

    background: #efebe2;
}

.cards {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}

.card {
    background: white;

    padding: 30px;

    border-radius: 16px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.07);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.11);
}

.card h3 {
    color: #355834;
}

.card p {
    margin: 0;

    font-size: 0.96rem;

    line-height: 1.6;
}


/* ---------------------------------------------------------
   GALLERY
   --------------------------------------------------------- */

.gallery {
    padding: 110px 0;

    background: #f7f5f0;
}

.gallery-grid {
    display: grid;

    grid-template-columns: 2fr 1fr 1fr;

    grid-template-rows: 220px 220px;

    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 16px;

    cursor: zoom-in;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.gallery-grid img:hover {
    transform: translateY(-4px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.18);
}


/*
    Featured first image.
*/

.gallery-grid img:first-child {
    grid-row: span 2;
}


/*
    Six-image layout:

    1 | 2 | 3
    1 | 4 | 5
      6 across bottom
*/

.gallery-grid img:nth-child(6) {
    grid-column: 1 / -1;
    grid-row: 3;

    height: 220px;
}


/* ---------------------------------------------------------
   ABOUT
   --------------------------------------------------------- */

.about {
    padding: 110px 0;

    background: #efebe2;
}

.about p {
    max-width: 780px;

    font-size: 1.05rem;
}


/* ---------------------------------------------------------
   CONTACT
   --------------------------------------------------------- */

.contact {
    padding: 90px 0;

    background: #405b43;

    color: white;

    text-align: center;
}

.contact h2 {
    color: white;

    margin-bottom: 15px;
}

.contact p {
    color: white;
}

.contact-buttons {
    margin: 35px 0;
}

.location {
    margin-top: 35px;

    opacity: 0.9;
}


/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

footer {
    padding: 25px 0;

    background: #222;

    color: #bbb;

    text-align: center;

    font-size: 0.9rem;
}


/* ---------------------------------------------------------
   LIGHTBOX
   --------------------------------------------------------- */

.lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

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

    padding: 30px;

    background: rgba(0, 0, 0, 0.92);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 88vh;

    width: auto;
    height: auto;

    border-radius: 12px;

    object-fit: contain;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5);
}


/* Close button */

.lightbox-close {
    position: absolute;

    top: 15px;
    right: 25px;

    z-index: 2;

    width: 50px;
    height: 50px;

    display: flex;

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

    color: white;

    font-size: 42px;
    line-height: 1;

    cursor: pointer;

    user-select: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.lightbox-close:hover {
    opacity: 0.7;

    transform: scale(1.1);
}


/* Previous / next */

.lightbox-prev,
.lightbox-next {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    z-index: 2;

    width: 60px;
    height: 60px;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.15);

    color: white;

    font-size: 30px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* ---------------------------------------------------------
   TABLET
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .nav {
        gap: 20px;
    }

    nav {
        gap: 0 18px;
    }

    .cards {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .two-column {
        gap: 45px;
    }

}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 700px) {

    html {
        scroll-padding-top: 125px;
    }


    /* Header */

    header {
        position: sticky;
    }

    .nav {
        min-height: auto;

        padding: 16px 0 14px;

        display: flex;

        flex-direction: column;

        justify-content: center;

        gap: 12px;
    }

    .logo {
        text-align: center;
    }

    .logo strong {
        font-size: 1.35rem;
    }

    nav {
        width: 100%;

        display: flex;

        justify-content: center;

        flex-wrap: wrap;

        gap: 3px 18px;
    }

    nav a {
        font-size: 0.88rem;

        padding: 4px 0;
    }


    /* Hero */

    .hero,
    .hero-overlay {
        min-height: 75vh;
    }

    .hero-content {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 13vw, 4.2rem);
    }

    .hero p {
        font-size: 1rem;

        max-width: 520px;
    }


    /* Buttons */

    .button {
        padding: 13px 24px;
    }


    /* Sections */

    section {
        padding: 75px 0;
    }

    .welcome,
    .services,
    .gallery,
    .about {
        padding: 75px 0;
    }


    /* Welcome */

    .two-column {
        display: block;
    }

    .two-column img {
        margin-top: 35px;
    }


    /* Services */

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

        gap: 18px;
    }

    .card {
        padding: 24px;
    }

    .card p {
        font-size: 0.94rem;
    }


    /* Gallery */

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

        grid-template-rows: none;

        gap: 15px;
    }

    .gallery-grid img,
    .gallery-grid img:first-child,
    .gallery-grid img:nth-child(6) {
        grid-column: auto;
        grid-row: auto;

        height: 260px;
    }


    /* Contact */

    .contact {
        padding: 75px 0;
    }

    .contact-buttons {
        flex-direction: column;

        gap: 12px;
    }

    .contact-buttons .button {
        width: 100%;
        max-width: 300px;
    }


    /* Lightbox */

    .lightbox {
        padding: 15px;
    }

    .lightbox-image {
        max-width: 94vw;
        max-height: 80vh;

        border-radius: 8px;
    }

    .lightbox-close {
        top: 8px;
        right: 10px;

        font-size: 38px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 46px;
        height: 46px;

        font-size: 24px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

}


/* ---------------------------------------------------------
   VERY SMALL PHONES
   --------------------------------------------------------- */

@media (max-width: 400px) {

    nav {
        gap: 2px 13px;
    }

    nav a {
        font-size: 0.82rem;
    }

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

    .hero p {
        font-size: 0.95rem;
    }

    .button {
        width: 100%;

        max-width: 280px;

        text-align: center;
    }

}