/* What we deliver: three pillars (Pilot, Aircraft, Organisation) under the Horus emblem, on the Carbon
   band. Hairline Paper branches and dots; red and blue only for the emblem and the active path. Castoro for the pillar names,
   JetBrains Mono for indexes and card labels, Atkinson semibold for product names, Atkinson regular for the leaves. Geometry and positions: js/pillars.js. */
.tree{position:relative;--node-in:22px}
.tree__rays{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;fill:none}
.tree__rays .seg{stroke:var(--paper);stroke-opacity:.16;stroke-width:1}
.tree__rays .ray-end{fill:var(--paper);fill-opacity:.5;stroke:none}
.tree__rays .ray-on{stroke:var(--blue);stroke-opacity:.75;stroke-width:1;transition:opacity 200ms ease}

/* apex: the Horus emblem (ring halves red over blue), two branches as wings; the pupil follows the pointer (js/emblem-eye.js) */
.tree__apex{position:relative;display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:56px 0 var(--space-5)}
.tree__emblem{display:block;width:96px;height:96px}
.pillar__name{font-family:var(--font-head);font-weight:400;text-transform:uppercase;letter-spacing:var(--tracking-section);font-size:clamp(1.375rem,1rem + 1vw,2rem);line-height:1.1;color:var(--paper)}

/* pillars on one Mono baseline */
.pillars{list-style:none;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.8fr) minmax(0,1.1fr)}
.pillar__head{position:relative;display:flex;flex-direction:column}
.pillar__base{margin-top:var(--space-3);padding-top:var(--space-2);border-top:1px solid var(--paper-line-strong);font-family:var(--font-mono);font-size:11px;letter-spacing:.14em;color:var(--silver);font-variant-numeric:tabular-nums}
.pillar__intro{margin-top:var(--space-3);font-size:var(--fs-small);line-height:1.5;color:var(--paper-body);max-width:32ch}
.pillar__tree{margin-top:var(--space-4)}
.pillar__toggle{display:none}
.pillar--alt .pillar__head,.pillar--alt .pillar__intro{text-align:center}
.pillar--alt .pillar__intro{margin-left:auto;margin-right:auto}

/* nodes: without JS a plain nested list */
.branches{list-style:none}
.branches .branches{padding-left:var(--space-4)}
.node{display:block;font:inherit;font-weight:600;font-size:clamp(1rem,.85rem + .45vw,1.1875rem);line-height:1.25;letter-spacing:-.01em;text-align:left;color:var(--paper);background:none;border:0;padding:2px 0;cursor:pointer;-webkit-tap-highlight-color:transparent}
.node__label{display:inline}
.node__sub{display:block;font-size:.8125rem;line-height:18px;color:var(--silver)}
.node__tag{font-family:var(--font-mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--silver);margin-left:.5em;white-space:nowrap}
.node--leaf{font-weight:400;font-size:.875rem;line-height:18px;letter-spacing:0;color:var(--paper-body)}
.node__chev{display:none}
.tree--js .node__chev{display:inline-block;width:6px;height:6px;margin:0 0 0 .6em;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-3px) rotate(45deg);transition:transform 300ms cubic-bezier(.16,1,.3,1)}
.tree--js .node[aria-expanded="true"] .node__chev{transform:translateY(0) rotate(-135deg)}
.node__def{font-size:var(--fs-small);color:var(--silver);margin-bottom:var(--space-3)}
.node:hover,.node.is-on{color:var(--paper)}
.node:focus-visible{outline:1px solid var(--paper);outline-offset:2px}

