@import url('fonts/fonts.css');

/* ══════════════════════════════════════════════════════════════════
   Tokens
   The system is warm-black rather than blue-black: this is space seen
   through a brass instrument, not through a spaceship window.
   ══════════════════════════════════════════════════════════════════ */
:root {
  --void:      #0a0908;
  --deep:      #17130f;
  --raise:     #201a15;
  --bone:      #f0eee6;
  --bone-soft: #cfc8bd;
  --dim:       #8a7f76;
  --dimmer:    #5b534c;
  --hair:      rgba(240, 238, 230, 0.13);
  --hair-soft: rgba(240, 238, 230, 0.07);

  /* Re-pointed at the active world's hue on descent. */
  --accent:     #d97757;
  --accent-dim: #6b3325;

  --display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --body:    'Sora', 'Helvetica Neue', Arial, sans-serif;
  --mono:    'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io:   cubic-bezier(0.65, 0, 0.35, 1);

  --gut: clamp(1.25rem, 3.2vw, 2.75rem);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body {
  overflow: hidden;
  cursor: default;
}
body[data-mode='chart'] { cursor: grab; }
body[data-mode='chart'].is-dragging { cursor: grabbing; }
body[data-mode='chart'].is-over-world { cursor: pointer; }

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* ── Atmosphere overlays ─────────────────────────────────────────── */
.overlay-grain,
.overlay-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 4; }

.overlay-grain {
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.overlay-vignette {
  background:
    radial-gradient(130% 100% at 50% 50%, transparent 42%, rgba(10, 9, 8, 0.55) 100%),
    linear-gradient(to bottom, rgba(10, 9, 8, 0.4), transparent 18%, transparent 82%, rgba(10, 9, 8, 0.5));
}

/* Once you have landed, the world's hue washes the whole frame. */
.overlay-wash {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(120% 90% at 68% 46%, var(--accent), transparent 62%);
  transition: opacity 1.6s var(--ease), background 1.2s var(--ease);
}
body[data-mode='world'] .overlay-wash,
body[data-mode='transit'] .overlay-wash { opacity: 0.11; }

/* Keeps the console legible when the world behind it is bright. */
.overlay-scrim {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    100deg,
    rgba(8, 7, 6, 0.97) 0%,
    rgba(8, 7, 6, 0.93) 28%,
    rgba(8, 7, 6, 0.66) 46%,
    rgba(8, 7, 6, 0.22) 58%,
    transparent 68%
  );
  transition: opacity 1.2s var(--ease);
}
body[data-mode='world'] .overlay-scrim { opacity: 1; }
body[data-mode='transit'] .overlay-scrim { opacity: 0.7; }

/* Atmospheric entry. Driven frame by frame during a descent. */
#entry-flash {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(90% 70% at 50% 55%, var(--accent), transparent 70%),
    linear-gradient(to top, var(--accent), transparent 55%);
  mix-blend-mode: screen;
  transition: opacity 0.9s var(--ease);
}

/* ── HUD scaffolding ─────────────────────────────────────────────── */
.hud {
  position: fixed;
  z-index: 6;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.hud--chart { opacity: 0; pointer-events: none; }
body[data-mode='chart'] .hud--chart { opacity: 1; }
body[data-mode='chart'] #index,
body[data-mode='chart'] #brand { pointer-events: auto; }

.hud--world { opacity: 0; pointer-events: none; }
body[data-mode='world'] .hud--world { opacity: 1; pointer-events: auto; }

/* ── Brand ───────────────────────────────────────────────────────── */
#brand {
  top: var(--gut);
  left: var(--gut);
  max-width: 15rem;
}
body[data-mode='transit'] #brand,
body[data-mode='world'] #brand { transform: translateY(-0.5rem); }

.brand__eyebrow {
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.brand__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 0.9;
  letter-spacing: -0.01em;
}
.brand__sub {
  margin: 0.5rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hair);
  font-family: var(--display);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--bone-soft);
}

/* ── Reticle ─────────────────────────────────────────────────────── */
#reticle {
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  opacity: 0;
}
body[data-mode='chart'] #reticle { opacity: 0.4; }
body[data-mode='chart'].is-over-world #reticle { opacity: 1; }

#reticle svg { display: block; overflow: visible; }
.reticle__ring {
  fill: none;
  stroke: var(--bone);
  stroke-width: 1;
  opacity: 0.5;
  transform-origin: 60px 60px;
  transition: r 0.35s var(--ease), stroke 0.35s var(--ease), opacity 0.35s var(--ease);
}
.reticle__tick {
  stroke: var(--bone);
  stroke-width: 1;
  opacity: 0.35;
  transition: opacity 0.35s var(--ease);
}
body.is-over-world .reticle__ring { r: 40; stroke: var(--accent); opacity: 1; }
body.is-over-world .reticle__tick { opacity: 0; }

