:root {
  color-scheme: dark;
  --bg-from: #11171f;
  --bg-to: #0a0d12;
  --surface: rgba(18, 25, 34, .78);
  --text: #d1d5db;
  --text-2: #9ca3af;
  --text-3: #6b7280;
  --border: #2a3340;
  --accent: #4a8acf;
  --amber: #e0a53a;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-to); }
body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg-to);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 300;
}
a, button, input { font: inherit; }
[hidden] { display: none !important; }

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 13%, var(--bg-from) 0%, var(--bg-to) 76%);
}

.brand {
  width: min(88vw, 30rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  color: #f2f2f2;
}
.brand__mark { width: 9.6rem; height: auto; }
.brand__name { margin-top: -.25rem; font-size: 2.2rem; font-weight: 600; letter-spacing: .31em; transform: translateX(.16em); }
.brand__rule { width: 100%; height: 1px; margin-top: .9rem; background: var(--border); }
.wire {
  width: 100%;
  height: 22px;
  margin-top: .5rem;
  overflow: visible;
  fill: none;
  stroke-width: 1;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.wire__one { stroke: rgb(100 200 255 / .55); }
.wire__two { stroke: rgb(60 140 240 / .4); }
.wire__three { stroke: rgb(130 220 255 / .28); }

.main {
  width: min(100%, 58rem);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 2.5vh, 1.4rem) 0 clamp(2rem, 4vh, 2.75rem);
}
.screen { width: 100%; text-align: center; animation: screen-in .32s ease both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(5px); } }
h1 { margin: 0; color: var(--text-2); font-size: 1rem; font-weight: 300; line-height: 1.5; }
h1:focus { outline: none; }
.step { margin: 0 0 .65rem; color: var(--text-3); font: .66rem var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.lede { max-width: 34rem; margin: .7rem auto 0; color: var(--text-3); font-size: .84rem; line-height: 1.55; }
.lede code { color: var(--text-2); font: .8rem var(--mono); }

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(1.25rem, 2.7vh, 1.75rem);
}
.choice {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 1.15rem 1.25rem 1.35rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(74, 138, 207, .05);
  text-align: left;
  text-decoration: none;
  isolation: isolate;
  transform: perspective(900px) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
  transform-style: preserve-3d;
  transition: transform .18s ease-out, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.choice::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -35% -20% 30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 138, 207, .15), transparent 66%);
  opacity: .45;
  transform: translateY(8%);
  transition: opacity .24s ease, transform .24s ease;
}
.choice::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid transparent;
  border-top-color: rgba(129, 205, 250, .08);
  border-left-color: rgba(129, 205, 250, .05);
  pointer-events: none;
  transition: border-color .2s ease;
}
.choice:hover,
.choice:focus-visible {
  border-color: var(--accent);
  background: rgba(74, 138, 207, .12);
  box-shadow: 0 0 28px rgba(74, 138, 207, .16);
  outline: none;
}
.choice:hover::before,
.choice:focus-visible::before { opacity: 1; transform: translateY(0); }
.choice:hover::after,
.choice:focus-visible::after { border-top-color: rgba(129, 205, 250, .28); border-left-color: rgba(129, 205, 250, .16); }

