:root {
    --bg-color: #050505;
    --card-bg: #121212;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border-color: rgba(255, 255, 255, 0.08);
    --glow-color: rgba(255, 255, 255, 0.15);
    
    --font-sans: 'Inter', sans-serif;
    
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Noise texture */
.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Preloader --- */
.loader {
    position: fixed;
    inset: 0;
    background-color: var(--bg-color);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.loader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader__text {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--text-main);
    text-transform: uppercase;
    animation: pulse 1.5s infinite ease-in-out alternate;
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Enhanced side padding for mobile */
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav {
    display: none;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

.nav__link {
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition);
}

.nav__link:hover {
    color: var(--text-main);
}

.btn-glow {
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

@media (max-width: 480px) {
    .btn-glow {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

.btn-glow:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px var(--glow-color);
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 6rem;
}

.hero__container {
    max-width: 1000px;
}

.hero__title {
    font-size: clamp(2.2rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

.hero__title span {
    font-weight: 300;
    color: var(--text-muted);
}

.hero__subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 2.5rem;
    background: var(--text-main);
    color: var(--bg-color);
    font-weight: 600;
    border-radius: 100px;
    font-size: 1.1rem;
    transition: transform var(--transition), box-shadow var(--transition);
    text-align: center;
}

.btn-primary--large {
    padding: 1.5rem 3.5rem;
    font-size: 1.25rem;
    width: 100%;
}

@media (min-width: 768px) {
    .btn-primary--large {
        width: auto;
    }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

/* --- Services --- */
.services {
    padding: 6rem 0;
}

@media (min-width: 768px) {
    .services {
        padding: 8rem 0;
    }
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .section-title {
        margin-bottom: 4rem;
    }
}

.services__grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .services__grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition), border-color var(--transition);
    width: 100%; /* Ensure full width in flex context */
}

.service-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.service-card__image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .service-card__image-wrapper {
        height: 300px;
    }
}

.service-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover .service-card__img {
    transform: scale(1.05);
}

.service-card__body {
    padding: 2rem;
}

@media (min-width: 768px) {
    .service-card__body {
        padding: 2.5rem;
    }
}

.service-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.service-card__title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .service-card__title {
        font-size: 1.6rem;
    }
}

.service-card__toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition);
}

.service-card.is-active .service-card__toggle {
    transform: rotate(45deg);
    background: rgba(255, 255, 255, 0.15);
}

.service-card__content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease;
}

.service-card.is-active .service-card__content {
    max-height: 500px; /* Safe upper bound for long texts */
    opacity: 1;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.service-card__content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* --- About --- */
.about {
    padding: 6rem 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .about {
        padding: 8rem 0;
    }
}

.about__container {
    display: grid;
    grid-template-columns: 1fr; /* Empilha no celular */
    gap: 2rem;
    align-items: center;
}

@media (min-width: 992px) {
    .about__container {
        grid-template-columns: 1fr 1fr; /* 50/50 no PC */
        gap: 4rem; /* Respiro entre imagem e texto */
        align-items: center; /* CRÍTICO: Alinha a imagem e o texto ao centro verticalmente */
    }
}

.about__image-wrapper {
    width: 100%;
    height: auto;
}

.img-giovane {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.about__text p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

@media (min-width: 768px) {
    .about__text p {
        font-size: 1.2rem;
    }
}

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

/* --- Footer --- */
.footer {
    padding: 6rem 0 8rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: radial-gradient(circle at top center, rgba(255,255,255,0.02) 0%, transparent 60%);
}

@media (min-width: 768px) {
    .footer {
        padding: 10rem 0;
    }
}

.footer__title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 3rem;
}