.reticle__readout {
  position: absolute;
  top: calc(50% + 3.4rem);
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
body.is-over-world .reticle__readout { opacity: 1; }

/* ── Telemetry ───────────────────────────────────────────────────── */
#telemetry {
  left: var(--gut);
  bottom: var(--gut);
  width: 11rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  color: var(--dimmer);
}
.tel__row { display: flex; justify-content: space-between; padding: 0.2rem 0; }
.tel__key { text-transform: uppercase; letter-spacing: 0.2em; }
.tel__val { color: var(--dim); font-variant-numeric: tabular-nums; }
.tel__bar {
  margin-top: 0.45rem;
  height: 1px;
  background: var(--hair-soft);
  position: relative;
  overflow: hidden;
}
.tel__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--accent);
  transition: width 0.12s linear;
}

/* ── Destination index ───────────────────────────────────────────── */
#index {
  right: var(--gut);
  bottom: var(--gut);
  width: min(19rem, 42vw);
  text-align: right;
}
.index__head {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dimmer);
}
#index ul { list-style: none; margin: 0; padding: 0; }
#index li { border-top: 1px solid var(--hair-soft); }
#index li:last-child { border-bottom: 1px solid var(--hair-soft); }

.dest {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.7rem;
  width: 100%;
  padding: 0.5rem 0;
  text-align: right;
  transition: color 0.25s var(--ease), padding 0.35s var(--ease);
}
.dest__num {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  color: var(--dimmer);
  transition: color 0.25s var(--ease);
}
.dest__name {
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1;
}
.dest__feature {
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--dim);
  letter-spacing: 0.01em;
  transition: color 0.25s var(--ease);
}
.dest__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--d);
  opacity: 0.65;
  transition: opacity 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.dest:hover, .dest:focus-visible { padding-right: 0.35rem; }
.dest:hover .dest__num,
.dest:focus-visible .dest__num { color: var(--d); }
.dest:hover .dest__feature,
.dest:focus-visible .dest__feature { color: var(--bone-soft); }
.dest:hover .dest__dot,
.dest:focus-visible .dest__dot { opacity: 1; box-shadow: 0 0 10px var(--d); }
.dest.is-live .dest__name { color: var(--d); }

/* ── Control legend ──────────────────────────────────────────────── */
#controls {
  left: 50%;
  bottom: var(--gut);
  translate: -50% 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  color: var(--dimmer);
  transition: opacity 0.9s var(--ease);
}
body[data-mode='chart'].has-flown #controls { opacity: 0.28; }
#controls p { margin: 0.24rem 0; }
kbd {
  font-family: inherit;
  font-size: 0.9em;
  padding: 0.1em 0.34em;
  margin-right: 0.14em;
  border: 1px solid var(--hair);
  border-radius: 2px;
  color: var(--dim);
}

/* ── Projected planet annotations ────────────────────────────────── */
#markers { position: fixed; inset: 0; z-index: 5; pointer-events: none; }

.marker {
  position: absolute;
  top: 0; left: 0;
  will-change: transform, opacity;
  transition: opacity 0.4s var(--ease);
}
.marker__stem {
  position: absolute;
  left: 0; bottom: 0;
  width: 1px;
  height: 34px;
  background: linear-gradient(to top, transparent, var(--d));
  opacity: 0.5;
}
.marker__body {
  position: absolute;
  left: 9px;
  bottom: 32px;
  white-space: nowrap;
  padding-left: 0.55rem;
  border-left: 1px solid var(--d);
}
.marker__desig {
  display: block;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--d);
  opacity: 0.85;
}
.marker__name {
  display: block;
  font-family: var(--display);
  font-size: 1.125rem;
  line-height: 1.1;
  color: var(--bone);
}
.marker__feature {
  display: block;
  font-size: 0.625rem;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.marker.is-hot .marker__stem { opacity: 1; }
.marker.is-hot .marker__feature { color: var(--bone-soft); }

/* ══════════════════════════════════════════════════════════════════
   World mode — the console
   A single instrument panel you step through, one reading at a time.
   Chamfered on two corners, bracketed on the other two, so it reads as
   hardware bolted to the viewport rather than a card floating over it.
   ══════════════════════════════════════════════════════════════════ */
#world { inset: 0; }

#return {
  position: absolute;
  left: var(--gut);
  top: max(var(--gut), calc(50% - 24rem));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem 0.45rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--hair);
  background: rgba(10, 9, 8, 0.5);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
#return:hover { color: var(--bone); border-color: var(--accent); background: rgba(10, 9, 8, 0.8); }
.return__arrow { transition: transform 0.3s var(--ease); }
#return:hover .return__arrow { transform: translateX(-3px); }

