/* Forces padding to stay strictly inside containers */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    background-color: white;
    margin: 0;
    padding: 0;
    font-family: "Bricolage Grotesque", sans-serif;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

#wrapper {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Hero ── */
.hero {
    position: relative;
    grid-column: 1 / -1;
}

#logo {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: auto;
    z-index: 10;
}

#leaves {
    display: block;
    width: 100%;
    max-height: 750px;
    object-fit: cover;
    z-index: 1;

    filter: brightness(0.92);
}

#mainheading, #subheading, .caption {
    
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0.25rem 0.5rem;
    color: white; 
    font-weight: 700;
    /* font-size: clamp(2rem, 8vw, 6rem); */
    z-index: 5;
    text-align: center;
    
    pointer-events: none;

    width: 100%; 
    box-sizing: border-box;
}

#mainheading {
    font-family: "Paytone One", sans-serif;
    font-size: clamp(5rem, 10vw, 8rem);
    letter-spacing: 0.05em;
    text-shadow: 0 2px 6px rgba(0,0,0,0.45);
}

#subheading {
    font-family: "Fraunces", serif;
    font-size: clamp(1.2rem, 5vw, 2.5rem);
    top: calc(55% + 4rem); 
    text-shadow: 0 2px 6px rgba(0,0,0,0.45);
}

.caption {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.25rem;
    /* top: auto;
    bottom: 2rem;  */
    top: calc(65% + 4rem); 
    /* transform: translateX(-50%); */
    color: #3f8e86;
}

/* ── Bio ── */
.bio {
    grid-column: 1 / 2;
    padding: 4em 3em;
    font-size: 1.125rem;
    line-height: 1.6;
    color: black;
    background: #d9c8ea;
    text-align: center;
}

#portrait {
    width: 70%;
    max-width: 280px;
    margin: 25px auto 0;
    display: block;
    height: auto;
}

/* ── Snail mail description ── */
.snail-mail-description {
    grid-column: 1 / 2;
    padding: 4em 3em;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #3f8e86;
    background: #e2f338;
    text-align: center;
    font-family: "Bricolage Grotesque", sans-serif;
    /* font-family: "Paytone One", sans-serif; */
}

#stamps {
    width: 90%;
    max-width: 600px;
    margin: 25px auto 0;
    display: block;
    height: auto;
}

/* ── Flowers side video ── */
#flowersSide {
    grid-column: 2 / -1;
    display: block;
    width: 100%;
    max-height: 800px;
    object-fit: cover;
    filter: brightness(0.85);
    transition: filter 0.2s ease;
    z-index: 1;
    /* prevent it from ever overflowing */
    max-width: 100%;
}


.socials{
    font-family: "Bricolage Grotesque", sans-serif;
}

/* ── Snail mail signup ── */
.snail-mail-signup {
    grid-column: 2 / -1;
    padding: 4em 3em;
    font-size: 1.125rem;
    line-height: 1.6;
    color: white;
    background: #3a6daf;
    text-align: center;
}

.snail-mail-signup form {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid rgba(152, 255, 176, 0.25);
    border-radius: 18px;
    background: #fa97f1;
    color: white;
    backdrop-filter: blur(6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.modern-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    color: #090a09;
}

.modern-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
    color: #090a09;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.98rem;
    line-height: 1.35;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: #f1a0ea;
    flex: 0 0 auto;
}

.reminder-toggle {
    margin-top: 0.25rem;
}

.snail-mail-signup label {
    color: white;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.snail-mail-signup input,
.snail-mail-signup textarea {
    width: 100%;
    border: 2px solid white;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #fa97f1;
    color: white;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.snail-mail-signup input::placeholder,
.snail-mail-signup textarea::placeholder {
    color: rgba(17, 17, 17, 0.45);
}

.snail-mail-signup input:focus,
.snail-mail-signup textarea:focus {
    border-color: #effbf2;
    box-shadow: 0 0 0 4px rgba(152, 255, 176, 0.18);
    transform: translateY(-1px);
}

.snail-mail-signup button {
    display: inline-block;
    margin-top: 0.5rem;
    width: 100%;
    max-width: 280px;
    padding: 0.95rem 1.5rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #fa97f1, #e988e1);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.snail-mail-signup button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
    filter: brightness(1.03);
}

.snail-mail-signup button:active {
    transform: translateY(0);
}

/* ── Thank-you block ── */
.signup-thankyou {
    max-width: 520px;
    margin: 0.75rem auto 0;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: #fa97f1;
    color: white;
}

.signup-thankyou .venmo-qr {
    display: block;
    margin: 0.5rem auto 0;
    max-width: 180px;
    width: 40%;
    height: auto;
}

/* ── Footer video ── */
#flowers {
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    filter: brightness(0.75);
    transition: filter 0.2s ease;
    z-index: 1;
}

footer {
    grid-area: 1 / -1;
    align-self: end;
    z-index: 10;
    padding: 1rem 0;
    text-align: center;
    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.45);
}

