/*
 * Build Web Apps visual refinement.
 * This file intentionally sits after site.css so the established PHP, content
 * model and admin remain independently recoverable.
 */

:root {
    --navy: #0a2947;
    --navy-dark: #041a2d;
    --blue: #60a7cc;
    --gold: #aa8338;
    --ink: #152331;
    --muted: #596675;
    --soft: #f3f0e9;
    --paper: #fffdf9;
    --line: #d9d9d2;
    --shadow: 0 24px 70px rgba(4, 26, 45, .12);
    --shadow-soft: 0 14px 40px rgba(4, 26, 45, .08);
    --ease-editorial: cubic-bezier(.22, 1, .36, 1);
}

body:not(.admin-body) {
    background: var(--paper);
    font-size: 16.5px;
}

body:not(.admin-body) .wrap {
    width: min(1280px, calc(100% - clamp(36px, 6vw, 84px)));
}

body:not(.admin-body) h1,
body:not(.admin-body) h2,
body:not(.admin-body) h3 {
    font-kerning: normal;
}

body:not(.admin-body) h2 {
    max-width: 17ch;
}

body:not(.admin-body) .section {
    position: relative;
    padding: clamp(88px, 9vw, 142px) 0;
}

body:not(.admin-body) .eyebrow {
    margin-bottom: 20px;
    color: var(--gold);
    font-size: .68rem;
    letter-spacing: .21em;
}

/* Header and navigation */
body:not(.admin-body) .site-header {
    background: rgba(255, 253, 249, .94);
    border-bottom-color: rgba(4, 26, 45, .09);
    transition: height .3s var(--ease-editorial), box-shadow .3s ease, background .3s ease;
}

body:not(.admin-body) .site-header.is-scrolled {
    box-shadow: 0 10px 40px rgba(4, 26, 45, .09);
}

body:not(.admin-body) .brand img {
    width: 236px;
}

body:not(.admin-body) .main-nav {
    gap: clamp(18px, 2vw, 30px);
    font-size: .79rem;
    letter-spacing: .015em;
}

body:not(.admin-body) .main-nav > a:not(.nav-cta)::after,
body:not(.admin-body) .nav-dropdown > a::after {
    bottom: -11px;
    height: 1px;
}

body:not(.admin-body) .nav-cta {
    min-height: 46px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: background .25s ease, transform .25s var(--ease-editorial);
}

body:not(.admin-body) .nav-cta::after {
    content: "↗";
    color: var(--blue);
    font-size: 1rem;
}

body:not(.admin-body) .nav-cta:hover {
    background: var(--navy-dark);
    transform: translateY(-2px);
}

body:not(.admin-body) .dropdown-panel {
    padding: 18px;
    background: var(--paper);
    box-shadow: 0 24px 65px rgba(4, 26, 45, .16);
    border-top-width: 2px;
}

body:not(.admin-body) .dropdown-panel a {
    padding: 11px 13px;
    border-bottom: 1px solid rgba(4, 26, 45, .06);
    transition: color .18s ease, background .18s ease, padding .18s ease;
}

body:not(.admin-body) .dropdown-panel a:last-child {
    border-bottom: 0;
}

body:not(.admin-body) .dropdown-panel a:hover,
body:not(.admin-body) .dropdown-panel a:focus-visible {
    padding-left: 17px;
}

/* Buttons and links */
body:not(.admin-body) .button {
    min-height: 54px;
    padding-inline: 24px;
    gap: 13px;
    overflow: hidden;
    position: relative;
    letter-spacing: .025em;
    transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s var(--ease-editorial);
}

body:not(.admin-body) .button::after {
    content: "→";
    font-size: 1rem;
    transition: transform .25s var(--ease-editorial);
}

body:not(.admin-body) .button:hover::after {
    transform: translateX(5px);
}

body:not(.admin-body) .button-primary {
    background: #0c365b;
}

body:not(.admin-body) .text-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-underline-offset: 5px;
}

body:not(.admin-body) .text-link span {
    transition: transform .25s var(--ease-editorial);
}

body:not(.admin-body) .text-link:hover span {
    transform: translateX(5px);
}

/* Homepage hero */
body:not(.admin-body) .hero {
    position: relative;
    isolation: isolate;
    background: var(--navy-dark);
}

body:not(.admin-body) .hero::before,
body:not(.admin-body) .page-hero::before {
    position: absolute;
    z-index: -1;
    content: "";
    inset: 0;
    opacity: .28;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, transparent calc(50% - .5px), rgba(105, 169, 204, .18) 50%, transparent calc(50% + .5px)),
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 100% 100%, 100% 96px;
}