#console {
  position: absolute;
  left: var(--gut);
  top: 50%;
  translate: 0 -50%;
  width: min(31rem, 46vw);
  --cut: 18px;
}

/* Corner brackets on the two square corners. */
.console__bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
  opacity: 0.8;
  pointer-events: none;
}
.console__bracket--tr { top: -5px; right: -5px; border-left: 0; border-bottom: 0; }
.console__bracket--bl { bottom: -5px; left: -5px; border-right: 0; border-top: 0; }

/* Frame is a 1px accent-tinted sheet; the inner panel sits on top of it. */
.console__frame {
  padding: 1px;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--accent) 62%, transparent),
    color-mix(in srgb, var(--accent) 14%, transparent) 45%,
    var(--hair) 100%
  );
  clip-path: polygon(
    var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)
  );
  transition: background 0.5s var(--ease), filter 0.35s var(--ease);
}
#console.is-stepping .console__frame { filter: brightness(1.9); }

.console__inner {
  position: relative;
  padding: 0 0 1.15rem;
  background:
    /* Hairline console grid, barely there. */
    repeating-linear-gradient(to bottom, rgba(240, 238, 230, 0.024) 0 1px, transparent 1px 5px),
    linear-gradient(150deg, rgba(24, 20, 17, 0.96), rgba(11, 10, 9, 0.97));
  backdrop-filter: blur(16px) saturate(1.15);
  clip-path: polygon(
    var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)
  );
}

/* ── Status bar ──────────────────────────────────────────────────── */
.console__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.4rem 0.7rem calc(1.4rem + var(--cut) * 0.4);
  border-bottom: 1px solid var(--hair-soft);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.console__id { color: var(--accent); }
.console__class { color: var(--dimmer); }
.console__step {
  margin-left: auto;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.console__step::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 0.55rem;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: livedot 2.6s var(--ease-io) infinite;
}
@keyframes livedot { 50% { opacity: 0.25; } }

/* ── Masthead ────────────────────────────────────────────────────── */
.console__masthead {
  padding: 1.5rem 1.6rem 1.25rem;
  border-bottom: 1px solid var(--hair-soft);
  transition: padding 0.5s var(--ease);
}
#console.is-deep .console__masthead { padding-top: 1.05rem; padding-bottom: 0.9rem; }

.console__name {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 6.2vw, 4.75rem);
  line-height: 0.82;
  letter-spacing: -0.028em;
  transition: font-size 0.5s var(--ease);
}
#console.is-deep .console__name { font-size: clamp(1.75rem, 3vw, 2.25rem); }

.console__feature {
  margin: 0.55rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.05;
  color: var(--accent);
  transition: font-size 0.5s var(--ease);
}
#console.is-deep .console__feature { font-size: 1rem; }

/* ── Screen ──────────────────────────────────────────────────────── */
.console__screen {
  position: relative;
  padding: 1.4rem 1.6rem 1.5rem;
  min-height: 15.5rem;
}
/* A tick in the corner of the screen area, like a registration mark. */
.console__screen::before {
  content: '';
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  width: 22px;
  height: 1px;
  background: var(--hair);
}

.console__body { transition: opacity 0.22s var(--ease-io), transform 0.22s var(--ease-io); }
.console__body.is-out { opacity: 0; transform: translateY(-6px); }

.console__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  min-height: 0.7rem;
}
.console__eyebrow::before {
  content: '';
  width: 3px;
  height: 11px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.console__eyebrow:empty { display: none; }

.console__title {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.9vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--bone);
}
.console__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.72;
  color: var(--bone-soft);
}

/* ── Controls ────────────────────────────────────────────────────── */
.console__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.6rem 0;
  border-top: 1px solid var(--hair-soft);
}

.console__ticks { display: flex; gap: 5px; }
.tick {
  width: 20px;
  height: 8px;
  padding: 0;
  border: 1px solid var(--hair);
  background: transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease), width 0.35s var(--ease);
}
.tick:hover { border-color: var(--accent); }
.tick.is-past { background: color-mix(in srgb, var(--accent) 34%, transparent); border-color: transparent; }
.tick.is-live {
  width: 34px;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
}

.console__keys { display: flex; gap: 0.5rem; margin-left: auto; }

.key {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.2s var(--ease);
}
.key--ghost {
  border: 1px solid var(--hair);
  color: var(--dim);
}
.key--ghost:hover:not(:disabled) { color: var(--bone); border-color: var(--accent); }
.key--ghost:disabled { opacity: 0.3; cursor: not-allowed; }

.key--go {
  background: var(--accent);
  color: #14100d;
  font-weight: 700;
}
.key--go:hover { transform: translateX(2px); background: var(--bone); }

