/* Public pages: the Sagittarius sky (/), /about and /who-are-we, plus the account chip when signed in.
   Positions and colours that change at runtime are set by src/client/*. */

html, body { margin: 0; background: #07080A; }
a { color: #7D8391; }
a:hover { color: #D5D9E2; }

.sg-root, .sg-page {
  background: #07080A;
  color: #7D8391;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.sg-root { position: relative; width: 100%; height: 100vh; min-height: 640px; overflow: hidden; }
.sg-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Constellation */
.sg-node {
  position: absolute; border-radius: 50%; transform: translate(-50%, -50%);
  background: #59606D; box-shadow: 0 0 2px #59606D; pointer-events: none;
  transition: background .6s, box-shadow .6s;
}
.sg-pulse {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; transform: translate(-50%, -50%);
  background: #AEB8CC; box-shadow: 0 0 8px #AEB8CC; pointer-events: none;
}
.sg-term {
  position: absolute; white-space: nowrap; padding: 12px 0; color: #7D8391; text-decoration: none;
  animation: sg-in 1.6s ease-out both; transition: color .6s;
}
.sg-term-left { transform: translate(calc(-100% - 14px), -50%); }
.sg-term-right { transform: translate(14px, -50%); }
.sg-term.is-lit { color: #D5D9E2; }
.sg-term:hover, .sg-term:focus-visible { color: #E4E7EE !important; }
.sg-term:focus-visible { outline: 1px solid #7D8391; outline-offset: 4px; }

/* Effects */
.sg-shoot-wrap { position: absolute; width: 0; height: 0; pointer-events: none; }
.sg-shoot {
  position: absolute; left: 0; top: 0; height: 1px; border-radius: 1px;
  background: linear-gradient(to right, rgba(220, 228, 245, 0), rgba(220, 228, 245, 0.8));
  animation: sg-shoot 1.1s ease-out forwards;
}
.sg-ripple {
  position: absolute; border: 1px solid #4A505C; border-radius: 50%; transform: translate(-50%, -50%);
  pointer-events: none; animation: sg-ripple 1.4s ease-out forwards;
}

/* Chrome */
.sg-wordmark {
  position: absolute; left: 24px; top: 20px; height: 44px; display: flex; align-items: center;
  font-size: 11px; letter-spacing: 0.24em; color: #7D8391; text-decoration: none;
}
.sg-key, .sg-key:hover {
  position: absolute; top: 20px; right: 20px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; color: #5C626F;
}
.sg-key-label { position: absolute; top: 44px; right: 0; width: 160px; text-align: right; font-size: 12px; line-height: 1.6; color: #9CA3B2; }
.sg-key.is-all, .sg-key.is-all:hover { color: #D5D9E2; }
.sg-key:focus-visible, .sg-wordmark:focus-visible { outline: 1px solid #7D8391; outline-offset: 4px; }

/* Bouncer */
.sg-form {
  position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%);
  width: min(400px, 86vw); display: flex; flex-direction: column; gap: 10px; margin: 0;
}
.sg-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #1C1F26; }
.sg-row:focus-within { border-bottom-color: #4A505C; }
.sg-label { font-size: 13px; letter-spacing: 0.1em; color: #2E333C; white-space: nowrap; }
.sg-field { position: relative; flex: 1; min-width: 0; display: flex; }
.sg-in {
  flex: 1; min-width: 0; background: transparent; border: 0; color: #C9CDD6; caret-color: #8A91A0;
  font: inherit; font-size: 14px; letter-spacing: 0.02em; padding: 10px 0; border-radius: 0;
}
.sg-in:focus { outline: none; }
.sg-caret {
  position: absolute; left: 1px; top: 50%; width: 1px; height: 15px; margin-top: -8px;
  background: #8A91A0; pointer-events: none; animation: sg-caret 2.8s ease-in-out infinite;
}
.sg-caret[hidden] { display: none; }
.sg-reply-slot { min-height: 1.7em; max-height: 28vh; overflow-y: auto; overflow-wrap: anywhere; }
.sg-hodor-controls { display: flex; align-items: center; gap: 10px; color: #7D8391; font-size: 11px; line-height: 1.4; }
.sg-hodor-controls button { background: none; color: #C9CDD6; border: 1px solid #4A505C; font: inherit; cursor: pointer; padding: 3px 8px; }
.sg-hodor-controls button[hidden] { display: none; }
.sg-reply { margin: 0; color: #9AA0AD; font-size: 13px; letter-spacing: 0.03em; animation: sg-in 1.2s ease-out both; }

/* Account chip (packages/browser-session markup), shown when signed in */
.aa-account-chip { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 16px; color: #5C626F; }
.aa-account-chip__account { color: #AEB5C2; }
.aa-account-chip__login { overflow-wrap: anywhere; }
.aa-account-chip__switch { color: #7D8391; text-underline-offset: 3px; }
.aa-account-chip__signout { margin: 0; }
.aa-account-chip__signout button {
  background: transparent; border: 0; padding: 0; color: #7D8391; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.aa-account-chip__switch:hover, .aa-account-chip__signout button:hover { color: #D5D9E2; }
.aa-account-chip a:focus-visible, .aa-account-chip button:focus-visible { outline: 1px solid #7D8391; outline-offset: 4px; }
.sg-root .aa-account-chip { position: absolute; top: 20px; right: 76px; min-height: 44px; max-width: calc(100% - 260px); }

@media (max-width: 640px) {
  .sg-root .aa-account-chip { top: 68px; right: 20px; min-height: 0; max-width: calc(100% - 40px); }
}

/* /about and /who-are-we */
.sg-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.sg-signin { text-underline-offset: 3px; }
.sg-page { min-height: 100vh; box-sizing: border-box; padding: 20px 24px 96px; }
.sg-page .sg-wordmark { position: static; display: inline-flex; }
.sg-page main { max-width: 34rem; margin: 18vh auto 0; }
.sg-page h1 { font-size: 11px; font-weight: 300; letter-spacing: 0.24em; color: #4A505C; margin: 0 0 4rem; }
.sg-page h2 { font-size: 13px; font-weight: 400; letter-spacing: 0.06em; color: #AEB5C2; margin: 0 0 0.9rem; }
.sg-page section { margin: 0 0 3.5rem; scroll-margin-top: 18vh; }
.sg-page .sg-vision-divider { border: 0; border-top: 1px solid #3A414D; margin: 0 0 3.5rem; }
.sg-page section:target h2 { color: #E4E7EE; }
.sg-page p { font-size: 13px; line-height: 1.8; color: #7D8391; margin: 0 0 1rem; }
.sg-page p a, .sg-page h2 a { color: #AEB5C2; text-underline-offset: 3px; }
.sg-page p a:hover, .sg-page h2 a:hover { color: #E4E7EE; }
.sg-page a:focus-visible { outline: 1px solid #7D8391; outline-offset: 4px; }
.sg-back { display: inline-block; margin-top: 2rem; }

@keyframes sg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sg-caret { 0%, 100% { opacity: .08; } 50% { opacity: .6; } }
@keyframes sg-shoot { 0% { transform: translateX(-60px); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateX(380px); opacity: 0; } }
@keyframes sg-ripple { from { opacity: .9; width: 6px; height: 6px; } to { opacity: 0; width: 200px; height: 200px; } }

@media (prefers-reduced-motion: reduce) {
  .sg-term, .sg-reply, .sg-caret { animation: none; }
  .sg-caret { opacity: .4; }
  .sg-ripple, .sg-shoot { display: none; }
}
