/* FIELDNOTES / MOTION SYSTEM — cyan instruments, not flashing body copy. */
:root { --ease-out: cubic-bezier(.16,1,.3,1); }
#ambient-field { position:fixed; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; }
body:has(#ambient-field):before { background-image:none; }
.page { position:relative; z-index:1; }
.boot-screen { position:fixed; inset:0; z-index:30; display:grid; place-items:center; padding:28px; background:#080e13; color:#e1edf4; pointer-events:none; overflow:hidden; animation:boot-failsafe .01ms 6s forwards; }
.boot-screen:before { content:''; position:absolute; inset:0; background-image:linear-gradient(#20364340 1px,transparent 1px),linear-gradient(90deg,#20364340 1px,transparent 1px); background-size:64px 64px; mask-image:radial-gradient(ellipse at center,#000,transparent 75%); }
.boot-screen:after { content:''; position:absolute; top:0; left:0; width:100%; height:2px; background:linear-gradient(90deg,transparent,rgba(var(--accent-rgb,130,227,237),.4),transparent); animation:boot-scan 1.7s var(--ease-out) both; }
.boot-console { position:relative; width:min(640px,100%); border:1px solid #346174; padding:38px; background:#0c151de8; clip-path:polygon(18px 0,100% 0,100% calc(100% - 18px),calc(100% - 18px) 100%,0 100%,0 18px); }
#boot-status { font:11px/1.8 var(--mono); color:var(--accent); margin:0; }
@keyframes boot-failsafe { to { visibility:hidden; } }
@keyframes boot-scan { from { transform:translateY(-5vh); } to { transform:translateY(105vh); } }
@keyframes instrument-orbit { to { transform:rotate(360deg); } }
@keyframes instrument-orbit-reverse { from { transform:rotate(35deg); } to { transform:rotate(-325deg); } }
@keyframes instrument-breathe { 0%,100% { opacity:.55; } 50% { opacity:1; } }
@keyframes waveform-live { 0%,100% { transform:scaleY(.45); } 50% { transform:scaleY(1); } }
@keyframes source-lift { 0%,100% { translate:0 0; } 50% { translate:0 -6px; } }
@keyframes signal-flow { from { transform:translateX(-100%); } to { transform:translateX(220%); } }
#motion-toggle { display:inline-flex; align-items:center; gap:8px; background:none; color:var(--muted); padding:6px 2px; font:12px var(--sans); min-height:44px; white-space:nowrap; }
.motion-icon { display:flex; align-items:center; justify-content:center; gap:3px; width:20px; height:20px; }
.motion-icon i { display:block; height:10px; width:2px; background:currentColor; }
.motion-icon i:nth-child(2) { height:17px; }
#motion-toggle[aria-pressed=true] { color:var(--accent); }
#motion-toggle[aria-disabled=true] { color:var(--muted); }
html[data-motion=on] .fx-inview .orbit.one { animation:instrument-orbit 64s linear infinite; }
html[data-motion=on] .fx-inview .orbit.two { animation:instrument-orbit-reverse 24s linear infinite; }
html[data-motion=on] .fx-inview .orbit.three { animation:instrument-orbit 40s linear infinite; }
html[data-motion=on] .fx-inview .orbit-core > span { animation:instrument-breathe 4s ease-in-out infinite; }
.orbital:before { content:''; position:absolute; width:250px; height:250px; border-radius:50%; background:conic-gradient(from 0deg,transparent 65%,rgba(var(--accent-rgb,130,227,237),.11) 95%,transparent); mask-image:radial-gradient(closest-side,transparent 25%,#000 85%); opacity:0; }
html[data-motion=on] .fx-inview .orbital:before { opacity:1; animation:instrument-orbit 14s linear infinite; }
html[data-motion=on] .fx-inview .waveform i { animation:waveform-live 1.8s ease-in-out infinite; }
html[data-motion=on] .waveform i:nth-child(3n) { animation-delay:-.65s; }
html[data-motion=on] .waveform i:nth-child(3n + 1) { animation-delay:-1.3s; animation-duration:2.3s; }
html[data-motion=on] .fx-inview .source-stack span { animation:source-lift 5s ease-in-out infinite; }
html[data-motion=on] .source-stack span:nth-child(2) { animation-delay:-1.1s; }
html[data-motion=on] .source-stack span:nth-child(3) { animation-delay:-2.2s; }
.starting-points > a, #home-collections > a, .primary-link { position:relative; overflow:hidden; isolation:isolate; }
.feature:before, .starting-points > a:before, #home-collections > a:before { content:''; position:absolute; inset:0; pointer-events:none; z-index:-1; background:radial-gradient(340px circle at var(--pointer-x,50%) var(--pointer-y,50%),rgba(var(--accent-rgb,130,227,237),.063),transparent 75%); opacity:0; transition:opacity .35s; }
.feature { isolation:isolate; }
html[data-motion=on] .feature:hover:before, html[data-motion=on] .starting-points > a:hover:before, html[data-motion=on] #home-collections > a:hover:before { opacity:1; }
html[data-motion=on] .primary-link, html[data-motion=on] .feature, html[data-motion=on] .starting-points > a, html[data-motion=on] #home-collections > a { transition:border-color .25s,background-color .25s,box-shadow .3s; }
html[data-motion=on] .feature:hover { box-shadow:inset 0 0 35px rgba(var(--accent-rgb,130,227,237),.032); }
html[data-motion=on] .primary-link span, html[data-motion=on] .directory-count b, html[data-motion=on] .feature-meta > span:last-child { display:inline-block; transition:transform .35s var(--ease-out); }
html[data-motion=on] .primary-link:hover span, html[data-motion=on] #home-collections > a:hover .directory-count b, html[data-motion=on] .feature:hover .feature-meta > span:last-child { transform:translate(3px,-3px); }
.resource:after { content:''; position:absolute; left:0; bottom:0; height:1px; width:100%; background:linear-gradient(90deg,transparent,var(--accent),transparent); transform:scaleX(0); transform-origin:left; opacity:.7; pointer-events:none; }
html[data-motion=on] .resource:hover:after { transform:scaleX(1); transition:transform .7s var(--ease-out); }
html[data-motion=on] .intro-copy .eyebrow { position:relative; padding-bottom:14px; }
html[data-motion=on] .intro-copy .eyebrow:after { content:''; position:absolute; bottom:0; left:0; width:90px; height:1px; background:linear-gradient(90deg,var(--accent),transparent); }
html[data-motion=on] dialog[open] { box-shadow:0 0 0 1px var(--line-bright),0 35px 110px #0008; }
html[data-motion=on] dialog::backdrop { animation:backdrop-open .3s ease-out; }
@keyframes backdrop-open { from { background-color:transparent; } to { background-color:#0009; } }
.tap-wave { position:absolute; width:26px; height:26px; border:1px solid var(--accent); border-radius:50%; pointer-events:none; z-index:2; opacity:0; }
.scroll-signal { position:fixed; left:290px; right:0; top:0; height:2px; z-index:12; pointer-events:none; }
.scroll-signal > span { display:block; width:100%; height:100%; background:var(--accent); transform:scaleX(0); transform-origin:left; opacity:.7; }
html[data-motion=off] *, html.document-hidden * { animation-play-state:paused!important; }
html[data-motion=off] { scroll-behavior:auto; }
html[data-motion=off] *, html[data-motion=off] *:before, html[data-motion=off] *:after { animation:none!important; transition:none!important; }
html[data-motion=off] .scroll-signal, html[data-motion=off] .tap-wave { display:none; }
html.document-hidden *:before, html.document-hidden *:after { animation-play-state:paused!important; }
html[data-motion=on] .boot-console { animation:welcome-enter .8s var(--ease-out) both; }
html[data-motion=on] .boot-screen:before { inset:-64px; animation:welcome-grid 14s linear infinite; }
@keyframes welcome-enter { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
@keyframes welcome-grid { to { transform:translate(64px,64px); } }
@media(max-width:1000px) { .scroll-signal { left:0; } }
@media(max-width:700px) {
 .topbar-actions { gap:18px; }
 #motion-toggle { min-width:44px; justify-content:center; }
 #motion-toggle > span:last-child { display:none; }
 #motion-toggle:focus-visible { outline-offset:1px; }
 .boot-screen { padding:22px; }
 .boot-console { padding:25px; }
 #boot-status { font-size:10px; max-width:145px; }
}
@media(prefers-reduced-motion:reduce) {
 *, *:before, *:after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
 .boot-screen, .scroll-signal, .tap-wave { display:none!important; }
}

.terminal-window { width:min(840px,100%); padding:0; background:var(--nav); border-color:var(--line-bright); }
.terminal-toolbar { display:flex; align-items:center; gap:16px; padding:18px 24px; border-bottom:1px solid var(--line); font:12px/1.6 var(--mono); color:var(--muted); }
.terminal-toolbar small { margin-left:auto; font-size:10px; color:var(--muted); letter-spacing:.7px; }
.terminal-lights { display:flex; gap:6px; }
.terminal-lights i { width:7px; height:7px; border-radius:50%; background:var(--accent); opacity:.7; }
.terminal-lights i:nth-child(2) { opacity:.4; }
.terminal-lights i:nth-child(3) { opacity:.2; }
.terminal-log { padding:28px; min-height:300px; font:15px/1.9 var(--mono); }
.terminal-step { margin-bottom:22px; }
.terminal-row { display:flex; gap:12px; align-items:baseline; }
.terminal-prompt { color:var(--accent); flex-shrink:0; }
.terminal-command { color:var(--ink); min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.terminal-command[data-typing=true]:after { content:'▌'; color:var(--accent); margin-left:2px; animation:terminal-caret .9s step-end infinite; }
.terminal-output { color:var(--muted); margin:7px 0 0 23px; font:inherit; font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }
#terminal-count { color:var(--accent); }
.terminal-footer { display:flex; justify-content:space-between; gap:16px; padding:16px 24px; border-top:1px solid var(--line); font:10px/1.8 var(--mono); color:var(--muted); }
.terminal-footer #boot-status { font:inherit; color:var(--accent); max-width:none; margin:0; }
@keyframes terminal-caret { 0%,50% { opacity:1; } 51%,100% { opacity:0; } }
@media(max-width:700px) {
 .terminal-window { padding:0; }
 .terminal-toolbar { padding:17px; gap:10px; font-size:11px; }
 .terminal-toolbar small { font-size:8px; letter-spacing:0; }
 .terminal-log { padding:22px 18px; min-height:330px; font-size:14px; }
 .terminal-output { font-size:13px; }
 .terminal-footer { padding:16px 18px; font-size:9px; }
}
