/* =====================================================================
   CTFY · Midnight Theta · About (/about/) — page layer
   Spec: docs/redesign/pages/34-about.md. Builds on css/site.css and css/modules.css.
   Chapters: I dark band (H6) · II porcelain (story → values → origin route → studio gallery → bridge) · III finale
   Hero moment: M27 variant "Origin Route" (.o-route) — Toronto → Sofia. Lives here until it is added to modules.css.
   ===================================================================== */

#story,#values,#experience,#people{scroll-margin-top:96px}

/* ---------- I · H6 paper subhero ---------- */
.about-hero .hero__float img{width:100%;aspect-ratio:4/5;height:auto;object-fit:cover;object-position:var(--pos,50% 45%)}
.about-hero .hero__float{border-radius:var(--r-xl);box-shadow:0 40px 90px -30px rgba(0,0,0,.65),0 0 0 1px var(--line-1)}
.about-hero .hero__lead{max-width:60ch}
/* the lounge hangs across the seam at the right of the wrap; keep the lead clear of it */
@media (min-width:1024px){.about-hero .hero__content>*{max-width:min(640px,60%)}}

/* ---------- II · 2 · Story ---------- */
.about-story .m-split__copy>p:not([class]) a{color:var(--fg-1);text-decoration:underline;text-decoration-color:var(--champ-600);text-decoration-thickness:1px;text-underline-offset:.22em}
.about-story .m-split__copy>p:not([class]) a:hover{text-decoration-color:var(--theta-700)}
.about-story .m-split__copy>p:first-of-type{font-size:calc(var(--t-lead) * var(--k-text));line-height:1.5;color:var(--fg-1)}

/* ---------- II · 3 · Values (paper-1 band; the hairline mask follows the band colour) ---------- */
.about-values{background:var(--paper-1);--page:var(--paper-1)}
.about-values .sec__head{margin-bottom:clamp(36px,5vw,64px)}
.about-values .m-pillar__index{margin:0;line-height:44px;font-size:calc(var(--t-title) * 1.25);font-weight:300;letter-spacing:-.02em;color:var(--fg-2)}
.about-values .m-pillar p:not(.m-pillar__index){max-width:36ch}
@media (max-width:1023px){
  .about-values .m-pillars{grid-template-columns:minmax(0,1fr);gap:0}
  .about-values .m-pillar{display:grid;grid-template-columns:minmax(96px,128px) minmax(0,1fr);column-gap:20px;row-gap:6px;padding-block:22px;border-top:1px solid var(--hair)}
  .about-values .m-pillar:last-child{border-bottom:1px solid var(--hair)}
  .about-values .m-pillar__index{grid-row:span 2;line-height:1.3;font-size:1rem;padding:0;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--fg-3);background:none}
  .about-values .m-pillar p:not(.m-pillar__index){max-width:52ch}
}

/* ---------- II · 4 · Origin Route (M27 variant) ----------
   Desktop: place labels over their stretch, stops on one horizontal line (text above, dot on the line), the larger
   end node on a midnight card, a dashed branch hanging below for the methodology and corporate method.
   Phones/tablets: vertical route on the left edge, place labels as dividers. Not pinned.
   Choreography keys off .is-in (core.js, removed after data-reveal-hold): the line draws Toronto → Sofia
   (--draw), each dot pops as the line reaches it (--k = position 0…1), text rises 18px, the end node blooms
   last with its Seal, then the branch fades in. Default CSS = the finished state (reduced motion, no JS, motion off). */
.ch--paper.about-route{padding-bottom:clamp(56px,7vw,96px)}
.about-route .sec__head{margin-bottom:clamp(40px,5vw,72px)}
.o-route{--draw:1400ms;--gap:clamp(20px,2.4vw,36px);--end-w:clamp(280px,29vw,360px);
  --colw:calc((100% - var(--end-w) - 3 * var(--gap)) / 3);
  position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) var(--end-w);column-gap:var(--gap);
  grid-template-rows:auto auto;align-items:stretch;margin-bottom:clamp(150px,15vw,190px)}
/* the line: from the first dot to the end dot, under the stops */
.o-route::before{content:"";position:absolute;z-index:0;left:7px;right:calc(var(--end-w) - 7px);bottom:6.5px;height:1px;
  background:linear-gradient(90deg,var(--theta-700),rgba(43,59,196,.45));transform-origin:left;pointer-events:none}
.o-place{grid-row:1;display:flex;align-items:center;gap:14px;margin-bottom:clamp(18px,2.4vw,32px);
  color:var(--fg-3);font:600 .75rem/1.3 var(--font-sans);letter-spacing:.14em;text-transform:uppercase}