body:not(.admin-body) .hero-copy {
    min-height: calc(100svh - var(--header-height) - 132px);
    grid-template-columns: minmax(460px, .9fr) minmax(520px, 1.1fr);
    gap: clamp(30px, 5vw, 78px);
}

body:not(.admin-body) .hero-content {
    max-width: 670px;
    padding: clamp(74px, 8vw, 120px) 0;
}

body:not(.admin-body) .hero h1 {
    max-width: 8ch;
    font-size: clamp(4.5rem, 7.25vw, 7.65rem);
    line-height: .93;
}

body:not(.admin-body) .hero-lead {
    max-width: 610px;
    margin: 34px 0 40px;
    color: #d4dee7;
    font-size: clamp(1.05rem, 1.45vw, 1.28rem);
    line-height: 1.65;
}

body:not(.admin-body) .hero-visual {
    min-height: 620px;
    padding: 18px 0;
    grid-template-rows: 11% 78% 11%;
}

body:not(.admin-body) .hero-visual::before {
    inset: 7% -8% -22% 1%;
    border-color: rgba(96, 167, 204, .26);
}

body:not(.admin-body) .hero-visual::after {
    position: absolute;
    right: 5%;
    bottom: 7%;
    content: "";
    width: 58%;
    height: 1px;
    background: rgba(255, 255, 255, .16);
}

body:not(.admin-body) .credentials-grid {
    min-height: 132px;
}

body:not(.admin-body) .credentials-grid div {
    padding-inline: clamp(20px, 3vw, 40px);
}

body:not(.admin-body) .credentials-grid strong {
    color: var(--gold);
    font-size: clamp(2rem, 2.7vw, 2.6rem);
}

/* Editorial sections */
body:not(.admin-body) .split-intro {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    align-items: start;
}

body:not(.admin-body) .split-intro > div:last-child {
    padding-top: clamp(10px, 5vw, 68px);
}

body:not(.admin-body) .principle-grid {
    margin-top: clamp(64px, 8vw, 110px);
}

body:not(.admin-body) .principle-grid article {
    min-height: 275px;
    padding: 38px clamp(24px, 3vw, 42px);
    transition: background .25s ease;
}

body:not(.admin-body) .principle-grid article:hover {
    background: #f6f3ed;
}

body:not(.admin-body) .section-heading {
    margin-bottom: clamp(48px, 6vw, 78px);
    grid-template-columns: minmax(0, 1.28fr) minmax(290px, .72fr);
    gap: clamp(44px, 8vw, 112px);
}

body:not(.admin-body) .section-heading > p,
body:not(.admin-body) .section-heading > .text-link {
    justify-self: end;
    max-width: 500px;
}

/* Practice areas */
body:not(.admin-body) .areas-home {
    overflow: hidden;
}

body:not(.admin-body) .areas-home::after {
    position: absolute;
    content: "ATUAÇÃO";
    right: -1.4rem;
    top: 3.5rem;
    color: rgba(255, 255, 255, .025);
    font-family: var(--serif);
    font-size: clamp(7rem, 18vw, 18rem);
    line-height: 1;
    pointer-events: none;
}

body:not(.admin-body) .area-grid {
    gap: 1px;
    background: rgba(255, 255, 255, .15);
}

body:not(.admin-body) .area-card {
    position: relative;
    background: #0a2947;
}

body:not(.admin-body) .area-card-media {
    aspect-ratio: 4 / 3;
}

body:not(.admin-body) .area-card-media img {
    filter: grayscale(1) contrast(.92);
    transition: filter .55s ease, transform .7s var(--ease-editorial);
}

body:not(.admin-body) .area-card:hover .area-card-media img {
    filter: grayscale(.12);
    transform: scale(1.045);
}

body:not(.admin-body) .area-card-content {
    padding: 28px;
}

body:not(.admin-body) .area-card-content h3,
body:not(.admin-body) .area-card-content strong {
    color: #fff;
}

body:not(.admin-body) .area-card-content p {
    color: #bac9d5;
}

body:not(.admin-body) .area-card-content strong {
    display: inline-flex;
    gap: 7px;
}

body:not(.admin-body) .area-card-content strong span {
    transition: transform .25s var(--ease-editorial);
}

body:not(.admin-body) .area-card:hover strong span {
    transform: translateX(5px);
}

/* People and imagery */
body:not(.admin-body) .people-grid {
    gap: clamp(12px, 2vw, 24px);
}

