/* aentic.ai — the flight. Active only when flight.js adds body.flight (WebGL on, reduced motion off).
   Layout and movement only: every colour, face and word is the site's own. */

.flight { overflow-x: hidden; }
html:has(body.flight) { scroll-behavior: auto; }
.flight #orrery { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; touch-action: pan-y; }
.flight .section { display: none; }
.flight .fl-spacer { position: relative; z-index: 1; pointer-events: none; }
.flight .hero {
  position: fixed; inset: 0; height: auto; min-height: 0; z-index: 4; background: none; border: 0; overflow: visible; pointer-events: none;
}
.flight .hero-copy > *, .flight .orrery-index { pointer-events: auto; }
.flight .site-footer { position: relative; z-index: 6; background: var(--bg-edge); }
.flight .scroll-indicator { z-index: 7; }

/* ---------- cards: anchored beside their body by flight.js ---------- */
.fl-layer { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.fl-card {
  position: fixed; left: 0; top: 0; display: none; width: min(450px, 37vw); padding: 26px 28px 24px;
  will-change: transform, opacity;
  /* no box: the panel is written on the orb itself */
  background: transparent; border: 1px solid transparent;
}
/* ---------- materialize: the pane opens from a line of light, then its letters resolve one by one ---------- */
.fl-card { transition: background 0.6s var(--ease), border-color 0.6s var(--ease); }
.fl-card.fl-opening { background: rgba(67, 179, 174, 0.55); border-color: var(--verdigris); transition: none; }
/* a soft dark core behind the words, for orbs that are not black (the sun) */
.fl-card:not(.fl-index)::before { content: ''; position: absolute; inset: -9% -12%; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(3, 4, 7, 0.9) 0%, rgba(3, 4, 7, 0.82) 62%, rgba(3, 4, 7, 0) 100%); }
.fl-w { white-space: nowrap; }
.fl-ch { animation: fl-letter 0.55s linear both; animation-delay: calc(0.42s + var(--i) * 1.25s / var(--n)); }
@keyframes fl-letter {
  0%   { opacity: 0; color: var(--verdigris); text-shadow: 0 0 14px var(--verdigris); }
  30%  { opacity: 1; color: var(--verdigris); text-shadow: 0 0 14px var(--verdigris); }
  100% { opacity: 1; text-shadow: 0 0 0 transparent; }
}
.fl-card .chip, .fl-card .btn, .fl-card .fl-more { animation: fl-rise 0.6s var(--ease) 1.1s both; }
@keyframes fl-rise { from { opacity: 0; transform: translateY(8px); } }
.flight .hint-drag { display: none; }
.flight #orrery.grabbing { cursor: default; }

/* the page's own blocks, re-housed: drop their page layout, keep their type */
.fl-card .section-head { display: block; margin: 0 0 20px; padding: 0 0 16px; }
.fl-card .section-title { font-size: clamp(34px, 3.4vw, 52px); margin: 6px 0 10px; }
.fl-card .section-meta { text-align: left; padding: 0; }
.fl-card .manifesto p { font-size: clamp(18px, 1.45vw, 21px); margin-bottom: 14px; max-width: none; }
.fl-card .manifesto-sign { margin-top: 18px; padding-top: 14px; }
.fl-card .chapter { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0; border: 0; }
.fl-card a.chapter:hover { padding-left: 0; background: none; }
.fl-card .chapter h3 { font-size: clamp(32px, 3vw, 44px); }
.fl-card .chapter .desc { max-width: none; }
.fl-card .chapter .state { justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; gap: 16px; padding-top: 6px; }
.fl-card .proj, .fl-card .proj.featured { position: static; display: grid; grid-template-rows: none; gap: 12px; padding: 0; background: none; overflow: visible; }
.fl-card .proj:hover { background: none; }
.fl-card .proj-visual { display: none; }
.fl-card .proj h3, .fl-card .proj.featured h3 { font-size: clamp(32px, 3vw, 46px); max-width: none; }
.fl-card .proj p, .fl-card .proj.featured p { font-size: 14.5px; max-width: none; }
.fl-card .proj .lesson { font-size: 16px; }
.fl-card .note { display: grid; gap: 12px; padding: 0; background: none; }
.fl-card .note-body p:not(:first-child), .fl-card .note-sign { display: none; }
.fl-card .corr-lede { font-size: clamp(18px, 1.5vw, 22px); max-width: none; margin-bottom: 14px; }
.fl-card .ledger li { padding: 9px 0; grid-template-columns: 96px 1fr; gap: 14px; }
.fl-card .ledger .val { font-size: 14.5px; }
.fl-card .ledger-cta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.fl-rows { display: grid; border-top: 1px solid var(--hairline); margin-bottom: 4px; }
.fl-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.fl-row-t { font-family: var(--serif); font-size: 24px; letter-spacing: -0.015em; }
.fl-row-t em { color: var(--verdigris); }
.fl-more {
  all: unset; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; margin-top: 16px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--verdigris);
}
.fl-more:focus-visible, .fl-item:focus-visible, .fl-close:focus-visible { outline: 1px solid var(--verdigris); outline-offset: 4px; }

