/* =============================================
   Nancy Ziegler Gallery - Modern Editorial Design
   ============================================= */

/* Cedarville Cursive Font */
@font-face {
    font-family: 'Cedarville Cursive';
    src: url('../fonts/Cedarville_Cursive/CedarvilleCursive-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables */
:root {
    /* Cloudy Sky Palette */
    --sky-deep: #4a90c2;
    --sky-mid: #6ba3d4;
    --sky-light: #87b5e1;
    --sky-pale: #a8cef0;
    --sky-white: #d4e8f9;
    --cloud-white: #ffffff;
    --cloud-light: #f0f5fa;
    --cloud-shadow: #c5d8e8;

    /* Gold Accent Spectrum */
    --gold-deep: #6b5010;
    --gold-rich: #8a7008;
    --gold-primary: #a6851f;
    --gold-bright: #b8962f;
    --gold-light: #c9a83c;
    --gold-pale: #d4b85a;

    /* Text Colors */
    --text-primary: #1a2a3a;
    --text-secondary: #4a5a6a;
    --text-muted: #7a8a9a;

    /* Typography */
    --font-display: 'Cedarville Cursive', cursive;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Space Grotesk', -apple-system, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Hazy Blue Sky Background */
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(180deg,
        #5a9fd4 0%,      /* Deeper blue at top */
        #7db4e0 30%,     /* Mid blue */
        #a8cef0 60%,     /* Pale blue */
        #d4e8f9 100%);   /* White-blue at bottom */
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =============================================
   Scroll-Driven Parallax Clouds
   ============================================= */
.parallax-clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.cloud {
    position: absolute;
    opacity: 0.8;
}

.cloud-1 {
    top: 10%;
    left: -10%;
    width: 40%;
}

.cloud-2 {
    top: 25%;
    right: -15%;
    width: 35%;
}

.cloud-3 {
    top: 50%;
    left: 5%;
    width: 25%;
}

.cloud-4 {
    top: 65%;
    right: -5%;
    width: 30%;
}

.cloud-5 {
    top: 35%;
    left: 50%;
    width: 20%;
}

/* Scroll-driven animation for clouds (modern browsers) */
@supports (animation-timeline: scroll()) {
    .cloud-1 {
        animation: cloudMove1 linear both;
        animation-timeline: scroll(root);
    }
    @keyframes cloudMove1 {
        from { transform: translateX(0); }
        to { transform: translateX(50vw); }
    }

    .cloud-2 {
        animation: cloudMove2 linear both;
        animation-timeline: scroll(root);
    }
    @keyframes cloudMove2 {
        from { transform: translateX(0); }
        to { transform: translateX(-40vw); }
    }

    .cloud-3 {
        animation: cloudMove3 linear both;
        animation-timeline: scroll(root);
    }
    @keyframes cloudMove3 {
        from { transform: translateX(0); }
        to { transform: translateX(30vw); }
    }

    .cloud-4 {
        animation: cloudMove4 linear both;
        animation-timeline: scroll(root);
    }
    @keyframes cloudMove4 {
        from { transform: translateX(0); }
        to { transform: translateX(-35vw); }
    }

    .cloud-5 {
        animation: cloudMove5 linear both;
        animation-timeline: scroll(root);
    }
    @keyframes cloudMove5 {
        from { transform: translateX(0); }
        to { transform: translateX(25vw); }
    }
}

/* Ensure content is above overlays */
header, main, footer {
    position: relative;
    z-index: 1;
}

/* =============================================
   Gallery Wrapper - Contains header sticky boundary
   ============================================= */
.gallery-wrapper {
    position: relative;
    z-index: 1;
}

/* =============================================
   Header - Sticky within Gallery
   ============================================= */
header {
    padding: var(--space-md) var(--space-md);
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Site Title - Cedarville Cursive Style */
.site-title {
    font-family: 'Cedarville Cursive', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    font-style: normal;
    color: var(--text-primary);
    letter-spacing: 0;
    position: relative;
    transition: all 0.4s ease;
}

.site-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        var(--gold-primary),
        var(--gold-light),
        transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-title:hover::after {
    transform: scaleX(1);
}

/* Contact Link - Modern Minimal */
.contact-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--text-muted);
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gold-primary);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.contact-link:hover {
    color: white;
    border-color: var(--gold-primary);
}

.contact-link:hover::before {
    transform: translateY(0);
}

/* Fixed Navigation - Always visible */
.fixed-nav {
    position: fixed;
    top: var(--space-md);
    right: var(--space-md);
    display: flex;
    gap: var(--space-md);
    align-items: center;
    z-index: 200;
}

/* Header Navigation (legacy, kept for reference) */
.header-nav {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--text-muted);
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gold-primary);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-link:hover {
    color: white;
    border-color: var(--gold-primary);
}

.nav-link:hover::before {
    transform: translateY(0);
}

/* =============================================
   Main Content
   ============================================= */
main {
    padding-top: 120px;
}

/* =============================================
   Section Title - Large Editorial Typography
   ============================================= */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 400;
    font-style: normal;
    text-align: center;
    color: transparent;
    -webkit-text-stroke: 0;
    letter-spacing: 0;
    line-height: 1.3;
    padding: 0.1em 0;
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
    text-shadow: none;
}

.section-title::before {
    content: 'Gallery';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--gold-pale) 0%,
        var(--gold-bright) 25%,
        var(--gold-deep) 50%,
        var(--gold-bright) 75%,
        var(--gold-pale) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0;
    clip-path: inset(0 100% 0 0);
    animation: revealText 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes revealText {
    to { clip-path: inset(0 0 0 0); }
}

/* =============================================
   Gallery Section
   ============================================= */
.gallery {
    padding: var(--space-lg) var(--space-md);
    max-width: 1600px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-md);
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* =============================================
   Art Card - Scroll Triggered Animations
   ============================================= */
.art-card {
    perspective: 1500px;
    height: 480px;
    opacity: 0;
    transform: translateY(60px);
    animation: scrollFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Staggered animation delays */
.art-card:nth-child(1) { animation-delay: 0.1s; }
.art-card:nth-child(2) { animation-delay: 0.2s; }
.art-card:nth-child(3) { animation-delay: 0.3s; }
.art-card:nth-child(4) { animation-delay: 0.5s; }
.art-card:nth-child(5) { animation-delay: 0.6s; }
.art-card:nth-child(6) { animation-delay: 0.7s; }
.art-card:nth-child(7) { animation-delay: 0.9s; }
.art-card:nth-child(8) { animation-delay: 1.0s; }
.art-card:nth-child(9) { animation-delay: 1.1s; }
.art-card:nth-child(10) { animation-delay: 1.3s; }
.art-card:nth-child(11) { animation-delay: 1.4s; }
.art-card:nth-child(12) { animation-delay: 1.5s; }

/* Wide art card - spans 3 columns */
.art-card--wide {
    grid-column: span 3;
    height: 520px;
}

.art-card--wide .frame-container {
    max-width: 100%;
}

.art-card--wide .artwork-mat img {
    height: 400px;
    object-fit: contain;
    background: #0d0d0d;
}

@keyframes scrollFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

/* Flip animation kept only for touch/click via .flipped class */
.art-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
}

.card-front {
    backface-visibility: hidden;
}

/* Card Front - Framed Artwork */
.card-front {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* =============================================
   Baroque Frame - Enhanced with Modern Touch
   ============================================= */
.frame-container {
    position: relative;
    padding: 24px;
    background: linear-gradient(
        145deg,
        #3d2e0a 0%,
        var(--gold-deep) 15%,
        var(--gold-rich) 30%,
        var(--gold-primary) 45%,
        var(--gold-bright) 50%,
        var(--gold-primary) 55%,
        var(--gold-rich) 70%,
        var(--gold-deep) 85%,
        #3d2e0a 100%
    );
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(240, 215, 122, 0.3),
        inset 0 -2px 4px rgba(61, 46, 10, 0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.frame-container:hover {
    transform: translateY(-8px);
    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.7),
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(201, 162, 39, 0.15),
        inset 0 2px 4px rgba(240, 215, 122, 0.3),
        inset 0 -2px 4px rgba(61, 46, 10, 0.5);
}

/* Dark overlay on hover - fits within frame */
.frame-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(60, 60, 60, 0.45);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.art-card:hover .frame-container::after,
.art-card.touch-active .frame-container::after {
    opacity: 1;
}

/* Frame Layers */
.frame-outer,
.frame-carved,
.frame-inner,
.frame-lip {
    position: absolute;
    pointer-events: none;
}

.frame-outer {
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 2px solid;
    border-color: var(--gold-deep) var(--gold-rich) var(--gold-light) var(--gold-deep);
}

.frame-carved {
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid var(--gold-deep);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(240, 215, 122, 0.08) 50%,
        transparent 100%
    );
}

.frame-inner {
    top: 14px;
    left: 14px;
    right: 14px;
    bottom: 14px;
    border: 2px solid;
    border-color: var(--gold-rich) var(--gold-bright) var(--gold-pale) var(--gold-rich);
}

.frame-lip {
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

/* Corner Ornaments */
.frame-corner {
    position: absolute;
    width: 32px;
    height: 32px;
    z-index: 2;
    background: conic-gradient(
        from 45deg,
        #3d2e0a,
        var(--gold-deep),
        var(--gold-rich),
        var(--gold-primary),
        var(--gold-bright),
        var(--gold-primary),
        var(--gold-rich),
        var(--gold-deep),
        #3d2e0a
    );
    clip-path: polygon(
        50% 0%,
        65% 35%,
        100% 50%,
        65% 65%,
        50% 100%,
        35% 65%,
        0% 50%,
        35% 35%
    );
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    transition: transform 0.4s ease;
}

.frame-container:hover .frame-corner {
    transform: scale(1.1);
}

.frame-corner--tl { top: -6px; left: -6px; }
.frame-corner--tr { top: -6px; right: -6px; transform: rotate(90deg); }
.frame-corner--bl { bottom: -6px; left: -6px; transform: rotate(-90deg); }
.frame-corner--br { bottom: -6px; right: -6px; transform: rotate(180deg); }

.frame-container:hover .frame-corner--tr { transform: rotate(90deg) scale(1.1); }
.frame-container:hover .frame-corner--bl { transform: rotate(-90deg) scale(1.1); }
.frame-container:hover .frame-corner--br { transform: rotate(180deg) scale(1.1); }

/* Artwork Mat */
.artwork-mat {
    position: relative;
    z-index: 1;
    background: #0d0d0d;
    padding: 3px;
}

.artwork-mat img {
    display: block;
    width: 100%;
    height: 340px;
    object-fit: cover;
    filter: brightness(0.95) contrast(1.05);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.art-card:hover .artwork-mat img,
.art-card.touch-active .artwork-mat img {
    filter: brightness(0.95) contrast(1.05) blur(1.5px);
    transform: scale(0.97);
}

/* Placeholder for missing images */
.artwork-mat img[src*="painting"] {
    background: linear-gradient(135deg, var(--cloud-shadow) 0%, var(--sky-pale) 100%);
}

/* =============================================
   Card Back - Text Overlay
   ============================================= */
.card-back {
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
}

.art-card:hover .card-back,
.art-card.touch-active .card-back {
    opacity: 1;
}

.card-back h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    font-style: italic;
    color: #fff;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.card-back p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* =============================================
   Contact Section - Clean Modern Form
   ============================================= */
.contact {
    padding: var(--space-xl) var(--space-md);
    max-width: 640px;
    margin: 0 auto;
}

.contact .section-title {
    font-size: clamp(3rem, 10vw, 8rem);
}

.contact .section-title::before {
    content: 'Get in Touch';
}

.contact-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 60px rgba(74, 144, 194, 0.15);
    position: relative;
}

.contact-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.contact-intro {
    text-align: center;
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    letter-spacing: 0.02em;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.required {
    color: var(--gold-primary);
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--cloud-shadow);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

/* Submit Button - Modern Minimal */
.submit-btn {
    padding: 1.25rem 2rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: var(--space-sm);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gold-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.submit-btn:hover {
    color: white;
}

.submit-btn:hover::before {
    transform: scaleX(1);
}

.form-success {
    text-align: center;
    padding: var(--space-md);
}

.form-success p {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--gold-bright);
}

/* =============================================
   About Section
   ============================================= */
.about {
    padding: var(--space-xl) var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.about .section-title {
    font-size: clamp(3rem, 10vw, 8rem);
}

.about .section-title::before {
    content: 'About the Artist';
}

.about-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 60px rgba(74, 144, 194, 0.15);
    position: relative;
}

.about-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.about-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* =============================================
   Footer - Minimal
   ============================================= */
footer {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    margin-top: var(--space-xl);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* =============================================
   Selection & Accessibility
   ============================================= */
::selection {
    background: var(--gold-primary);
    color: white;
}

:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 2px;
}

/* =============================================
   Scroll-Driven Animations (Modern Browsers)
   ============================================= */
@supports (animation-timeline: scroll()) {
    .art-card {
        animation: scrollReveal linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 40%;
    }

    @keyframes scrollReveal {
        from {
            opacity: 0;
            transform: translateY(100px) scale(0.9);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .art-card--wide {
        grid-column: span 2;
        height: 480px;
    }

    .art-card--wide .artwork-mat img {
        height: 360px;
    }
}

@media (max-width: 768px) {
    :root {
        --space-md: 1.5rem;
        --space-lg: 3rem;
    }

    header {
        padding: var(--space-sm);
    }

    .section-title {
        font-size: clamp(3rem, 12vw, 6rem);
        margin-bottom: var(--space-md);
    }

    .gallery {
        padding: var(--space-md) var(--space-sm);
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        max-width: 420px;
        margin: 0 auto;
    }

    .art-card {
        height: 440px;
    }

    .art-card--wide {
        grid-column: span 1;
        height: 320px;
    }

    .art-card--wide .artwork-mat img {
        height: 200px;
    }

    .artwork-mat img {
        height: 300px;
    }

    .frame-container {
        padding: 20px;
    }

    .frame-corner {
        width: 26px;
        height: 26px;
    }

    .contact-container {
        padding: var(--space-md);
    }

    .card-back h3 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .fixed-nav {
        top: var(--space-sm);
        right: var(--space-sm);
        gap: var(--space-sm);
    }

    .header-content {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .header-nav {
        flex-wrap: wrap;
        gap: var(--space-sm);
        justify-content: center;
    }

    main {
        padding-top: 160px;
    }

    .section-title {
        font-size: clamp(2.5rem, 15vw, 5rem);
        -webkit-text-stroke: 0.5px var(--sky-deep);
    }

    .art-card {
        height: 400px;
    }

    .artwork-mat img {
        height: 260px;
    }

    .frame-container {
        padding: 16px;
    }

    .frame-corner {
        width: 22px;
        height: 22px;
    }

    .frame-corner--tl { top: -4px; left: -4px; }
    .frame-corner--tr { top: -4px; right: -4px; }
    .frame-corner--bl { bottom: -4px; left: -4px; }
    .frame-corner--br { bottom: -4px; right: -4px; }

    .contact .section-title::before {
        content: 'Contact';
    }

    .submit-btn {
        width: 100%;
    }
}

/* Touch device support */
@media (hover: none) {
    .frame-container:hover {
        transform: none;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .parallax-clouds .cloud {
        animation: none !important;
        transform: none !important;
    }

    .art-card {
        opacity: 1;
        transform: none;
    }

    .section-title::before {
        clip-path: none;
        animation: none;
    }
}
