/* SPOT - Sky Patches Over Time. Written with AI assistance under the direction of Ali (team AITHMAC). */
@font-face { font-family: "Plex"; src: url("fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
:root {
  --ink: #000000; --ink2: #000000; --sky: #000000; --steel: rgba(255,255,255,.65); --haze: rgba(255,255,255,.65); --mist: #FFFFFF; --ember: #FE5101;
  --d1: #FFFFFF; --d2: color-mix(in srgb, #FE5101 20%, #FFFFFF); --d3: color-mix(in srgb, #FE5101 40%, #FFFFFF); --d4: color-mix(in srgb, #FE5101 60%, #FFFFFF); --d5: color-mix(in srgb, #FE5101 80%, #FFFFFF); --d6: #FE5101; --sim: #FFFFFF;
  --line: rgba(255,255,255,.3); --r: 6px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body { margin: 0; background: var(--ink); color: var(--mist); font: 400 16px/1.5 "Plex", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--haze); text-underline-offset: 3px; } a:hover { color: var(--mist); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--ink2); padding: 8px; z-index: 9; }
:focus-visible { outline: 2px solid var(--mist); outline-offset: 2px; }
.muted { color: var(--haze); } .small { font-size: 14px; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; } h2 { font-size: 28px; margin: 48px 0 12px; } h3 { font-size: 20px; margin: 24px 0 8px; }

/* app bar */
.top { display: flex; align-items: center; gap: 16px 24px; padding: 12px 16px; background: var(--ink2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 28px; width: auto; display: block; }
.brand h1 { position: absolute; left: -9999px; }
.topnav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; } .topnav a { text-decoration: none; color: var(--haze); padding: 8px 0; } .topnav a:hover { color: var(--mist); }
main { max-width: 1280px; margin: 0 auto; padding: 0 16px 48px; }

/* hero */
.hero { position: relative; margin: 0 -16px; background: var(--sky); border-bottom: 1px solid var(--line); }
#heroCv { width: 100%; height: min(62vh, 560px); display: block; image-rendering: pixelated; cursor: pointer; }
.heroText { position: absolute; left: 16px; bottom: 16px; right: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px; pointer-events: none; }
.heroText p { margin: 0; font-size: 28px; font-weight: 600; text-shadow: 0 1px 3px #000; }
.heroCap { font-size: 12px; color: var(--haze); text-shadow: 0 1px 2px #000; max-width: 420px; text-align: right; }
.heroPlay { position: absolute; top: 12px; right: 12px; }

/* search */
.coords { margin-top: 24px; }
.coordform { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.coordform label { display: flex; flex-direction: column; font-size: 14px; color: var(--haze); gap: 4px; }
input, select { background: var(--ink); color: var(--mist); border: 1px solid var(--steel); border-radius: var(--r); padding: 10px 12px; font: inherit; min-height: 44px; }
input:hover, select:hover { border-color: var(--haze); }
.coordform input { width: 220px; max-width: 100%; }
.btn { background: transparent; color: var(--mist); border: 1px solid var(--steel); border-radius: var(--r); padding: 10px 16px; font: inherit; min-height: 44px; cursor: pointer; }
.btn:hover { border-color: var(--haze); } .btn:active { background: var(--ink2); } .btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--ember); color: var(--ink); border-color: var(--ember); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.msg { min-height: 1.5em; color: var(--haze); }
.liveopts { margin-top: 8px; } .liveopts summary { cursor: pointer; color: var(--haze); font-size: 14px; min-height: 32px; }
#liveDets { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: center; }
.livebox { margin-top: 8px; } .progress { height: 4px; background: var(--ink2); } .progress > div { height: 100%; background: var(--ember); width: 0; }

/* film strip of targets */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card { background: transparent; border: 0; padding: 0; text-align: left; color: var(--mist); cursor: pointer; font: inherit; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
.card img { width: 100%; aspect-ratio: 1; display: block; image-rendering: pixelated; background: var(--sky); border: 1px solid var(--line); }
.card:hover img, .card:focus-visible img { border-color: var(--haze); }
.card h3 { font-size: 16px; margin: 8px 0 2px; } .card p { margin: 0; font-size: 14px; color: var(--haze); }
.badge { font-size: 14px; color: var(--haze); }
.badge.mover::before { content: "● "; color: var(--ember); }

/* viewer */
.viewer { margin-top: 32px; }
.vhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; } .vhead h2 { margin: 0; }
.hook { color: var(--haze); max-width: 70ch; margin: 4px 0 16px; }
.vgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .vgrid { grid-template-columns: 1fr; } }
.stagewrap { position: relative; }
.stage { position: relative; width: 100%; aspect-ratio: 1; background: var(--sky); overflow: hidden; touch-action: manipulation; }
#cv { width: 100%; height: 100%; display: block; image-rendering: pixelated; cursor: crosshair; }
.stagePlay { position: absolute; left: 8px; bottom: 8px; z-index: 2; background: rgba(0,0,0,.75); }
.swipehandle { position: absolute; top: 0; bottom: 0; width: 44px; margin-left: -22px; cursor: ew-resize; touch-action: none; }
.swipehandle::after { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--ember); }
.simbanner { background: repeating-linear-gradient(-45deg, #000000 0 6px, rgba(255,255,255,.3) 6px 8px); color: #FFFFFF; border: 1px solid #FFFFFF; font-weight: 600; text-align: center; padding: 6px; text-shadow: 0 0 3px #000000, 0 0 3px #000000; }
.framebar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.framelabel { font-weight: 600; }
.readout { font-size: 14px; color: var(--haze); min-height: 1.5em; }
.legend { color: var(--haze); margin-top: 4px; font-size: 14px; }
.viewtools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 8px; font-size: 14px; color: var(--haze); }
.viewtools input[type=range] { width: 110px; min-height: 32px; padding: 0; border: 0; background: transparent; accent-color: var(--ember); }
.controls .group { border-top: 1px solid var(--line); padding: 16px 0; }
.controls .group:first-child { border-top: 0; padding-top: 0; }
.controls h3 { font-size: 16px; margin: 0 0 8px; color: var(--haze); font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { background: transparent; color: var(--mist); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; min-height: 44px; font: inherit; font-size: 15px; cursor: pointer; }
.seg button:hover { border-color: var(--steel); }
.seg button[aria-checked="true"] { background: var(--ember); color: var(--ink); border-color: var(--ember); font-weight: 600; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
/* wavelength ruler */
.ruler { margin-top: 12px; }
.rulerbar { display: flex; height: 44px; }
.rulerbar button { border: 0; border-radius: 0; padding: 0; min-height: 44px; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink); font-weight: 600; position: relative; outline-offset: -3px; }
.rulerbar button[aria-pressed="true"] { outline: 3px solid var(--mist); z-index: 1; }
.rulerbar button[disabled] { opacity: .3; cursor: not-allowed; }
.rulerscale { position: relative; height: 18px; font-size: 12px; color: var(--haze); margin-top: 2px; border-top: 1px solid var(--line); }
.rulerscale span { position: absolute; top: 0; transform: translateX(-50%); padding-top: 3px; white-space: nowrap; }
.rulerscale span::before { content: ""; position: absolute; left: 50%; top: -1px; height: 4px; border-left: 1px solid var(--haze); }
.rulerscale span:last-child { transform: translateX(-100%); } .rulerscale span:last-child::before { left: auto; right: 0; }
.chanbtns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chanbtns button { background: transparent; color: var(--mist); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; min-height: 40px; font: inherit; font-size: 14px; cursor: pointer; }
.chanbtns button[aria-pressed="true"] { border-color: var(--mist); }
.epochrow { display: flex; gap: 8px; flex-wrap: wrap; } .epochrow label { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--haze); }
.epochrow select { max-width: 100%; }
.timeline { display: flex; gap: 8px; align-items: center; margin: 8px 0; } .timeline input { flex: 1; min-height: 44px; padding: 0; border: 0; background: transparent; accent-color: var(--ember); }
.chk { display: flex; gap: 8px; align-items: center; min-height: 36px; font-size: 15px; }
.chk input { width: 20px; height: 20px; min-height: 0; accent-color: var(--ember); }
/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; border-bottom: 1px solid var(--line); margin-top: 32px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--haze); font: inherit; padding: 12px 0; cursor: pointer; min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--mist); border-bottom-color: var(--ember); font-weight: 600; }
.tabpanel { padding: 16px 0; } .tabpanel[hidden] { display: none; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; white-space: nowrap; }
th { color: var(--haze); font-weight: 600; }
.note { border-left: 2px solid var(--ember); padding: 4px 16px; margin-top: 16px; }
.note h3 { margin-top: 0; font-size: 16px; }
.simtag { display: inline-block; background: repeating-linear-gradient(-45deg, #000000 0 4px, rgba(255,255,255,.3) 4px 6px); color: #FFFFFF; border: 1px solid #FFFFFF; font-weight: 600; font-size: 13px; padding: 0 6px; border-radius: 3px; }
#spec svg, #lc svg { width: 100%; height: auto; display: block; }
.planetx input[type=range] { width: 100%; accent-color: var(--ember); padding: 0; border: 0; min-height: 32px; }
.about { max-width: 70ch; } .about h3 { color: var(--mist); }
.foot { border-top: 1px solid var(--line); padding: 24px 16px; color: var(--haze); font-size: 14px; max-width: 1280px; margin: 0 auto; }
@media (max-width: 600px) { .heroText p { font-size: 20px; } #heroCv { height: 52vh; } .topnav { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
/* Lenis (landing page smooth scroll) */
html.lenis, html.lenis body { height: auto; } .lenis.lenis-smooth { scroll-behavior: auto !important; } .lenis.lenis-stopped { overflow: hidden; } [data-lenis-prevent] { overscroll-behavior: contain; }

/* round 3: friendlier controls, button motion, 3D globe */
.sky { margin-top: 48px; }
#globe { width: 100%; height: min(70vw, 460px); display: block; cursor: grab; touch-action: none; border-radius: 12px; }
#globe:active { cursor: grabbing; }
details.more > summary, #aboutDetails > summary { cursor: pointer; list-style: none; color: var(--haze); min-height: 44px; display: flex; align-items: center; gap: 8px; }
details.more > summary::before, #aboutDetails > summary::before { content: "+"; color: var(--ember); font-weight: 600; width: 1em; }
details[open].more > summary::before, #aboutDetails[open] > summary::before { content: "−"; }
details.more > summary h3, #aboutDetails > summary h2 { display: inline; margin: 0; }
details.more > summary::-webkit-details-marker, #aboutDetails > summary::-webkit-details-marker { display: none; }
.btn, .seg button, .chanbtns button, .rulerbar button, .tabs button, .card { transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; will-change: transform; }
.btn:hover, .seg button:hover, .chanbtns button:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.65), 0 6px 20px rgba(254,81,1,.18); }
.btn.primary:hover { box-shadow: 0 8px 28px rgba(254,81,1,.45); }
.btn:active, .seg button:active, .chanbtns button:active, .rulerbar button:active, .tabs button:active { transform: scale(.95); }
.card { border-radius: 10px; transform-style: preserve-3d; }
.card img { border-radius: 10px; transition: border-color .2s ease, box-shadow .2s ease; }
.card:hover img { box-shadow: 0 14px 34px rgba(254,81,1,.25); border-color: #FE5101; }
.btn, .seg button, .chanbtns button, input, select { border-radius: 999px; }
.rulerbar button { border-radius: 0; }
@media (prefers-reduced-motion: reduce) { .btn:active, .seg button:active, .chanbtns button:active, .rulerbar button:active, .tabs button:active { transform: none; } }
.cap-viewer .top, .cap-viewer .hero, .cap-viewer .coords, .cap-viewer #sky, .cap-viewer #fields, .cap-tab .top, .cap-tab .hero, .cap-tab .coords, .cap-tab #sky, .cap-tab #fields, .cap-tab .vgrid { display: none !important; }
.cap-viewer .viewer, .cap-tab .viewer { margin-top: 12px; }
.cap-globe .top, .cap-globe .hero, .cap-globe .coords { display: none !important; }

/* space theme */
html { background: #000000; } body { background: transparent; }
.starfield { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
.top { background: rgba(0,0,0,.88); position: sticky; top: 0; z-index: 20; }
.scrollbar { position: fixed; left: 0; top: 0; height: 2px; width: 100%; background: #FE5101; transform-origin: 0 50%; transform: scaleX(0); z-index: 40; pointer-events: none; }
h2 .w { display: inline-block; overflow: hidden; vertical-align: top; } h2 .w > span { display: inline-block; }
.cur-dot, .cur-ring { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 70; border-radius: 50%; opacity: 0; transition: opacity .2s ease, width .25s ease, height .25s ease, margin .25s ease, border-color .25s ease, background-color .25s ease; }
.cur-on .cur-dot, .cur-on .cur-ring { opacity: 1; }
.cur-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #FE5101; }
.cur-ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(255,255,255,.65); }
.cur-ring.hot { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: #FE5101; background: rgba(254,81,1,.08); }
.cur-hide .cur-dot, .cur-hide .cur-ring { opacity: 0; }
.cards .card, .controls, .tabpanel, .about, .coords, .sky { position: relative; }
.madeby { margin-top: 8px; color: #FFFFFF; letter-spacing: .02em; }
.madeby strong { color: #FE5101; }
.btn.primary { background: linear-gradient(120deg, #FE5101, #FE5101 40%, rgba(255,255,255,.85) 50%, #FE5101 60%) 0 0 / 300% 100%; }
.btn.primary:hover { animation: sheen 1.1s ease forwards; }
@keyframes sheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .btn.primary:hover { animation: none; } }
main section, #viewer, #tabs { scroll-margin-top: 64px; }
