@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&family=Manrope:wght@200;300;400;500&display=swap');

:root {
  color-scheme: dark;
  font-family: 'DM Sans', 'Apple SD Gothic Neo', sans-serif;
  font-synthesis: none;
  --ink: #030405;
  --silver: #dce3ed;
  --crt-green: #78eaa0;
  --star-x: 23%;
  --star-y: 31%;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--ink); }
body { height: 100svh; min-height: 420px; overflow: hidden; color: var(--silver); -webkit-font-smoothing: antialiased; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 1px solid #dce3edaa; outline-offset: 7px; }
button:disabled { cursor: default; }
.universe, .deep-space, #starfield, .vignette, .passage-flash { position: absolute; inset: 0; width: 100%; height: 100%; }
.universe { overflow: hidden; pointer-events: none; }
.deep-space {
  background-image: url('/assets/event-horizon.png');
  background-position: center;
  background-size: cover;
  opacity: .78;
  transform: scale(1.025);
  transform-origin: 68% 49%;
  transition: opacity 2.5s ease, filter 3s ease;
  will-change: transform;
}
#starfield { z-index: 1; }
html[data-renderer="three-webgl"] .deep-space { visibility: hidden; }
.vignette { z-index: 2; background: radial-gradient(ellipse at 55% 48%, transparent 30%, #02030555 72%, #020305b0 100%); }
.passage-flash { position: fixed; z-index: 100; opacity: 0; background: #000; pointer-events: none; }
.masthead { position: absolute; z-index: 5; left: 43px; right: 43px; top: 35px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; color: #cbd1da8a; text-decoration: none; font-size: 12px; font-weight: 400; letter-spacing: .31em; }
.entry { position: absolute; inset: 0; z-index: 4; }
.login { position: absolute; left: calc(var(--star-x) - 142px); top: calc(var(--star-y) - 31px); width: 96px; display: flex; align-items: center; transition: opacity .5s ease, transform .5s ease, filter .5s ease; }
.login-fields { flex: 1; min-width: 0; }
.field { display: block; margin: 0; }
.field + .field { margin-top: 10px; }
.field input { display: block; width: 100%; height: 29px; border: 0; border-bottom: 1px solid #c8d3e62b; outline: none; padding: 3px 0 7px 1px; border-radius: 0; background: transparent; color: var(--crt-green); font-size: 9px; font-weight: 300; letter-spacing: .26em; caret-color: var(--crt-green); text-shadow: 0 0 5px #78eaa033; transition: border-color .45s, text-shadow .45s; }
.field input::placeholder { color: #bdc9df7d; opacity: 1; font: inherit; letter-spacing: inherit; text-shadow: none; }
.field input:hover { border-bottom-color: #c8d3e663; }
.field input:focus { border-bottom-color: #e2ebf1a1; text-shadow: 0 0 7px #78eaa055; }
.field input:-webkit-autofill, .field input:-webkit-autofill:hover, .field input:-webkit-autofill:focus { -webkit-text-fill-color: var(--crt-green); transition: background-color 9999s ease-out; }
.star-portal { position: absolute; left: calc(var(--star-x) - 32px); top: calc(var(--star-y) - 52px); width: 64px; height: 104px; padding: 0; border: 0; background: transparent; border-radius: 50%; }
.star-portal:focus-visible { outline: 1px solid #dce8ff55; outline-offset: 5px; }
body:not([data-phase="idle"]) .star-portal { pointer-events: none; }
body[data-phase="failure"] .field input { animation: rejected-light .95s ease-out; }
@keyframes rejected-light {
  0%, 100% { border-bottom-color: #c8d3e62b; box-shadow: 0 3px 9px -6px transparent; }
  25%, 50% { border-bottom-color: #d9b78599; box-shadow: 0 3px 9px -6px #dbb37f88; }
}
.home { position: absolute; z-index: 4; inset: 0; opacity: 0; transition: opacity 1.8s ease; }
.home[hidden] { display: none; }
body[data-phase="ignition"] .login, body[data-phase="flight"] .login, body[data-phase="arrival"] .login, body[data-phase="home"] .login { opacity: 0; transform: translateY(-4px); filter: blur(4px); pointer-events: none; }
body[data-phase="home"] .home { opacity: 1; }
body[data-phase="arrival"], body[data-phase="home"] { background: #000; }
body[data-phase="arrival"] .universe, body[data-phase="home"] .universe,
body[data-phase="arrival"] .masthead { visibility: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (min-width: 1800px) { :root { --star-x: 22%; } }
@media (max-width: 700px) {
  :root { --star-x: 43%; --star-y: 28%; }
  body { min-height: 480px; }
  .masthead { left: 24px; right: 24px; top: 27px; }
  .wordmark { font-size: 11px; }
  .deep-space { background-size: auto 78%; background-repeat: no-repeat; background-position: 63% 82%; transform-origin: 66% 62%; }
  .login { left: calc(var(--star-x) - 121px); width: 88px; }
  /* Keep a 16px layout font for iPhone focus; render it at the same 9px as desktop. */
  .field { height: 32px; --input-scale: .5625; }
  .field input { font-size: 16px; width: calc(100% / var(--input-scale)); height: calc(32px / var(--input-scale)); padding: calc(3px / var(--input-scale)) 0 calc(7px / var(--input-scale)) calc(1px / var(--input-scale)); border-bottom-width: calc(1px / var(--input-scale)); transform: scale(var(--input-scale)); transform-origin: top left; }
  .field input::placeholder { font-size: inherit; }

}
@media (max-height: 520px) and (min-width: 701px) { :root { --star-y: 40%; } .masthead { top: 23px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .15s !important; animation-duration: .15s !important; } }
