/* Final visual QA: compact rhythm, context-aware contrast and responsive containment. */
:root{--ink-accent:#5d176c;--control-line:#89858d;--section-space:clamp(32px,4vw,58px);--card-space:clamp(16px,2vw,24px);color-scheme:light}
html[data-theme=dark]{--ink-accent:#c9f36b;--muted:#bcbac4;--control-line:#85838e;color-scheme:dark}
/* Always-dark brand panels have their own surface tokens, independent of theme. */
:is(.dark,.hero,.page-hero,.market,.cta,.sourcing-panel,.quote){--text:#f6f5f1;--muted:#d9d5df;--card:#201d26;--bg:#15121a;--line:#514858;--ink-accent:#c9f36b;--control-line:#a49baa;color:var(--text);color-scheme:dark}
.dark{background:#15121a}
.market{background:#5d176c}
.cta{background:linear-gradient(135deg,#54145f,#72206f)}
.agz-photo-hero{background:radial-gradient(ellipse at 80% 20%,#54205f 0,transparent 56%),#100d15}
.page-hero{background:linear-gradient(135deg,#111 0 62%,#55155f 62%)}
:is(.dark,.hero,.page-hero,.market,.cta,.sourcing-panel,.quote) .eyebrow,.event-card-copy .tag,.service b,.email,.agz-number,.agz-textlink,.feature-list li::before,.check-list li::before{color:var(--ink-accent)}
.agz-selected.dark .agz-project-copy .eyebrow,.agz-selected.dark .agz-textlink{color:var(--lime)}
.agz-selected.dark .agz-section-head .eyebrow{color:var(--lime)}
:is(.dark,.hero,.page-hero,.market,.cta,.sourcing-panel,.quote) :is(.btn:not(.primary):not(.white)){color:#fff;border-color:#c8bed0}
:is(.dark,.hero,.page-hero,.market,.cta,.sourcing-panel,.quote) .btn.primary{background:var(--lime);border-color:var(--lime);color:#171b11}
:is(.dark,.hero,.page-hero,.market,.cta,.sourcing-panel,.quote) .btn.white{color:#111;background:#fff;border-color:#fff}
.btn:not(.primary):not(.white),.theme,.menu-toggle,.agz-email-dialog :is(button,input,textarea){border-color:var(--control-line)}
.agz-email-dialog .btn.primary{color:#fff;background:#5d176c;border-color:#5d176c}
.agz-contact-primary small{opacity:1}
.micro,.cta-note,.proof-strip span,.conversion-trust span{opacity:1}
.agz-email-status:empty{display:none}
:focus-visible{outline-color:var(--ink-accent)}
/* Reduce decorative height, repeated vertical padding and empty card interiors. */
main > section:not(.hero):not(.page-hero):not(.trust-band):not(.case-photo-hero):not(.cta),main.agz-home>section:not(.hero):not(.agz-metrics):not(.cta){padding-block:var(--section-space)}
main > section.page-hero{padding-block:clamp(36px,5vw,70px)}
main > section.cta{padding-block:clamp(34px,5vw,64px)}
main > section.agz-photo-hero{min-height:0;padding-block:clamp(32px,4.5vw,64px)}
main > section.sourcing-section{padding-top:12px}
main > section.case-photo-hero{padding-block:24px 4px}
.case-photo-hero+section{padding-top:16px!important}
.trust-band{padding-block:16px 20px}
.head,.agz-section-head,.story-lead,.event-story .story-lead{margin-bottom:clamp(18px,2vw,28px);gap:clamp(16px,3vw,36px)}
.eyebrow{margin-bottom:12px;line-height:1.45;letter-spacing:.13em}
:is(h1,h2,h3){line-height:1.1;overflow-wrap:break-word}
.page-hero p,.hero p,.agz-photo-hero p{margin-top:16px}
.actions,.page-hero .actions,.agz-photo-hero .actions{margin-top:20px}
.agz-capability,.decision-card,.service,.event-card{min-height:0}
.agz-capability{padding:var(--card-space)}
.agz-capability h3{margin-top:12px;margin-bottom:8px}
.agz-project-copy,.event-card-copy,.decision-card,.panel,.seo-card,.link-card,.service,.case-detail,.agz-detail-grid article{padding:var(--card-space)}
.agz-project-copy{gap:8px}.agz-project-copy p{margin-bottom:4px}
.agz-project-copy .eyebrow,.agz-editorial .event-card-copy .tag{font-size:12px;letter-spacing:.09em;line-height:1.45}
.agz-textlink{font-size:14px}.agz-project-copy .agz-textlink{margin-top:0}
.card-actions{margin-top:4px}.decision-card .btn{margin-top:0}
.service b{margin-bottom:12px}.service h3,.panel h3{margin-bottom:10px}
.sourcing-panel{padding:clamp(22px,4vw,44px)}.sourcing-groups{margin-top:24px}.sourcing-group{padding:var(--card-space)}
.sourcing-lede,.sourcing-line,.organizer-home-layout p{margin-top:16px}
.content h2{margin:16px 0 12px}.content p{margin-bottom:16px}
.proof-strip{margin:12px 0;gap:12px}.proof-strip>div{padding:var(--card-space);min-width:0}.proof-strip strong{font-size:clamp(24px,3.8vw,46px);overflow-wrap:normal}.proof-strip span{font-size:14px;line-height:1.5}
.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.cards>.card{padding:var(--card-space);border:1px solid var(--line);background:var(--card);border-radius:16px;min-width:0}.cards>.card h3{margin-bottom:10px}
.agz-direct-contact{margin-top:16px}.agz-contact-grid{margin-top:16px}.agz-contact-option small,.agz-email-note,.fine,.micro{font-size:13px;line-height:1.5}
footer{padding:clamp(26px,3vw,40px) 0}.footer{gap:24px}.footer-links{gap:12px;font-size:13px}.fine{margin-top:10px}
/* Keep the fixed contacts off primary text. Small screens have a reserved bottom dock. */
body:has(.agz-floating-contacts){padding-bottom:0}
html{scroll-padding-top:96px;scroll-padding-bottom:20px}
@media(min-width:1321px){.agz-floating-contacts{right:12px}.agz-float-button{width:44px;height:44px}}
@media(max-width:1320px),(max-height:430px){
 body:has(.agz-floating-contacts){padding-bottom:calc(62px + env(safe-area-inset-bottom))}
 html{scroll-padding-bottom:calc(80px + env(safe-area-inset-bottom))}
 .agz-floating-contacts{left:0;right:0;bottom:0;flex-direction:row;align-items:center;justify-content:center;gap:10px;padding:7px max(10px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom));background:var(--card);border-top:1px solid var(--line);pointer-events:auto}
 .agz-float-button{width:46px;height:46px}.agz-float-label{right:0;top:auto;bottom:calc(100% + 8px);transform:none}.agz-float-button:first-child .agz-float-label{right:auto;left:0}
}
@media(max-width:760px){
 :root{--section-space:30px;--card-space:18px}
 main > section.page-hero{padding-block:34px 30px}main > section.cta{padding-block:34px}
 .agz-photo-hero h1{line-height:1.04}.agz-hero-layout{gap:20px}.agz-hero-link{margin-top:14px}
 .cards{grid-template-columns:minmax(0,1fr)}.head>p,.head>.btn{margin-top:12px}
 .agz-section-head h2,.agz-editorial h2{line-height:1.12}.agz-section-head>p{margin-top:10px}
 .footer-links{margin-top:16px}.photo-pair,.agz-inline-photo{margin-top:16px}
 .agz-email-dialog{max-height:calc(100dvh - 20px)}
}
@media(max-width:380px){.agz-floating-contacts{gap:7px}.agz-float-button{width:44px;height:44px}.agz-metric-layout span{font-size:12px}.agz-metric-layout strong{font-size:clamp(23px,7vw,32px)}}
@media(max-height:430px){header.nav-open .nav nav{max-height:calc(100dvh - 145px)}}
/* Balance partial grid rows so that there are no abandoned desktop columns. */
@media(min-width:761px){
 .seo-grid:not(.events-grid):has(> :nth-child(4):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:981px){
 .event-hub-grid:has(> :nth-child(5):last-child){grid-template-columns:repeat(6,minmax(0,1fr))}
 .event-hub-grid:has(> :nth-child(5):last-child)>*{grid-column:span 2}
 .event-hub-grid:has(> :nth-child(5):last-child)>:nth-child(n+4){grid-column:span 3}
 .seo-grid.events-grid:has(> :nth-child(26):last-child){grid-template-columns:repeat(6,minmax(0,1fr))}
 .seo-grid.events-grid:has(> :nth-child(26):last-child)>*{grid-column:span 2}
 .seo-grid.events-grid:has(> :nth-child(26):last-child)>:nth-last-child(-n+2){grid-column:span 3}
}
@media(min-width:761px) and (max-width:980px){
 .event-hub-grid:has(> :nth-child(5):last-child)>:last-child{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;align-items:stretch}
 .event-hub-grid:has(> :nth-child(5):last-child)>:last-child .event-image-link{height:100%}
 .event-hub-grid:has(> :nth-child(5):last-child)>:last-child img{height:100%;min-height:200px;object-fit:cover}
}
