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


html,
body {
    width: 100%;
    min-height: 100%;
}


body {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    background: #d8e3dc;
}


/* =========================================================
   PÁGINA
   ========================================================= */

.home {
    position: relative;

    width: 100%;
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(300px, 390px)
        minmax(0, 1fr)
        clamp(190px, 14vw, 245px);

    grid-template-rows:
        clamp(175px, 22vh, 225px)
        minmax(0, 1fr);

    grid-template-areas:
        "title title logo"
        "menu description description";

    column-gap:
        clamp(30px, 4vw, 62px);

    row-gap:
        clamp(16px, 2.2vh, 28px);

    align-items: start;

    padding:
        clamp(28px, 3.5vh, 46px)
        5vw
        clamp(28px, 4vh, 46px);

    overflow: hidden;

    background-image:
        var(--page-background);

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* =========================================================
   MATIZAÇÃO DA IMAGEM
   ========================================================= */

.background-shade {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(38, 76, 68, 0.30) 0%,
            rgba(58, 100, 88, 0.18) 30%,
            rgba(112, 145, 126, 0.07) 60%,
            rgba(255, 255, 255, 0.00) 85%
        );

    pointer-events: none;
}


/* =========================================================
   MENU LATERAL
   ========================================================= */

.side-menu {
    grid-area: menu;

    position: relative;

    z-index: 2;

    align-self: start;

    width: min(
        390px,
        100%
    );

    padding:
        40px
        30px;

    border-radius: 22px;

    border:
        1px solid
        rgba(219, 201, 143, 0.55);

    background:
        linear-gradient(
            145deg,
            rgba(55, 100, 88, 0.78),
            rgba(76, 122, 106, 0.68),
            rgba(197, 178, 121, 0.30)
        );

    box-shadow:
        0 20px 45px
        rgba(35, 65, 56, 0.28),

        inset 0 1px 0
        rgba(255, 255, 255, 0.16);

    backdrop-filter:
        blur(10px);

    -webkit-backdrop-filter:
        blur(10px);
}


.side-menu::before {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: inherit;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.10),
            transparent 45%
        );

    pointer-events: none;
}


/* =========================================================
   CABEÇALHO DO MENU
   ========================================================= */

.menu-header {
    position: relative;

    z-index: 2;

    margin-bottom: 30px;
}


.menu-header h1 {
    color: #f2e7c4;

    font-size: 32px;

    font-weight: 600;

    letter-spacing: 3px;

    line-height: 1.1;

    text-shadow:
        0 2px 5px
        rgba(29, 55, 48, 0.30);
}


.menu-header p {
    margin-top: 9px;

    color:
        rgba(242, 231, 196, 0.76);

    font-size: 14px;

    letter-spacing: 0.5px;
}


/* =========================================================
   BOTÕES
   ========================================================= */

.menu-links {
    position: relative;

    z-index: 2;

    display: flex;

    flex-direction: column;

    gap: 14px;
}


.menu-button {
    width: 100%;

    min-height: 58px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding:
        12px
        20px;

    border-radius: 12px;

    border:
        1px solid
        rgba(232, 213, 154, 0.45);

    background:
        linear-gradient(
            135deg,
            rgba(242, 230, 190, 0.30),
            rgba(113, 156, 136, 0.42)
        );

    color: #fff3cf;

    text-decoration: none;

    text-align: center;

    font-size: 15px;

    font-weight: 600;

    letter-spacing: 1.5px;

    box-shadow:
        0 7px 16px
        rgba(34, 70, 60, 0.18),

        inset 0 1px 0
        rgba(255, 255, 255, 0.12);

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}


.menu-button:hover {
    transform:
        translateX(5px);

    background:
        linear-gradient(
            135deg,
            rgba(239, 214, 137, 0.48),
            rgba(100, 164, 137, 0.58)
        );

    border-color:
        rgba(247, 219, 132, 0.68);

    box-shadow:
        0 10px 22px
        rgba(34, 70, 60, 0.24);
}


.menu-button:active {
    transform:
        translateX(3px)
        scale(0.99);
}


/* =========================================================
   TÍTULO DO RPG
   ========================================================= */

.rpg-title-area {
    grid-area: title;

    position: relative;

    z-index: 2;

    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    padding:
        8px
        clamp(20px, 3vw, 50px);

    text-align: center;
}


