/* ================================================
   CUNHA ADVOGADOS — Website Styles
   Colors: Olive #4A5530 | Beige #C4B799 | Cream #F5F0E8
   ================================================ */

:root {
    --olive-dark: #3D4A2D;
    --olive: #4A5530;
    --olive-light: #5C6B3F;
    --beige: #C4B799;
    --beige-light: #D4C9A8;
    --cream: #F5F0E8;
    --cream-dark: #EDE7DB;
    --charcoal: #2C2C2C;
    --text: #3A3A3A;
    --text-light: #6B6B6B;
    --white: #FFFFFF;

    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- Navigation ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(61, 74, 45, 0.97);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo-img {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.navbar.scrolled .nav-logo-img {
    height: 36px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--beige-light);
    transition: var(--transition);
    position: relative;
}

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

.nav-link:hover::after {
    width: 100%;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 1.5px;
    background: var(--beige-light);
    transition: var(--transition);
}

/* ---- Hero Section ---- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--olive-dark);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: none;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 1.2s ease-out;
}

.hero-logo {
    max-width: 320px;
    width: 80%;
    margin-bottom: 2rem;
}

.hero-divider {
    width: 60px;
    height: 1px;
    background: var(--beige);
    margin: 0 auto 1.5rem;
    opacity: 0.6;
}

.hero-tagline {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--beige);
    opacity: 0.8;
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--beige);
    opacity: 0.5;
    transition: var(--transition);
    animation: bounce 2s infinite;
}

.hero-scroll:hover {
    opacity: 1;
}

/* ---- Sections ---- */
.section {
    padding: 7rem 0;
}

.section-light {
    background: var(--cream);
}

.section-dark {
    background: var(--olive-dark);
}

.section-olive {
    background: var(--olive);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--olive);
    display: block;
    margin-bottom: 1rem;
}

.section-label-light {
    color: var(--beige);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--charcoal);
    line-height: 1.2;
}

.section-title-light {
    color: var(--cream);
}

.section-subtitle {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-light);
    margin-top: 1.25rem;
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
}

/* ---- About Section ---- */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;   /* texto mais largo -> menos cortes */
    gap: 4rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.25rem;
    font-size: 1.02rem;
    color: var(--text);
    line-height: 1.8;
    text-align: justify;
    hyphens: none;
}

.about-lead {
    font-size: 1.15rem !important;
    color: var(--charcoal) !important;
}

.about-lead strong {
    color: var(--olive);
}

.value-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(74, 85, 48, 0.1);
}

.value-item:last-child {
    border-bottom: none;
}
/* alinhar o topo da coluna dos valores com o topo do texto */
.value-item:first-child {
    padding-top: 0;
}

.value-number {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--beige);
    line-height: 1;
    min-width: 40px;
}

.value-content h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--olive-dark);
    margin-bottom: 0.25rem;
}

.value-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* ---- Practice Areas ---- */
.areas-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.area-card {
    flex: 0 1 calc((100% - 3rem) / 3);
    min-width: 0;
}

.area-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(196, 183, 153, 0.12);
    border-radius: 8px;
    padding: 2.25rem;
    transition: var(--transition);
    cursor: default;
}

.area-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(196, 183, 153, 0.25);
    transform: translateY(-4px);
}

.area-icon {
    width: 40px;
    height: 40px;
    color: var(--beige);
    margin-bottom: 1.25rem;
    opacity: 0.7;
}

.area-card h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--cream);
    margin-bottom: 0.75rem;
}

.area-card p {
    font-size: 0.88rem;
    color: var(--beige);
    opacity: 0.65;
    line-height: 1.6;
    text-align: justify;
    hyphens: auto;
}

/* ---- Team Section ---- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.team-card {
    text-align: center;
}

.team-photo {
    width: 180px;
    height: 220px;
    margin: 0 auto 1.5rem;
    border-radius: 6px;
    overflow: hidden;
    background: var(--cream-dark);
}

.team-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--beige);
}

.team-photo-placeholder svg {
    width: 60px;
    height: 60px;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.team-role {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--olive);
    display: block;
    margin-bottom: 0.5rem;
}

.team-areas {
    font-size: 0.88rem;
    color: var(--text-light);
}

/* ---- Contact Section ---- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-item {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 24px;
    height: 24px;
    color: var(--beige);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--cream);
    margin-bottom: 0.3rem;
}

.contact-item p {
    font-size: 0.92rem;
    color: var(--beige);
    opacity: 0.75;
    line-height: 1.6;
}

.contact-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-left: 3rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(196, 183, 153, 0.25);
    color: var(--beige);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--beige);
    color: var(--olive-dark);
    border-color: var(--beige);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.9rem 1.15rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--cream);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(196, 183, 153, 0.2);
    border-radius: 6px;
    outline: none;
    transition: var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(196, 183, 153, 0.45);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--beige);
    background: rgba(255, 255, 255, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--olive-dark);
    background: var(--beige);
    border: none;
    border-radius: 6px;
    padding: 1rem 2.5rem;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

.btn-submit:hover {
    background: var(--cream);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ---- Footer ---- */
