:root{
    --motion-fast:160ms;
    --motion-normal:260ms;
    --motion-slow:520ms;
    --motion-ease:cubic-bezier(.2,.65,.25,1);
}

/* =========================================================
   ACCESSIBILITY / GLOBAL
   ========================================================= */

html{
    scroll-behavior:smooth;
    scroll-padding-top:92px;
}

body{
    overflow-x:hidden;
}

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

a,
button,
input,
textarea,
select{
    -webkit-tap-highlight-color:transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
    outline:2px solid #285789;
    outline-offset:3px;
}

::selection{
    background:#285789;
    color:#fff;
}

/* =========================================================
   HEADER / NAV
   ========================================================= */

.institutional-header{
    transition:
        box-shadow var(--motion-normal) var(--motion-ease),
        background var(--motion-normal) var(--motion-ease),
        transform var(--motion-normal) var(--motion-ease);
}

.institutional-header.scrolled{
    box-shadow:0 8px 28px rgba(10,32,55,.08);
    background:rgba(255,255,255,.985);
}

.institutional-nav a{
    transition:
        color var(--motion-fast) ease,
        opacity var(--motion-fast) ease;
}

.header-contact,
.language-switch{
    transition:
        background var(--motion-fast) ease,
        color var(--motion-fast) ease,
        transform var(--motion-fast) ease;
}

.header-contact:hover{
    transform:translateY(-1px);
}

.nav-toggle{
    transition:background var(--motion-fast) ease;
}

.nav-toggle span{
    transition:
        transform var(--motion-normal) var(--motion-ease),
        opacity var(--motion-normal) var(--motion-ease);
}

.nav-toggle.active span:first-child{
    transform:translateY(3px) rotate(45deg);
}

.nav-toggle.active span:last-child{
    transform:translateY(-3px) rotate(-45deg);
}

/* =========================================================
   HEROES
   ========================================================= */

.institutional-hero,
.corporate-page-hero,
.firm-hero,
.service-detail-hero,
.insights-hero,
.insight-detail-hero,
.contact-hero,
.careers-hero,
.legal-hero,
.public-indicators-hero{
    position:relative;
    overflow:hidden;
}