.rpg-title {
    width: 100%;

    margin: 0 auto;

    color: #f7e8b8;

    font-family:
        var(--title-font);

    /*
       O tamanho salvo na Administração continua sendo usado,
       mas o título nunca fica menor que 68px em telas grandes.
    */
    font-size:
        clamp(
            68px,
            calc(var(--title-size) * 1.45),
            112px
        );

    font-weight:
        var(--title-weight);

    font-style:
        var(--title-style);

    letter-spacing:
        var(--title-spacing);

    line-height: 1.02;

    text-align: center;

    white-space: nowrap;

    overflow: visible;

    text-shadow:
        0 3px 8px
        rgba(22, 48, 40, 0.52),

        0 0 24px
        rgba(224, 202, 137, 0.20);
}


/* =========================================================
   CAIXA DO LOGOTIPO
   ========================================================= */

.rpg-logo-area {
    grid-area: logo;

    position: relative;

    z-index: 2;

    width: 100%;
    height: 100%;

    min-height: 155px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 12px;

    border-radius: 20px;

    border:
        1px solid
        rgba(219, 201, 143, 0.58);

    background:
        linear-gradient(
            145deg,
            rgba(55, 100, 88, 0.58),
            rgba(76, 122, 106, 0.45),
            rgba(197, 178, 121, 0.20)
        );

    box-shadow:
        0 14px 34px
        rgba(35, 65, 56, 0.20),

        inset 0 1px 0
        rgba(255, 255, 255, 0.14);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);
}


.rpg-logo-area::before {
    content: "";

    position: absolute;

    inset: 9px;

    border-radius: 14px;

    border:
        1px dashed
        rgba(239, 219, 159, 0.30);

    pointer-events: none;
}


.rpg-logo {
    position: relative;

    z-index: 2;

    width: 100%;
    height: 100%;

    max-width: 220px;
    max-height: 190px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 8px 16px
            rgba(24, 48, 41, 0.42)
        );
}


.rpg-logo-placeholder {
    position: relative;

    z-index: 2;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    color:
        rgba(247, 232, 184, 0.68);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    text-align: center;

    letter-spacing: 3px;

    user-select: none;
}


.rpg-logo-placeholder span {
    font-size: 23px;

    font-weight: 700;
}


.rpg-logo-placeholder small {
    margin-top: 5px;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 2px;
}


/* =========================================================
   CAIXA GRANDE DA APRESENTAÇÃO
   ========================================================= */

.rpg-description-box {
    grid-area: description;

    position: relative;

    z-index: 2;

    width: 100%;
    height: 100%;

    min-height: 0;

    padding: 13px;

    border-radius: 22px;

    border:
        1px solid
        rgba(219, 201, 143, 0.55);

    background:
        linear-gradient(
            145deg,
            rgba(55, 100, 88, 0.72),
            rgba(76, 122, 106, 0.62),
            rgba(197, 178, 121, 0.24)
        );

    box-shadow:
        0 20px 45px
        rgba(35, 65, 56, 0.25),

        inset 0 1px 0
        rgba(255, 255, 255, 0.15);

    backdrop-filter:
        blur(9px);

    -webkit-backdrop-filter:
        blur(9px);
}


.rpg-description {
    width: 100%;
    height: 100%;

    min-height:
        clamp(
            360px,
            52vh,
            590px
        );

    max-height:
        calc(
            100vh - clamp(
                235px,
                29vh,
                300px
            )
        );

    overflow-y: auto;

    overscroll-behavior: contain;

    padding:
        clamp(
            28px,
            3vw,
            42px
        )
        clamp(
            26px,
            3.4vw,
            46px
        );

    border-radius: 15px;

    background:
        linear-gradient(
            160deg,
            rgba(250, 245, 224, 0.91),
            rgba(237, 238, 216, 0.87)
        );

    color: #294038;

    font-family:
        var(--text-font);

    font-size:
        var(--text-size);

    font-weight:
        var(--text-weight);

    font-style:
        var(--text-style);

    letter-spacing:
        var(--text-spacing);

    line-height: 1.78;

    text-align: justify;

    box-shadow:
        inset 0 0 34px
        rgba(57, 82, 70, 0.08);
}


.rpg-description p {
    white-space: pre-line;

    text-indent:
        var(--paragraph-indent);

    margin-bottom: 1.18em;
}


.rpg-description p:last-child {
    margin-bottom: 0;
}


.rpg-description-empty {
    text-indent: 0 !important;

    text-align: center !important;

    opacity: 0.66;

    font-style: italic;
}


