/* Shared Skyshot site foundations: homepage, technology page and desktop portal.
   A night-sky atlas (docs/LANDING.md): night blue, Hevelius parchment for labels and accents,
   serif headings. The panel's filter colours keep their meaning: sodium (the solution and the
   main action), OIII (verified, available now), H-alpha (red light). */
:root {
  --night: #050816;
  --ink: #070b1d;
  --glass: #0c1230;
  --rule: #1a2247;
  --rule-2: #29335f;
  --text: #edf1f8;
  --soft: #c9d1e3;
  --dim: #98a3c3;
  --faint: #66719a;
  --parchment: #e8d5ad;
  --sodium: #f2b35b;
  --sodium-dim: rgba(242, 179, 91, .14);
  --oiii: #62c6bd;
  --oiii-dim: rgba(98, 198, 189, .12);
  --star: #a9bedf;
  --ha: #e8695f;
  --f-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-cond: "Avenir Next Condensed", Bahnschrift, "DIN Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --f-display: Baskerville, "Baskerville Old Face", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --f-mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --bar: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--bar); }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.6 var(--f-ui);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: rgba(242, 179, 91, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--sodium); outline-offset: 3px; border-radius: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.cond { font-family: var(--f-cond); font-stretch: condensed; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--sodium); color: #1d1405; padding: 8px 12px; border-radius: 6px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }
.eyebrow {
  margin: 0;
  font: 500 11px/1.4 var(--f-mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--parchment);
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  height: var(--bar);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background-color .25s, border-color .25s;
}
.top.solid, .top.open { background: rgba(5, 8, 22, .88); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); border-bottom-color: var(--rule); }
.sym { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; color: var(--text); }
.brand .logo { flex: none; display: block; fill: currentColor; }
.brand span { font: 500 12px/1 var(--f-cond); font-stretch: condensed; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); padding-top: 3px; }
.links { display: flex; align-items: center; gap: 20px; }
.links a { text-decoration: none; color: var(--dim); font-size: 14px; white-space: nowrap; }
.links a:hover { color: var(--text); }
/* Technology and its related pages: a disclosure, so it works with a keyboard and without script */
.navdrop { position: relative; }
.navdrop summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 14px; white-space: nowrap; border-radius: 4px; }
.navdrop summary::-webkit-details-marker { display: none; }
.navdrop summary:hover, .navdrop[open] summary { color: var(--text); }
.navdrop .chev { transition: transform .2s; }
.navdrop[open] .chev { transform: rotate(180deg); }
.navdrop-menu {
  position: absolute; top: calc(100% + 16px); left: -16px; z-index: 40; min-width: 310px; padding: 8px;
  background: rgba(9, 13, 36, .97); border: 1px solid rgba(232, 213, 173, .18); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.links .navdrop-menu a { display: block; padding: 10px 12px; border-radius: 9px; color: var(--text); white-space: normal; }
.links .navdrop-menu a:hover, .links .navdrop-menu a:focus-visible { background: rgba(232, 213, 173, .07); }
.navdrop-menu b { display: block; font: 400 18px/1.25 var(--f-display); }
.navdrop-menu span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--dim); }
.navdrop-menu a[aria-current] b { color: var(--sodium); }
.links .site-desktop, .menu nav .site-desktop {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 7px;
  background: rgba(255, 255, 255, .025); color: var(--soft);
  font: 500 13px/1.3 var(--f-ui); white-space: nowrap; text-decoration: none;
}
.links .site-desktop:hover, .menu nav .site-desktop:hover { border-color: var(--faint); color: var(--text); }
.links .site-desktop[aria-current], .menu nav .site-desktop[aria-current] { color: var(--sodium); border-color: rgba(242, 179, 91, .4); background: rgba(242, 179, 91, .055); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 7px; overflow: hidden; height: 32px; }
.lang button { background: transparent; border: 0; color: var(--dim); padding: 0 10px; font: 600 11px var(--f-mono); letter-spacing: .06em; }
.lang button + button { border-left: 1px solid var(--rule-2); }
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { color: var(--sodium); background: var(--sodium-dim); }
.lang button:focus-visible { outline-offset: -2px; }
.redlight {
  height: 32px; padding: 0 11px; border-radius: 7px;
  border: 1px solid var(--rule-2); background: transparent; color: var(--dim);
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap;
}
.redlight:hover { color: var(--text); border-color: var(--faint); }
.redlight i { width: 9px; height: 9px; border-radius: 50%; background: var(--ha); box-shadow: 0 0 6px rgba(232, 105, 95, .6); }
.redlight[aria-pressed="true"] { color: var(--ha); border-color: var(--ha); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--f-ui); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn.primary { background: var(--sodium); color: #1d1405; box-shadow: 0 0 0 1px #f7c47b, 0 10px 34px rgba(242, 179, 91, .26); }
.btn.primary:hover { background: #f7c47b; }
.top .btn.primary { box-shadow: none; }
.btn.ghost { border-color: rgba(232, 213, 173, .32); background: rgba(5, 8, 22, .35); color: var(--text); }
.btn.ghost:hover { border-color: var(--parchment); }
.btn.discord { background: #5865f2; color: #fff; }
.btn.discord:hover { background: #4752c4; }
.top .btn.discord { padding: 0 10px; }
.top .discord-label { display: none; }
.top .btn.github { flex: none; width: 40px; padding: 0; border-color: var(--rule-2); color: var(--dim); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 7px; }
.btn .short { display: none; }
.menubtn {
  display: none; width: 38px; height: 34px; padding: 0; border-radius: 7px;
  border: 1px solid var(--rule-2); background: transparent; color: var(--text);
  align-items: center; justify-content: center;
}
.menubtn:hover { border-color: var(--dim); }
.menubtn[aria-expanded="true"] { background: var(--glass); }
.menu {
  position: absolute; left: 0; right: 0; top: var(--bar);
  background: rgba(5, 8, 22, .97); border-bottom: 1px solid var(--rule);
  padding: 4px var(--gutter) 22px;
  max-height: calc(100dvh - var(--bar)); overflow-y: auto; overscroll-behavior: contain;
}
.menu:focus { outline: none; } /* static programmatic focus target */
.menu nav a {
  display: block; padding: 13px 0; border-bottom: 1px solid var(--rule);
  font: 400 23px/1.2 var(--f-display); text-decoration: none;
}
.menu nav a:hover { color: var(--sodium); }
.menu nav .menu-sub { padding: 0 0 8px 18px; border-bottom: 1px solid var(--rule); }
.menu nav .menu-sub a { padding: 8px 0; border-bottom: 0; font-size: 18px; color: var(--soft); }
.menu nav .menu-sub a[aria-current] { color: var(--sodium); }
.menu nav .site-desktop { margin-top: 16px; min-height: 40px; padding: 0 14px; font-size: 15px; }
.menu-tools { display: none; gap: 10px; margin-top: 18px; }
.btn svg { flex: none; }

.wrap {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: 56px;
}
.wrap > .eyebrow { padding-top: 13px; }
h2 {
  margin: 0 0 20px; max-width: 19ch;
  font: 400 clamp(36px, 4.4vw, 64px)/1.03 var(--f-display);
  letter-spacing: -.012em;
  text-wrap: balance;
}
h3 {
  margin: 0 0 10px;
  font: 400 25px/1.2 var(--f-display);
}
.sub { margin: 0; max-width: 40em; font-size: 18px; color: var(--dim); }

.foot { border-top: 1px solid var(--rule); padding: 44px 0 60px; font-size: 14px; color: var(--dim); }
.foot .wrap { row-gap: 16px; }
.foot-id { grid-row: 1 / span 2; }
.foot .who { margin: 12px 0 0; font-size: 13px; line-height: 1.7; color: var(--dim); }
.foot .who a { color: var(--soft); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.foot .who a:hover { color: var(--text); border-color: var(--dim); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--text); }
.foot .discord-link { display: inline-flex; align-items: center; gap: 8px; }
.foot .credit { margin: 0; grid-column: 2; font-size: 13px; color: var(--dim); max-width: 60em; }
.foot .credit b { font-weight: 600; color: var(--soft); }

/* red light: everything to luminance, then multiplied by red (as in the panel) */
#veil { position: fixed; inset: 0; background: #ff1a00; mix-blend-mode: multiply; pointer-events: none; z-index: 100; display: none; }
body.night .page { filter: grayscale(1) brightness(.9); }
body.night #veil { display: block; }

/* Shared navigation and footer breakpoints. */
@media (min-width: 1560px) {
  .top .discord-label { display: inline; }
}
@media (max-width: 1199px) {
  .links { display: none; }
  .menubtn { display: inline-flex; }
}
@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .wrap > .eyebrow { padding: 0 0 16px; }
  .foot .credit { grid-column: 1; }
  .foot-id { grid-row: auto; }
}
@media (max-width: 700px) {
  .tools > .lang, .tools > .redlight { display: none; }
  .top .btn.github { display: none; } /* Source remains linked from Technology. */
  .menu-tools { display: flex; }
}
@media (max-width: 560px) {
  .top .brand span { display: none; }
  .btn .long { display: none; }
  .btn .short { display: inline; }
  .tools { gap: 8px; }
  .top { gap: 12px; }
}
@media (max-width: 380px) {
  .top .brand .logo { width: 90px; height: auto; }
  .tools { gap: 6px; }
  .top .btn.discord { padding: 0 6px; }
  .top .btn.github, .menubtn { width: 34px; }
  .top .btn.primary { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .top, .btn { transition: none; }
}
