/* =========================================================================
   SILVA & BERNARDO ADVOGADOS - APPLE-STYLE DESIGN SYSTEM
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors - v9 British Green & Gold */
    --color-bg-primary: #fbfbfd;
    --color-bg-secondary: #f5f5f7;
    --color-bg-tertiary: #ffffff;
    --color-text-primary: #1d1d1f;
    --color-text-secondary: #86868b;
    --color-accent-green: #1B4D3E;
    /* Verde Inglês */
    --color-accent-gold: #D4AF37;
    /* Dourado */
    --color-accent-gold-hover: #C5A030;

    /* Typography */
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing */
    --space-2: 0.5rem;
    --space-4: 1rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Borders & Shadows */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 980px;
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.08);

    /* Navbar */
    --nav-height: 56px;
    --nav-bg: rgba(251, 251, 253, 0.8);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

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

/* =========================================================================
   TYPOGRAPHY
   ========================================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    /* Apple-style tight tracking for headings */
    color: var(--color-text-primary);
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 5vw + 1rem, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-4);
}

h2 {
    font-size: clamp(2rem, 3vw + 1rem, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-4);
}

h3 {
    font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
    letter-spacing: -0.015em;
    margin-bottom: var(--space-2);
}

p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 800px;
}

.text-gold {
    color: var(--color-accent-gold);
}

.text-green {
    color: var(--color-accent-green);
}

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

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-16 {
    margin-bottom: var(--space-16);
}

/* =========================================================================
   LAYOUT & GRID
   ========================================================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: var(--space-24) 0;
}

.bg-secondary {
    background-color: var(--color-bg-secondary);
}

.bg-tertiary {
    background-color: var(--color-bg-tertiary);
}

/* =========================================================================
   COMPONENTS
   ========================================================================= */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-accent-green);
    color: #fff;
}

.btn-primary:hover {
    background-color: #153a2f;
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(27, 77, 62, 0.3);
}

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

.btn-outline:hover {
    background-color: var(--color-accent-green);
    color: #fff;
}

.btn-gold {
    background-color: var(--color-accent-gold);
    color: #fff;
}

.btn-gold:hover {
    background-color: var(--color-accent-gold-hover);
    transform: scale(1.02);
}

.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
}

.btn-whatsapp:hover {
    background-color: #1ebc59;
    transform: scale(1.02);
}

.btn-whatsapp img {
    width: 20px;
    margin-right: 8px;
    filter: brightness(0) invert(1);
}

/* Floating WhatsApp */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}

.floating-whatsapp img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

/* =========================================================================
   HEADER (GLASSMORPHISM)
   ========================================================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.site-header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    height: 40px;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.main-nav ul {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.8);
    font-weight: 400;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--color-text-primary);
}

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

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--color-text-primary);
    transition: 0.3s ease;
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
    background: var(--color-bg-primary);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
}

.hero h1 {
    margin-bottom: var(--space-4);
    /* Apple style gradient text optional, but solid dark gray is safer */
    color: var(--color-text-primary);
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin: 0 auto var(--space-8);
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-logo {
    width: 100%;
    max-width: 500px;
    margin: 0 auto var(--space-8) auto;
    display: block;
    border-radius: var(--radius-sm);
    /* Optional soft edge */
}

/* =========================================================================
   CARDS & GRIDS
   ========================================================================= */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-8);
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.apple-card {
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.apple-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.apple-card.image-card {
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.apple-card .card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
    background: #fbfbfd;
    display: block;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.apple-card .card-content {
    padding: var(--space-8);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.apple-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
    color: var(--color-accent-green);
}

/* =========================================================================
   TEAM SECTION
   ========================================================================= */
.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.team-image-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-soft);
    background: #f5f5f7;
}

.team-image-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image-wrapper img {
    transform: scale(1.05);
}

.team-card h3 {
    margin-bottom: var(--space-2);
}

.team-card .role {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

/* =========================================================================
   FAQ SECTION
   ========================================================================= */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: var(--space-4) 0;
}

.faq-item:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    padding: var(--space-2) 0;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
    color: var(--color-text-secondary);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
}

.faq-answer p {
    padding-top: var(--space-2);
    padding-bottom: var(--space-4);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
    background-color: var(--color-bg-secondary);
    padding: var(--space-12) 0 var(--space-8);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-4);
}

.footer-logo {
    height: 48px;
    filter: grayscale(100%) opacity(0.7);
}

.footer-links {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    margin-top: var(--space-8);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* =========================================================================
   UTILITY & ANIMATIONS (GSAP Classes)
   ========================================================================= */
.reveal {
    /* Opacity handled by JS to prevent FOIC */
}

/* =========================================================================
   RESPONSIVE DESIGN
   ========================================================================= */
@media (max-width: 992px) {
    .main-nav {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--color-bg-primary);
        padding: var(--space-4) 0;
        flex-direction: column;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .main-nav.nav-open {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: var(--space-4);
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    section {
        padding: var(--space-16) 0;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}