/* =========================================================
   SGSA — HOME
   Versão com atmosfera, brilho e movimento
   ========================================================= */

:root {
    --sgsa-gold: #d7a33d;
    --sgsa-gold-light: #f0c66b;
    --sgsa-red: #721b20;
    --sgsa-red-dark: #4b1016;
    --sgsa-red-light: #8d252a;
    --sgsa-purple: #17091f;
    --sgsa-purple-light: #281033;
    --sgsa-black: #090706;
    --sgsa-menu-height: 82px;
    --sgsa-max-width: 1500px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}


a:hover {
    color: inherit;
    text-decoration: none !important;
}


/* =========================================================
   ATMOSFERA
   ========================================================= */

.sgsa-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.sgsa-light-beam {
    position: absolute;
    width: 55vw;
    height: 20vh;
    opacity: .11;
    filter: blur(45px);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(215, 163, 61, .7),
        transparent
    );
    transform: rotate(-18deg);
    animation: lightDrift 18s ease-in-out infinite;
}

.sgsa-light-beam-1 {
    top: 8%;
    left: -20%;
}

.sgsa-light-beam-2 {
    top: 55%;
    right: -30%;
    opacity: .07;
    animation-delay: -9s;
    animation-duration: 24s;
}

.sgsa-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--sgsa-gold-light);
    opacity: 0;
    box-shadow: 0 0 9px rgba(240,198,107,.8);
    animation: particleFloat 11s ease-in-out infinite;
}

.sgsa-particle-1 { left: 7%; top: 76%; animation-delay: -2s; }
.sgsa-particle-2 { left: 18%; top: 23%; animation-delay: -7s; animation-duration: 14s; }
.sgsa-particle-3 { left: 31%; top: 82%; animation-delay: -5s; animation-duration: 12s; }
.sgsa-particle-4 { left: 48%; top: 17%; animation-delay: -1s; animation-duration: 15s; }
.sgsa-particle-5 { left: 64%; top: 78%; animation-delay: -8s; animation-duration: 13s; }
.sgsa-particle-6 { left: 78%; top: 29%; animation-delay: -4s; animation-duration: 16s; }
.sgsa-particle-7 { left: 88%; top: 69%; animation-delay: -10s; animation-duration: 12s; }
.sgsa-particle-8 { left: 94%; top: 14%; animation-delay: -6s; animation-duration: 17s; }


/* =========================================================
   ESTRUTURA PRINCIPAL
   ========================================================= */

.sgsa-home {
    position: relative;
    z-index: 2;

    width: min(100%, var(--sgsa-max-width));
    min-height: calc(100vh - var(--sgsa-menu-height));

    margin: 0 auto;
    padding: 32px 32px 30px;

    display: grid;
    grid-template-columns:
        minmax(340px, 1fr)
        minmax(440px, 1.18fr)
        minmax(340px, 1fr);

    gap: 34px;
    align-items: center;
}

.sgsa-column {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}


/* =========================================================
   PAINEL SUPERIOR
   ========================================================= */

.sgsa-feature-panel {
    position: relative;

    width: 100%;
    height: 220px;
    padding: 15px;

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

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(40, 15, 49, 0.97),
            rgba(17, 7, 23, 0.97)
        );

    border: 2px solid rgba(215, 163, 61, 0.78);
    border-radius: 5px;

    box-shadow:
        0 14px 35px rgba(0,0,0,0.38),
        inset 0 0 0 1px rgba(255,255,255,0.06);

    transition:
        border-color .4s ease,
        box-shadow .4s ease;
}

.sgsa-feature-panel:hover {
    border-color: rgba(240,198,107,.95);

    box-shadow:
        0 18px 45px rgba(0,0,0,.45),
        0 0 25px rgba(215,163,61,.08),
        inset 0 0 0 1px rgba(255,255,255,.07);
}


/* =========================================================
   SCGES — BRILHO
   ========================================================= */