.choice__eyebrow {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-3);
  font: .61rem var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.choice__eyebrow::after {
  content: "";
  width: .35rem;
  height: .35rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: color .14s ease, background .14s ease, box-shadow .14s ease;
}
.choice:hover .choice__eyebrow::after,
.choice:focus-visible .choice__eyebrow::after { color: var(--accent); background: var(--accent); box-shadow: 0 0 10px rgba(74, 138, 207, .7); }
.choice__scene { position: relative; display: grid; place-items: center; min-height: 0; }
.choice__scene::before,
.choice__scene::after { content: ""; position: absolute; left: 50%; top: 50%; pointer-events: none; }
.choice__scene::before { width: 8.9rem; height: 8.9rem; border: 1px solid rgba(74, 138, 207, .11); border-radius: 50%; transform: translate(-50%, -50%); }
.choice__scene::after { width: 11rem; height: 1px; background: linear-gradient(90deg, transparent, rgba(74, 138, 207, .14), transparent); transform: translate(-50%, -50%); }
.choice__icon { position: relative; z-index: 1; width: 8.25rem; height: 8.25rem; color: var(--text-2); transition: color .2s ease, filter .2s ease, transform .2s ease; }
.choice__icon * { vector-effect: non-scaling-stroke; }
.choice__icon .accent { color: var(--accent); }
.choice__icon .faint { color: rgb(107 114 128 / .45); }
/* Motion confirms the destination: download lands, login advances, engineering maps the system. */
.choice__icon .signal { stroke-dasharray: 3 6; }
.choice__icon .download-signal,
.choice__icon .login-arrow,
.choice__icon .portal-ring,
.choice__icon .mind-mark,
.choice__icon .mind-orbit { transform-box: fill-box; transform-origin: center; }
.choice:hover .choice__icon,
.choice:focus-visible .choice__icon { color: #eef4fb; filter: drop-shadow(0 0 14px rgba(74, 138, 207, .24)); transform: translateY(-3px) scale(1.025); }
.choice:hover .signal,
.choice:focus-visible .signal { animation: signal-flow 2s linear infinite; }
.choice--download:hover .download-signal,
.choice--download:focus-visible .download-signal { animation: download-settle 1.15s cubic-bezier(.45, 0, .2, 1) both; }
.choice--login:hover .portal-ring,
.choice--login:focus-visible .portal-ring { animation: portal-breathe 1.5s ease-in-out infinite; }
.choice--login:hover .login-arrow,
.choice--login:focus-visible .login-arrow { animation: login-nudge 1.2s ease-in-out infinite; }
.choice--engineering:hover .mind-mark,
.choice--engineering:focus-visible .mind-mark { animation: mind-float 1.8s ease-in-out infinite; }
.choice--engineering:hover .mind-orbit,
.choice--engineering:focus-visible .mind-orbit { animation: orbit-drift 1.6s ease-in-out infinite; }
@keyframes signal-flow { to { stroke-dashoffset: -18; } }
@keyframes download-settle { 0% { transform: translateY(-4px); opacity: .7; } 65% { transform: translateY(5px); opacity: 1; } 100% { transform: translateY(0); } }
@keyframes portal-breathe { 0%, 100% { transform: scale(.96); opacity: .55; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes login-nudge { 0%, 55%, 100% { transform: translateX(0); } 72% { transform: translateX(4px); } }
@keyframes mind-float { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-3px); } }
@keyframes orbit-drift { 0%, 100% { transform: translateX(-2px); opacity: .42; } 50% { transform: translateX(2px); opacity: .82; } }

.choice__copy { position: relative; z-index: 2; min-height: 4rem; display: grid; align-content: start; gap: .38rem; }
.choice__title { color: var(--text); font-size: .95rem; font-weight: 400; line-height: 1.35; }
.choice__detail { max-width: 24ch; color: var(--text-3); font-size: .78rem; line-height: 1.5; transition: color .14s ease; }
.choice:hover .choice__detail,
.choice:focus-visible .choice__detail { color: var(--text-2); }

.route-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.5rem; }
.route {
  min-height: 9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(74, 138, 207, .05);
  text-decoration: none;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease, transform .14s ease;
}
.route:hover,
.route:focus-visible { border-color: var(--accent); background: rgba(74, 138, 207, .12); box-shadow: 0 0 24px rgba(74, 138, 207, .15); transform: translateY(-2px); outline: none; }
.route strong { font-size: .9rem; font-weight: 400; }
.route span { max-width: 26ch; color: var(--text-3); font-size: .78rem; line-height: 1.5; }

.lookup { width: min(100%, 27rem); margin: 1.6rem auto 0; }
.lookup__label { display: block; margin-bottom: .65rem; color: var(--text-3); font-size: .7rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; }
.field { height: 3.2rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid var(--border); background: rgba(74, 138, 207, .035); transition: border-color .14s ease, box-shadow .14s ease; }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 24px rgba(74, 138, 207, .12); }
.field input { min-width: 0; height: 100%; padding: 0 .3rem 0 1rem; border: 0; outline: 0; color: var(--text); background: transparent; font: 400 .86rem var(--mono); }
.field input::placeholder { color: var(--text-3); }
.field span { padding-right: 1rem; color: var(--text-3); font: .72rem var(--mono); }
.field-error { margin: .75rem 0 0; color: var(--amber); font-size: .78rem; line-height: 1.5; }
.field.has-error { border-color: rgb(224 165 58 / .65); }

.button {
  width: 100%;
  height: 3.2rem;
  margin-top: .75rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(74, 138, 207, .06);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.button span { color: var(--accent); }
.button:hover,
.button:focus-visible { border-color: var(--accent); background: rgba(74, 138, 207, .14); box-shadow: 0 0 24px rgba(74, 138, 207, .18); outline: none; }
.button--link { width: min(100%, 27rem); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.back, .aside { display: block; width: fit-content; margin: 1rem auto 0; color: var(--text-3); font-size: .78rem; font-style: italic; text-decoration: none; }
.aside { margin-top: .7rem; }
.back:hover, .back:focus-visible, .aside:hover, .aside:focus-visible { color: var(--accent); outline: none; }

.footer {
  width: min(100%, 58rem);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font: .66rem/1.5 var(--mono);
  letter-spacing: .02em;
}
.footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .85rem; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover, .footer a:focus-visible { color: var(--accent); outline: none; }

@media (max-width: 760px) {
  .page { padding-top: 1.25rem; }
  .brand__mark { width: 7rem; }
  .brand__name { font-size: 1.65rem; }
  .main { align-items: flex-start; padding-top: 1.7rem; }
  .choices { width: min(100%, 21rem); margin-inline: auto; grid-template-columns: 1fr; }
  .choice { min-height: 21rem; aspect-ratio: auto; }
  .route-choices { width: min(100%, 24rem); margin-inline: auto; grid-template-columns: 1fr; }
  .route { min-height: 7rem; }
  .footer { flex-direction: column; text-align: center; }
  .footer nav { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
