/* ==========================================================================
   Estilos - IS Vértice Arquitetura v1.0
   ========================================================================== */

/* --- 1. Importação de Fontes --- */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;600&display=swap");

/* --- 2. Variáveis CSS --- */
:root {
    --font-serif: "Playfair Display", serif;
    --font-sans: "Inter", sans-serif;

    /* Paleta Minimalista */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8F8F8;
    --color-text: #222222;
    --color-text-light: #777777;
    --color-primary-accent: #B0A08D; /* Bege/Dourado */
    --color-border: #EAEAEA;
    --color-white: #FFFFFF;
    --color-black: #000000;

    --header-height: 90px;
    --default-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --subtle-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

/* --- 3. Reset Básico e Globais --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-weight: 400;
    padding-top: var(--header-height); /* Espaço para o header fixo */
}
/* Classe para impedir scroll (menu mobile) */
body.no-scroll { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: var(--color-text); transition: var(--default-transition); }
a:hover, a:focus { color: var(--color-primary-accent); outline: 2px solid var(--color-primary-accent); outline-offset: 2px; border-radius: 2px; }
ul { list-style: none; }

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.4rem; }
p { color: var(--color-text-light); margin-bottom: 1.5rem; }

/* --- 4. Utilitários (Container, Botões, Secções) --- */
.container, .container-header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cta-button.primary {
    display: inline-block; padding: 14px 35px; border-radius: 0; font-weight: 600; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.8px; transition: var(--default-transition); border: 2px solid var(--color-text); background-color: var(--color-text); color: var(--color-white); cursor: pointer;
}
.cta-button.primary:hover, .cta-button.primary:focus { background-color: transparent; color: var(--color-text); outline-color: var(--color-text); }
.cta-button.large { padding: 16px 45px; font-size: 1rem; }

.link-styled { font-weight: 600; color: var(--color-text); padding-bottom: 3px; border-bottom: 2px solid var(--color-primary-accent); transition: var(--default-transition); }
.link-styled:hover, .link-styled:focus { color: var(--color-primary-accent); border-bottom-color: var(--color-text); }

.section-padding { padding: 90px 0; }
.alt-bg { background-color: var(--color-bg-alt); }

.section-header { text-align: center; margin-bottom: 50px; }
.section-title { color: var(--color-text); }
.section-header p { max-width: 600px; margin-left: auto; margin-right: auto; }
.section-header .link-styled { font-size: 1rem; }

.narrow-content { max-width: 750px; margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

/* --- 5. Cabeçalho (Header) --- */
.site-header {
    padding: 0; background-color: var(--color-bg); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; border-bottom: 1px solid var(--color-border); height: var(--header-height);
}
.container-header { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.site-logo { display: flex; align-items: center; }
.logo-img { height: 200px; width: auto; }

.main-navigation ul { display: flex; gap: 40px; }
.main-navigation a {
    color: var(--color-text-light); font-weight: 600; font-size: 0.9rem; padding: 5px 0; border-bottom: 2px solid transparent; transition: var(--default-transition);
}
.main-navigation a:hover, .main-navigation a:focus, .main-navigation a.active {
    color: var(--color-text); border-bottom-color: var(--color-text);
}

/* --- Menu Hamburger --- */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; z-index: 1100; height: 30px; width: 30px; position: relative; }
.hamburger-line { display: block; width: 100%; height: 2px; background-color: var(--color-text); transition: transform 0.3s ease-out, opacity 0.3s ease-out; position: absolute; left: 0; }
.hamburger-line:nth-child(1) { top: 6px; }
.hamburger-line:nth-child(2) { top: 14px; }
.hamburger-line:nth-child(3) { top: 22px; }
.menu-toggle.active .hamburger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }
.menu-toggle.active .hamburger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }


/* --- 6. Secção Hero Visual (Home e Internas) --- */
.hero-visual {
    height: calc(100vh - var(--header-height)); min-height: 600px; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; color: var(--color-white); background-color: #333; background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/images/projects/projeto-01.jpg'); background-size: cover; background-position: center center; background-attachment: fixed;
}
.hero-visual .hero-content-overlay { position: relative; z-index: 2; }
.hero-visual .hero-title { color: var(--color-white); font-size: 4rem; text-shadow: 1px 1px 5px rgba(0,0,0,0.3); }
.hero-visual .hero-subtitle { color: rgba(255, 255, 255, 0.9); font-size: 1.2rem; max-width: 600px; margin: 0 auto 40px auto; }
.hero-visual .cta-button.primary { background-color: var(--color-white); color: var(--color-black); border-color: var(--color-white); }
.hero-visual .cta-button.primary:hover, .hero-visual .cta-button.primary:focus { background-color: transparent; color: var(--color-white); }

