/* =========================================================================
   GORILA SOFTWARE HOUSE - DESIGN SYSTEM (CROMATISMO TÉCNICO & ARQUITETURA)
   ========================================================================= */

:root {
    /* Cromatismo Técnico */
    --color-primary-dark: #1A242B;
    /* Azul Carvão Escuro - Textos/Backgrounds principais */
    --color-secondary-gray: #4A5560;
    /* Cinza Aço - Gorila/Secundário */
    --color-action-white: #F8FAFC;
    /* Branco Gelo - CTAs/Fundos de leitura */
    --color-border-geo: #CBD5E1;
    /* Cinza Geométrico - Bordas/Linhas */

    /* Extra Tones */
    --color-bg-dark: #0f1519;
    /* Fundo mais profundo */
    --color-text-light: #e2e8f0;
    --color-text-dark: #0f172a;

    /* Arquitetura de Fontes */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'JetBrains Mono', monospace;
    /* Using Monospaced for that tech/code feel */
    --font-sans: 'Montserrat', sans-serif;
    /* fallback for large paragraphs if body gets too heavy, but user preferred Monospace for DNA */

    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================================
   RESET & GLOBAL
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-action-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-primary-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.section-content {
    padding: 0 2rem;
}

/* =========================================================================
   TYPOGRAPHY SPECIFICS
   ========================================================================= */
.highlight {
    color: var(--color-secondary-gray);
}

/* =========================================================================
   BUTTONS (POLYGONAL CUTS & GEOMETRY)
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* 45° corner cut via clip-path for Polygonal Style */
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

/* Hover effect with sliding geometry */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transform: skewX(-15deg);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--color-primary-dark);
    color: var(--color-action-white);
}

.btn-primary:hover {
    background-color: var(--color-secondary-gray);
}

.btn-action {
    background-color: var(--color-action-white);
    color: var(--color-primary-dark);
}

.btn-action:hover {
    background-color: var(--color-border-geo);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-action-white);
    border: 1px solid var(--color-secondary-gray);
    /* for bordered buttons with clip-path, we use inset outline or box-shadow since border might be clipped awkwardly but here we adapt */
    background-color: rgba(74, 85, 96, 0.2);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-gray);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary-dark);
    box-shadow: inset 0 0 0 2px var(--color-primary-dark);
}

.btn-outline:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-action-white);
}

/* =========================================================================
   NAVIGATION BAR
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    background-color: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(203, 213, 225, 0.1);
}

.navbar .container {
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 80px;
    width: auto;
    display: block;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--color-primary-dark);
    line-height: 1;
    letter-spacing: -0.5px;
}

.logo-sub {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--color-secondary-gray);
    text-transform: uppercase;
    display: block;
    margin-top: 5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-secondary-gray);
    transition: width var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */
.hero-section {
    min-height: 100vh;
    background-color: var(--color-action-white);
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 130px;
    overflow: hidden;
}

.hero-grid-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    width: 100%;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* Geometric Network Background */
.hero-geometric-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(248, 250, 252, 0.9), var(--color-action-white)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><polygon points="50,10 90,30 90,70 50,90 10,70 10,30" fill="none" stroke="%234A5560" stroke-width="0.5" stroke-opacity="0.3"/></svg>');
    background-size: 150px;
    background-attachment: fixed;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding-left: 2rem;
    padding-right: 2rem;
}

.hero-content-inner {
    max-width: 560px;
    margin-left: auto;
}

.hero-subtitle {
    color: var(--color-secondary-gray);
    font-size: 1.15rem;
    margin-bottom: 3rem;
    max-width: 500px;
    font-weight: 400;
}

.hero-title {
    color: var(--color-primary-dark);
    font-size: clamp(1.8rem, 3vw, 3.2rem);
    /* Significantly smaller to avoid overlap and fit better */
    text-transform: uppercase;
    margin-bottom: 2rem;
    letter-spacing: -1px;
    word-break: break-word;
}

.hero-subtitle {
    color: var(--color-secondary-gray);
    font-size: 1.15rem;
    margin-bottom: 3rem;
    max-width: 500px;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

/* Hardware overlay representation */
.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 0% 100%);
    overflow: hidden;
    transition: transform 0.5s ease;
    min-height: 500px;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Alternativa: animação em plano sequencial