/* ---------- the index: the last stop ---------- */
.fl-card.fl-index {
  left: var(--gutter); top: 96px; width: min(640px, calc(100vw - 2 * var(--gutter))); max-height: calc(100vh - 130px); overflow: auto;
  display: none; padding: 30px 34px; columns: 2; column-gap: 44px;
  background: rgba(8, 9, 12, 0.84); border-color: var(--hairline-strong);
}
.fl-group { break-inside: avoid; margin-bottom: 22px; }
.fl-group-h { color: var(--sienna); padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--hairline); }
.fl-item {
  all: unset; cursor: pointer; display: block; width: 100%; padding: 5px 0; box-sizing: border-box;
  font-family: var(--serif); font-size: 23px; line-height: 1.15; letter-spacing: -0.015em; color: var(--vellum); transition: color 0.2s, padding 0.25s var(--ease);
}
.fl-item em { color: var(--verdigris); }
.fl-item:hover { padding-left: 8px; color: var(--verdigris); }

/* ---------- reader for the long texts ---------- */
.fl-dialog {
  width: min(720px, calc(100vw - 32px)); max-height: min(84vh, 900px); margin: auto; padding: 0; overflow: hidden;
  background: var(--charcoal); color: var(--vellum); border: 1px solid var(--hairline-strong);
}
.fl-dialog::backdrop { background: rgba(5, 7, 10, 0.72); }
.fl-dialog-body { max-height: min(84vh, 900px); overflow: auto; padding: 56px 34px 34px; }
.fl-dialog-body > * { position: static; background: none; border: 0; padding: 0; margin: 0; }
.fl-dialog-body .tracks, .fl-dialog-body .notes { display: grid; grid-template-columns: 1fr; gap: 28px; }
.fl-dialog-body .track { background: none; padding: 0 0 24px; border-bottom: 1px solid var(--hairline); }
.fl-dialog-body .track p, .fl-dialog-body .corr-lede { max-width: none; }
.fl-close { all: unset; cursor: pointer; position: absolute; right: 22px; top: 18px; color: var(--vellum-dim); }
.fl-close:hover { color: var(--verdigris); }

@media (max-width: 900px) {
  .flight .hero-copy { padding: 36vh 20px 24px; }
  .flight .hero-hint { display: none; }
  .fl-card { width: calc(100vw - 36px); padding: 16px 18px 16px; }
  .fl-card .section-head { margin-bottom: 12px; padding-bottom: 10px; }
  .fl-card .section-title { font-size: 34px; }
  .fl-card .manifesto p { font-size: 17px; margin-bottom: 10px; }
  .fl-card .manifesto p.dropcap .dc { font-size: 2.6em; }
  .fl-card .chapter h3, .fl-card .proj h3, .fl-card .proj.featured h3 { font-size: 32px; }
  .fl-card .chapter .desc, .fl-card .proj p, .fl-card .proj.featured p { font-size: 14px; line-height: 1.5; }
  .fl-card .note-body p { font-size: 15.5px; }
  .fl-card .ledger li { padding: 7px 0; grid-template-columns: 84px 1fr; }
  .fl-card.fl-index { left: 14px; top: 72px; width: calc(100vw - 28px); padding: 20px 22px; max-height: calc(100vh - 96px); padding: 20px 22px; column-gap: 26px; }
  .fl-item { font-size: 19px; padding: 4px 0; }
  .fl-group { margin-bottom: 16px; }
  .fl-dialog-body { padding: 52px 20px 24px; }
}
