/* ==============================================
   ANIMATION PAGE — gallery + lightbox
   ============================================== */

/* ---- Reset ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h2,
h3,
p,
figure,
section {
    margin: 0;
    padding: 0;
}

/* ---- Base ---- */
body {
    font-family: 'Libre Baskerville', Georgia, serif;
    background: #111;
    color: #d4cdc4;
    line-height: 1.6;
}

::selection {
    background: #c9a96e;
    color: #111;
}


/* ====================
   HEADINGS
   ==================== */

.featured h2,
.gallery h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #e8e0d4;
    margin: 2.5rem 0 1.25rem;
    letter-spacing: 0.5px;
}

.featured h2::after,
.gallery h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 1.5px;
    background: #c9a96e;
    margin: 0.75rem auto 0;
}


/* ====================
   LOADING / ERROR
   ==================== */

.loading {
    text-align: center;
    color: #5a5550;
    padding: 3rem;
    font-style: italic;
    grid-column: 1 / -1;
}

.error-msg {
    text-align: center;
    color: #a05050;
    padding: 2rem;
    font-style: italic;
    grid-column: 1 / -1;
}


/* ====================
   FEATURED REEL
   ==================== */

.featured {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2rem;
}

.featured-frame {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
}

.featured-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.featured-title {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.05rem;
    font-style: italic;
    color: #807a72;
}


/* ====================
   GRID
   ==================== */

.gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .grid {
        grid-template-columns: 1fr;
    }
}


/* ====================
   VIDEO CARD
   ==================== */

.card {
    background: #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    opacity: 0;
    animation: cardIn 0.5s ease forwards;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(201, 169, 110, 0.15);
}

/* ---- Thumbnail ---- */
.card-thumb {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s, filter 0.4s;
}

.card-thumb:hover img {
    transform: scale(1.04);
    filter: brightness(0.5);
}

/* ---- Play Button ---- */
.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
    z-index: 2;
}

.card-play svg {
    width: 22px;
    height: 22px;
    fill: #e8e0d4;
    margin-left: 3px;
    transition: fill 0.3s;
}

.card-play:hover,
.card-thumb:hover .card-play {
    transform: translate(-50%, -50%) scale(1);
    background: rgba(201, 169, 110, 0.25);
    border-color: rgba(201, 169, 110, 0.6);
}

.card-play:hover svg,
.card-thumb:hover .card-play svg {
    fill: #c9a96e;
}

/* ---- Card Title ---- */
.card-title {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    font-weight: 400;
    font-style: italic;
    color: #807a72;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ====================
   LIGHTBOX
   ==================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.lightbox-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox-body {
    position: relative;
    width: 90%;
    max-width: 960px;
    z-index: 1;
    transform: scale(0.95);
    transition: transform 0.3s;
}

.lightbox.open .lightbox-body {
    transform: scale(1);
}

.lightbox-frame {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lightbox-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lightbox-x {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: #807a72;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
    font-family: 'Libre Baskerville', serif;
}

.lightbox-x:hover {
    color: #c9a96e;
}