/*
 * Memórias do Futuro
 *
 * This stylesheet defines the visual language for the landing page.
 * The colour palette borrows from the dark, industrial mood of the Pejão coal mines – deep blacks and greys with pops of neon inspired by 1980s retro‑futurist aesthetics【88970535578761†L193-L198】.  
 * A subtle falling dust animation pays tribute to the coal dust and geological heritage of the complex【302831969384730†L58-L67】.
 */

/* Import the retro typeface. This font draws on the pixel‑style lettering popularised by 1980s arcade machines, providing a nostalgic feel. */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Base styles */
body {
    font-family: 'Press Start 2P', monospace;
    background-color: #0b0c10;
    color: #c5c6c7;
    margin: 0;
    overflow-x: hidden;
}

header {
    text-align: center;
    padding: 40px 20px 20px;
    font-size: 2rem;
    color: #66fcf1;
    text-shadow: 0 0 10px #45a29e;
    position: relative;
    z-index: 3;
}

header .icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #66fcf1;
}

.subtitle {
    font-size: 1rem;
    color: #c5c6c7;
    margin-top: 10px;
}

/* Grid layout for the photographs */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 20px 40px;
    position: relative;
    z-index: 2; /* ensure cards sit above dust particles */
}

/* Flip card container */
.flip-card {
    width: 100%;
    padding-top: 56.25%; /* maintain 16:9 aspect ratio using padding hack */
    perspective: 1000px; /* creates a 3D space for the flip effect【689066602942100†L1065-L1083】 */
    position: relative;
    cursor: pointer;
}

/* Inner wrapper rotated to create the flipping effect */
.flip-card-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 1s;
    transform-style: preserve-3d; /* ensures children are rendered in 3D space【689066602942100†L1065-L1099】 */
}

/* Apply the flip when the card has the "flipped" class */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg); /* rotate horizontally around the Y axis【689066602942100†L1086-L1091】 */
}

/* Front and back sides */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* hide the back of the elements when facing away【689066602942100†L1092-L1100】 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Image on the front */
.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Styling for the back of the card where the video is shown */
.flip-card-back {
    transform: rotateY(180deg);
    background-color: #1f2833;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flip-card-back video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dust container occupies the full viewport and ignores pointer events */
#dustContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Individual dust particles */
.dust {
    position: absolute;
    top: -10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes fall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Responsive text sizes for small screens */
@media (max-width: 600px) {
    header {
        font-size: 1.5rem;
    }
    .subtitle {
        font-size: 0.8rem;
    }
}

/* Footer and view counter styling */
footer {
    text-align: center;
    padding: 20px;
    color: #c5c6c7;
    font-size: 0.8rem;
    z-index: 2;
}

.view-counter {
    display: inline-block;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}