/* ==========================================================================
   DESIGN TOKENS & SYSTEM VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --color-bg: #F5F4F0;          /* Off-white Gesso */
    --color-text-main: #111111;   /* Quase Preto Texturizado */
    --color-text-muted: #8C8C8C;  /* Cinza Concreto Sutil */
    --color-accent: #A67C52;      /* Terracota Queimado / Bronze Cru */
    --color-accent-light: rgba(166, 124, 82, 0.1);
    --border-soft: rgba(17, 17, 17, 0.08);
    
    /* Typography */
    --font-serif: 'Tenor Sans', serif;
    --font-sans: 'Space Grotesk', sans-serif;
    
    /* Easing Functions */
    --ease-editorial: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-fluid: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ==========================================================================
   RESET & FOUNDATION
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-sans);
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Fluid Layout & Spacing using clamp() */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
}

.section-padding {
    padding: clamp(60px, 10vw, 140px) 0;
}

/* Guidelines de Arte em Background */
.bg-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    padding: 0 clamp(24px, 5vw, 80px);
}

.bg-line {
    width: 1px;
    height: 100%;
    background-color: var(--border-soft);
}

/* Typography Base */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

p {
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* Sub-header labels e tags */
.section-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    display: block;
    margin-bottom: 12px;
}

/* ==========================================================================
   UI COMPONENTS (Buttons & Interactivity)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 1.5vw, 16px) clamp(24px, 2.5vw, 40px);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.4s var(--ease-editorial);
    cursor: pointer;
}

.btn-outline {
    border: 1px solid var(--color-text-main);
    color: var(--color-text-main);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--color-text-main);
    color: var(--color-bg);
}

.btn-desktop {
    display: none; /* Mobile first logic */
}

/* Animações de Entrada (Intersection Observer targets) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s var(--ease-editorial), transform 1.2s var(--ease-editorial);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   HEADER / NAVEGAÇÃO
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 24px 0;
    transition: padding 0.4s var(--ease-editorial), background-color 0.4s var(--ease-editorial);
}

.header.scrolled {
    padding: 16px 0;
    background-color: rgba(245, 244, 240, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-soft);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 102;
}

.logo {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    letter-spacing: 0.25em;
    color: var(--color-text-main);
    text-decoration: none;
}

/* Menu de links flutuantes oculto no mobile por padrão */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-fluid);
    z-index: 101;
}

.nav-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    list-style: none;
}

.nav-link {
    font-family: var(--font-serif);
    font-size: 2rem;
    text-decoration: none;
    color: var(--color-text-main);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-accent);
}

/* Menu Hamburguer customizado minimalista */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 103;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--color-text-main);
    transition: transform 0.4s var(--ease-fluid), background-color 0.4s ease;
}

.menu-toggle.open .line-1 {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.open .line-2 {
    transform: translateY(-10px) rotate(-45deg);
}

/* ==========================================================================
   HERO / O MANIFESTO
   ========================================================================== */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    max-width: 480px;
    margin-bottom: 40px;
}

.scroll-discover {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.scroll-discover svg {
    transition: transform 0.4s var(--ease-editorial);
}

.scroll-discover:hover {
    color: var(--color-accent);
}

.scroll-discover:hover svg {
    transform: translateX(10px);
}

.hero-image-wrapper {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(15%);
    transition: transform 1.5s var(--ease-editorial);
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.04);
}

/* ==========================================================================
   PORTFÓLIO CURADO (Grid Editorial Assimétrico)
   ========================================================================== */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: clamp(40px, 6vw, 80px);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px 40px;
    position: relative;
    z-index: 2;
}

.project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.project-img-box {
    width: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-soft);
    background-color: #EAEAEA;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-editorial), filter 0.5s ease;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-meta {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 12px;
}

.project-name {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--color-text-main);
}

