/* Site-wide dark mode (html[data-site-theme="dark"]) */
html[data-site-theme="dark"]{color-scheme:dark;--dk-ground:#0b0b0c;--dk-panel:#151517;--dk-card:#1c1c1f;--dk-card-2:#232327;--dk-ink:#ece9e3;--dk-ink-2:#a3a39b;--dk-rule:#2f2f34;--dk-frame:rgba(255,255,255,.065);--dk-frame-line:rgba(255,255,255,.1)}
html[data-site-theme="dark"],html[data-site-theme="dark"] body{background:var(--dk-ground)!important;color:var(--dk-ink)}

/* ---------- Homepage ---------- */
html[data-site-theme="dark"] :is(#services,#work,#about,#insights,#testimonials,.faq){color:var(--dk-ink)}
html[data-site-theme="dark"] :is(#services,#work,#about,#insights,#testimonials,.faq) :is(h1,h2,h3,h4,h5,p,li,span,strong,small,b,em,a,summary,figcaption,dt,dd,blockquote,label,div,cite){color:inherit}
html[data-site-theme="dark"] :is(#services,#work,#about,#insights,#testimonials,.faq) :is(.case-meta,.case-line,.project-meta,.case p,.section-top p span,.tm-count,.pp-count,.collab-figure figcaption,.service-caption,.service .number,.faq details p,.tc-org,.tc-who div span,.wk-view button){color:var(--dk-ink-2)}
html[data-site-theme="dark"] :is(#services,#work,#about,#insights,#testimonials,.faq) *{border-color:var(--dk-rule)}
html[data-site-theme="dark"] #services .section-top p,html[data-site-theme="dark"] #work .section-top p{color:var(--dk-ink)!important}

/* advisory cards: deep tints of the light pastels; drawings turned to light line */

/* Selected work / Perspectives panels and cards */
html[data-site-theme="dark"] #work,html[data-site-theme="dark"] #insights{background:var(--dk-frame)!important;box-shadow:inset 0 0 0 1px var(--dk-frame-line)}
html[data-site-theme="dark"] :is(#work,#insights) .case{background:rgba(255,255,255,.06)!important;border-color:rgba(255,255,255,.08)!important}
html[data-site-theme="dark"] :is(#work,#insights) .case-img.cutout{background:#e8e8e3!important}
html[data-site-theme="dark"] :is(#work,#insights) .pp-bar{background:#34343a!important}
html[data-site-theme="dark"] :is(#work,#insights) .pp-bar i{background:var(--dk-ink)!important}

/* flat pills turn light on dark */
html[data-site-theme="dark"] :is(#services,#work,#about,#insights,#testimonials,.faq) :is(.link-btn,.case-more){background:var(--dk-ink)!important;color:#111113!important}
/* liquid glass turns to smoked glass */
html[data-site-theme="dark"] :is(#services,#work,#about,#insights,#testimonials,.faq,.essay-foot,.a-wrap) .gh-glass,html[data-site-theme="dark"] .gh-glass{color:#f4f4f0!important;background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.04))!important;border:1px solid rgba(255,255,255,.22)!important;box-shadow:0 12px 30px -14px rgba(0,0,0,.6)!important}
html[data-site-theme="dark"] .gh-glass::before{opacity:.28}
html[data-site-theme="dark"] .call-float{color:#f4f4f0!important;background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.04))!important;border:1px solid rgba(255,255,255,.22)!important}

/* Client perspective */
html[data-site-theme="dark"] #testimonials{--ink:#ece9e3;--ink-2:#a3a39b;--rule:#34343a;--ground:#0b0b0c;--ground-2:#1c1c1f}
html[data-site-theme="dark"] #testimonials .tc-cta{color:#111113!important}
html[data-site-theme="dark"] #testimonials .tc-mono{color:#111113!important}

/* carousel controls and toggles */
html[data-site-theme="dark"] :is(#work,#insights,#testimonials) :is(.pp-arr,.pp-pause,.tm-arr,.tm-pause,.wk-view button){color:var(--dk-ink)!important}

/* pop-up form */
html[data-site-theme="dark"] dialog.mp{--essay-bg:#161618;--panel:#161618;--ground:#0b0b0c;--ink:#ece9e3;--ink-2:#a3a39b;--rule:#3a3a40;border-color:#2a2a2f}
html[data-site-theme="dark"] dialog.mp .mp-send{background:#ece9e3!important;color:#111113!important}

/* ---------- About page ---------- */
html[data-site-theme="dark"] .about-page{--a-ink:#ece9e3;--a-muted:#a3a39b;--a-line:#2f2f34;background:var(--dk-ground)!important;color:var(--dk-ink)!important}
html[data-site-theme="dark"] .about-page :is(h1,h2,h3,p,li,span,strong,figcaption,blockquote,.rec-t){color:inherit}
html[data-site-theme="dark"] .about-page :is(.a-eyebrow,.a-portrait figcaption,.rec-y,.rec-d,.rec-sum,.a-rec-head p){color:var(--dk-ink-2)!important}
html[data-site-theme="dark"] .about-page #a-recognition{background:var(--dk-frame)!important;box-shadow:inset 0 0 0 1px var(--dk-frame-line)}
html[data-site-theme="dark"] .about-page .a-pull::before{color:var(--dk-ink)}
html[data-site-theme="dark"] .about-page .a-social img{filter:invert(1)}

/* ---------- Case studies and perspectives (their own palette follows data-theme) ---------- */
html[data-site-theme="dark"] :is(.essay-share,.cs-back){color:var(--dk-ink)!important}

/* ---------- Appearance switch outside the homepage ---------- */
.site-appearance{display:inline-flex;align-items:center;gap:0}
.site-appearance button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}
.site-appearance .theme-toggle-mark{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:1px solid currentColor;border-radius:50%;box-sizing:border-box;opacity:.55;transition:opacity .2s ease,background-color .2s ease,color .2s ease}
.site-appearance .theme-toggle-mark svg{display:block;flex:none}
.site-appearance .theme-auto{font-size:11px;font-weight:600;line-height:1}
.site-appearance button:hover .theme-toggle-mark,.site-appearance button:focus-visible .theme-toggle-mark{opacity:1}
.site-appearance button[aria-pressed="true"] .theme-toggle-mark{opacity:1;background:#151515;border-color:#151515;color:#f4f4f0}
html[data-site-theme="dark"] .site-appearance button[aria-pressed="true"] .theme-toggle-mark{background:#ece9e3;border-color:#ece9e3;color:#111113}
.a-actions{display:flex;align-items:center;gap:14px}
.a-header .site-appearance{color:#151515}
html[data-site-theme="dark"] .a-header .site-appearance{color:#ece9e3}
.pp-bar .site-appearance{color:var(--ink);margin-left:6px}
@media (max-width:700px){.a-actions{gap:6px}.site-appearance button{width:34px;height:40px}.pp-bar nav{gap:12px}}
/* About header blends with difference like the homepage, so the switch is drawn in white */
.a-header .site-appearance,html[data-site-theme="dark"] .a-header .site-appearance{color:#fff}
.a-header .site-appearance .theme-toggle-mark{opacity:1;border-color:rgba(255,255,255,.7)}
.a-header .site-appearance button[aria-pressed="true"] .theme-toggle-mark,html[data-site-theme="dark"] .a-header .site-appearance button[aria-pressed="true"] .theme-toggle-mark{background:#fff;border-color:#fff;color:#151515}
@media (max-width:700px){.a-header-inner{position:relative}.a-header .site-appearance{position:absolute;left:62px;top:57px}}

/* White frames read as translucent grey on the dark ground */
html[data-site-theme="dark"] body.pp .pp-main{background:rgba(255,255,255,.045)!important;border-color:var(--dk-frame-line)!important}

/* Design & Advisory cards keep their light-mode solid colours in every theme */
html[data-site-theme="dark"] #services .service{color:#151515!important;--ink:#151515}
html[data-site-theme="dark"] #services .service :is(h1,h2,h3,h4,h5,p,li,span,strong,small,b,em,summary,figcaption,dt,dd,label,div){color:inherit}
html[data-site-theme="dark"] #services .service :is(.service-caption,.number){color:rgba(21,21,21,.62)!important}
html[data-site-theme="dark"] #services .service *{border-color:rgba(21,21,21,.18)}
html[data-site-theme="dark"] #services .service .service-toggle{border-color:rgba(21,21,21,.45)!important;color:#151515}
html[data-site-theme="dark"] #services .service :is(.link-btn,.case-more){background:#151515!important;color:#f4f4f0!important}html[data-site-theme="dark"] #services .service .gh-glass{color:#151515!important;background:linear-gradient(rgba(255,255,255,.55),rgba(255,255,255,.18) 60%,rgba(255,255,255,.4))!important;border:1px solid rgba(255,255,255,.75)!important;box-shadow:0 10px 28px -14px rgba(20,22,18,.28)!important}
html[data-site-theme="dark"] #services .service .gh-glass::before{opacity:1}

/* My Approach: black frame in light mode, white frame in dark mode */
html[data-site-theme="dark"] .intro{background:#fff!important;color:#151515!important}
html[data-site-theme="dark"] .intro :is(h1,h2,h3,p,span,strong,em,div,a,li,small){color:inherit!important}
html[data-site-theme="dark"] .intro *{border-color:rgba(21,21,21,.16)!important}
html[data-site-theme="dark"] .intro h2 span{color:#8a8a84!important}

/* Selected work and Perspectives, dark: translucent white cards, soft shadow edge, mirror gloss beneath */
html[data-site-theme="dark"] :is(#work,#insights) .cases .case{background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.07))!important;border:1px solid rgba(255,255,255,.2)!important;-webkit-backdrop-filter:blur(14px) saturate(120%);backdrop-filter:blur(14px) saturate(120%);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 4px 12px rgba(0,0,0,.35),0 26px 48px -16px rgba(0,0,0,.7),0 50px 80px -34px rgba(0,0,0,.65)!important;-webkit-box-reflect:below 8px linear-gradient(to bottom,transparent 0%,transparent 45%,rgba(255,255,255,.12) 72%,rgba(255,255,255,.38) 100%)}
@media (max-width:700px){html[data-site-theme="dark"] :is(#work,#insights) .cases .case{-webkit-box-reflect:below 6px linear-gradient(to bottom,transparent 55%,rgba(255,255,255,.3) 100%)}}

/* Contact and footer frame: black in light mode, white in dark mode */
html[data-site-theme="dark"] .cta{background:#fff!important;color:#151515!important}
html[data-site-theme="dark"] .cta :is(h1,h2,h3,p,span,strong,em,div,a,li,small,.eyebrow){color:#151515!important}
html[data-site-theme="dark"] .cta :is(.footer-legal,.footer-links a,.cta-side p){color:#5f5f5a!important}
html[data-site-theme="dark"] .cta *{border-color:rgba(21,21,21,.14)!important}
html[data-site-theme="dark"] .cta .social-icon{filter:invert(1)}
html[data-site-theme="dark"] .cta footer .footer-hero-logo img{filter:none!important;mix-blend-mode:multiply!important}
html[data-site-theme="dark"] .cta .gh-glass{color:#151515!important;background:linear-gradient(rgba(255,255,255,.55),rgba(255,255,255,.18) 60%,rgba(255,255,255,.4))!important;border:1px solid rgba(21,21,21,.16)!important;box-shadow:0 10px 28px -14px rgba(20,22,18,.35)!important}
html[data-site-theme="dark"] .cta .gh-glass span{color:#151515!important}