body:not(.admin-body) .person-card {
    background: transparent;
    border-top: 1px solid var(--navy);
}

body:not(.admin-body) .person-photo {
    aspect-ratio: 4 / 5;
    margin-top: 12px;
}

body:not(.admin-body) .person-photo img {
    filter: saturate(.76);
    transition: filter .5s ease, transform .7s var(--ease-editorial);
}

body:not(.admin-body) .person-card:hover img {
    transform: scale(1.035);
}

body:not(.admin-body) .person-content {
    padding: 26px 4px 16px;
}

body:not(.admin-body) .person-content strong {
    display: inline-flex;
    gap: 7px;
}

body:not(.admin-body) .person-content strong span {
    transition: transform .25s var(--ease-editorial);
}

body:not(.admin-body) .person-card:hover strong span {
    transform: translateX(5px);
}

body:not(.admin-body) .team-banner {
    min-height: 580px;
    margin-top: clamp(78px, 9vw, 128px);
    grid-template-columns: 1.22fr .78fr;
    background: var(--navy-dark);
    box-shadow: var(--shadow-soft);
}

body:not(.admin-body) .team-banner-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

body:not(.admin-body) .team-banner .button {
    margin-top: 10px;
}

/* Process and locations */
body:not(.admin-body) .process-section {
    background: var(--soft);
}

body:not(.admin-body) .process-grid {
    position: relative;
    border-color: #bfc4c5;
}

body:not(.admin-body) .process-grid::before {
    position: absolute;
    top: -4px;
    left: 0;
    content: "";
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
}

body:not(.admin-body) .process-grid article {
    min-height: 250px;
    padding: 36px 34px 24px 0;
}

body:not(.admin-body) .process-grid h3 {
    font-size: 1.7rem;
}

body:not(.admin-body) .locations-section {
    background: #082743;
}

body:not(.admin-body) .city-list > a {
    min-height: 82px;
    grid-template-columns: 58px 1fr 45px;
}

body:not(.admin-body) .city-list > a:hover,
body:not(.admin-body) .city-list > a:focus-visible {
    padding-left: 16px;
    background: rgba(255, 255, 255, .06);
}

/* News and content cards */
body:not(.admin-body) .article-grid {
    gap: clamp(18px, 2.2vw, 30px);
}

body:not(.admin-body) .article-card {
    background: transparent;
    border-top-width: 1px;
}

body:not(.admin-body) .article-card-image {
    margin-top: 10px;
    aspect-ratio: 3 / 2;
}

body:not(.admin-body) .article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease-editorial), filter .4s ease;
}

body:not(.admin-body) .article-card-content {
    padding: 26px 2px 20px;
}

body:not(.admin-body) .article-card:hover .article-card-image img {
    transform: scale(1.045);
}

/* Internal pages */
body:not(.admin-body) .page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(88px, 10vw, 150px) 0 clamp(64px, 7vw, 96px);
}

body:not(.admin-body) .page-hero h1 {
    max-width: 15ch;
    font-size: clamp(3.4rem, 6.2vw, 6.6rem);
}

body:not(.admin-body) .team-page-hero {
    padding: clamp(66px, 5.5vw, 84px) 0 clamp(54px, 4.5vw, 68px);
}

body:not(.admin-body) .team-page-hero h1 {
    max-width: 17ch;
    font-size: clamp(3.2rem, 5vw, 5.4rem);
}

body:not(.admin-body) .breadcrumbs {
    padding-top: 26px;
}

body:not(.admin-body) .practice-hero,
body:not(.admin-body) .profile-hero {
    background: var(--navy-dark);
}

body:not(.admin-body) .contact-form,
body:not(.admin-body) .office-card,
body:not(.admin-body) .case-card {
    box-shadow: var(--shadow-soft);
}

body:not(.admin-body) .tag-cloud a,
body:not(.admin-body) .filter-list a,
body:not(.admin-body) [data-tab-target] {
    border-radius: 0;
}

body:not(.admin-body) .site-footer {
    border-top: 1px solid rgba(255, 255, 255, .14);
}

body:not(.admin-body) .footer-grid {
    grid-template-columns: 1.35fr .65fr 1fr .9fr;
    gap: clamp(38px, 6vw, 82px);
}

/* Progressive motion. Content remains visible without JavaScript. */
.has-enhanced-motion [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .75s var(--ease-editorial), transform .75s var(--ease-editorial);
}

