/* George Mathews Photography Homepage Styles */
/* Scoped with gm- prefix for WordPress compatibility */

/* CSS Custom Properties */
:root {
    --gm-font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --gm-color-white: #ffffff;
    --gm-color-black: #000000;
    --gm-color-overlay: rgba(0, 0, 0, 0.25);
    --gm-transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --gm-section-height: 100vh;
}

/* Reset for scoped elements */
.gm-homepage {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--gm-font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.gm-homepage *,
.gm-homepage *::before,
.gm-homepage *::after {
    box-sizing: inherit;
}

/* Main Container */
.gm-gallery-container {
    width: 100%;
    overflow-x: hidden;
}

/* Gallery Section Base Styles */
.gm-gallery-section {
    position: relative;
    width: 100%;
    min-height: var(--gm-section-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}

/* Dark overlay for better text contrast */
.gm-gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gm-color-overlay);
    transition: background var(--gm-transition-smooth);
    z-index: 1;
}

/* Hover effect - lighten overlay */
.gm-gallery-section:hover::before {
    background: rgba(0, 0, 0, 0.15);
}

/* Section Link - Full clickable area */
.gm-section-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 2;
    cursor: pointer;
}

/* Section Content */
.gm-section-content {
    text-align: center;
    padding: 2rem;
    transform: translateY(0);
    transition: transform var(--gm-transition-smooth);
}

.gm-gallery-section:hover .gm-section-content {
    transform: translateY(-5px);
}

/* Section Title */
.gm-section-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 400;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gm-color-white);
    margin: 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: letter-spacing var(--gm-transition-smooth),
                text-shadow var(--gm-transition-smooth);
}

.gm-gallery-section:hover .gm-section-title {
    letter-spacing: 0.5em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* Individual Section Backgrounds */
.gm-section-rock {
    background-image: url('https://www.georgemathewsphoto.com/wp-content/uploads/2026/01/Rock-min.webp');
}

.gm-section-ice {
    background-image: url('https://www.georgemathewsphoto.com/wp-content/uploads/2026/01/jpeg-optimizer_PhotoFeb212023125827PM.webp');
}

.gm-section-earth {
    background-image: url('https://www.georgemathewsphoto.com/wp-content/uploads/2026/01/jpeg-optimizer_PhotoAug21202365319PM.webp');
}

.gm-section-snow {
    background-image: url('https://www.georgemathewsphoto.com/wp-content/uploads/2026/01/jpeg-optimizer_PhotoFeb122023110857AM.webp');
}

/* About Section */
.gm-about-section {
    background-color: var(--gm-color-black);
    padding: 8rem 4rem;
}

.gm-about-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.gm-about-image {
    position: relative;
    overflow: hidden;
}

.gm-about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--gm-transition-smooth);
}

.gm-about-image:hover img {
    transform: scale(1.02);
}

.gm-about-content {
    padding: 2rem 0;
}

.gm-about-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gm-color-white);
    margin: 0 0 2rem 0;
}

.gm-about-text {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 2.5rem 0;
}

.gm-about-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gm-color-white);
    background-color: transparent;
    border: 1px solid var(--gm-color-white);
    transition: background-color var(--gm-transition-smooth),
                color var(--gm-transition-smooth);
}

.gm-about-cta:hover {
    background-color: var(--gm-color-white);
    color: var(--gm-color-black);
}

.gm-about-cta:focus-visible {
    outline: 3px solid var(--gm-color-white);
    outline-offset: 3px;
}

/* Responsive Styles */

/* Tablet */
@media screen and (max-width: 1024px) {
    .gm-section-title {
        font-size: clamp(2.5rem, 8vw, 5rem);
        letter-spacing: 0.3em;
    }

    .gm-gallery-section:hover .gm-section-title {
        letter-spacing: 0.4em;
    }

    .gm-about-section {
        padding: 6rem 3rem;
    }

    .gm-about-container {
        gap: 3rem;
    }
}

/* Mobile - Disable parallax for better performance */
@media screen and (max-width: 768px) {
    .gm-gallery-section {
        background-attachment: scroll;
        min-height: 70vh;
    }

    .gm-section-title {
        font-size: clamp(2rem, 12vw, 3.5rem);
        letter-spacing: 0.2em;
    }

    .gm-gallery-section:hover .gm-section-title {
        letter-spacing: 0.25em;
    }

    .gm-section-content {
        padding: 1.5rem;
    }

    .gm-about-section {
        padding: 4rem 2rem;
    }

    .gm-about-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .gm-about-content {
        padding: 0;
        text-align: center;
    }

    .gm-about-title {
        margin-bottom: 1.5rem;
    }

    .gm-about-text {
        margin-bottom: 2rem;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .gm-gallery-section {
        min-height: 60vh;
    }

    .gm-section-title {
        font-size: clamp(1.75rem, 14vw, 2.5rem);
        letter-spacing: 0.15em;
    }

    .gm-gallery-section:hover .gm-section-title {
        letter-spacing: 0.2em;
    }

    .gm-about-section {
        padding: 3rem 1.5rem;
    }

    .gm-about-container {
        gap: 2rem;
    }

    .gm-about-cta {
        padding: 0.875rem 2rem;
        font-size: 0.8125rem;
    }
}

/* iOS Safari parallax fix */
@supports (-webkit-touch-callout: none) {
    .gm-gallery-section {
        background-attachment: scroll;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .gm-gallery-section::before,
    .gm-section-content,
    .gm-section-title,
    .gm-about-image img,
    .gm-about-cta {
        transition: none;
    }

    .gm-gallery-section:hover .gm-section-content {
        transform: none;
    }

    .gm-about-image:hover img {
        transform: none;
    }
}

/* Focus styles for accessibility */
.gm-section-link:focus {
    outline: none;
}

.gm-section-link:focus-visible {
    outline: 3px solid var(--gm-color-white);
    outline-offset: -10px;
}

/* Print styles */
@media print {
    .gm-gallery-section {
        min-height: auto;
        page-break-inside: avoid;
        background-attachment: scroll;
    }
}