.rpg-description:focus {
    outline:
        2px solid
        rgba(224, 201, 132, 0.55);

    outline-offset: 3px;
}


/* =========================================================
   BARRA DE ROLAGEM
   ========================================================= */

.rpg-description {
    scrollbar-width: thin;

    scrollbar-color:
        rgba(91, 122, 106, 0.78)
        rgba(45, 75, 66, 0.10);
}


.rpg-description::-webkit-scrollbar {
    width: 10px;
}


.rpg-description::-webkit-scrollbar-track {
    background:
        rgba(45, 75, 66, 0.08);

    border-radius: 10px;
}


.rpg-description::-webkit-scrollbar-thumb {
    background:
        rgba(91, 122, 106, 0.78);

    border:
        2px solid
        rgba(242, 238, 215, 0.72);

    border-radius: 10px;
}


/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (
    max-width: 1180px
) {

    .home {
        grid-template-columns:
            minmax(285px, 350px)
            minmax(0, 1fr)
            180px;

        column-gap: 28px;
    }


    .rpg-title {
        white-space: normal;

        font-size:
            clamp(
                56px,
                calc(var(--title-size) * 1.25),
                88px
            );
    }

}


@media (
    max-width: 900px
) {

    .home {
        display: flex;

        flex-direction: column;

        align-items: center;

        gap: 24px;

        padding:
            24px
            20px;

        overflow-y: auto;
    }


    .rpg-title-area {
        order: 1;

        min-height: 120px;

        padding:
            8px
            12px;
    }


    .rpg-title {
        white-space: normal;

        font-size:
            clamp(
                46px,
                9vw,
                72px
            );
    }


    .rpg-logo-area {
        order: 2;

        width: min(
            230px,
            70vw
        );

        height: 170px;
    }


    .side-menu {
        order: 3;

        width: min(
            100%,
            390px
        );
    }


    .rpg-description-box {
        order: 4;

        width: min(
            100%,
            720px
        );

        height: auto;
    }


    .rpg-description {
        min-height: 420px;

        max-height: 58vh;
    }

}


@media (
    max-width: 600px
) {

    .rpg-title {
        font-size:
            clamp(
                38px,
                11vw,
                58px
            );
    }


    .rpg-description {
        min-height: 360px;

        padding:
            24px
            20px;

        font-size:
            min(
                var(--text-size),
                19px
            );
    }

}


/* =========================================================
   HOME — MENU TECNOLÓGICO DIRETO
   Aplicado diretamente em home.css para não depender do tema global.
   ========================================================= */

.home .side-menu{
    border-radius:6px !important;
    border:1px solid rgba(125,232,255,.76) !important;

    background:
        linear-gradient(
            145deg,
            rgba(7,31,54,.96),
            rgba(14,62,99,.92),
            rgba(11,90,128,.52)
        ) !important;

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.05),
        inset 0 0 26px rgba(67,207,255,.08),
        0 16px 36px rgba(0,0,0,.34),
        0 0 20px rgba(67,207,255,.12) !important;

    clip-path:polygon(
        0 18px,
        18px 0,
        calc(100% - 14px) 0,
        100% 14px,
        100% calc(100% - 18px),
        calc(100% - 18px) 100%,
        14px 100%,
        0 calc(100% - 14px)
    );
}

.home .side-menu::before{
    inset:8px !important;
    border:1px solid rgba(125,232,255,.18) !important;
    border-radius:0 !important;

    background:
        linear-gradient(135deg,rgba(125,232,255,.08),transparent 28%),
        repeating-linear-gradient(
            90deg,
            transparent 0 23px,
            rgba(67,207,255,.055) 23px 24px,
            transparent 24px 48px
        ) !important;

    clip-path:polygon(
        0 9px,
        9px 0,
        calc(100% - 9px) 0,
        100% 9px,
        100% calc(100% - 9px),
        calc(100% - 9px) 100%,
        9px 100%,
        0 calc(100% - 9px)
    );
}

.home .menu-button{
    position:relative !important;
    min-height:58px !important;

    border-radius:0 !important;
    border:1px solid rgba(125,232,255,.88) !important;

    background:
        linear-gradient(
            180deg,
            rgba(35,126,194,.98),
            rgba(8,58,102,.99)
        ) !important;

    color:#f2fcff !important;

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.08),
        inset 0 13px 17px rgba(255,255,255,.045),
        0 8px 18px rgba(0,0,0,.30),
        0 0 20px rgba(67,207,255,.13) !important;

    clip-path:polygon(
        0 10px,
        10px 0,
        calc(100% - 18px) 0,
        100% 18px,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        14px 100%,
        0 calc(100% - 14px)
    );
}