/* Hero Simples (Páginas Internas) */
.hero-simple {
    padding: 80px 0; /* Menos padding que section-padding */
    text-align: center;
    background-color: var(--color-bg-alt); /* Fundo alternativo */
    border-bottom: 1px solid var(--color-border);
}
.hero-simple .hero-title { font-size: 3rem; margin-bottom: 10px; }
.hero-simple .hero-subtitle { font-size: 1.1rem; margin-bottom: 0; }


/* --- 7. Secção Introdução (Home) --- */
.intro h2 { font-family: var(--font-sans); font-weight: 600; font-size: 1.8rem; }
.intro p { font-size: 1.1rem; }

/* --- 8. Secção Projetos em Destaque (Home) --- */
.featured-projects { border-top: 1px solid var(--color-border); }
.projects-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.project-preview-card { position: relative; overflow: hidden; display: block; border: 1px solid var(--color-border); }
.project-preview-card img { width: 100%; height: 350px; object-fit: cover; transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); }
.card-overlay { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); padding: 40px 20px 20px 20px; color: var(--color-white); transition: var(--default-transition); transform: translateY(30%); opacity: 0; }
.project-preview-card:hover img { transform: scale(1.05); }
.project-preview-card:hover .card-overlay { transform: translateY(0); opacity: 1; }
.card-overlay h3 { font-family: var(--font-sans); font-weight: 600; color: var(--color-white); font-size: 1.3rem; margin-bottom: 5px; }
.card-overlay span { font-size: 0.9rem; opacity: 0.8; }

/* --- 9. Secção Filosofia (Sobre) --- */
.philosophy ul { list-style: none; padding-left: 0; margin-top: 25px; }
.philosophy li { padding-left: 25px; position: relative; margin-bottom: 15px; }
.philosophy li::before { /* Marcador personalizado */
    content: '▪';
    position: absolute;
    left: 0;
    top: 0px;
    color: var(--color-primary-accent);
    font-size: 1.2em;
    line-height: 1.7;
}
.philosophy li strong { color: var(--color-text); }

/* --- 10. Secção Equipa (Sobre) --- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 800px; margin: 0 auto; }
.team-member-card { text-align: center; }
.team-member-photo { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; margin: 0 auto 20px auto; filter: grayscale(100%); /* P&B */ }
.team-member-name { font-family: var(--font-sans); font-weight: 600; font-size: 1.3rem; margin-bottom: 5px; }
.team-member-role { display: block; color: var(--color-primary-accent); font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; }
.team-member-bio { font-size: 0.95rem; }

/* --- 11. Galeria Assimétrica (Projetos) --- */
.asymmetric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colunas base */
    grid-auto-rows: 250px; /* Altura base das linhas */
    gap: 15px;
}
.grid-item {
    position: relative;
    overflow: hidden;
    display: block;
    background-color: var(--color-bg-alt); /* Fallback */
}
/* Classes para controlar o span */
.span-col-2 { grid-column: span 2; }
.span-row-2 { grid-row: span 2; }

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.3s ease;
    filter: saturate(0.8); /* Efeito subtil */
}
.item-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: flex-end; /* Alinha texto em baixo */
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
    padding: 20px;
    color: var(--color-white);
    opacity: 0; /* Começa invisível */
    transition: var(--default-transition);
}
.grid-item:hover img {
    transform: scale(1.03);
    filter: saturate(1);
}
.grid-item:hover .item-overlay {
    opacity: 1;
}
.item-overlay h3 { font-family: var(--font-sans); font-weight: 600; color: var(--color-white); font-size: 1.3rem; margin-bottom: 5px; }
.item-overlay span { font-size: 0.9rem; opacity: 0.8; }


/* --- 12. Secção Contato --- */
.contact-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; color: var(--color-text); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%; padding: 12px; border: 1px solid var(--color-border); font-family: var(--font-sans); font-size: 1rem; color: var(--color-text); background-color: var(--color-bg-alt); transition: var(--default-transition);
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--color-text); outline: none; background-color: var(--color-white); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button { width: 100%; }