/* ── Gallery ── */
.gallery-wrapper {
    grid-column: 1 / -1;
    width: 100%;
    
    min-width: 0; 
    max-width: 100vw; 
    height: 650px; 
    overflow: hidden;
    
    padding: 0 20px;
    
    color: white;
    background-color: #fd967e;

    

    text-align: center;
}

#recent-artwork {
    font-family: "Paytone One", sans-serif;
    letter-spacing: 0.2em;
}

.horizontal-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    
    padding: 20px 16px;
    width: 100%;
    max-width: 100%;
    
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.horizontal-gallery::-webkit-scrollbar {
    display: none;
}

.gallery-img {
    flex: 0 0 auto;
    height: 500px; 
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    -webkit-user-drag: none;
}


.socials-wrapper {
    display: grid;
    width: 100%;
    grid-column: 1 / -1; /* Ensures it spans the full width if in a grid */
}

#bottom-banner {
    grid-area: 1 / 1;
    width: 100%;
    min-height: 550px;
    max-height: 550px; 
    object-fit: cover; 
    z-index: 1;

    filter: brightness(0.92);
}

.socials {
    grid-area: 1 / 1;
    place-self: center;
    z-index: 5;
    text-align: center;
    color: white; 
    text-shadow: 0 2px 6px rgba(0,0,0,0.45); /* Matches the hero text shadow */
    width: 100%;
    box-sizing: border-box;
    padding: 60px 20px;
}

.socials h2 {
    margin: 1.5rem 0 0.5rem 0;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    font-size: clamp(1rem, 3vw, 1.25rem);
    transition: opacity 0.2s ease;
}

.socials a:hover {
    opacity: 0.8;
}

/* ── Responsive: single-column below 800px ── */
@media (max-width: 800px) {
    .gallery-img{
        scroll-snap-align: start;
    }

    #wrapper {
        grid-template-columns: 1fr;
    }

    .bio,
    .snail-mail-description,
    #flowersSide,
    .snail-mail-signup {
        grid-column: 1 / -1;
    }

    #leaves {
        min-height: 700px;
    }

    #mainheading {
        /* Makes the heading significantly larger on tablets/small laptops */
        font-size: clamp(3.5rem, 12vw, 5rem);
        top: 45%; 
    }

    #subheading {
        font-size: clamp(1rem, 4.5vw, 1.8rem);
        top: calc(45% + 4rem); 
    }

    .caption {
        /* Enforces the bottom placement on smaller screens */
        top: calc(55% + 4rem); 
        font-size: 1rem;
        white-space: normal;
        text-align: center;
        width: 90%;
    }

    .bio,
    .snail-mail-description,
    .snail-mail-signup {
        padding: 2.5rem 1.75rem;
    }

    .snail-mail-signup button {
        width: 100%;
        max-width: none;
    }

    .modern-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .snail-mail-signup form {
        padding: 1rem;
    }

    /* .gallery-img {
        height: 280px;
        max-width: 85vw;
    } */

    .signup-thankyou .venmo-qr {
        width: 48%;
        max-width: 140px;
    }
}

@media (max-width: 520px) {

    #logo{
        top: 17%; 
    }

    #mainheading { 
        top: calc(45% + 3rem); 
        font-size: clamp(3rem, 11vw, 4rem); 
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }
    
    #subheading {
        font-size: clamp(1.2rem, 4vw, 1.4rem);
        top: calc(55% + 3rem); 
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }

    .caption { 
        font-size: 0.9rem; 
        top: calc(62% + 3rem); 
    }

    .bio,
    .snail-mail-description,
    .snail-mail-signup {
        padding: 2rem 1.25rem;
    }

    .gallery-wrapper {
        height: 600px;
        
    }

    #recent-artwork {
        font-family: "Paytone One", sans-serif;
        letter-spacing: 0.2em;
    }

    .gallery-img {
        height: 350px;
        max-width: 300px;
        background-color: #ff9c86;
    }
}

body.force-stack #wrapper {
    grid-template-columns: 1fr;
}

body.force-stack .bio,
body.force-stack .snail-mail-description,
body.force-stack #flowersSide,
body.force-stack .snail-mail-signup {
    grid-column: 1 / -1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}