/* Bordas arredondadas das imagens laterais/superiores */
.sgsa-feature-panel img {
    border-radius: 10px;
}



.sgsa-glow-panel {
    isolation: isolate;
}

.sgsa-panel-light {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(240,198,107,.22),
        rgba(215,163,61,.07) 35%,
        transparent 70%
    );
    filter: blur(4px);
    animation: panelPulse 5s ease-in-out infinite;
}

.sgsa-gm {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 390px;
    max-height: 190px;

    object-fit: contain;

    filter:
        drop-shadow(0 0 7px rgba(215,163,61,.18))
        drop-shadow(0 15px 25px rgba(0,0,0,.45));

    animation: symbolBreath 5s ease-in-out infinite;
}


/* =========================================================
   PAINÉIS DE IMAGEM
   ========================================================= */

.sgsa-image-panel {
    position: relative;

    width: 100%;
    height: 245px;

    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 3px;

    padding: 7px;

    background:
        linear-gradient(
            145deg,
            var(--sgsa-red-light),
            var(--sgsa-red-dark)
        );

    border: 2px solid rgba(215,163,61,0.78);
    border-radius: 5px;

    box-shadow:
        0 14px 35px rgba(0,0,0,0.38);
}

.sgsa-image-cell {
    position: relative;

    min-width: 0;
    min-height: 0;

    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    background: var(--sgsa-red);

    border: 1px solid rgba(215,163,61,0.32);

    border-radius: 10px;

    cursor: default;

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

.sgsa-image-cell:hover {
    transform: translateY(-4px);
    background: #7e2026;
    border-color: rgba(240,198,107,.8);

    box-shadow:
        0 10px 25px rgba(0,0,0,.3),
        0 0 18px rgba(215,163,61,.08);
}

.sgsa-image-cell img {
    position: relative;
    z-index: 1;

    width: 100%;
    height: 190px;

    object-fit: contain;
    padding: 8px;

    background: var(--sgsa-red);
    border: 0;
    border-radius: 10px;

    transition:
        transform .5s cubic-bezier(.2,.8,.2,1),
        filter .5s ease;
}

.sgsa-image-cell:hover img {
    transform: scale(1.025);
    filter: brightness(1.06);
}

.sgsa-image-cell span {
    position: relative;
    z-index: 3;

    width: 100%;
    min-height: 43px;
    padding: 5px 4px;

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

    color: #fff;
    background: var(--sgsa-red-dark);

    font-family: "Montserrat", sans-serif;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.1;
    text-align: center;

    transition:
        color .3s ease,
        background .3s ease;
}

.sgsa-image-cell:hover span {
    color: var(--sgsa-gold-light);
    background: #3d0c12;
}


/* =========================================================
   REFLEXO DE LUZ NAS IMAGENS
   ========================================================= */

.sgsa-image-shine {
    position: absolute;
    z-index: 2;

    top: -30%;
    left: -70%;

    width: 45%;
    height: 170%;

    pointer-events: none;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.24),
        rgba(240,198,107,.15),
        transparent
    );

    transform: rotate(18deg);
    filter: blur(5px);

    animation: imageShine 10s ease-in-out infinite;
}

.sgsa-image-cell:nth-child(2) .sgsa-image-shine {
    animation-delay: 2.4s;
}

.sgsa-image-cell:nth-child(3) .sgsa-image-shine {
    animation-delay: 4.8s;
}


/* =========================================================
   CENTRO
   ========================================================= */

.sgsa-center {
    position: relative;
    min-height: 560px;
    align-items: center;
    justify-content: center;
}

.sgsa-center-aura {
    position: absolute;

    width: 570px;
    height: 570px;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(215,163,61,.12) 0%,
        rgba(114,27,32,.08) 30%,
        rgba(24,10,32,.04) 55%,
        transparent 72%
    );

    filter: blur(4px);

    animation: auraPulse 6s ease-in-out infinite;
}

.sgsa-profile-wrap {
    position: relative;
    z-index: 4;

    width: min(100%, 600px);

    display: flex;
    align-items: center;
    justify-content: center;
}