.contact-info .section-title { margin-bottom: 30px; font-size: 2.2rem; }
.info-block { display: flex; gap: 15px; margin-bottom: 25px; align-items: flex-start; }
.info-block i { font-size: 1.3rem; color: var(--color-primary-accent); margin-top: 5px; width: 25px; text-align: center; }
.info-block strong { display: block; font-weight: 600; color: var(--color-text); margin-bottom: 5px; }
.info-block p, .info-block a { margin: 0; font-size: 1rem; color: var(--color-text-light); }
.info-block a:hover { color: var(--color-primary-accent); }
.map-placeholder { margin-top: 30px; border: 1px solid var(--color-border); height: 300px; }


/* --- 13. Rodapé --- */
.site-footer { padding: 30px 0; background-color: var(--color-bg-alt); border-top: 1px solid var(--color-border); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.site-footer p { color: var(--color-text-light); font-size: 0.9rem; margin: 0; }
.footer-nav ul { display: flex; gap: 25px; }
.footer-nav a { color: var(--color-text-light); font-size: 0.9rem; font-weight: 400; }
.footer-nav a:hover, .footer-nav a:focus { color: var(--color-text); border-bottom: 1px solid var(--color-text); padding-bottom: 1px; outline: none; }

/* --- 14. Animações e Transições de Página --- */
main { transition: opacity 0.5s ease-out; } /* Duração da transição */
body:not(.loaded) main { opacity: 0; } /* Esconde inicialmente */

/* Animação de entrada para elementos do Hero */
.animate-on-load { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease-out 0.3s, transform 0.8s ease-out 0.3s; }
.animate-on-load.delay-1 { transition-delay: 0.5s; }
.animate-on-load.delay-2 { transition-delay: 0.7s; }
body.loaded .animate-on-load { opacity: 1; transform: translateY(0); }


/* --- 15. Responsividade --- */
@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    .hero-visual { min-height: 500px; height: calc(100vh - var(--header-height) - 100px); }
    .hero-visual .hero-title { font-size: 3.2rem; }

    .projects-preview-grid { grid-template-columns: repeat(2, 1fr); }
    .asymmetric-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; } /* Ajusta grid da galeria */
    /* Remove spans que não fazem sentido em 2 colunas */
    .asymmetric-grid .span-col-2 { grid-column: span 1; }
    .asymmetric-grid .span-row-2 { grid-row: span 1; }
    /* Ajustes manuais podem ser necessários aqui dependendo das imagens */
    .asymmetric-grid a:nth-child(1) { grid-column: span 2; grid-row: span 1;} /* Exemplo */
    .asymmetric-grid a:nth-child(4) { grid-column: span 2; grid-row: span 1;} /* Exemplo */

    .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --header-height: 80px; }
    body { padding-top: var(--header-height); }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .section-padding { padding: 60px 0; }
    
    .main-navigation {
        display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: var(--color-bg); padding-top: var(--header-height); z-index: 1050; overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .main-navigation.active {
        display: block; opacity: 1; visibility: visible;
    }
    .main-navigation ul { flex-direction: column; padding: 40px; align-items: center; gap: 10px; }
    .main-navigation li { width: 100%; text-align: center; }
    .main-navigation a { display: block; padding: 15px; font-size: 1.3rem; border-bottom: none; color: var(--color-text); }
    .main-navigation a.active { color: var(--color-primary-accent); border-bottom: none; }

    .menu-toggle { display: block; position: fixed; top: calc(var(--header-height)/2 - 15px); right: 20px; z-index: 1100;}

    .hero-visual { height: calc(100vh - var(--header-height)); background-attachment: scroll; }
    .hero-visual .hero-title { font-size: 2.8rem; }
    .hero-visual .hero-subtitle { font-size: 1.1rem; }

    .projects-preview-grid { grid-template-columns: 1fr; }
    .project-preview-card img { height: 300px; }

    .asymmetric-grid { grid-template-columns: 1fr; grid-auto-rows: 250px; } /* 1 coluna na galeria */
    .asymmetric-grid .span-col-2, .asymmetric-grid .span-row-2 { grid-column: span 1; grid-row: span 1; } /* Reset total */

    .footer-content { justify-content: center; text-align: center; }
    .footer-nav { margin-top: 10px; }
}