/* ==========================================
   ROCHA DE SOUZA — ADVOCACIA E CONSULTORIA
   Design System & Styles v2
   ========================================== */

/* ===== CSS Custom Properties ===== */
:root {
    /* Colors — extracted from logo */
    --c-primary: #1a2e4a;
    --c-primary-light: #2a4368;
    --c-primary-dark: #0f1d30;
    --c-secondary: #2d5c47;
    --c-secondary-light: #3a7a5e;
    --c-accent: #c9a84c;
    --c-accent-light: #dfc275;

    /* Neutrals */
    --c-bg: #f8f6f3;
    --c-bg-alt: #f0ece6;
    --c-bg-dark: #111827;
    --c-white: #ffffff;
    --c-text: #1a1a2e;
    --c-text-secondary: #3d4555;
    --c-text-muted: #6b7280;
    --c-border: #e2ddd6;

    /* Typography — brand identity */
    --f-heading: 'Instrument Serif', 'Georgia', serif;
    --f-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --f-serif: 'Georgia', 'Palatino Linotype', 'Palatino', serif;
    --f-citation: 'Palatino Linotype', 'Palatino', 'Georgia', serif;

    /* Spacing — tighter */
    --s-xs: 0.25rem;
    --s-sm: 0.5rem;
    --s-md: 1rem;
    --s-lg: 1.5rem;
    --s-xl: 2rem;
    --s-2xl: 3rem;
    --s-3xl: 4rem;
    --s-4xl: 5rem;

    /* Borders & Shadows */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(26, 46, 74, 0.08);
    --shadow-md: 0 4px 20px rgba(26, 46, 74, 0.1);
    --shadow-lg: 0 10px 40px rgba(26, 46, 74, 0.12);
    --shadow-xl: 0 20px 60px rgba(26, 46, 74, 0.15);

    /* Transitions */
    --t-fast: 0.2s ease;
    --t-normal: 0.35s ease;
    --t-slow: 0.5s ease;
    --t-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--f-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--c-text);
    background-color: var(--c-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--t-fast);
}

ul {
    list-style: none;
}

/* ===== Container ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--s-lg);
}

/* ===== Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--s-2xl);
}

.section-header__label {
    display: inline-block;
    font-family: var(--f-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-secondary);
    margin-bottom: var(--s-sm);
}

.section-header__title {
    font-family: var(--f-heading);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 400;
    color: var(--c-primary);
    line-height: 1.2;
    margin-bottom: var(--s-md);
}

.section-header__line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--c-secondary), var(--c-accent));
    margin: 0 auto;
    border-radius: 2px;
}

.section-header__subtitle {
    font-family: var(--f-serif);
    font-size: 1.1rem;
    color: var(--c-text-secondary);
    max-width: 540px;
    margin: var(--s-lg) auto 0;
    line-height: 1.7;
}

.section-header--light .section-header__label {
    color: var(--c-accent-light);
}

.section-header--light .section-header__title {
    color: var(--c-white);
}

.section-header--light .section-header__subtitle {
    color: rgba(255, 255, 255, 0.75);
}

/* ==========================================
   HEADER / NAVIGATION
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--t-normal), box-shadow var(--t-normal), backdrop-filter var(--t-normal);
}

.header--scrolled {
    background-color: rgba(15, 29, 48, 0.85); /* Dark Glassmorphism */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-md);
}

.header--scrolled .nav__link {
    color: var(--c-white);
}

.header--scrolled .nav__link:hover::after,
.header--scrolled .nav__link.active::after {
    background: var(--c-secondary);
}

.header--scrolled .nav__toggle {
    color: var(--c-white);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__logo-img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: opacity var(--t-fast);
}

.nav__logo:hover .nav__logo-img {
    opacity: 0.8;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--s-xl);
}

.nav__link {
    font-family: var(--f-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-white);
    letter-spacing: 0.02em;
    position: relative;
    padding: var(--s-xs) 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--c-secondary);
    transition: width var(--t-normal);
    border-radius: 1px;
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__link--cta {
    background: var(--c-secondary);
    color: var(--c-white);
    padding: 0.55rem 1.4rem;
    border-radius: var(--radius-sm);
    transition: background-color var(--t-fast), transform var(--t-fast);
}

.nav__link--cta::after {
    display: none;
}

.nav__link--cta:hover {
    background: var(--c-secondary-light);
    transform: translateY(-1px);
}

.nav__toggle,
.nav__close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--c-white);
    padding: var(--s-xs);
}

/* ==========================================
   HERO SECTION — with background image
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: url('images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dark overlay over the image */
.hero__bg-pattern {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(10, 15, 25, 0.88) 0%,
        rgba(15, 29, 48, 0.85) 30%,
        rgba(15, 29, 48, 0.88) 50%,
        rgba(26, 46, 74, 0.92) 100%
    );
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--s-lg) var(--s-lg);
}

