/* =====================================================
   Australian Weathercam Network — Memorial Camera Wall
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@300;400&display=swap');

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

html, body {
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    color: #fff;
    font-family: 'Barlow', system-ui, -apple-system, sans-serif;
    overflow: hidden; /* wall fills exactly the screen */
}

/* ── Header ─────────────────────────────────────────── */

#site-header {
    position: relative;
    width: 100%;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    flex-shrink: 0;
}

/* blurred hero image behind header */
#header-bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(14px) brightness(0.35) saturate(1.4);
    transform: scale(1.1);
    transition: background-image 1s ease;
    z-index: 0;
}

/* dark gradient overlay */
#site-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 46, 0.72) 0%,
        rgba(15, 52, 96, 0.55) 100%
    );
    z-index: 1;
}

/* orange accent bar at bottom of header */
#site-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff6b00, #ffaa00, #ff6b00, transparent);
    z-index: 3;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    max-width: 900px;
}

.header-content h1 {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.4rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8), 0 0 40px rgba(255,107,0,0.3);
}

.header-content .year-range {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    letter-spacing: 0.25em;
    color: #ff9a3c;
    margin: 6px 0 10px;
    text-shadow: 0 0 20px rgba(255,107,0,0.5);
}

.header-content .tribute-text {
    font-size: clamp(0.68rem, 1.2vw, 0.82rem);
    font-weight: 300;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
    max-width: 720px;
    margin: 0 auto;
}

/* ── Camera Wall ─────────────────────────────────────── */

#camera-wall {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-auto-rows: 1fr;
    gap: 3px;
    background: #080808;
    overflow: hidden;
}

.camera-cell {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #080808;
    font-size: 0;
    line-height: 0;
}

.camera-cell img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 135%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    will-change: transform;
    cursor: pointer !important;
}

.camera-cell:hover img {
    transform: scale(1.08);
    box-shadow: 0 0 24px rgba(255, 140, 0, 0.65);
    z-index: 10;
    position: relative;
}

/* Location label on hover */
.camera-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 8px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,0.78));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

.camera-cell:hover .camera-label {
    opacity: 1;
    transform: translateY(0);
}

/* ── Placeholder / Loading states ───────────────────── */

.camera-cell.loading {
    background: #0d0d0d;
}

.camera-cell.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,107,0,0.06) 50%,
        transparent 100%
    );
    animation: shimmer 1.8s infinite;
}

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

/* ── Responsive breakpoints ─────────────────────────── */

@media (max-width: 900px) {
    #camera-wall {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

@media (max-width: 600px) {
    #site-header {
        height: 160px;
    }

    #camera-wall {
        height: calc(100vh - 160px);
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 2px;
    }

    .header-content .tribute-text {
        display: none; /* hide long text on small screens to keep header compact */
    }

    .header-content .year-range {
        margin-bottom: 0;
    }
}

@media (max-width: 400px) {
    #camera-wall {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}


/* ── Scrollbar (body has overflow:hidden but just in case) */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #ff6b00; border-radius: 2px; }