.hero-sequence {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.hero-sequence-frame {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
*/

.hero-image-wrapper:hover {
    transform: scale(1.02) translateX(-10px);
}

/* =========================================================================
   PROJECTS SECTION (CAROUSEL)
   ========================================================================= */
.projects-section {
    padding: 8rem 0;
    background-color: var(--color-action-white);
    position: relative;
    overflow: hidden;
}

.projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(203, 213, 225, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.carousel-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1rem;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    border-radius: var(--border-radius-md);
    isolation: isolate;
}

.carousel-track {
    list-style: none;
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 600%;
    will-change: transform;
    backface-visibility: hidden;
}

.carousel-track.is-snapping {
    transition: none;
    will-change: auto;
}

.carousel-slide {
    flex: 0 0 16.666%;
    width: 16.666%;
    padding: 0;
    box-sizing: border-box;
}

.carousel-slide.carousel-clone {
    pointer-events: none;
}

.carousel-slide .project-card {
    margin: 0 auto;
    max-width: 100%;
}

.project-card {
    background: #fff;
    border: 1px solid var(--color-border-geo);
    display: flex;
    flex-direction: column;
    height: 480px;
    clip-path: polygon(25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%, 0 25px);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    overflow: hidden;
}

.project-img-wrapper {
    flex: 1 1 auto;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-dark);
    overflow: hidden;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-geo);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-img {
    filter: brightness(1);
}

.project-img-wrapper:hover .project-img {
    transform: scale(1.03);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(26, 36, 43, 0.1);
}

.project-content {
    padding: 0.75rem 1.25rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-title {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
    color: var(--color-primary-dark);
}

.project-desc {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--color-secondary-gray);
    font-family: var(--font-body);
}

.carousel-btn {
    background: var(--color-primary-dark);
    color: var(--color-action-white);
    border: none;
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background var(--transition-fast), transform var(--transition-fast);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--color-secondary-gray);
    transform: scale(1.1);
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.carousel-indicator {
    border: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--color-border-geo);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.carousel-indicator.current-indicator {
    background: var(--color-primary-dark);
}

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 21, 25, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.is-open {
    display: flex;
}

.lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-primary-dark);
    color: var(--color-action-white);
    border: none;
    width: 48px;
    height: 48px;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background var(--transition-fast);
}

.lightbox-close:hover {
    background: var(--color-secondary-gray);
}

/* =========================================================================
   INSTITUTIONAL DIALOGS (Sobre Nós, Carreiras)
   ========================================================================= */
.institutional-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    border: none;
    padding: 0;
    max-width: 90vw;
    width: 560px;
    max-height: 90vh;
    border-radius: var(--border-radius-md);
    box-shadow: 0 25px 50px rgba(15, 21, 25, 0.3);
    background: var(--color-action-white);
}

.institutional-dialog::backdrop {
    background: rgba(15, 21, 25, 0.6);
}

.dialog-inner {
    position: relative;
    padding: 2.5rem 2rem;
    max-height: 85vh;
    overflow-y: auto;
}

.dialog-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-primary-dark);
    color: var(--color-action-white);
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.dialog-close:hover {
    background: var(--color-secondary-gray);
}

.dialog-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary-dark);
    padding-right: 3rem;
}

.dialog-body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-secondary-gray);
}

.dialog-body p {
    margin-bottom: 1.25rem;
}

.dialog-body p:last-child {
    margin-bottom: 0;
}

.dialog-body h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    margin: 1.5rem 0 0.5rem;
}

.dialog-body h3:first-of-type {
    margin-top: 0.5rem;
}

.dialog-body a {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.dialog-body a:hover {
    color: var(--color-secondary-gray);
}

/* =========================================================================
   CONTACT SECTION
   ========================================================================= */
.contact-section {
    padding: 6rem 0;
    background-color: var(--color-primary-dark);
    color: var(--color-action-white);
    text-align: center;
}

.contact-section .section-title {
    color: var(--color-action-white);
}

.contact-section .section-subtitle {
    color: var(--color-border-geo);
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.contact-card {
    background-color: rgba(248, 250, 252, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-smooth), background var(--transition-fast);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.contact-card:hover {
    transform: translateY(-5px);
    background-color: rgba(248, 250, 252, 0.1);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.contact-card h3 {
    color: var(--color-action-white);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.contact-card p {
    color: var(--color-border-geo);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.contact-action {
    color: var(--color-secondary-gray);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-secondary-gray);
    transition: all var(--transition-fast);
}

.contact-card:hover .contact-action {
    background-color: var(--color-action-white);
    color: var(--color-primary-dark);
    border-color: var(--color-action-white);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
    background-color: var(--color-action-white);
    color: var(--color-secondary-gray);
    padding: 6rem 0 2rem;
    border-top: 4px solid var(--color-secondary-gray);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand-giant {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.logo-img-giant {
    max-width: 300px;
    /* Grande e destacado na esquerda */
    width: 100%;
    height: auto;
    display: block;
}

.footer-links {
    flex: 2;
    display: flex;
    gap: 5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.link-group h4 {
    color: var(--color-primary-dark);
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
}

.link-group a {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.link-group a:hover {
    color: var(--color-primary-dark);
    padding-left: 5px;
    /* micro interaction */
}

.footer-bottom {
    border-top: 1px solid rgba(203, 213, 225, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    font-family: var(--font-body);
}

/* =========================================================================
   RESPONSIVE DESIGN
   ========================================================================= */
@media (max-width: 992px) {
    .hero-content {
        max-width: 100%;
        padding-right: 0;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-image-wrapper {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 45%;
        opacity: 0.15;
        padding-right: 0;
    }

    .hero-video {
        padding-right: 0;
    }

    .carousel-btn {
        display: none;
    }

    .project-card {
        height: 420px;
    }

    .project-img-wrapper {
        min-height: 280px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu would go here */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .logo-img-giant {
        max-width: 250px;
    }
}