/* COLERE 2026-11-03c: header navigation, practice density, principles accordion, name/founder headings,
   belief orb, scroll unrolling. Loaded last. */

/* ---------- header + navigation ---------- */
html{scroll-padding-top:96px}
body .header{position:sticky;top:0;z-index:30;transition:padding .35s ease}
body .header:before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:50%;width:100vw;margin-left:-50vw;
  background:rgb(246 245 240 / .9);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  border-bottom:1px solid rgb(32 38 34 / .08);opacity:0;transition:opacity .35s ease;pointer-events:none}
body .header.is-stuck{padding-block:12px}
body .header.is-stuck:before{opacity:1}
body .header .brand,body .header .brand img{transition:width .35s ease}
body .header.is-stuck .brand,body .header.is-stuck .brand img{width:96px}
.header-actions{gap:36px}
.header .site-nav{display:flex;justify-content:flex-end;align-items:center;gap:26px;font:14px/1.4 var(--sans);white-space:nowrap;grid-column:auto;grid-row:auto;flex-wrap:nowrap}
.site-nav a{position:relative;padding:6px 0;color:var(--ink);background:linear-gradient(currentColor,currentColor) 0 100%/0 1px no-repeat;transition:color .25s ease,background-size .3s ease}
.site-nav a:hover,.site-nav a:focus-visible{color:var(--red);background-size:100% 1px}
.site-nav a.is-active{color:var(--red);background-size:100% 1px}
.language-switch a{transition:color .25s ease}
@media(max-width:1180px){
  .header-actions{display:contents}
  body .header{grid-template-columns:1fr auto;row-gap:10px}
  .header .language-switch{grid-column:2;grid-row:1}
  .header .site-nav{grid-column:1/-1;grid-row:2;justify-content:flex-start;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;
    -webkit-mask-image:linear-gradient(to right,#000 88%,transparent);mask-image:linear-gradient(to right,#000 88%,transparent);padding-right:32px}
  .header .site-nav::-webkit-scrollbar{display:none}
  body .header.is-stuck{padding-block:10px 4px;row-gap:4px}
}
@media(max-width:760px){
  html{scroll-padding-top:104px}
  .header .site-nav{gap:20px;font-size:13px;margin-inline:-2px}
  body .header.is-stuck .brand,body .header.is-stuck .brand img{width:78px}
}
.section,.belief,.contact{scroll-margin-top:96px}
@media(min-width:1000px){body .about>.about-head{top:120px}}

/* hover feedback, restrained */
.text-link{transition:color .25s ease,border-color .25s ease}
.text-link span{display:inline-block;transition:transform .3s ease}
.text-link:hover span{transform:translate(2px,-2px)}
.email-link{transition:color .25s ease,border-color .25s ease}
.email-link:hover{border-bottom-color:var(--red)}
.contact-form button{transition:background-color .25s ease}
.commission summary{transition:color .25s ease}
.commission{position:relative}
.commission:before{content:"";position:absolute;left:0;right:0;top:-1px;height:1px;background:var(--red);transform:scaleX(0);transform-origin:0 50%;transition:transform .6s cubic-bezier(.2,.7,.2,1)}
.commission:hover:before,.commission:focus-within:before{transform:scaleX(1)}
.commission h3{transition:color .3s ease}

/* ---------- 6: hero aux line removed; keep spacing even ---------- */
.opening-kind{margin-bottom:0}

/* ---------- 3 + 2: what we do ---------- */
.practice-motto{font-family:var(--display)}
.practice-motto .ms{display:block;text-wrap:wrap}
html[lang^="zh"] .practice-motto{font-family:'Bodoni 72','Bodoni Moda','Didot',Georgia,serif;letter-spacing:-.005em!important;font-weight:400!important}
body .commission>p:not(.small-label){margin-bottom:28px!important;align-self:flex-start}
body .commission details{margin:0 0 20px!important}
.partners{display:block}
.partners-head h3{margin:0!important}
.partners-head .service-note{margin:14px 0 0!important;max-width:24em}
.partners>ul{margin:0;padding-left:1.1em;font:17px/1.8 var(--sans);color:var(--ink2);max-width:34em}
.partners>ul li+li{margin-top:14px}
@media(min-width:1000px){
  body .section-heading{margin-bottom:104px!important}
  body .commission{padding-top:56px!important}
  body .commission-grid{align-items:stretch!important}
  body .partners{margin-top:136px!important;padding-top:56px}
}
@media(max-width:999px){
  .partners-head{margin-bottom:24px}
  body .commission{padding:44px 0!important}
}

/* ---------- 4: principles accordion ---------- */
body .principle{display:block;padding:0;border-top:1px solid #20262220}
.principle-h{margin:0!important;font-size:inherit!important;line-height:inherit!important}
.principle-toggle{all:unset;box-sizing:border-box;display:grid;grid-template-columns:48px minmax(0,1fr) 24px;gap:24px;align-items:baseline;width:100%;padding:30px 0;cursor:pointer;-webkit-tap-highlight-color:transparent}
.principle-toggle:focus-visible{outline:2px solid var(--red);outline-offset:4px}
.principle-name{display:block}
.principle-title{display:block;font-size:var(--fs-h3);line-height:1.3;letter-spacing:var(--ls-h);font-weight:400;transition:color .25s ease}
html[lang^="zh"] .principle-title{font-weight:500}
.principle-name .principle-en{display:block;margin:6px 0 0;font:14px/1.5 var(--sans);letter-spacing:.04em;color:var(--muted)}
body .principle .word-number{color:var(--muted)!important;transition:color .25s ease;margin:0!important;line-height:1.3!important}
.principle-toggle:hover .principle-title{color:var(--red)}
.principle.is-open .word-number,.principle-toggle:hover .word-number{color:var(--red)!important}
.pm{position:relative;width:14px;height:14px;align-self:center;justify-self:end}
.pm:before,.pm:after{content:"";position:absolute;left:0;top:6.5px;width:14px;height:1px;background:var(--red);transition:transform .35s ease}
.pm:after{transform:rotate(90deg)}
.principle.is-open .pm:after{transform:rotate(90deg) scaleX(0)}
.principle-inner{overflow:hidden;min-height:0}
.principle-body{margin:0!important;padding:0 0 32px 72px;max-width:calc(34em + 72px)!important;font-size:17px;line-height:1.8}
.principles-list.is-acc .principle-panel{display:grid;grid-template-rows:0fr;opacity:0;visibility:hidden;
  transition:grid-template-rows .45s cubic-bezier(.2,.7,.2,1),opacity .35s ease,visibility 0s linear .45s}
.principles-list.is-acc .principle.is-open .principle-panel{grid-template-rows:1fr;opacity:1;visibility:visible;
  transition:grid-template-rows .45s cubic-bezier(.2,.7,.2,1),opacity .4s ease .05s,visibility 0s}
body .how>.eyebrow{margin-bottom:40px!important}
@media(max-width:650px){
  .principle-toggle{grid-template-columns:28px minmax(0,1fr) 18px;gap:12px;padding:24px 0}
  .principle-body{padding:0 0 26px 40px;font-size:16px}
}
@media(prefers-reduced-motion:reduce){
  .principles-list.is-acc .principle-panel,.principles-list.is-acc .principle.is-open .principle-panel{transition:none}
}

/* ---------- 11: name quote, 5: founder credo ---------- */
.name-quote .ph,.credo .ph{white-space:nowrap}
@media(max-width:760px){.name-quote .ph{white-space:normal}}
@media(max-width:360px){.credo .ph{white-space:normal}}
html[lang^="zh"] .name-quote .ph{white-space:nowrap!important}
body .about .name-quote{max-width:15em!important}
html[lang^="zh"] body .about .name-quote{max-width:none!important}
body .about .credo{max-width:14em!important}

/* ---------- 10: belief orb ---------- */
.belief-sheet{position:relative}
.belief-orb{pointer-events:none}
.orb-canvas{display:block;width:100%;height:100%}
@media(min-width:1000px){
  .belief-orb{position:absolute;top:50%;right:max(56px,calc((100% - 1200px)/2));width:min(36vw,500px);aspect-ratio:1;transform:translateY(-50%)}
  body .belief-inner>*{max-width:min(620px,54%)!important}
}
@media(max-width:999px){
  .belief-sheet{display:flex;flex-direction:column}
  .belief-orb{order:2;width:min(68vw,360px);aspect-ratio:1;margin:-40px auto 56px}
  body .belief-inner{padding-bottom:40px!important}
}
@media(max-width:760px){
  .belief-orb{width:min(62vw,240px);margin:-24px auto 40px}
}

/* ---------- 8 + 12: reveal / scroll unroll (only once JS adds .rv) ---------- */
.belief-sheet{will-change:opacity}
.rv{transition:opacity .6s ease,transform .6s cubic-bezier(.2,.7,.2,1)}
.rv:not(.is-in){opacity:0;transform:translateY(18px)}
.rv-scroll{position:relative;clip-path:inset(-2px -100vw -2px -100vw)}
.rv-scroll>.rv-curtain{position:absolute;z-index:6;left:-50vw;right:-50vw;top:-170px;height:calc(100% + 172px);pointer-events:none;
  background:linear-gradient(to bottom,rgb(246 245 240 / 0) 0,rgb(238 234 226 / .28) 50px,rgb(242 240 234 / .72) 100px,rgb(246 245 240 / .96) 140px,#f6f5f0 170px);
  transform:translateY(0);transition:transform var(--unroll,1.8s) cubic-bezier(.33,.0,.2,1)}
.rv-scroll.is-in>.rv-curtain{transform:translateY(100%)}
.rv-instant,.rv-instant>.rv-curtain{transition:none!important}
@media(prefers-reduced-motion:reduce){.rv,.rv-scroll>.rv-curtain{transition:none!important}.rv:not(.is-in){opacity:1;transform:none}.rv-curtain{display:none}}

/* mobile: section labels in the two "about" sections sat centred; align them with the text */
@media(max-width:999px){body .about{align-items:stretch}}
/* the two-row header (nav on its own row) is taller; let the ink hero reach the top edge */
@media(min-width:761px) and (max-width:1180px){body .ink-stage{top:-170px}}
@media(max-width:760px){body .ink-stage{top:-150px}}
.partners>.partners-foot{margin:28px 0 0!important;font:14px/1.8 var(--sans);color:var(--muted);max-width:34em}
@media(min-width:701px){body .partners>.partners-foot{grid-column:2}}
@media (min-width:700px){html[lang^="zh"] .practice-motto .ms{white-space:nowrap}}
.scope .scope-eg{margin:14px 0 0;font-size:var(--fs-s);line-height:1.7;color:var(--muted);font-style:normal}
