/*
Theme Name: WEMAKEHEART
Theme URI: https://wemakeheart.com
Author: WEMAKEHEART
Description: Single-page WordPress theme for WEMAKEHEART ad agency. Brutalist design with hero, brand runners, and advertising work gallery.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: wemakeheart
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #fff;
    font-family: 'Arial Black', Arial, sans-serif;
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 55px 30px;
}

.hero-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    max-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 900px;
}

.hero-content h1 {
    font-size: clamp(28px, 4vw, 64px);
    line-height: 1.25;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #ff0000 0%, #ffffff 25%, #ff0000 50%, #ffffff 75%, #ff0000 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Runners */
.runner-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.runner-top {
    position: absolute;
    top: 12px;
    left: 0;
    width: 100%;
    height: 44px;
    overflow: hidden;
}

.runner-text-top {
    display: flex;
    white-space: nowrap;
    animation: moveRight 12s linear infinite;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
}

.runner-text-top span { flex-shrink: 0; }

.runner-bottom {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    height: 44px;
    overflow: hidden;
}

.runner-text-bottom {
    display: flex;
    white-space: nowrap;
    animation: moveLeft 12s linear infinite;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
}

.runner-text-bottom span { flex-shrink: 0; }

@keyframes moveLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes moveRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Gallery Section - Masonry + Infinite Scroll */
.gallery-section {
    padding: 80px 30px 120px;
    background: #0a0a0a;
}

.gallery-section h2 {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 900;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 50px;
    text-align: center;
}

.gallery-grid {
    column-count: 4;
    column-gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.03) rotate(1deg);
    border-color: #ff0000;
    box-shadow: 0 25px 50px rgba(255,0,0,0.2);
}

.gallery-item:nth-child(3n):hover {
    transform: translateY(-8px) scale(1.03) rotate(-1deg);
}

.gallery-item:nth-child(5n):hover {
    transform: translateY(-8px) scale(1.03) rotate(2deg);
}

.gallery-item img,
.gallery-item object {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: bottom;
}

.gallery-item object {
    pointer-events: none;
}

.gallery-item-loading {
    animation: galleryFadeIn 0.5s ease forwards;
}

@keyframes galleryFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-sentinel {
    height: 1px;
    visibility: hidden;
    margin-top: 40px;
}

.gallery-sentinel.gallery-complete {
    display: none;
}

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.gallery-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    animation: lightboxPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.gallery-lightbox-close:hover {
    opacity: 1;
}

@media (max-width: 1200px) {
    .gallery-grid { column-count: 3; }
}

@media (max-width: 768px) {
    .hero-section { padding: 50px 25px; }
    .hero-content h1 { font-size: clamp(24px, 6vw, 36px); }
    .runner-text-top, .runner-text-bottom { font-size: 20px; }
    .gallery-grid { column-count: 2; column-gap: 16px; }
    .gallery-item { margin-bottom: 16px; }
    .gallery-section { padding: 60px 20px 80px; }
}

@media (max-width: 480px) {
    .gallery-grid { column-count: 1; }
}