.sgsa-profile {
    position: relative;
    z-index: 4;

    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - var(--sgsa-menu-height) - 45px);

    height: auto;

    object-fit: contain;

    filter:
        drop-shadow(0 24px 35px rgba(0,0,0,.48))
        drop-shadow(0 0 18px rgba(215,163,61,.08));

    /*animation: profileFloat 6s ease-in-out infinite;*/
}

/* =========================================================
   ÓRBITAS
   ========================================================= */

.sgsa-orbit {
    position: absolute;
    z-index: 2;

    left: 50%;
    top: 50%;

    border: 1px solid rgba(215,163,61,.18);
    border-radius: 50%;

    transform: translate(-50%, -50%);
    pointer-events: none;
}

.sgsa-orbit-outer {
    width: min(92%, 590px);
    aspect-ratio: 1;

    border-style: dashed;

    animation: rotateSlow 38s linear infinite;
}

.sgsa-orbit-inner {
    width: min(76%, 480px);
    aspect-ratio: 1;

    border-color: rgba(215,163,61,.11);

    animation: rotateSlowReverse 28s linear infinite;
}

.orbit-star {
    position: absolute;

    color: var(--sgsa-gold-light);
    font-size: 1rem;

    text-shadow: 0 0 12px rgba(215,163,61,.8);

    animation: starPulse 3s ease-in-out infinite;
}

.orbit-star-1 {
    top: -7px;
    left: 18%;
}

.orbit-star-2 {
    right: 14%;
    bottom: -6px;
    animation-delay: -1.4s;
}


/* =========================================================
   ÁUDIO
   ========================================================= */

.sgsa-audio-panel {
    flex-direction: column;
}

.sgsa-audio-title {
    color: var(--sgsa-gold-light);

    font-family: "Montserrat", sans-serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;

    text-align: center;

    animation: titleGlow 4s ease-in-out infinite;
}

.sgsa-audio-decoration {
    width: 60px;
    height: 1px;
    margin-top: 5px;

    background: var(--sgsa-gold);

    box-shadow: 0 0 9px rgba(215,163,61,.5);
}

