/* =========================
   RESET / BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lato', 'Segoe UI', Arial, Helvetica, sans-serif;
}

html, body {
    height: 100%;
}

/* Evita bugs de media query + scroll horizontal */
body {
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Texto invisível para SEO / acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* =========================
   BACKGROUND
========================= */
body {
    min-height: 100vh;
    background:
        linear-gradient(45deg, #010000, #403011, #774e00),
        url("/img/bg.png") center / cover no-repeat;
    background-blend-mode: overlay;
    color: #fff;
    user-select: none;
}

/* =========================
   LOADING SCREEN
========================= */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(45deg, #010000, #403011, #774e00);
}

.loader-logo {
    width: 260px;
    opacity: 0;
    transform: scale(0.85);
    animation:
        logoFadeIn 1.6s ease forwards,
        pulse 2.5s ease-in-out infinite 1.6s;
}

@keyframes logoFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* =========================
   LEAVES / WIND SYSTEM
========================= */
.leaves-layer {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.leaf {
    position: absolute;
    will-change: transform;
    user-select: none;
    pointer-events: none;
    filter: blur(0.2px);
    opacity: 0.4;
}

/* Depth variation */
.leaf:nth-child(3n) {
    filter: blur(1px);
    opacity: 0.25;
}

.leaf:nth-child(3n + 1) {
    filter: blur(0.5px);
    opacity: 0.35;
}

.leaf:nth-child(3n + 2) {
    filter: blur(0px);
    opacity: 0.5;
}

/* =========================
   HEADER
========================= */
.header {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 30;
}

.logo {
    height: 14vh;
    margin-top: 1vh;
}

/* =========================
   CONTAINER
========================= */
.container {
    max-width: 80%;
    margin: auto;
    padding: 80px 40px;
    position: relative;
    z-index: 20;
}

/* =========================
   GRID
========================= */
.parent {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 12vh);
    gap: 2vh;
}

/* Grid areas */
.div1 { grid-area: 1 / 1 / 2 / 3; }
.div2 { grid-area: 1 / 3 / 2 / 5; }
.div3 { grid-area: 2 / 1 / 3 / 2; }
.div4 { grid-area: 2 / 2 / 3 / 4; }
.div5 { grid-area: 2 / 4 / 3 / 5; }
.div6 { grid-area: 3 / 1 / 4 / 3; }
.div7 { grid-area: 3 / 3 / 4 / 4; }
.div8 { grid-area: 3 / 4 / 4 / 5; }

/* =========================
   CARDS
========================= */
.card {
    position: relative;
    z-index: 20;

    border-radius: 3.6vh;
    display: flex;
    align-items: center;
    padding-left: 28px;

    background: rgba(110,110,110,.55);
    backdrop-filter: blur(10px);
    cursor: pointer;

    transition: transform .25s ease, background .25s ease;
    box-shadow: 0.1vh 0.8vh 3vh black;
}

/* Hover */
.card:hover {
    transform: translateY(-3px);
    background: rgba(168, 140, 0, 0.7);
}

/* =========================
   ICONS
========================= */
.card::before {
    content: "";
    position: relative;
    z-index: 25;

    width: 80%;
    height: 8vh;

    background-size: contain;
    background-repeat: no-repeat;
}

/* Ícones */
.whatsapp::before { background-image: url("/img/Whatsapp.png"); }
.discord::before  { background-image: url("/img/Discord.png"); }
.telegram::before { background-image: url("/img/Telegram.png"); }
.youtube::before  { background-image: url("/img/Youtube.png"); }
.tiktok::before   { background-image: url("/img/TikTok.png"); }
.instagram::before{ background-image: url("/img/Instagram.png"); }
.x::before        { background-image: url("/img/X.png"); }
.regras::before   { background-image: url("/img/Regras.png"); }

/* =========================
   IMAGE CARDS (TOP)
========================= */
.image-card {
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.image-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to right,
        rgba(0,0,0,.55),
        rgba(0,0,0,.15)
    );
}

/* Backgrounds */
.bg-whatsapp { background-image: url("/img/cards/whatsapp.jpg"); }
.bg-discord  { background-image: url("/img/cards/discord.jpg"); }

/* =========================
   FOOTER
========================= */
.footer {
    position: absolute;
    width: 80%;
    height: 15%;
    bottom: -5%;
    left: 50%;
    transform: translateX(-50%);

    background: linear-gradient(
        to right,
        rgba(0,0,0,.65),
        rgba(0,0,0,.25)
    );

    border-top: 1px solid rgba(255,255,255,.08);
    border-radius: 2rem;
    z-index: 30;
}

.footer h3 {
    font-size: 3.8vh;
    font-weight: 500;
    opacity: .85;
    margin: 2vh 0 0 5vh;
}

/* =========================
   MODAL
========================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;

    z-index: 100;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: linear-gradient(145deg, #111, #1c1c1c);
    border-radius: 1.8rem;
    width: min(90%, 600px);
    padding: 35px;

    color: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    position: relative;
}

.modal-box h2 {
    margin-bottom: 15px;
    font-weight: 700;
}

.modal-box p {
    line-height: 1.6;
    opacity: .9;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;

    background: none;
    border: none;
    font-size: 32px;
    color: #ffd400;
    cursor: pointer;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width:700px) {

    .container {
        max-width: 95%;
    }

    .parent {
        grid-template-rows: repeat(3, 7vh);
    }

    .card {
        border-radius: 1.5vh;
        padding-left: 2vw;
    }

    .card::before {
        height: 7vh;
        width: 100%;
    }
}