.o-place::after{content:"";flex:1;height:1px;background:var(--hair-2)}
.o-place--a{grid-column:1/3}
.o-place--b{grid-column:3/5}
.o-stop{grid-row:2;position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;padding-bottom:30px}
/* flag-pole stem from the text down to its dot */
.o-stop::after{content:"";flex:1;min-height:28px;width:1px;margin:10px 0 0 6px;background:linear-gradient(to bottom,rgba(17,19,26,0),rgba(17,19,26,.28));transform-origin:top}
.o-stop--end{grid-column:4}
.o-stop::before{content:"";position:absolute;left:0;bottom:0;width:14px;height:14px;border-radius:50%;background:var(--theta-700);
  box-shadow:0 0 0 4px rgba(43,59,196,.14)}
.o-stop h3{color:var(--fg-1);font-size:calc(var(--t-title) * .95)}
.o-stop p{max-width:26ch;color:var(--fg-2);font-size:.9375rem;line-height:1.45}
/* end node: larger, midnight glass card, Seal chip, the dot gets a halo */
.o-stop--end::before{box-shadow:0 0 0 5px rgba(43,59,196,.2),0 0 26px rgba(62,85,245,.55)}
.o-end{position:relative;isolation:isolate;overflow:hidden;display:grid;gap:14px;justify-items:start;padding:clamp(20px,2vw,28px);
  border-radius:var(--r-xl);background:var(--bg-1);color:var(--text-1);
  box-shadow:0 30px 60px -30px rgba(17,19,26,.55),inset 0 0 0 1px var(--line-2),inset 0 1px 0 rgba(255,255,255,.1)}
.o-end>.bloom{inset:auto -20% -50% -20%;height:90%;background:var(--m-bloom)}
.o-end h3{color:var(--text-1);font:500 calc(var(--t-display-m) * .78 * var(--k-display))/1.08 var(--font-display);letter-spacing:-.01em;text-wrap:balance}
.o-end .chip{max-width:100%}
/* branch: hangs from the line between the two stretches */
.o-branch{position:absolute;z-index:1;left:calc(1.5 * (var(--colw) + var(--gap)) + 7px);top:calc(100% - 6.5px + 52px);transform:translateX(-50%);width:max-content;max-width:calc(100vw - 2 * var(--gutter))}
.o-branch::before{content:"";position:absolute;left:50%;bottom:100%;height:52px;border-left:1px dashed var(--ink-3);transform-origin:top}
.o-branch::after{content:"";position:absolute;left:50%;top:-6px;width:11px;height:11px;margin-left:-5.5px;border-radius:50%;background:var(--paper-0);box-shadow:inset 0 0 0 1.5px var(--ink-3)}
.o-branch__list{display:flex;gap:0}
.o-branch__list>li{display:grid;gap:6px;justify-items:center;text-align:center;padding:22px clamp(16px,2vw,28px) 0}
.o-branch__list>li+li{border-left:1px solid var(--hair-2)}
.o-branch__list h3{color:var(--fg-1);font-size:calc(var(--t-title) * .9)}
.o-branch__list p{color:var(--fg-2);font-size:.875rem;line-height:1.4}

/* choreography (JS + motion on only) */
.js .o-route.is-pending{opacity:1;transform:none}
.js .o-route.is-pending::before{transform:scaleX(0)}
.js .o-route.is-pending .o-stop::before{opacity:.15;transform:scale(.4)}
.js .o-route.is-pending .o-stop>*:not(.o-end){opacity:0;transform:translateY(var(--rise))}
.js .o-route.is-pending .o-stop::after{opacity:0;transform:scaleY(.2)}
.js .o-route.is-pending .o-place{opacity:0}
.js .o-route.is-pending .o-end{opacity:0;transform:scale(.94) translateY(var(--rise))}
.js .o-route.is-pending .o-end .chip{opacity:0}
.js .o-route.is-pending .o-branch{opacity:0}
.js .o-route.is-pending .o-branch::before{transform:scaleY(0)}
.o-route.is-in::before{transition:transform var(--draw) linear 120ms}   /* linear: the dots are timed to the line's position */
.o-route.is-in .o-place{transition:opacity 500ms var(--ease-out)}
.o-route.is-in .o-place--b{transition-delay:calc(120ms + .6667 * var(--draw))}
.o-route.is-in .o-stop::before{transition:opacity 260ms var(--ease-out) calc(120ms + var(--k) * var(--draw)),transform 480ms var(--ease-pop) calc(120ms + var(--k) * var(--draw))}
.o-route.is-in .o-stop>*:not(.o-end){transition:opacity var(--dur-reveal) var(--ease-out) calc(220ms + var(--k) * var(--draw)),transform var(--dur-reveal) var(--ease-out) calc(220ms + var(--k) * var(--draw))}
.o-route.is-in .o-stop::after{transition:opacity 500ms var(--ease-out) calc(300ms + var(--k) * var(--draw)),transform 600ms var(--ease-out) calc(300ms + var(--k) * var(--draw))}
.o-route.is-in .o-end{transition:opacity 700ms var(--ease-out) calc(220ms + var(--draw)),transform 900ms var(--ease-out) calc(220ms + var(--draw))}
.o-route.is-in .o-end .chip{transition:opacity 600ms var(--ease-out) calc(720ms + var(--draw))}
.o-route.is-in .o-branch{transition:opacity 700ms var(--ease-out) calc(900ms + var(--draw))}
.o-route.is-in .o-branch::before{transition:transform 600ms var(--ease-out) calc(900ms + var(--draw))}