.hero__logo-wrapper {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.hero__logo {
    max-width: 670px;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 1;
}

.hero__slogan {
    font-family: var(--f-heading);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 500;
    color: var(--c-white);
    letter-spacing: 0.03em;
    line-height: 1.4;
    max-width: 700px;
    margin: 2.5rem auto 1.5rem;
    opacity: 0.9;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--s-sm);
    background: var(--c-secondary);
    color: var(--c-white);
    border: none;
    padding: 1rem 2.4rem;
    border-radius: var(--radius-sm);
    font-family: var(--f-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all var(--t-normal);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(45, 92, 71, 0.4);
}

.hero__cta:hover {
    background: var(--c-secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(45, 92, 71, 0.6);
}

.hero__cta svg {
    transition: transform var(--t-normal);
}

.hero__cta:hover svg {
    transform: translateX(4px);
}

.hero__scroll-indicator {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-xs);
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--f-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    animation: scrollBounce 2s ease-in-out infinite;
    z-index: 2;
    transition: color var(--t-fast);
    text-decoration: none;
    border: none;
    background: transparent;
    outline: none;
}

.hero__scroll-indicator:hover {
    color: var(--c-white);
    animation-play-state: paused;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ==========================================
   SOBRE SECTION
   ========================================== */
.sobre {
    padding: var(--s-4xl) 0;
    background-color: var(--c-bg);
}

.sobre__content {
    display: grid;
    gap: var(--s-2xl);
}

.sobre__text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.sobre__text p {
    font-family: var(--f-serif);
    font-size: 1.1rem;
    color: var(--c-text-secondary);
    margin-bottom: var(--s-lg);
    line-height: 1.85;
}

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

.sobre__text strong {
    color: var(--c-primary);
    font-weight: 700;
}

.sobre__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-lg);
    margin-top: var(--s-md);
}

.sobre__stat {
    text-align: center;
    padding: var(--s-xl) var(--s-lg);
    background: var(--c-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
    transition: transform var(--t-normal), box-shadow var(--t-normal);
}

.sobre__stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.sobre__stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(26, 46, 74, 0.06), rgba(45, 92, 71, 0.06));
    color: var(--c-secondary);
    margin-bottom: var(--s-md);
}

.sobre__stat h3 {
    font-family: var(--f-heading);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--c-primary);
    margin-bottom: var(--s-sm);
}

.sobre__stat p {
    font-size: 0.9rem;
    color: var(--c-text-muted);
    line-height: 1.6;
}

/* ==========================================
   ÁREAS DE ATUAÇÃO
   ========================================== */
.areas {
    padding: var(--s-4xl) 0;
    background: var(--c-white);
}

.areas__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-lg);
}

.area-card {
    position: relative;
    padding: var(--s-xl) var(--s-xl);
    background: var(--c-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
    transition: all var(--t-normal);
    overflow: hidden;
}

.area-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--c-secondary), var(--c-accent));
    transition: height var(--t-slow);
    border-radius: 0 0 2px 0;
}

.area-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.area-card:hover::before {
    height: 100%;
}

.area-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--s-md);
    color: var(--c-secondary);
    transition: color var(--t-normal), transform var(--t-normal);
}

.area-card:hover .area-card__icon {
    color: var(--c-primary);
    transform: scale(1.08);
}

.area-card__title {
    font-family: var(--f-heading);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--c-primary);
    margin-bottom: var(--s-sm);
}

.area-card__desc {
    font-size: 0.95rem;
    color: var(--c-text-secondary);
    line-height: 1.7;
}

/* ==========================================
   CONTATO SECTION
   ========================================== */
.contato {
    padding: var(--s-4xl) 0;
    background: linear-gradient(160deg, var(--c-primary-dark) 0%, var(--c-primary) 50%, var(--c-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.contato::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.contato > .container {
    position: relative;
    z-index: 2;
}

.contato__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-lg);
    max-width: 700px;
    margin: 0 auto;
}

.contato__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--s-2xl) var(--s-xl);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    transition: all var(--t-normal);
    cursor: pointer;
}

.contato__card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.contato__card-icon {
    color: var(--c-accent-light);
    margin-bottom: var(--s-md);
    transition: transform var(--t-spring);
}

.contato__card:hover .contato__card-icon {
    transform: scale(1.15);
}

.contato__card-title {
    font-family: var(--f-heading);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--c-white);
    margin-bottom: var(--s-sm);
}

.contato__card-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: var(--s-lg);
    word-break: break-word;
}

.contato__card-action {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--c-accent-light);
    letter-spacing: 0.03em;
    transition: color var(--t-fast);
}

.contato__card:hover .contato__card-action {
    color: var(--c-white);
}

