/* ============================================
   political.bar — Graffiti Luxury Mountain Gallery
   ============================================ */

/* Palette:
   Deep Terracotta-Dark: #2A1810 — headings
   Warm Terracotta:      #5A3828 — body text
   Terracotta Accent:    #C07040 — labels, primary accent
   Gallery Border:       #4A3020 — grid item borders
   Earth Cream:          #F4ECE0 — primary background
   Item White:           #FFF6EC — gallery item backgrounds
   Mountain Dark:        #3A2820 — landscape silhouettes
   Political Red:        #C04030 — rare emphasis accent
   Illustration Line:    #6A4A38 — line art
*/

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.8;
    color: #5A3828;
    background-color: #F4ECE0;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* === Keyframe Animations === */

/* Kinetic Weight Oscillation for Syne Headings */
@keyframes kineticWeight {
    0%, 100% { font-weight: 500; }
    50% { font-weight: 800; }
}

/* Shake-Error Seismic Tension */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Fade-in from below */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade-in general */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll indicator bob */
@keyframes scrollBob {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* Border accent slide */
@keyframes borderSlideIn {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Accent line expand */
@keyframes lineExpand {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Title letter spacing breathe */
@keyframes letterBreathe {
    0%, 100% { letter-spacing: 0.08em; }
    50% { letter-spacing: 0.14em; }
}

/* === Mountain Backdrop === */
#mountain-backdrop {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

#mountain-backdrop svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
}

/* === Graffiti Texture Overlay === */
#graffiti-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(ellipse at 15% 20%, rgba(106, 74, 56, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 60%, rgba(106, 74, 56, 0.015) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(58, 40, 32, 0.02) 0%, transparent 40%);
}

/* === Header === */
#site-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 20px 60px;
    text-align: center;
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.header-accent-line {
    width: 80px;
    height: 2px;
    background: #C07040;
    transform-origin: center;
    animation: lineExpand 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.3s both;
}

.header-accent-line--bottom {
    width: 40px;
    animation-delay: 0.6s;
}

#site-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 4.5rem);
    color: #2A1810;
    letter-spacing: 0.08em;
    animation: kineticWeight 4s ease-in-out infinite, letterBreathe 8s ease-in-out infinite;
    text-transform: uppercase;
    line-height: 1.1;
}

.tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(0.7rem, 1.1vw, 0.9rem);
    color: #C07040;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 1s ease 0.8s forwards;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBob 2s ease-in-out infinite;
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

/* === Section Label === */
.section-label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 40px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-label__line {
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: #4A3020;
    opacity: 0.3;
}

.section-label__text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.65rem;
    color: #6A4A38;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

/* === Gallery Grid === */
#gallery-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* === Gallery Items === */
.gallery-item {
    position: relative;
    background: #FFF6EC;
    border: 1px solid #4A3020;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transition: border-color 0.3s ease;
}

.gallery-item.visible {
    animation: fadeInUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.gallery-item--wide {
    grid-column: span 2;
}

.gallery-item--square {
    aspect-ratio: 1 / 1;
}

/* Staggered animation delays for visible items */
.gallery-item:nth-child(1).visible { animation-delay: 0.05s; }
.gallery-item:nth-child(2).visible { animation-delay: 0.1s; }
.gallery-item:nth-child(3).visible { animation-delay: 0.15s; }
.gallery-item:nth-child(4).visible { animation-delay: 0.2s; }
.gallery-item:nth-child(5).visible { animation-delay: 0.25s; }
.gallery-item:nth-child(6).visible { animation-delay: 0.3s; }
.gallery-item:nth-child(7).visible { animation-delay: 0.35s; }
.gallery-item:nth-child(8).visible { animation-delay: 0.4s; }
.gallery-item:nth-child(9).visible { animation-delay: 0.45s; }
.gallery-item:nth-child(10).visible { animation-delay: 0.5s; }
.gallery-item:nth-child(11).visible { animation-delay: 0.55s; }
.gallery-item:nth-child(12).visible { animation-delay: 0.6s; }

/* Border accent bar at bottom of each item */
.gallery-item__border-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #C07040;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 5;
}

.gallery-item:hover .gallery-item__border-accent {
    transform: scaleX(1);
}

/* Hover border color change */
.gallery-item:hover {
    border-color: #C07040;
}

/* Line-Illustration background */
.gallery-item__illustration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.12;
    transition: opacity 0.5s ease, transform 0.6s ease;
}