.project-details {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Proporções nativas no Mobile */
.project-img-box {
    aspect-ratio: 4/3;
}

/* ==========================================================================
   FILOSOFIA / PROCESSO
   ========================================================================== */
.philosophy {
    position: relative;
    z-index: 2;
    background-color: #ECEBE7; /* Tom concreto ligeiramente diferenciado */
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

.philosophy-step {
    border-top: 1px solid rgba(17, 17, 17, 0.15);
    padding-top: 24px;
}

.step-num {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.step-title {
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.step-text {
    max-width: 380px;
}

/* ==========================================================================
   ABOUT / SOBRE O ESCRITÓRIO
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.about-image-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 1.5s var(--ease-editorial);
}

.about-image-wrapper:hover .about-image {
    transform: scale(1.03);
    filter: grayscale(80%);
}

.about-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: 24px;
}

.about-text {
    font-size: 1.05rem;
    margin-bottom: 20px;
    max-width: 540px;
}

.awards-box {
    margin-top: 40px;
    border-top: 1px solid var(--border-soft);
}

.award-item {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.9rem;
    color: var(--color-text-main);
}

.award-year {
    color: var(--color-text-muted);
}

/* ==========================================================================
   CONTACT / FORMULÁRIO CONCEITUAL PREMIUM
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.premium-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-label {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--color-text-main);
}

.form-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(17, 17, 17, 0.2);
    padding: 12px 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text-main);
    transition: border-color 0.4s ease;
    border-radius: 0;
}

.form-input::placeholder {
    color: #BBB;
}

.form-input:focus {
    border-bottom-color: var(--color-text-main);
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right center;
}

.flex-row {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.input-subgroup {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

textarea.form-input {
    resize: none;
}

.form-submit-box {
    margin-top: 20px;
}

.btn-submit {
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 24px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text-main);
    cursor: pointer;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-text-main);
    transition: all 0.4s var(--ease-editorial);
}

.btn-submit svg {
    transition: transform 0.4s var(--ease-editorial);
}

.btn-submit:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.btn-submit:hover svg {
    transform: translateX(12px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: #111111;
    color: #F5F4F0;
    padding: 80px 0 40px 0;
    position: relative;
    z-index: 2;
}

.footer h3 {
    color: #F5F4F0;
    letter-spacing: 0.2em;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.footer p {
    color: #8C8C8C;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    border-bottom: 1px solid rgba(245, 244, 240, 0.1);
    padding-bottom: 60px;
    margin-bottom: 40px;
}

.footer-social {
    display: flex;
    gap: 24px;
}

.social-link {
    color: #F5F4F0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--color-accent);
}

.footer-base {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 0.8rem;
}

.footer-signature {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   MEDIA QUERIES (Responsividade de Elite, Grids Assimétricos)
   ========================================================================== */
@media (min-width: 768px) {
    .btn-desktop {
        display: inline-flex;
    }
    
    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 60px;
    }
    
    .hero-image-wrapper {
        aspect-ratio: 2.5/3.5;
    }

    /* Transformando a vitrine em um Grid Assimétrico de Portfólio */
    .portfolio-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 120px 40px;
    }
    
    .item-vertical {
        grid-column: 1 / 6;
    }
    
    .item-vertical .project-img-box {
        aspect-ratio: 3/4;
    }

    .item-horizontal {
        grid-column: 7 / 13;
        margin-top: 100px;
    }
    
    .item-horizontal .project-img-box {
        aspect-ratio: 16/10;
    }

    .item-square {
        grid-column: 2 / 7;
    }
    
    .item-square .project-img-box {
        aspect-ratio: 1/1;
    }

    .item-tall {
        grid-column: 8 / 12;
        margin-top: -60px;
    }
    
    .item-tall .project-img-box {
        aspect-ratio: 3/5;
    }

    .philosophy-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
    
    .about-grid {
        grid-template-columns: 0.9fr 1.1fr;
        gap: 80px;
    }
    
    .contact-grid {
        grid-template-columns: 0.8fr 1.2fr;
        gap: 80px;
    }

    .flex-row {
        flex-direction: row;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-base {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    /* Navbar flutuante em telas grandes expandida */
    .menu-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        opacity: 1;
        pointer-events: auto;
        background: transparent;
        z-index: auto;
    }

    .nav-list {
        flex-direction: row;
        gap: 40px;
    }

    .nav-link {
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.15em;
        position: relative;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 1px;
        background-color: var(--color-accent);
        transition: width 0.4s var(--ease-editorial);
    }

    .nav-link:hover::after {
        width: 100%;
    }
    
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
    
    .hero-title {
        margin-right: -10vw; /* Efeito de sobreposição elegante com a imagem */
        position: relative;
        z-index: 5;
    }
}