/* WhatsApp card accent */
.contato__card--whatsapp:hover {
    border-color: rgba(37, 211, 102, 0.4);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.15);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--c-bg-dark);
    padding: var(--s-2xl) 0 var(--s-lg);
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--s-xl);
    padding-bottom: var(--s-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__logo {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    margin-bottom: var(--s-md);
}

.footer__tagline {
    font-family: var(--f-heading);
    font-style: italic;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
}

.footer__links h4,
.footer__contact h4 {
    font-family: var(--f-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--s-md);
}

.footer__links ul,
.footer__contact ul {
    display: flex;
    flex-direction: column;
    gap: var(--s-sm);
}

.footer__links a,
.footer__contact a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--t-fast);
}

.footer__links a:hover,
.footer__contact a:hover {
    color: var(--c-accent-light);
}

.footer__bottom {
    text-align: center;
    padding-top: var(--s-lg);
}

.footer__oab {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--s-xs);
    font-weight: 500;
}

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

/* ==========================================
   WHATSAPP FLOATING BUTTON
   ========================================== */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
    z-index: 999;
    transition: all var(--t-normal);
    opacity: 0;
    transform: scale(0.5) translateY(20px);
}

.whatsapp-float.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.3);
    animation: whatsappPulse 2s ease-in-out infinite;
}

@keyframes whatsappPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0; }
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Hero elements start visible — no scroll trigger needed */
.hero .animate-on-scroll {
    opacity: 1;
    transform: none;
}

/* Stagger animation for cards */
.areas__grid .area-card:nth-child(1) { transition-delay: 0s; }
.areas__grid .area-card:nth-child(2) { transition-delay: 0.1s; }
.areas__grid .area-card:nth-child(3) { transition-delay: 0.2s; }
.areas__grid .area-card:nth-child(4) { transition-delay: 0.3s; }

.sobre__stats .sobre__stat:nth-child(1) { transition-delay: 0s; }
.sobre__stats .sobre__stat:nth-child(2) { transition-delay: 0.15s; }
.sobre__stats .sobre__stat:nth-child(3) { transition-delay: 0.3s; }

/* ==========================================
   RESPONSIVE — TABLET
   ========================================== */
@media screen and (max-width: 968px) {
    .sobre__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--s-md);
    }

    .sobre__stat {
        padding: var(--s-lg);
    }

    .areas__grid {
        gap: var(--s-md);
    }

    .footer__content {
        grid-template-columns: 1fr 1fr;
        gap: var(--s-xl);
    }

    .footer__brand {
        grid-column: 1 / -1;
    }
}

/* ==========================================
   RESPONSIVE — MOBILE
   ========================================== */
@media screen and (max-width: 768px) {
    /* Mobile Navigation */
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--c-white);
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
        padding: 5rem var(--s-xl) var(--s-xl);
        transition: right var(--t-normal);
        z-index: 1001;
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s-lg);
    }

    .nav__link {
        font-size: 1.1rem;
    }

    .nav__link--cta {
        width: 100%;
        text-align: center;
        margin-top: var(--s-md);
    }

    .nav__toggle,
    .nav__close {
        display: block;
    }

    .nav__close {
        position: absolute;
        top: 1.2rem;
        right: 1.2rem;
        z-index: 1002;
    }

    /* Mobile overlay */
    .nav__menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: -100vw;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0);
        transition: background var(--t-normal);
        pointer-events: none;
    }

    .nav__menu.show-menu::before {
        background: rgba(0, 0, 0, 0.4);
        pointer-events: all;
    }

    /* Hero adjustments */
    .hero__logo {
        max-width: 300px;
    }

    .hero__slogan {
        font-size: 1.3rem;
    }

    .hero__scroll-indicator {
        display: none;
    }

    /* Sections padding */
    .sobre,
    .areas,
    .contato {
        padding: var(--s-3xl) 0;
    }

    /* Stats */
    .sobre__stats {
        grid-template-columns: 1fr;
        gap: var(--s-md);
    }

    /* Areas grid */
    .areas__grid {
        grid-template-columns: 1fr;
    }

    /* Contact cards */
    .contato__cards {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__logo {
        margin: 0 auto var(--s-md);
    }

    .footer__links ul,
    .footer__contact ul {
        align-items: center;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 var(--s-md);
    }

    .hero__logo {
        max-width: 240px;
    }

    .hero__cta {
        width: 100%;
        justify-content: center;
    }

    .area-card {
        padding: var(--s-lg);
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--c-secondary);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Print styles */
@media print {
    .header,
    .hero__scroll-indicator,
    .whatsapp-float,
    .hero__cta {
        display: none;
    }

    .hero {
        min-height: auto;
        background: none;
        padding: var(--s-xl) 0;
    }

    .hero::after,
    .hero__bg-pattern {
        display: none;
    }

    .hero__logo {
        filter: none;
    }

    .hero__slogan {
        color: var(--c-text);
    }

    body {
        font-size: 12pt;
    }
}