.footer {
    background: var(--charcoal);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.footer-brand p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

.footer-links h4 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--beige);
    margin-bottom: 1.25rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.45);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--beige);
}

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2.3rem;
    }

    .area-card {
        flex-basis: calc((100% - 1.5rem) / 2);
    }

    .about-grid {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(61, 74, 45, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        font-size: 1rem;
        letter-spacing: 0.2em;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 4px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -4px);
    }

    .section {
        padding: 5rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .area-card {
        flex-basis: 100%;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-logo {
        max-width: 240px;
    }

    .hero-tagline {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .area-card {
        padding: 1.75rem;
    }
}

/* ---- Blocos de texto corrido (Uma advocacia próxima / No Porto) ---- */
.section-subtitle-light {
    color: var(--beige);
}

.prose {
    max-width: 40rem;
    margin: 0 auto;
}

/* Texto corrido alinha à esquerda: quatro parágrafos centrados ficam com as
   duas margens irregulares e custam a seguir. Só a frase de abertura é que
   é curta o suficiente para se centrar. */
.prose p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
    margin-bottom: 1.35rem;
    text-align: justify;
    hyphens: auto;
}
/* a frase de abertura mantém-se centrada */
.prose .prose-lead { text-align: center; }
/* "No Porto" (prose-center) continua centrado, não justificado */
.prose-center p { text-align: center; hyphens: none; }

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

.prose .prose-lead {
    font-family: var(--font-serif);
    font-size: 1.65rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.45;
    text-align: center;
    max-width: 34rem;
    margin: 0 auto 2.5rem;
    padding-bottom: 2.25rem;
    position: relative;
}

/* Filete curto a separar a abertura do corpo — dá hierarquia sem mais palavras */
.prose .prose-lead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 1px;
    background: currentColor;
    opacity: 0.45;
}

.prose-light p {
    color: var(--beige-light);
}

.prose-light .prose-lead {
    color: var(--cream);
}

/* ---- Formulário de contacto: rótulos, armadilha e resposta ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* A resposta ao envio aparece aqui — nunca no texto do botão, que
   desaparece antes de ser lido e não diz o que fazer a seguir. */
.form-status {
    margin-top: 1.25rem;
    padding: 0.9rem 1.1rem;
    border-radius: 4px;
    font-size: 0.92rem;
    line-height: 1.6;
    border-left: 3px solid transparent;
}

.form-status-ok {
    background: rgba(245, 240, 232, 0.14);
    border-left-color: var(--cream);
    color: var(--cream);
}

.form-status-erro {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #E8B4A0;
    color: #F7DCD2;
}

.form-status a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-submit[disabled] {
    opacity: 0.65;
    cursor: progress;
}

/* ---- "No Porto": texto centrado (secção curta) + morada em destaque ---- */
.prose-center p {
    text-align: center;
}

.prose-morada {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--cream);
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    position: relative;
}

.prose-morada::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 1px;
    background: currentColor;
    opacity: 0.45;
}


/* ---- Bloco "No Porto" sem título: texto justificado ---- */
.prose-justify p {
    text-align: justify;
    hyphens: auto;
}

/* ---- Seletor de idioma ---- */
.nav-lang {
    display: flex;
    gap: 0.15rem;
    align-items: center;
    margin-left: 0.5rem;
}
.lang-btn {
    background: none;
    border: none;
    color: var(--beige);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.4rem;
    cursor: pointer;
    opacity: 0.55;
    transition: var(--transition);
    border-radius: 3px;
}
.lang-btn:hover { opacity: 0.9; }
.lang-btn.active { opacity: 1; color: var(--cream); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 768px) {
    .nav-lang { justify-content: center; margin: 1rem 0 0; gap: 0.5rem; }
    .lang-btn { font-size: 1rem; padding: 0.5rem 0.8rem; }
}