.sgsa-wave {
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.sgsa-wave i {
    display: block;

    width: 3px;
    height: 7px;

    border-radius: 4px;

    background: rgba(215,163,61,.55);

    transform-origin: center;

    animation: waveIdle 2.2s ease-in-out infinite;
}

.sgsa-wave i:nth-child(1)  { animation-delay: -.20s; }
.sgsa-wave i:nth-child(2)  { animation-delay: -.50s; }
.sgsa-wave i:nth-child(3)  { animation-delay: -.80s; }
.sgsa-wave i:nth-child(4)  { animation-delay: -1.10s; }
.sgsa-wave i:nth-child(5)  { animation-delay: -.70s; }
.sgsa-wave i:nth-child(6)  { animation-delay: -.30s; }
.sgsa-wave i:nth-child(7)  { animation-delay: -.90s; }
.sgsa-wave i:nth-child(8)  { animation-delay: -1.30s; }
.sgsa-wave i:nth-child(9)  { animation-delay: -.60s; }
.sgsa-wave i:nth-child(10) { animation-delay: -.10s; }
.sgsa-wave i:nth-child(11) { animation-delay: -.40s; }
.sgsa-wave i:nth-child(12) { animation-delay: -1.00s; }
.sgsa-wave i:nth-child(13) { animation-delay: -.20s; }
.sgsa-wave i:nth-child(14) { animation-delay: -.80s; }
.sgsa-wave i:nth-child(15) { animation-delay: -.45s; }

.sgsa-audio {
    width: 100%;
    max-width: 420px;
    margin-top: 0;
}


/* =========================================================
   ONDA REAL QUANDO A MÚSICA TOCA
   ========================================================= */

.sgsa-audio-panel.is-playing .sgsa-wave i {
    animation-duration: .65s;
    background: var(--sgsa-gold-light);
    box-shadow: 0 0 7px rgba(215,163,61,.5);
}

.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(1)  { height: 12px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(2)  { height: 25px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(3)  { height: 35px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(4)  { height: 18px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(5)  { height: 30px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(6)  { height: 40px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(7)  { height: 23px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(8)  { height: 34px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(9)  { height: 17px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(10) { height: 28px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(11) { height: 38px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(12) { height: 20px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(13) { height: 31px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(14) { height: 15px; }
.sgsa-audio-panel.is-playing .sgsa-wave i:nth-child(15) { height: 27px; }


/* =========================================================
   ANIMAÇÕES
   ========================================================= */

@keyframes profileFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes auraPulse {
    0%, 100% {
        opacity: .65;
        transform: translate(-50%, -50%) scale(.96);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.04);
    }
}

@keyframes symbolBreath {
    0%, 100% {
        filter:
            drop-shadow(0 0 6px rgba(215,163,61,.12))
            drop-shadow(0 15px 25px rgba(0,0,0,.45));
    }

    50% {
        filter:
            drop-shadow(0 0 15px rgba(215,163,61,.25))
            drop-shadow(0 15px 25px rgba(0,0,0,.45));
    }
}

@keyframes panelPulse {
    0%, 100% {
        opacity: .35;
        transform: scale(.8);
    }

    50% {
        opacity: .9;
        transform: scale(1.35);
    }
}

@keyframes imageShine {
    0%, 55% {
        left: -75%;
        opacity: 0;
    }

    65% {
        opacity: .8;
    }

    78%, 100% {
        left: 135%;
        opacity: 0;
    }
}

@keyframes rotateSlow {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotateSlowReverse {
    from {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

@keyframes starPulse {
    0%, 100% {
        opacity: .45;
        transform: scale(.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.25);
    }
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 0 rgba(240,198,107,0);
    }

    50% {
        text-shadow: 0 0 12px rgba(240,198,107,.35);
    }
}

@keyframes waveIdle {
    0%, 100% {
        transform: scaleY(.45);
        opacity: .5;
    }

    50% {
        transform: scaleY(1.5);
        opacity: .9;
    }
}

@keyframes lightDrift {
    0%, 100% {
        transform: translateX(-10%) rotate(-18deg);
        opacity: .04;
    }

    50% {
        transform: translateX(70%) rotate(-18deg);
        opacity: .14;
    }
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translate3d(0, 30px, 0) scale(.5);
    }

    20% {
        opacity: .55;
    }

    75% {
        opacity: .35;
    }

    100% {
        opacity: 0;
        transform: translate3d(25px, -100px, 0) scale(1);
    }
}


/* =========================================================
   ACESSIBILIDADE — REDUZIR MOVIMENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}


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

@media (max-width: 1050px) {
    .sgsa-home {
        grid-template-columns:
            minmax(280px, 1fr)
            minmax(350px, 1.1fr)
            minmax(280px, 1fr);

        gap: 20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .sgsa-center {
        min-height: 500px;
    }

    .sgsa-image-panel {
        height: 225px;
    }

    .sgsa-image-cell img {
        height: 170px;
    }

}
@media (max-width: 800px) {

    .sgsa-home {
        width: min(100%, 650px);

        min-height: auto;

        padding:
            30px
            20px
            calc(var(--sgsa-menu-height) + 30px);

        display: flex;
        flex-direction: column;

        gap: 28px;
    }

    .sgsa-center {
        order: 1;
        min-height: 480px;
        width: 100%;
    }

    .sgsa-left {
        order: 2;
        width: 100%;
    }

    .sgsa-right {
        order: 3;
        width: 100%;
    }

    .sgsa-center-aura {
        width: 450px;
        height: 450px;
    }

    .sgsa-orbit-outer {
        width: 440px;
    }

    .sgsa-orbit-inner {
        width: 360px;
    }

    .sgsa-profile {
        max-height: 450px;
    }

    .sgsa-feature-panel {
        height: 210px;
    }

    .sgsa-image-panel {
        height: 225px;
    }

    .sgsa-image-cell img {
        height: 170px;
    }
}

@media (max-width: 500px) {

    .sgsa-home {
        padding-left: 12px;
        padding-right: 12px;
    }

    .sgsa-center {
        min-height: 380px;
    }

    .sgsa-center-aura {
        width: 350px;
        height: 350px;
    }

    .sgsa-orbit-outer {
        width: 350px;
    }

    .sgsa-orbit-inner {
        width: 285px;
    }

    .sgsa-profile {
        max-height: 360px;
    }

    .sgsa-feature-panel {
        height: 180px;
    }

    .sgsa-image-panel {
        height: 190px;
    }

    .sgsa-image-cell img {
        height: 140px;
        padding: 5px;
    }

    .sgsa-image-cell span {
        min-height: 38px;
        font-size: .55rem;
    }

    .sgsa-audio-title {
        font-size: .62rem;
    }

    .sgsa-wave {
        transform: scale(.85);
    }
}


/* =========================================================
   ENTRADA DA HOME
   ========================================================= */

.sgsa-home {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .9s ease, transform 1s ease;
}

.sgsa-home.sgsa-loaded {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   BORDAS DAS IMAGENS
   Todas as imagens fora da coluna central ficam arredondadas.
   A imagem central (.sgsa-profile) permanece sem alteração.
   ========================================================= */

.sgsa-column img:not(.sgsa-profile) {
    border-radius: 10px;
}

.sgsa-feature-panel img,
.sgsa-image-cell img {
    border-radius: 10px;
}

/* A coluna central não recebe arredondamento */
.sgsa-center .sgsa-profile {
    border-radius: 0;
}


/* =========================================================
   CORREÇÃO MOBILE — ESTABILIDADE DA HOME
   ========================================================= */

@media (max-width: 800px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .sgsa-home {
        width: 100%;
        max-width: 100%;
        transform: none !important;
        transition: opacity .9s ease !important;
    }

    .sgsa-home.sgsa-loaded {
        transform: none !important;
    }
}


/* =========================================================
   ÓRBITAS — NÃO ULTRAPASSAR O VIEWPORT
   ========================================================= */

@media (max-width: 500px) {

    .sgsa-orbit-outer {
        width: 92vw;
        max-width: 350px;
    }

    .sgsa-orbit-inner {
        width: 76vw;
        max-width: 285px;
    }

    .sgsa-center-aura {
        width: 92vw;
        max-width: 350px;
        height: 92vw;
        max-height: 350px;
    }

}

/* =========================================================
   TÍTULO PRINCIPAL DO SITE
   ========================================================= */

.sgsa-site-title {
    grid-column: 1 / -1;

    width: 100%;
    margin: 0;
    padding: 0 20px;

    position: relative;
    z-index: 10;

    text-align: center;
}

.sgsa-site-title h1 {
    margin: 0;

    color: var(--sgsa-gold-light);
    font-family: "Montserrat", Arial, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.8rem);
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;

    text-shadow:
        0 0 10px rgba(215, 163, 61, .25),
        0 0 25px rgba(215, 163, 61, .12);
}

.sgsa-site-title::after {
    content: "";
    display: block;

    width: 90px;
    height: 1px;

    margin: 16px auto 0;

    background: linear-gradient(
        90deg,
        transparent,
        var(--sgsa-gold),
        transparent
    );
}

@media (max-width: 800px) {
    .sgsa-site-title {
        padding: 0 10px;
    }

    .sgsa-site-title h1 {
        font-size: 1.25rem;
        letter-spacing: .05em;
        line-height: 1.3;
    }

    .sgsa-site-title::after {
        width: 65px;
        margin-top: 12px;
    }
}

@media (max-width: 500px) {
    .sgsa-site-title h1 {
        font-size: 1rem;
        letter-spacing: .035em;
    }
}