.gallery-item__illustration svg {
    width: 65%;
    height: 65%;
}

/* Hover state: illustration shifts and becomes more visible */
.gallery-item:hover .gallery-item__illustration {
    opacity: 0.22;
    transform: scale(1.05);
}

/* Hover reveal content */
.gallery-item__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 24px;
    background: linear-gradient(
        to top,
        rgba(42, 24, 16, 0.94) 0%,
        rgba(42, 24, 16, 0.7) 50%,
        rgba(42, 24, 16, 0.15) 80%,
        transparent 100%
    );
    transform: translateY(55%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover .gallery-item__content {
    transform: translateY(0);
}

/* Shake on hover for charged content */
.shake-target:hover {
    animation: shake 250ms ease-in-out;
}

/* Gallery item label (Space Grotesk) */
.gallery-item__label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.65rem;
    color: #C07040;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

/* Gallery item title (Syne) */
.gallery-item__title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #FFF6EC;
    margin-bottom: 8px;
    line-height: 1.2;
}

/* Gallery item text (Lora) */
.gallery-item__text {
    font-family: 'Lora', Georgia, serif;
    font-weight: 300;
    font-size: clamp(0.72rem, 0.85vw, 0.88rem);
    color: #F4ECE0;
    line-height: 1.65;
    opacity: 0;
    transition: opacity 0.45s ease 0.12s;
}

.gallery-item:hover .gallery-item__text {
    opacity: 0.9;
}

/* Political Red accent on certain items */
.gallery-item:nth-child(2) .gallery-item__label,
.gallery-item:nth-child(6) .gallery-item__label,
.gallery-item:nth-child(10) .gallery-item__label {
    color: #C04030;
}

.gallery-item:nth-child(2) .gallery-item__border-accent,
.gallery-item:nth-child(6) .gallery-item__border-accent,
.gallery-item:nth-child(10) .gallery-item__border-accent {
    background: #C04030;
}

.gallery-item:nth-child(2):hover,
.gallery-item:nth-child(6):hover,
.gallery-item:nth-child(10):hover {
    border-color: #C04030;
}

/* === Closing Section === */
#closing-section {
    position: relative;
    z-index: 1;
    padding: 60px 40px 80px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.closing-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.closing-divider__line {
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: #4A3020;
    opacity: 0.25;
}

.closing-divider__symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.closing-quote {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: #5A3828;
    line-height: 1.8;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.closing-quote.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Footer === */
#site-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px 50px;
}

.footer-mountain {
    width: 100%;
    margin-bottom: 30px;
    opacity: 0.5;
}

.footer-mountain svg {
    display: block;
    width: 100%;
    height: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: #2A1810;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.65rem;
    color: #6A4A38;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.footer-year {
    font-family: 'Lora', Georgia, serif;
    font-weight: 300;
    font-size: 0.7rem;
    color: #C07040;
    letter-spacing: 0.3em;
    margin-top: 4px;
}

/* === Responsive === */

/* Tablet */
@media (max-width: 1024px) {
    #gallery-grid {
        gap: 3px;
        padding: 0 16px 50px;
    }

    .gallery-item__content {
        padding: 22px 20px;
    }
}

/* Smaller tablet */
@media (max-width: 900px) {
    #gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item--wide {
        grid-column: span 2;
    }

    #site-header {
        min-height: 80vh;
    }
}

/* Mobile */
@media (max-width: 600px) {
    #gallery-grid {
        grid-template-columns: 1fr;
        gap: 3px;
        padding: 0 12px 40px;
    }

    .gallery-item--wide {
        grid-column: span 1;
    }

    .gallery-item--square {
        aspect-ratio: 4 / 3;
    }

    #site-header {
        min-height: 70vh;
        padding: 60px 16px 50px;
    }

    .gallery-item__content {
        transform: translateY(40%);
        padding: 18px 16px;
    }

    .section-label {
        padding: 16px 20px 30px;
    }

    .section-label__line {
        max-width: 60px;
    }

    #closing-section {
        padding: 40px 20px 60px;
    }

    .closing-quote {
        font-size: clamp(0.85rem, 3.5vw, 1rem);
    }

    .scroll-indicator {
        bottom: 30px;
    }
}

/* Small mobile */
@media (max-width: 400px) {
    #site-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .tagline {
        font-size: 0.6rem;
        letter-spacing: 0.15em;
    }

    .gallery-item__title {
        font-size: 0.95rem;
    }

    .gallery-item__text {
        font-size: 0.72rem;
    }
}