/* vertical route (tablet and phone) */
@media (max-width:1023px){
  .o-route{--draw:1600ms;display:flex;flex-direction:column;gap:28px;padding-left:34px;margin-bottom:0}
  .o-route::before{left:6px;right:auto;top:8px;bottom:8px;width:1px;height:auto;transform-origin:top;
    background:linear-gradient(180deg,var(--theta-700),rgba(43,59,196,.4))}
  .js .o-route.is-pending::before{transform:scaleY(0)}
  .o-place{margin:6px 0 -6px}
  .o-place::after{display:none}
  .o-stop{padding-bottom:0}
  .o-stop::after{display:none}
  .o-stop::before{left:-34px;bottom:auto;top:5px}
  .o-stop h3,.o-stop p{max-width:none}
  .o-stop p{max-width:44ch}
  .o-end{width:100%;max-width:440px}
  .o-stop--end::before{top:26px}
  .o-branch{position:relative;left:auto;top:auto;transform:none;width:auto;max-width:none;margin-top:6px}
  .o-branch::before{left:-34px;bottom:auto;top:10px;width:26px;height:0;border-left:0;border-top:1px dashed var(--ink-3);transform-origin:left}
  .o-branch::after{left:-34px;top:5px;margin-left:0;width:11px;height:11px;background:var(--paper-0)}
  .o-branch__list{flex-direction:column}
  .o-branch__list>li{justify-items:start;text-align:left;padding:0 0 18px}
  .o-branch__list>li+li{border-left:0;border-top:1px solid var(--hair-2);padding-top:18px}
  .o-branch__list>li:last-child{padding-bottom:0}
  .js .o-route.is-pending .o-branch::before{transform:scaleX(0)}
  .o-route.is-in .o-stop::before{transition-delay:calc(120ms + var(--k) * var(--draw)),calc(120ms + var(--k) * var(--draw))}
  .o-route.is-in .o-place--b{transition-delay:calc(120ms + .6667 * var(--draw))}
}
/* a route that is not drawn must never hide content */
[data-motion="off"] .o-route::before,[data-motion="off"] .o-branch::before{transform:none!important}
[data-motion="off"] .o-route .o-stop::after,[data-motion="off"] .o-route .o-stop::before,[data-motion="off"] .o-route .o-stop>*,[data-motion="off"] .o-route .o-place,
[data-motion="off"] .o-route .o-end,[data-motion="off"] .o-route .o-end .chip,[data-motion="off"] .o-route .o-branch{opacity:1!important;transform:none!important}
[data-motion="off"] .o-route .o-branch{transform:translateX(-50%)!important}
@media (max-width:1023px){[data-motion="off"] .o-route .o-branch{transform:none!important}}
@media (prefers-reduced-motion:reduce){
  .o-route::before,.o-branch::before{transform:none!important}
  .o-route .o-stop::before,.o-route .o-stop>*,.o-route .o-place,.o-route .o-end,.o-route .o-end .chip,.o-route .o-branch{opacity:1!important}
  .o-route .o-stop::before,.o-route .o-stop::after,.o-route .o-stop>*,.o-route .o-end{transform:none!important;opacity:1!important}
}

/* ---------- II · 5 · Gallery (M26) ---------- */
.ch--paper.about-gallery{padding-top:0;padding-bottom:clamp(40px,6vw,80px)}
.about-gallery .m-gallery>li>figure>picture{display:block;width:100%;height:100%}

/* ---------- II · 6 · Bridge card on porcelain ---------- */
.ch--paper.about-bridge{padding-top:0}
.about-bridge .m-bridge__grid{grid-template-columns:minmax(0,4fr) minmax(0,8fr)}

/* ---------- Bulgarian (html[lang="bg"]) ---------- */
@media (max-width:767px){
  html[lang="bg"] .about-bridge .m-bridge__grid{grid-template-columns:minmax(0,1fr)}
}