/* ══════════════════════════════════════════════════════════════════
   Narrow viewports — the console docks to the bottom
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .overlay-scrim { display: none; }

  #console {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    translate: none;
    width: 100%;
    --cut: 0px;
  }
  .console__bracket { display: none; }
  .console__frame { padding: 1px 0 0; }
  .console__inner { padding-bottom: max(1.15rem, env(safe-area-inset-bottom)); }
  .console__screen { min-height: 11rem; }
  .console__name { font-size: clamp(2.25rem, 9vw, 3rem); }

  #return { top: var(--gut); left: var(--gut); }
  #gauge { display: none; }
  #controls { display: none; }
  #index { width: auto; max-width: 60vw; }
  .dest__feature { display: none; }
}

@media (max-width: 560px) {
  #telemetry { display: none; }
  .marker__feature { display: none; }
  .console__controls { flex-wrap: wrap; }
  .console__keys { width: 100%; margin-left: 0; }
  .key { flex: 1; justify-content: center; }
}

/* Instrument readout — the world's own telemetry */
#gauge {
  position: absolute;
  right: var(--gut);
  bottom: var(--gut);
  width: 13rem;
  text-align: right;
}
.gauge__head {
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
#gauge dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 0.9rem; }
#gauge dt {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dimmer);
  text-align: left;
}
#gauge dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--bone-soft);
  font-variant-numeric: tabular-nums;
}

/* Sound toggle — present in both modes */
#sound {
  right: var(--gut);
  top: var(--gut);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--hair);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dimmer);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
body:not([data-mode='boot']) #sound { opacity: 1; pointer-events: auto; }
#sound:hover { color: var(--bone); border-color: var(--accent); }
#sound[aria-pressed='true'] { color: var(--accent); }

.sound__bars { display: flex; align-items: flex-end; gap: 2px; height: 10px; }
.sound__bars i {
  width: 2px;
  height: 3px;
  background: currentColor;
  opacity: 0.5;
}
#sound[aria-pressed='true'] .sound__bars i {
  opacity: 1;
  animation: eq 1.1s var(--ease-io) infinite alternate;
}
#sound[aria-pressed='true'] .sound__bars i:nth-child(2) { animation-delay: 0.18s; }
#sound[aria-pressed='true'] .sound__bars i:nth-child(3) { animation-delay: 0.36s; }
#sound[aria-pressed='true'] .sound__bars i:nth-child(4) { animation-delay: 0.54s; }
@keyframes eq { to { height: 10px; } }

/* ══════════════════════════════════════════════════════════════════
   Boot gate
   ══════════════════════════════════════════════════════════════════ */
#boot {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: var(--gut);
  background: var(--void);
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}
body:not([data-mode='boot']) #boot { opacity: 0; visibility: hidden; }

.boot__inner {
  width: min(38rem, 100%);
  animation: rise 1.2s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.boot__eyebrow {
  margin: 0 0 2rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--dim);
}
.boot__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(4rem, 13vw, 8.5rem);
  line-height: 0.78;
  letter-spacing: -0.03em;
}
.boot__title-em {
  display: block;
  margin-top: 0.28em;
  font-style: italic;
  font-size: 0.26em;
  letter-spacing: -0.005em;
  color: var(--accent);
}
.boot__blurb {
  margin: 2.2rem 0 0;
  max-width: 27rem;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--bone-soft);
}

.boot__progress { margin: 3rem 0 0; max-width: 22rem; }
.boot__bar { height: 1px; background: var(--hair); overflow: hidden; }
.boot__bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}
.boot__manifest {
  margin: 0.7rem 0 0;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  color: var(--dimmer);
  min-height: 1em;
}

.boot__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2.2rem 0 0; animation: rise 0.7s var(--ease) both; }

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn--primary { background: var(--accent); color: #14100d; }
.btn--primary:hover { transform: translateY(-2px); background: var(--bone); }
.btn--ghost { border: 1px solid var(--hair); color: var(--dim); }
.btn--ghost:hover { border-color: var(--accent); color: var(--bone); }

.boot__foot {
  margin: 2.5rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hair-soft);
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  color: var(--dimmer);
}

.noscript {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 2rem; text-align: center;
  background: var(--void); color: var(--bone-soft);
}

@media (max-height: 780px) {
  .console__screen { min-height: 12rem; }
  .console__masthead { padding-top: 1.1rem; padding-bottom: 0.9rem; }
  .console__name { font-size: clamp(2.25rem, 4.6vw, 3.25rem); }
  .console__feature { font-size: clamp(1.0625rem, 2vw, 1.375rem); }
  #return { top: var(--gut); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.08s !important;
  }
}