/* drawn tree */
.tree--js .tree__apex .branches{position:static}
.tree--js .node{position:absolute;z-index:2;white-space:normal}
.tree--js .node--r{padding-left:var(--node-in)}
.tree--js .node--l{padding-right:var(--node-in);text-align:right}
.tree--js .node__def{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.tree--js .branches .branches{padding-left:0}
.tree--js .pillar__tree{position:relative}
.tree--js.has-active .node:not(.is-on){color:rgba(246,244,239,.55)}
.tree__lines{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;fill:none}
.tree__lines .seg{stroke:var(--paper);stroke-opacity:.34;stroke-width:1;transition:stroke 200ms ease,stroke-opacity 200ms ease}
.tree__lines .seg.is-on{stroke:var(--blue);stroke-opacity:1;stroke-width:1.5}
.tree__lines .dot{fill:var(--paper);fill-opacity:.85;stroke:var(--carbon);stroke-width:2;paint-order:stroke;transition:fill 200ms ease}
.tree__lines .dot.is-on{fill:var(--red);fill-opacity:1}
.tree__lines .link{stroke:var(--blue);stroke-width:1.5}
.tree__lines .root{fill:var(--carbon);stroke:var(--paper);stroke-opacity:.6}

/* definition card: Mono label, Atkinson text, on Graphite. Opens beside the active node with a lit line to it (placed by
   js/pillars.js); on the stacked layout the row is static and the card opens under the node */
.tree__readout{position:relative;margin-top:var(--space-4)}
.tree__card{position:absolute;z-index:3;width:min(300px,100%);padding:var(--space-3);background:var(--graphite);border:1px solid var(--paper-line-strong);box-shadow:0 12px 32px rgba(3,4,5,.6);pointer-events:none}
.tree__card[hidden]{display:none}
.tree__card-label{display:block;margin-bottom:var(--space-2);font-family:var(--font-mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--silver)}
.tree__card-text{font-size:var(--fs-small);line-height:1.5;color:var(--paper)}

/* growth on scroll into view: strokes from the roots outward, nodes when their branch arrives (motion allowed only) */
.tree--grow [data-grow] .seg{stroke-dasharray:1;transition:stroke-dashoffset var(--dur,600ms) linear var(--t0,0ms),stroke 200ms ease,stroke-opacity 200ms ease}
.tree--grow [data-grow]:not(.is-grown) .seg{stroke-dashoffset:1}
.tree--grow [data-grow] .dot,.tree--grow [data-grow] .node,.tree--grow .ray-end{transition:opacity 400ms ease var(--t0,0ms),color 150ms ease,fill 200ms ease}
.tree--grow [data-grow]:not(.is-grown) .dot,.tree--grow [data-grow]:not(.is-grown) .node,.tree--grow .tree__rays:not(.is-grown) .ray-end{opacity:0}

/* unfolding sub-branches (Training programmes): the same growth from the group node, motion allowed only */
.tree__lines .seg.sprout{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset var(--dur,600ms) linear var(--t0,0ms),stroke 200ms ease,stroke-opacity 200ms ease}
.tree__lines .seg.sprout.is-sprouted{stroke-dashoffset:0}
.tree__lines .dot.sprout,.tree--js .node.sprout{opacity:0;transition:opacity 400ms ease var(--t0,0ms),color 150ms ease,fill 200ms ease}
.tree__lines .dot.sprout.is-sprouted,.tree--js .node.sprout.is-sprouted{opacity:1}

/* below 768 px: emblem at the top, pillars stacked, each pillar a tap-to-expand group with a mini diagram */
@media (max-width:767px){
  .tree__apex{padding:48px 0 var(--space-4)}
  .tree__emblem{width:64px;height:64px}
  .tree__readout{position:static;margin-top:0}
  .pillars{grid-template-columns:1fr}
  .pillar{padding:var(--space-3) 0 var(--space-4)}
  .tree--js .pillar__toggle{position:static;display:flex;align-items:center;gap:var(--space-3);margin-left:auto;min-height:44px;padding:0;background:none;border:0;color:var(--paper);cursor:pointer}
  .tree--js .pillar__toggle::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0}
  .tree--js .pillar__head{flex-direction:row;flex-wrap:wrap;align-items:center}
  .tree--js .pillar__base{flex-basis:100%}
  .pillar__mini{height:40px;overflow:visible;fill:none}
  .pillar__mini path{stroke:var(--paper);stroke-opacity:.5;stroke-width:1;vector-effect:non-scaling-stroke}
  .pillar__mini circle{fill:var(--paper);stroke:none}
  .pillar__chev{width:10px;height:10px;margin:0 4px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-3px) rotate(45deg);transition:transform 300ms cubic-bezier(.16,1,.3,1)}
  .pillar__toggle[aria-expanded="true"] .pillar__chev{transform:translateY(2px) rotate(-135deg)}
  .pillar__toggle:focus-visible{outline:none}
  .pillar__toggle:focus-visible::after{outline:1px solid var(--paper);outline-offset:4px}
  .tree--js .node{padding-top:6px;padding-bottom:6px}
  .tree__rays{display:none}
}
