/* AJ Digital Agency — site-wide light / dark appearance */
:root{
  --theme-bg:#f4f3ef;
  --theme-surface:#ffffff;
  --theme-surface-2:#eceae4;
  --theme-text:#0a0a0a;
  --theme-muted:#6e6d68;
  --theme-border:rgba(10,10,10,.14);
  --theme-nav:rgba(8,8,8,.96);
  --theme-control:#f4f3ef;
  --theme-control-text:#0a0a0a;
  --theme-shadow:0 18px 50px rgba(0,0,0,.12);
}
html[data-theme="dark"]{
  --ink:#f4f3ef;
  --paper:#0b0b0b;
  --white:#121212;
  --soft:#1c1c1b;
  --muted:#a4a49f;
  --line:rgba(244,243,239,.14);
  --aj-paper:#0b0b0b;
  --theme-bg:#0b0b0b;
  --theme-surface:#121212;
  --theme-surface-2:#181817;
  --theme-text:#f4f3ef;
  --theme-muted:#a4a49f;
  --theme-border:rgba(244,243,239,.14);
  --theme-nav:rgba(8,8,8,.96);
  --theme-control:#f4f3ef;
  --theme-control-text:#0a0a0a;
  --theme-shadow:0 20px 60px rgba(0,0,0,.36);
}
html,body{background:var(--theme-bg);color:var(--theme-text)}
body{transition:background-color .28s ease,color .28s ease}

