/* The Coherence Triad as a schematic of the ACE mark (local preview, 2026-10-22).
   Every rule is scoped under .tri-section; every class is prefixed tri-, apart from the site's own
   .triad-name / .triad-tagline / .triad-desc / .triad-output, reused here for their type. */

.tri-section { position: relative; padding-bottom: 12rem; }
@media (min-width: 769px) { .tri-section { padding-bottom: 14rem; } }
.tri-section .tri-head { margin-bottom: 0; }

/* sticky needs body to clip sideways, not scroll; the page's other pins do the same */
html.tri-pinned body { overflow-x: clip !important; }

.tri-section .tri-scrolly { position: relative; height: 280vh; height: 280svh; }
.tri-section .tri-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: 7rem; }
.tri-section .tri-stage { width: 100%; display: grid; grid-template-columns: minmax(0, 36fr) minmax(0, 64fr); gap: 4rem; align-items: center; }

/* ---------- the words, in the page's own type ---------- */
.tri-section .tri-text { display: flex; flex-direction: column; gap: 2.6rem; }
.tri-section .tri-leg { transition: opacity .5s ease; opacity: 0.32; }
.tri-section .tri-leg.tri-done { opacity: 0.55; }
.tri-section .tri-leg.tri-on { opacity: 1; }
.tri-section.tri-resolved .tri-leg { opacity: 1; }
.tri-section .tri-leg .triad-name { font-size: 3.4rem; margin-bottom: 0.8rem; }
.tri-section .tri-leg .triad-tagline { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.tri-section .tri-leg .triad-desc { font-size: 1.6rem; line-height: 1.65; margin: 0 0 0.9rem; max-width: 46ch; }
.tri-section .tri-leg .triad-output { margin: 0; font-size: 1.25rem; color: var(--leg, var(--text-mid)); }
.tri-section .tri-resolve { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .7s cubic-bezier(0.16,1,0.3,1); }
.tri-section.tri-resolved .tri-resolve { opacity: 1; transform: none; }
.tri-section .tri-holds { margin: 0; font-family: var(--serif); font-size: clamp(3rem, 3vw, 4.2rem); line-height: 1.05; letter-spacing: -0.01em; color: var(--text); }
.tri-section .tri-def { margin: 1.2rem 0 0; font-size: 1.5rem; line-height: 1.6; color: var(--text-mid); max-width: 46ch; }
.tri-section .tri-def span { color: var(--text); }

/* ---------- the drawing ---------- */
.tri-section .tri-draw { position: relative; width: 100%; aspect-ratio: 860 / 600; }
.tri-section .tri-draw svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tri-section .tri-ov { position: absolute; inset: 0; pointer-events: none; }
.tri-section .tri-line { fill: none; stroke: rgba(200,160,240,0.34); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tri-section .tri-faint { stroke: rgba(200,160,240,0.16); }
.tri-section .tri-line-c { stroke: rgba(200,160,240,0.30); stroke-dasharray: 3 5; }
.tri-section .tri-axis { stroke: rgba(200,160,240,0.18); }
.tri-section .tri-radius { stroke: rgba(200,160,240,0.13); }
.tri-section .tri-tick { stroke: rgba(200,160,240,0.22); }
.tri-section .tri-tick-l { stroke: rgba(200,160,240,0.40); }
.tri-section .tri-reg-c, .tri-section .tri-reg-x { stroke: rgba(232,228,240,0.40); }
.tri-section .tri-orb-ring { stroke: rgba(232,228,240,0.45); }
.tri-section .tri-orb-x { stroke: rgba(232,228,240,0.5); }
.tri-section .tri-ann { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; fill: rgba(188,186,212,0.7); }
.tri-section .tri-ann-dim { fill: rgba(156,154,187,0.55); }
.tri-section .tri-arc { fill: none; stroke: var(--leg); stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.tri-section .tri-arc-glow { fill: none; stroke: var(--leg); stroke-width: 6; vector-effect: non-scaling-stroke; opacity: 0; filter: blur(4px); }
.tri-section .tri-feeder { fill: none; stroke: var(--leg); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-opacity: 0.45; }
.tri-section .tri-sigpath { fill: none; stroke: none; }
.tri-section .tri-pulse { fill: var(--leg); opacity: 0; }
.tri-section .tri-node-dot { fill: #0a0a0f; stroke: var(--leg); stroke-width: 1.25; vector-effect: non-scaling-stroke; transition: fill .3s ease; }
.tri-section .tri-node-halo { fill: var(--leg); opacity: 0; transition: opacity .3s ease; }
.tri-section .tri-node.tri-lit .tri-node-dot { fill: var(--leg); }
.tri-section .tri-node.tri-lit .tri-node-halo { opacity: 0.16; }
.tri-section .tri-leader { fill: none; stroke: var(--leg); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-opacity: 0.7; }
.tri-section .tri-lead-dot { fill: var(--leg); }
.tri-section .tri-orb-core { fill: #fff; }
.tri-section .tri-mark { mix-blend-mode: screen; }
.tri-section svg.tri-rest .tri-orb-glow { animation: triBreathe 5.5s ease-in-out infinite; transform-origin: 430px 300px; transform-box: view-box; }
.tri-section svg.tri-rest .tri-mark { animation: triMarkBreathe 5.5s ease-in-out infinite; }
@keyframes triBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes triMarkBreathe { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }

.tri-section .tri-nl { position: absolute; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; opacity: 0; text-shadow: 0 0 6px var(--bg), 0 0 2px var(--bg); }
.tri-section .tri-callout { position: absolute; margin: 0; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.25; opacity: 0; transform: translateY(-50%); text-shadow: 0 0 10px var(--bg), 0 0 4px var(--bg), 0 0 2px var(--bg); }
.tri-section .tri-callout-left { text-align: left; }
.tri-section .tri-callout-right { text-align: right; }
.tri-section .tri-callout-center { text-align: center; transform: none; }

/* ---------- phones and narrow screens: the drawing above, the active leg below ---------- */
.tri-section.tri-phone .tri-pin { padding-top: 6.4rem; align-items: center; }
.tri-section.tri-phone .tri-draw svg { overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 100%), linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 100%), linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-composite: intersect; }
.tri-section.tri-phone .tri-ann-lead { display: none; }
.tri-section.tri-phone .tri-stage { grid-template-columns: 1fr; gap: 1.6rem; align-content: start; padding-top: 1.2rem; }
.tri-section.tri-phone .tri-draw { order: -1; aspect-ratio: 516 / 392; }
.tri-section.tri-phone .tri-nl { font-size: 11px; letter-spacing: 0.06em; }
.tri-section.tri-phone .tri-ann { display: none; }
.tri-section.tri-phone .tri-text { display: grid; gap: 0; }
.tri-section.tri-phone .tri-text > * { grid-area: 1 / 1; }
.tri-section.tri-phone .tri-leg { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; }
.tri-section.tri-phone .tri-leg.tri-on, .tri-section.tri-phone:not(.tri-resolved)[data-stage="construct"] .tri-leg:first-child { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.tri-section.tri-phone[data-stage="construct"] .tri-leg:first-child { opacity: 0.45; }
.tri-section.tri-phone.tri-resolved .tri-leg { opacity: 0; visibility: hidden; }
.tri-section.tri-phone .tri-leg .triad-name { font-size: 2.6rem; margin-bottom: 0.4rem; }
.tri-section.tri-phone .tri-leg .triad-tagline { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 1.7rem; line-height: 1.3; opacity: 1; margin: 0 0 1rem; }
.tri-section.tri-phone .tri-leg .triad-desc { font-size: 1.5rem !important; line-height: 1.6 !important; margin-bottom: 0.8rem; }
.tri-section.tri-phone .tri-leg .triad-output { font-size: 1.2rem !important; }
.tri-section.tri-phone .tri-holds { font-size: 3rem; }
.tri-section.tri-phone .tri-def { font-size: 1.5rem; }

/* ---------- reduced motion: no pin, the finished schematic, every word visible ---------- */
.tri-section.tri-reduced .tri-scrolly { height: auto; }
.tri-section.tri-reduced .tri-pin { position: relative; height: auto; padding-top: 6rem; }
.tri-section.tri-reduced .tri-leg, .tri-section.tri-reduced .tri-resolve { opacity: 1; transform: none; visibility: visible; }
.tri-section.tri-reduced.tri-phone .tri-text { display: flex; flex-direction: column; gap: 3rem; }
.tri-section.tri-reduced.tri-phone .tri-leg { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .tri-section .tri-leg, .tri-section .tri-resolve { transition: none; }
  .tri-section svg .tri-orb-glow, .tri-section svg .tri-mark { animation: none !important; }
}
