/* ══════════════════════════════════════
   Brand Gallery — Client Preview
   Dark theme · Zoom/pan lightbox
   ══════════════════════════════════════ */

:root {
    --bg: #0a0a0b;
    --surface: #141416;
    --surface-hover: #1c1c1f;
    --border: #2a2a2e;
    --text: #e8e8ec;
    --text-muted: #6b6b76;
    --accent: #5e6ad2;
    --accent-glow: rgba(94, 106, 210, 0.15);
    --radius: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-user-select: none;
}

.hidden { display: none !important; }

/* ── Password Gate ── */
.gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(94, 106, 210, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(94, 106, 210, 0.04) 0%, transparent 60%);
}

.gate-card {
    text-align: center;
    padding: 48px 40px 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 360px;
    max-width: 90vw;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.gate-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.gate-card h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.gate-card > p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

#gate-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    user-select: text;
    -webkit-user-select: text;
}

#gate-form input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#gate-form button {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

#gate-form button:hover { opacity: 0.9; }
#gate-form button:active { transform: scale(0.98); }

.gate-error {
    margin-top: 14px;
    font-size: 13px;
    color: #e85c5c;
}

/* ── Header ── */
.header {
    text-align: center;
    padding: 60px 24px 40px;
}

.header h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 300;
}

/* ── Gallery Grid ── */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0 24px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(94, 106, 210, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.5s ease;
    draggable: false;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

/* Item overlay label */
.gallery-item .item-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 14px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s, transform 0.3s;
}

.gallery-item:hover .item-label {
    opacity: 1;
    transform: translateY(0);
}

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 32px 24px 48px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lb-fade-in 0.2s ease;
}

@keyframes lb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lb-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lb-close:hover { background: rgba(255, 255, 255, 0.15); }

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lb-nav:hover { background: rgba(255, 255, 255, 0.14); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* Lightbox stage — scrollable/pannable area */
.lb-stage {
    width: 90vw;
    height: 85vh;
    overflow: hidden;
    cursor: grab;
    position: relative;
    border-radius: 8px;
    touch-action: none;
}

.lb-stage:active { cursor: grabbing; }

.lb-stage img {
    position: absolute;
    max-width: none;
    max-height: none;
    transform-origin: center center;
    /* will be set by JS for zoom/pan */
    pointer-events: none;
    draggable: false;
}

.lb-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    z-index: 10;
}

/* ── Download Protection ── */
img {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
        padding: 0 12px 40px;
    }

    .header { padding: 40px 16px 28px; }

    .lb-stage {
        width: 96vw;
        height: 80vh;
    }

    .lb-nav {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .lb-prev { left: 10px; }
    .lb-next { right: 10px; }

    .gate-card {
        padding: 36px 28px 32px;
        width: 320px;
    }
}