.institutional-hero:before,
.corporate-page-hero:before,
.firm-hero:before,
.insights-hero:before,
.contact-hero:before,
.careers-hero:before{
    content:"";
    position:absolute;
    width:420px;
    height:420px;
    border-radius:50%;
    right:-180px;
    top:-220px;
    background:radial-gradient(circle,rgba(40,87,137,.08),transparent 70%);
    pointer-events:none;
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */

[data-reveal]{
    opacity:0;
    transform:translateY(20px);
    transition:
        opacity var(--motion-slow) var(--motion-ease),
        transform var(--motion-slow) var(--motion-ease);
    will-change:opacity,transform;
}

[data-reveal].is-visible{
    opacity:1;
    transform:none;
}

[data-reveal-delay="1"]{transition-delay:80ms}
[data-reveal-delay="2"]{transition-delay:160ms}
[data-reveal-delay="3"]{transition-delay:240ms}
[data-reveal-delay="4"]{transition-delay:320ms}

/* fallback if JS unavailable */
.no-js [data-reveal]{
    opacity:1;
    transform:none;
}

/* =========================================================
   CARDS / LINKS / INTERACTIONS
   ========================================================= */

.practice-card,
.home-indicator-card,
.corporate-service-card,
.insight-card,
.firm-principles-grid article,
.career-development-grid article,
.public-indicator-card,
.contact-form-panel,
.corporate-aside-card{
    transition:
        transform var(--motion-normal) var(--motion-ease),
        box-shadow var(--motion-normal) var(--motion-ease),
        border-color var(--motion-normal) var(--motion-ease),
        background var(--motion-normal) var(--motion-ease);
}

@media (hover:hover){
    .practice-card:hover,
    .home-indicator-card:hover,
    .public-indicator-card:hover,
    .firm-principles-grid article:hover,
    .career-development-grid article:hover{
        transform:translateY(-4px);
        box-shadow:0 16px 34px rgba(13,33,58,.08);
        border-color:#cdd8e2;
    }

    .insight-card:hover{
        background:#f8fafc;
    }

    .corporate-service-card:hover .corporate-service-arrow{
        transform:translate(3px,-3px);
    }
}

.corporate-service-arrow{
    transition:transform var(--motion-normal) var(--motion-ease);
}

.button-primary,
.button-light,
.corporate-primary-button,
.corporate-light-button,
.insights-light-button,
.careers-light-button,
.contact-submit{
    transition:
        transform var(--motion-fast) ease,
        box-shadow var(--motion-fast) ease,
        filter var(--motion-fast) ease;
}

@media (hover:hover){
    .button-primary:hover,
    .button-light:hover,
    .corporate-primary-button:hover,
    .corporate-light-button:hover,
    .insights-light-button:hover,
    .careers-light-button:hover,
    .contact-submit:hover{
        transform:translateY(-2px);
        box-shadow:0 10px 22px rgba(13,33,58,.13);
    }
}

.button-text,
.corporate-text-link,
.home-indicators-all,
.insight-card a,
.corporate-service-content a,
.insight-aside a{
    transition:
        color var(--motion-fast) ease,
        transform var(--motion-fast) ease;
}

/* =========================================================
   FORMS
   ========================================================= */

.corporate-contact-form input,
.corporate-contact-form textarea{
    transition:
        border-color var(--motion-fast) ease,
        background var(--motion-fast) ease;
}

.corporate-contact-form input:hover,
.corporate-contact-form textarea:hover{
    border-bottom-color:#9eb1c2;
}

.contact-submit[disabled]{
    opacity:.65;
    cursor:wait;
}

/* =========================================================
   RESPONSIVE SYSTEM
   ========================================================= */

@media(max-width:1180px){
    .container{
        width:min(100% - 48px,1120px);
    }

    .institutional-header-inner{
        width:calc(100% - 48px);
    }
}

@media(max-width:1024px){
    html{
        scroll-padding-top:76px;
    }

    .institutional-hero{
        padding-top:82px;
    }

    .institutional-hero h1,
    .corporate-page-hero h1,
    .firm-hero h1,
    .insights-hero h1,
    .contact-hero h1,
    .careers-hero h1{
        max-width:850px;
    }

    .home-indicators-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:900px){
    .institutional-nav{
        max-height:calc(100vh - 72px);
        overflow-y:auto;
        box-shadow:0 16px 30px rgba(12,31,52,.08);
    }

    .institutional-nav a{
        font-size:14px;
    }

    .aca-footer-navigation{
        grid-template-columns:repeat(2,1fr);
    }

    .indicator-chart-wrap{
        height:340px;
    }
}

@media(max-width:768px){
    .container{
        width:calc(100% - 36px);
    }

    .institutional-header-inner{
        width:calc(100% - 36px);
    }

    .institutional-hero,
    .corporate-page-hero,
    .firm-hero,
    .service-detail-hero,
    .insights-hero,
    .insight-detail-hero,
    .contact-hero,
    .careers-hero,
    .legal-hero{
        padding-top:58px;
        padding-bottom:50px;
    }

    .institutional-hero h1,
    .corporate-page-hero h1,
    .firm-hero h1,
    .service-detail-hero h1,
    .insights-hero h1,
    .insight-detail-hero h1,
    .contact-hero h1,
    .careers-hero h1,
    .legal-hero h1{
        font-size:clamp(38px,10vw,52px);
    }

    .home-intro,
    .home-practice,
    .home-value,
    .home-insights-preview,
    .firm-story,
    .firm-principles,
    .service-detail-body,
    .insights-list,
    .insight-detail-body,
    .contact-main,
    .careers-intro,
    .career-development,
    .legal-content,
    .public-indicators-section{
        padding-top:58px;
        padding-bottom:58px;
    }

    .practice-grid,
    .home-indicators-grid,
    .public-indicator-grid,
    .insights-grid{
        gap:0;
    }

    .home-indicator-card,
    .public-indicator-card,
    .insight-card{
        border-radius:0;
    }

    .contact-form-panel{
        padding:26px 22px;
    }

    .aca-footer-top{
        padding-bottom:34px;
    }

    .indicator-chart-wrap{
        height:300px;
    }
}

@media(max-width:620px){
    .container{
        width:calc(100% - 28px);
    }

    .institutional-header-inner{
        width:calc(100% - 28px);
    }

    .institutional-hero-actions{
        display:grid;
        align-items:start;
        gap:16px;
    }

    .institutional-hero-actions .button-primary{
        justify-self:start;
    }

    .institutional-hero-actions .button-text{
        margin-top:0;
    }

    .home-indicators-grid{
        grid-template-columns:1fr;
    }

    .section-heading,
    .home-indicators-heading{
        display:grid;
        gap:16px;
    }

    .practice-card,
    .firm-principles-grid article,
    .career-development-grid article{
        min-height:auto;
    }

    .corporate-service-card{
        padding-top:24px;
        padding-bottom:24px;
    }

    .corporate-service-content h2{
        font-size:24px;
    }

    .insight-card.featured h2{
        font-size:30px;
    }

    .contact-form-grid{
        gap:15px;
    }

    .contact-form-footer{
        gap:18px;
    }

    .contact-submit{
        width:100%;
    }

    .aca-footer-navigation{
        grid-template-columns:1fr;
        gap:28px;
    }

    .aca-footer-office{
        gap:24px;
    }

    .public-indicator-number,
    .home-indicator-value{
        font-size:28px;
    }

    .indicator-ranges{
        flex-wrap:wrap;
    }
}

@media(max-width:420px){
    .aca-header-logo{
        width:138px;
    }

    .language-switch{
        width:32px;
    }

    .nav-toggle{
        width:38px;
    }

    .institutional-hero h1{
        font-size:39px;
    }

    .institutional-hero-copy>p,
    .contact-hero-copy p,
    .careers-hero-copy p,
    .insights-hero-grid>div:last-child p{
        font-size:15px;
    }

    .contact-form-panel{
        padding:22px 17px;
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media(prefers-reduced-motion:reduce){
    html{
        scroll-behavior:auto;
    }

    *,
    *:before,
    *:after{
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
        transition-duration:.01ms!important;
        scroll-behavior:auto!important;
    }

    [data-reveal]{
        opacity:1;
        transform:none;
    }
}
