/* InoBuilt inner-page layer. Loaded after motion.css on every page. Chosen by Arash Mohsenijam (design review, rounds 5 and 6).
   Tone "ink": the inner pages that were dark are light (stone with dark cards, or paper), so cards have real contrast with the page.
   motion's build step (tools/build_dist.py) adds .mx-lt to those sections: .mx-a (holds cards, stone) or .mx-b (holds text or images, paper).
   Text that sits OUTSIDE a card is flipped dark with :not(<card>), so the flip never depends on script: every :not(...) below lists the cards (the same list src/motion.js uses to add .mx; :where() keeps the list at zero specificity, and .mx keeps the old specificity). */

:root{
  --mx-pad:clamp(20px,2vw,26px);          /* the one padding every card uses (the investor card's) */
  --mx-stone:#E6E3DE;--mx-paper:#F2F0EC;
  --mx-ot:#A8460A;                        /* orange text on light: 5.9:1 on white, 4.6:1 on stone */
  --mx-surf:#35312e;--mx-bd:rgba(255,255,255,.12);   /* card surface and edge on dark: 1.45:1 against the ink band, so a dark card no longer vanishes into it */
}

/* ================= tone: light sections ================= */
html[data-mx-tone=ink] .mx-lt{color:var(--ink);--line:rgba(22,21,20,.14);--mx-surf:#211f1d;--mx-bd:rgba(255,255,255,.08)}
html[data-mx-tone=ink] .mx-lt.mx-a{background:var(--mx-stone)}
html[data-mx-tone=ink] .mx-lt.mx-b{background:var(--mx-paper)}
html[data-mx-tone=ink] .mx-lt.mx-b+.mx-lt.mx-b{border-top:1px solid rgba(22,21,20,.1)}
/* these three shared the dark background of the section above and had no top padding; on their own they need it */
html[data-mx-tone=ink] .mx-lt:is(.svc-faq,.fee-cmp,.inv-proof){padding-top:clamp(48px,6vw,88px)}
html[data-mx-tone=ink] .mx-lt.svc-faq .faq{border-top:0;padding-top:0}

/* text outside cards turns dark */
html[data-mx-tone=ink] .mx-lt :is(p,.timeline td,.timeline th,.faq summary,.note-tbc,.inv-proof-g span,.proj-hd p):not(:is(.mx,:where(.v5-aud,.v5-pc,.ins-card,.step6,.projects .card,.svc,.feat,.icard,.reasons>article,.div-grid>article,.recent-g>a,.cc,.arch-list>li,.arch-steps li)) *){color:#3f3c3a}
html[data-mx-tone=ink] .mx-lt .timeline th:not(:is(.mx,:where(.v5-aud,.v5-pc,.ins-card,.step6,.projects .card,.svc,.feat,.icard,.reasons>article,.div-grid>article,.recent-g>a,.cc,.arch-list>li,.arch-steps li)) *){color:#5b5753}
html[data-mx-tone=ink] .mx-lt.fee-cmp .timeline td:first-child{color:#5b5753}
html[data-mx-tone=ink] .mx-lt.fee-cmp .timeline td:last-child{color:var(--ink);font-weight:500}
html[data-mx-tone=ink] .mx-lt :is(.eyebrow,em,.n,.more-link a,.steps-links a,.inv-proof-g b):not(:is(.mx,:where(.v5-aud,.v5-pc,.ins-card,.step6,.projects .card,.svc,.feat,.icard,.reasons>article,.div-grid>article,.recent-g>a,.cc,.arch-list>li,.arch-steps li)) *){color:var(--mx-ot)}
html[data-mx-tone=ink] .mx-lt .faq summary::after{color:var(--mx-ot)}
html[data-mx-tone=ink] .mx-lt .ins-filter button{color:#3f3c3a}
html[data-mx-tone=ink] .mx-lt .ins-filter button:is(.on,:hover){color:var(--ink)}
/* cards stay dark with light text */
html[data-mx-tone=ink] .mx-lt :is(.mx,:where(.v5-aud,.v5-pc,.ins-card,.step6,.projects .card,.svc,.feat,.icard,.reasons>article,.div-grid>article,.recent-g>a,.cc,.arch-list>li,.arch-steps li)){--line:rgba(255,255,255,.16);color:var(--stone)}
html[data-mx-tone=ink] .mx-lt :is(.mx,:where(.v5-aud,.v5-pc,.ins-card,.step6,.projects .card,.svc,.feat,.icard,.reasons>article,.div-grid>article,.recent-g>a,.cc,.arch-list>li,.arch-steps li)) :is(.reasons p,.arch-list li span){color:#d6d2cb}

/* small orange text on a dark card uses the lighter orange (the site's --o2 on dark): #E05F0E measured 4.3:1 on the card surface, 4.5 is needed.
   Every card in this list is dark in the final design, on every page, so the rule does not depend on script. */
:is(.ins-k,.ins-card b,.step6-n b,.step6 .dl b,.icard .n,.svc .n,.svc b,.projects .card .meta .type,.projects .card .more,.div-grid>article .n,.reasons>article .n){color:#ff9a5c}

/* the site's own hover colours (#262321, --ink-2) would darken the lifted surface */
.ins-card:hover,.svc:hover{background:var(--mx-surf)}
/* the orange focus ring is about 2.8:1 on stone; on light sections, outside the dark cards, it uses the darker orange (4.6:1) */
html[data-mx-tone=ink] .mx-lt :is(a,button,summary,input,select,textarea):focus-visible:not(:is(.mx,:where(.v5-aud,.v5-pc,.ins-card,.step6,.projects .card,.svc,.feat,.icard,.reasons>article,.div-grid>article,.recent-g>a,.cc,.arch-list>li,.arch-steps li)) *){outline-color:var(--mx-ot)}

/* ================= one card anatomy: a surface, an edge, and the investor card's padding ================= */
:is(.step6,.svc,.icard,.projects .card,.reasons>article,.div-grid>article,.arch-list>li,.arch-steps li){background:var(--mx-surf);border:1px solid var(--mx-bd)}
.ins-card{background:var(--mx-surf)}
.step6-b,.svc-b,.icard>div,.ins-b{padding:var(--mx-pad)}
/* projects: the text sat on the card edge (padding 18px 0 0). It now sits inside the card like the investor cards. */
.projects .card .card-link{display:flex;flex-direction:column;height:100%}
.projects .card .meta{flex:1;padding:var(--mx-pad)}

/* ================= Services: smaller cards ================= */
/* was two across, each 16:9 picture over 28px titles (635px wide and 527px tall at 1400). Now four across with a 3:2 picture and tighter type.
   --mx-svc-cols is the one knob: 3 gives larger cards, 2 gives the original layout. */
.svc-sec .svc-grid{grid-template-columns:repeat(var(--mx-svc-cols,4),minmax(0,1fr));gap:clamp(14px,1.6vw,20px)}
.svc-sec .svc-img{aspect-ratio:3/2}
.svc-sec .svc-b{gap:8px}
.svc-sec .svc h3{font-size:clamp(1.1875rem,1.7vw,1.375rem);line-height:1.15}
.svc-sec .svc p{font-size:0.875rem;line-height:1.5}
.svc-sec .svc b{margin-top:auto;padding-top:6px}
@media (max-width:1100px){.svc-sec .svc-grid{--mx-svc-cols:2}}
@media (max-width:600px){.svc-sec .svc-grid{--mx-svc-cols:1}}
@media (max-width:600px){   /* phones: picture beside the text, so four services fit in about 800px instead of 1900px */
  .svc-sec .svc.svc-i{flex-direction:row;align-items:stretch}
  .svc-sec .svc-img{flex:0 0 38%;aspect-ratio:auto}
  .svc-sec .svc-img img{height:100%}
  .svc-sec .svc-b{flex:1;min-width:0;padding:16px}
}

/* ================= About: hairline columns become cards ================= */
.statement .reasons{gap:clamp(14px,1.6vw,22px);border-top:0;margin-top:clamp(40px,5vw,64px)}
.statement .reasons article{padding:var(--mx-pad)!important;border:1px solid var(--mx-bd)!important}
.statement .reasons article h3{margin-top:12px}
.divisions .div-grid{gap:clamp(14px,1.6vw,22px);border-top:0}
.divisions .div-grid article{padding:var(--mx-pad)!important;border:1px solid var(--mx-bd)!important}
.divisions .div-grid article h3{margin:12px 0 8px}

/* ================= Architects: less empty ================= */
/* (the photo head is the site's own .page-head.shot, set in architects.html) */
/* intro on the left, a framed line-drawing sheet on the right, the six commitments as cards underneath */
.architects .arch-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"intro sheet" "list list";gap:clamp(32px,4vw,56px) 6vw;align-items:center}
.architects .arch-grid>div{grid-area:intro}
.architects .arch-sheet{grid-area:sheet;position:relative;margin:0;background:#f4f2ee;border:1px solid rgba(22,21,20,.12);box-shadow:var(--mx-e1)}
.architects .arch-sheet img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:contain}
.architects .arch-sheet figcaption{position:absolute;left:14px;bottom:14px;font:600 0.75rem/1 var(--sans);letter-spacing:.16em;text-transform:uppercase;color:var(--ink);
  background:rgba(255,255,255,.72);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:8px 12px;border-radius:var(--mx-r);border:1px solid rgba(22,21,20,.12)}
.architects .arch-list{grid-area:list;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(14px,1.6vw,22px);border-top:0}
.architects .arch-list li{display:flex;flex-direction:column;gap:8px;padding:var(--mx-pad)!important;border:1px solid var(--mx-bd)!important}
/* the number is a real element in the markup: a card's own ::before and ::after belong to the hover effects */
.mx-num{display:block;font:500 2.25rem/1 var(--display);font-style:normal;color:#ff9a5c;margin-bottom:8px}   /* on dark cards; the site's orange is too dim there */
/* "How a partnership starts": the dark strip becomes three numbered cards */
.architects .arch-steps{display:block;margin-top:clamp(40px,5vw,64px);padding:0;background:none;color:var(--ink)}
.architects .arch-steps>span{display:flex;gap:14px;align-items:center;margin-bottom:22px;font:500 0.75rem/1 var(--sans);letter-spacing:.22em;color:var(--mx-ot)}
.architects .arch-steps>span::before{content:'';width:28px;height:1px;background:currentColor}
.architects .arch-steps ol{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(14px,1.6vw,22px);color:var(--ink);font-size:0.9375rem;line-height:1.5}
.architects .arch-steps li{padding:var(--mx-pad)!important}
.recent-g a{box-shadow:var(--mx-e1)}
@media (max-width:1000px){
  .architects .arch-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"intro" "sheet" "list"}
  .architects .arch-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:700px){
  .architects .arch-list,.architects .arch-steps ol{grid-template-columns:minmax(0,1fr)}
}