/* appearance control */
.theme-toggle{appearance:none;border:1px solid currentColor;background:transparent;color:inherit;border-radius:999px;min-height:38px;padding:5px 9px 5px 6px;display:inline-flex;align-items:center;gap:7px;cursor:pointer;font:inherit;white-space:nowrap;transition:border-color .2s ease,background .2s ease,color .2s ease,transform .2s ease}.theme-toggle:hover{background:rgba(127,127,127,.12)}.theme-toggle:focus-visible{outline:2px solid currentColor;outline-offset:3px}.theme-toggle-track{width:36px;height:24px;border-radius:999px;background:rgba(127,127,127,.22);display:block;position:relative}.theme-toggle-track i{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:currentColor;transition:transform .24s cubic-bezier(.2,.75,.2,1)}html[data-theme="dark"] .theme-toggle-track i{transform:translateX(12px)}.theme-icon{position:absolute;width:12px;height:12px;top:6px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;opacity:.65}.theme-icon-sun{left:5px}.theme-icon-moon{right:5px}.theme-toggle-label{font-size:9px;text-transform:uppercase;letter-spacing:.12em;font-weight:600}.theme-toggle-floating{position:fixed;z-index:500;right:18px;bottom:18px;background:var(--theme-surface);box-shadow:var(--theme-shadow)}
.v4-nav .theme-toggle{border-color:#383838;color:#fff}.v4-nav .theme-toggle:hover{border-color:#686868}.v4-nav:not(.scrolled):not(.on-light):not(.mega-open) .theme-toggle{color:#fff}.v4-nav-end .theme-toggle{flex:none}

/* light-mode navigation retains AJ's dark command bar after scroll */
html[data-theme="light"] .site-nav.scrolled:not(.v4-nav),html[data-theme="light"] .site-nav.on-light:not(.v4-nav){background:rgba(244,243,239,.94);color:#0a0a0a}
html[data-theme="dark"] .site-nav.scrolled,html[data-theme="dark"] .site-nav.on-light{background:rgba(8,8,8,.95);color:#f4f3ef;border-color:#252525}
html[data-theme="dark"] .site-nav.scrolled .brand img,html[data-theme="dark"] .site-nav.on-light .brand img{filter:invert(1)}

/* shared light surfaces */
html[data-theme="dark"] :is(.confidence,.home-work,.process-teaser,.page-main,.philosophy-v42,.disciplines-v42,.dual-cta-v42,.capability-index,.operating-home,.intelligence-home,.project-scroll-section,.work-page,.service-section,.service-detail,.case-body,.case-gallery,.contact-section,.form-section){background:var(--theme-bg)!important;color:var(--theme-text)}
html[data-theme="dark"] :is(.project-row,.discipline-card,.support-card,.intelligence-card,.work-card,.case-card,.service-card,.industry-card,.insight-card,.option label,.form-panel,.contact-panel,.quick-lead,.audit-question-card){background:var(--theme-surface)!important;color:var(--theme-text);border-color:var(--theme-border)!important}
html[data-theme="dark"] :is(.confidence-row,.philosophy-grid,.discipline-grid,.social-feature,.operating-list,.operating-row,.capability-list a,.support-grid,.industry-links a,.intelligence-card,.project-scroll-card,.work-card,.case-body,.form-field input,.form-field textarea,.form-field select,.field input,.field textarea,.field select){border-color:var(--theme-border)!important}
html[data-theme="dark"] :is(.confidence-intro,.discipline-card:hover,.featured-capability){background:var(--theme-surface-2)!important}
html[data-theme="dark"] :is(.project-info p,.philosophy-grid p,.discipline-card p,.social-feature p,.operating-row p,.support-card p,.intelligence-card p,.page-hero p,.lead,.body-lg.muted,.muted,.case-copy p,.work-card p){color:var(--theme-muted)!important}
html[data-theme="dark"] .project-meta span{border-color:var(--theme-border)}
html[data-theme="dark"] .skip{background:#f4f3ef;color:#0a0a0a}

/* inner-page heroes stay premium dark regardless of appearance */
.page-hero,.service-detail-hero,.tech-page-hero,.tech-detail-hero,.wisdom-hero,.case-hero{background:#080808!important;color:#fff!important}
.page-hero :is(.lead,.muted),.service-detail-hero :is(.lead,.muted),.tech-page-hero :is(.lead,.muted),.tech-detail-hero :is(.lead,.muted),.wisdom-hero :is(.lead,.muted),.case-hero :is(.lead,.muted){color:#aaa!important}

/* controls and forms */
html[data-theme="dark"] :is(input,textarea,select){color:var(--theme-text);background:#101010;border-color:#343434}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#777}
html[data-theme="dark"] .button.black{background:#f4f3ef;color:#0a0a0a;border-color:#f4f3ef}
html[data-theme="dark"] .button.black:hover{background:#fff}
html[data-theme="dark"] .button.white{background:#f4f3ef;color:#0a0a0a;border-color:#f4f3ef}
html[data-theme="dark"] .button:not(.white):not(.signal):not(.ghost-light){border-color:var(--theme-text)}
html[data-theme="dark"] .text-link:not(.light){color:var(--theme-text)}
html[data-theme="dark"] .draft-notice{background:#171914;border-left-color:#8b927f;color:#d7d7d1}
html[data-theme="dark"] .lead-intake-meta span,html[data-theme="dark"] .journey-context span{border-color:#353535}
html[data-theme="dark"] .consent-row{color:#aaa}

/* project / work scroll */
html[data-theme="dark"] .project-scroll-card{background:#111!important;border-color:#2a2a2a!important}
html[data-theme="dark"] .project-scroll-copy{background:#111;color:#f4f3ef}
html[data-theme="dark"] .project-scroll-copy p{color:#aaa}
html[data-theme="dark"] .case-tags span{border-color:#343434;color:#b8b8b2}
html[data-theme="dark"] .project-scroll-progress{background:#282828}
html[data-theme="dark"] .project-scroll-controls button{border-color:#3a3a3a;color:#f4f3ef;background:#111}

/* Wisdom result areas */
html[data-theme="dark"] :is(.audit-workspace,.wisdom-results,.wisdom-questionnaire,.audit-main-light){background:var(--theme-bg)!important;color:var(--theme-text)}
html[data-theme="dark"] :is(.wisdom-result-card,.evidence-card,.finding-card,.roadmap-card,.case-match-card,.question-card){background:var(--theme-surface)!important;border-color:var(--theme-border)!important;color:var(--theme-text)}

/* persistent footer remains AJ black */
.site-footer,.v4-footer{background:#080808!important;color:#fff!important}.site-footer .muted,.site-footer p{color:#888}

@media(max-width:1280px){.theme-toggle-label{display:none}.theme-toggle{padding:5px 6px}}
@media(max-width:1180px){.v4-nav-end .theme-toggle{display:inline-flex}.v4-nav .nav-contact{display:none}}
@media(max-width:760px){.theme-toggle{min-height:36px}.theme-toggle-track{width:34px}.theme-toggle-track i{width:18px}html[data-theme="dark"] .theme-toggle-track i{transform:translateX(10px)}}
@media(prefers-reduced-motion:reduce){body,.theme-toggle,.theme-toggle-track i{transition:none!important}}
