/* ===================================
   Nullax - Página Inicial
   =================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --nullax-purple: #a82bff;
    --bg-dark: #0d0d0d;
    --bg-card: #111111;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #888888;
    --border-subtle: #1a1a1a;
}

html {
    scroll-behavior: smooth;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Layout --- */
.container {
    width: 100%;
    flex-grow: 1;
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 3vh 20px 1vh;
    position: relative;
}

.social-links-top {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 20px;
}

.social-links-top a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links-top a:hover {
    color: var(--nullax-purple);
    transform: translateY(-3px);
}

.logo-main {
    /* CORRIGIDO: mínimo reduzido para não forçar overflow em mobile
       e max-width:100% garante que nunca ultrapasse o container */
    width: clamp(180px, 55vw, 500px);
    max-width: 100%;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text-secondary);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 2px;
}

/* --- Section Titles SVG --- */
.section-title-svg {
    width: 100%;
    max-width: 600px;
    margin: 40px auto 10px;
    height: auto;
}

.section-title-svg svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.svg-main-text {
    fill: var(--text-primary);
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-family: inherit;
    -webkit-text-stroke: 1px rgba(168, 43, 255, 0.4);
}

.svg-ghost-text {
    fill: rgba(168, 43, 255, 0.15);
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 15px;
}

/* --- Projects (3 colunas ponta a ponta) --- */
.projects {
    padding: 0;
    margin-bottom: 5vh;
}

.projects-list {
    display: flex;
    width: 100%;
}

.project-item {
    position: relative;
    flex: 1;
    height: 40vh;
    min-height: 280px;
    border-right: 1px solid rgba(168, 43, 255, 0.3);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: flex 0.4s ease;
}

.project-item:last-child {
    border-right: none;
}

.project-item.rapta {
    background-image: url('img/Rapta_BTN.png');
}

.project-item.tincker {
    background-image: url('img/Tinker_BTN.png');
}

.project-item.slime {
    background-image: url('img/Slime_BTN.png');
}

/* Destaque para o projeto principal (RAPTA) */
.project-item.featured {
    flex: 1.15;
    border: 2px solid var(--nullax-purple);
    box-shadow: 0 0 20px rgba(168, 43, 255, 0.3);
    animation: pulseFeatured 3s infinite alternate;
    z-index: 2;
}

@keyframes pulseFeatured {
    0% {
        box-shadow: 0 0 10px rgba(168, 43, 255, 0.2);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 25px rgba(168, 43, 255, 0.5);
        transform: scale(1.02);
    }
}

/* Overlay: invisível por padrão, escurece + nome no hover */
.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.project-overlay span {
    color: var(--text-primary);
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 10px;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.9);
    transform: translateY(15px);
    transition: transform 0.4s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.65);
}

.project-item:hover .project-overlay span {
    transform: translateY(0);
}

.project-item:hover {
    flex: 1.25;
}

/* Scroll Down Team Button */
.scroll-down-team {
    text-align: center;
    padding: 30px 0;
}

.scroll-down-team a {
    text-decoration: none;
    color: var(--text-secondary);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.scroll-down-team a i {
    font-size: 1.5rem;
    animation: bounceDown 2s infinite;
}

.scroll-down-team a:hover {
    color: var(--nullax-purple);
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(10px); }
    60% { transform: translateY(5px); }
}

/* --- Developers --- */
.developers {
    padding: 30px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.dev-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.dev-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 50px 30px;
    border-radius: 12px;
    text-align: center;
    transition: border-color 0.3s, background 0.3s, transform 0.3s;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dev-card:hover {
    border-color: var(--nullax-purple);
    background: #161616;
}

.dev-avatar {
    width: 140px;
    height: 140px;
    background: #222;
    border-radius: 50%;
    margin: 0 auto 25px;
    border: 2px solid var(--nullax-purple);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(168, 43, 255, 0.2);
}

.dev-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dev-card h3 {
    font-size: 1.6rem;
    color: #dfb3ff;
    margin-bottom: 5px;
}

.dev-real-name {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 500;
}

.dev-role {
    font-size: 0.95rem;
    color: var(--nullax-purple);
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dev-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-style: italic;
}

.dev-email {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.dev-email:hover {
    color: var(--nullax-purple);
}

.dev-email i {
    margin-right: 5px;
    font-size: 0.8rem;
}

.btn-commissions {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    border: 1px solid var(--nullax-purple);
    color: var(--nullax-purple);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-commissions:hover {
    background: var(--nullax-purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 43, 255, 0.3);
}

.team-about {
    max-width: 800px;
    margin: 60px auto 0;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 40px;
}

.team-about p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-style: italic;
}

/* --- Footer --- */
footer {
    padding: 40px 20px;
    background-color: #080808;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    border-top: 1px solid var(--border-subtle);
    gap: 20px;
}

.logo-footer {
    width: 160px;
    opacity: 0.9;
}

#Contatos ul {
    list-style: none;
    color: var(--text-muted);
    text-align: center;
}

.social-links-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links-footer a {
    color: var(--text-muted);
    font-size: 1.4rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links-footer a:hover {
    color: var(--nullax-purple);
    transform: scale(1.2);
}

#Contatos li {
    margin-bottom: 5px;
    font-size: 1rem;
}

#Contatos a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

#Contatos a:hover {
    color: var(--nullax-purple);
}

.copyright {
    margin-top: 15px;
    font-size: 0.8rem !important;
    opacity: 0.6;
}

#lang-switcher {
    border-radius: 5px;
    border: 2px solid var(--nullax-purple);
    padding: 6px 12px;
    background-color: #000;
    color: var(--nullax-purple);
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    outline: none;
}

#lang-switcher option {
    background-color: #000;
    color: var(--nullax-purple);
}

/* --- Mobile --- */
@media (max-width: 800px) {
    .projects-list {
        flex-direction: column;
    }

    .project-item {
        flex: none;
        width: 100%;
        height: 17vh;
        min-height: 130px;
        border-right: none;
        border-bottom: 1px solid rgba(168, 43, 255, 0.3);
    }
    
    .social-links-top {
        position: relative;
        top: 0;
        right: 0;
        justify-content: center;
        margin-bottom: 15px;
    }

    .logo-main {
        width: clamp(120px, 35vw, 160px);
    }

    .section-title-svg {
        margin: 20px auto 10px;
        max-width: 400px;
    }

    .svg-main-text {
        font-size: 2.5rem;
    }

    .svg-ghost-text {
        font-size: 5rem;
        letter-spacing: 10px;
    }

    .scroll-down-team {
        padding: 5px 0 20px;
    }

    .project-item:last-child {
        border-bottom: none;
    }

    .project-item:hover {
        flex: none;
        transform: scale(1.02);
    }
}

@media (max-width: 600px) {
    footer {
        flex-direction: column;
        text-align: center;
    }

    /* Logo footer também ajustada para não vazar em telas muito pequenas */
    .logo-footer {
        width: clamp(120px, 40vw, 160px);
    }
}

/* --- Back To Top --- */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--nullax-purple);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background-color: #bc62ff;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(168, 43, 255, 0.4);
}

@media (max-width: 600px) {
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}