.has-enhanced-motion [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

.has-enhanced-motion [data-reveal-delay="1"] { transition-delay: .08s; }
.has-enhanced-motion [data-reveal-delay="2"] { transition-delay: .16s; }
.has-enhanced-motion [data-reveal-delay="3"] { transition-delay: .24s; }

@media (max-width: 1050px) {
    body:not(.admin-body) .brand img {
        width: 196px;
    }

    body:not(.admin-body) .main-nav {
        gap: 0;
        background: var(--navy-dark);
    }

    body:not(.admin-body) .main-nav.is-open {
        animation: menu-in .42s var(--ease-editorial) both;
    }

    body:not(.admin-body) .main-nav > a,
    body:not(.admin-body) .nav-dropdown > a {
        padding: 11px 0;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
        font-size: clamp(1.55rem, 5vw, 2rem);
    }

    body:not(.admin-body) .nav-cta {
        justify-content: center;
        margin-top: 14px;
        border-bottom: 0;
        font-family: var(--sans);
        font-size: .85rem;
    }

    body:not(.admin-body) .dropdown-panel a {
        border-color: rgba(255, 255, 255, .08);
    }

    body:not(.admin-body) .hero-copy {
        grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
    }

    body:not(.admin-body) .hero h1 {
        font-size: clamp(4rem, 9vw, 6.3rem);
    }

    body:not(.admin-body) .area-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body:not(.admin-body) .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 760px) {
    body:not(.admin-body) .wrap {
        width: min(100% - 32px, 1280px);
    }

    body:not(.admin-body) .section {
        padding: 76px 0;
    }

    body:not(.admin-body) .hero::before,
    body:not(.admin-body) .page-hero::before {
        background-size: 100% 100%, 100% 72px;
    }

    body:not(.admin-body) .hero-copy {
        grid-template-columns: 1fr;
    }

    body:not(.admin-body) .hero-content {
        padding: 62px 0 32px;
    }

    body:not(.admin-body) .hero h1 {
        max-width: 7.5ch;
        font-size: clamp(3.65rem, 16vw, 5rem);
        line-height: .94;
    }

    body:not(.admin-body) .hero-lead {
        margin: 28px 0 32px;
        font-size: 1.05rem;
    }

    body:not(.admin-body) .hero-actions {
        display: grid;
        justify-items: stretch;
    }

    body:not(.admin-body) .hero-actions .button {
        width: 100%;
    }

    body:not(.admin-body) .hero-visual {
        min-height: 0;
        padding: 26px 0 34px;
        display: flex;
    }

    body:not(.admin-body) .hero-visual img {
        width: min(88%, 430px);
    }

    body:not(.admin-body) .credentials-grid div {
        padding: 20px 14px;
    }

    body:not(.admin-body) .credentials-grid strong {
        font-size: 2rem;
    }

    body:not(.admin-body) .split-intro,
    body:not(.admin-body) .section-heading {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    body:not(.admin-body) .split-intro > div:last-child {
        padding-top: 0;
    }

    body:not(.admin-body) .section-heading > p,
    body:not(.admin-body) .section-heading > .text-link {
        justify-self: start;
    }

    body:not(.admin-body) .principle-grid article {
        min-height: 0;
    }

    body:not(.admin-body) .area-grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }

    body:not(.admin-body) .area-card {
        border-bottom: 1px solid rgba(255, 255, 255, .15);
    }

    body:not(.admin-body) .area-card-media {
        aspect-ratio: 3 / 2;
    }

    body:not(.admin-body) .people-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    body:not(.admin-body) .person-photo {
        aspect-ratio: auto;
    }

    body:not(.admin-body) .person-content {
        padding-inline: 0;
    }

    body:not(.admin-body) .team-banner {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    body:not(.admin-body) .team-banner-media img {
        width: 100%;
        height: auto;
    }

    body:not(.admin-body) .process-grid article {
        min-height: 0;
        padding: 30px 0;
    }

    body:not(.admin-body) .page-hero {
        padding: 70px 0 58px;
    }

    body:not(.admin-body) .team-page-hero {
        padding: 58px 0 50px;
    }

    body:not(.admin-body) .team-page-hero h1 {
        font-size: clamp(3rem, 13vw, 4.35rem);
    }

    body:not(.admin-body) .page-hero h1 {
        font-size: clamp(3rem, 13vw, 4.35rem);
    }

    body:not(.admin-body) .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (hover: none) {
    body:not(.admin-body) .area-card-media img,
    body:not(.admin-body) .person-photo img {
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .has-enhanced-motion [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@keyframes menu-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: none; }
}