.home .menu-button::before{
    content:"" !important;
    position:absolute !important;
    inset:0 !important;
    pointer-events:none !important;

    background:
        linear-gradient(
            120deg,
            rgba(255,255,255,.22),
            transparent 28%,
            transparent 72%,
            rgba(125,232,255,.10)
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0 18px,
            rgba(125,232,255,.07) 18px 19px,
            transparent 19px 37px
        ) !important;
}

.home .menu-button::after{
    content:"" !important;
    position:absolute !important;
    inset:6px !important;
    pointer-events:none !important;

    border:1px solid rgba(125,232,255,.24) !important;

    clip-path:polygon(
        0 6px,
        6px 0,
        calc(100% - 10px) 0,
        100% 10px,
        100% calc(100% - 6px),
        calc(100% - 6px) 100%,
        8px 100%,
        0 calc(100% - 8px)
    );
}

.home .menu-button:hover{
    transform:translateX(5px) !important;

    background:
        linear-gradient(
            180deg,
            rgba(52,154,224,.99),
            rgba(10,76,128,.99)
        ) !important;

    border-color:rgba(194,250,255,1) !important;

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.10),
        0 11px 23px rgba(0,0,0,.34),
        0 0 28px rgba(67,207,255,.24) !important;
}


/* =========================================================
   HOME — BANNER/TÍTULO OCUPANDO TODA A FAIXA SUPERIOR
   ========================================================= */

/*
   A imagem Beyond the Heavens é tratada como o banner principal.
   Ela ocupa toda a primeira linha da Home, de uma lateral à outra
   dentro da área útil da página.
*/
.home{
    grid-template-areas:
        "logo logo logo"
        "menu description description" !important;
}

/* O banner/logo passa a ocupar toda a largura superior. */
.home .rpg-logo-area{
    grid-area:logo !important;
    grid-column:1 / -1 !important;
    grid-row:1 !important;

    width:100% !important;
    max-width:none !important;
    height:100% !important;
    min-height:0 !important;

    padding:0 !important;
    margin:0 !important;

    display:flex !important;
    align-items:stretch !important;
    justify-content:stretch !important;

    border:0 !important;
    border-radius:12px !important;
    background:transparent !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;

    overflow:hidden !important;
}

/* Retira a moldura antiga tracejada do logo. */
.home .rpg-logo-area::before{
    display:none !important;
}

/* A imagem realmente preenche a faixa, sem ficar pequena no canto. */
.home .rpg-logo{
    width:100% !important;
    height:100% !important;

    max-width:none !important;
    max-height:none !important;

    object-fit:cover !important;
    object-position:center !important;

    border-radius:12px !important;

    filter:
        drop-shadow(0 8px 18px rgba(0,0,0,.34)) !important;
}

/*
   Se ainda houver título textual configurado no sistema,
   ele fica sobreposto ao banner, em vez de reservar outra coluna
   e desalinhá-lo.
*/
.home .rpg-title-area{
    grid-area:unset !important;

    position:absolute !important;
    top:clamp(28px,3.5vh,46px) !important;
    left:5vw !important;
    right:5vw !important;

    width:auto !important;
    height:clamp(175px,22vh,225px) !important;

    padding:
        8px
        clamp(24px,4vw,62px) !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    z-index:4 !important;
    pointer-events:none !important;
}

/* Imagens eventualmente usadas dentro da área de título também
   passam a preencher toda a largura. */
.home .rpg-title-area img{
    width:100% !important;
    height:100% !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:cover !important;
    object-position:center !important;
}

/* Caso o título textual esteja vazio, ele não cria espaço visual. */
.home .rpg-title:empty{
    display:none !important;
}

@media(max-width:900px){
    .home .rpg-logo-area{
        order:1 !important;
        width:100% !important;
        height:clamp(120px,26vw,180px) !important;
    }

    .home .rpg-title-area{
        order:1 !important;
        position:absolute !important;
        top:24px !important;
        left:20px !important;
        right:20px !important;
        height:clamp(120px,26vw,180px) !important;
        min-height:0 !important;
        width:auto !important;
    }

    .home .side-menu{
        order:2 !important;
    }

    .home .rpg-description-box{
        order:3 !important;
    }
}
