:root {
  color-scheme: dark;
  --bg: #050a12;
  --surface: rgba(13, 25, 40, 0.84);
  --surface-strong: #0d1928;
  --line: rgba(133, 174, 208, 0.18);
  --text: #f4f9ff;
  --muted: #93a9bc;
  --cyan: #26e6f2;
  --blue: #2588ff;
  --green: #37e49b;
  --card-width: clamp(168px, 14vw, 208px);
  --card-height: 76px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(13, 93, 135, 0.18), transparent 33%),
    linear-gradient(145deg, #040810 0%, #081525 45%, #07101d 100%);
}

.ambient__blob {
  position: absolute;
  width: 58vmax;
  aspect-ratio: 1;
  border-radius: 48% 52% 62% 38%;
  filter: blur(90px);
  opacity: 0.2;
  will-change: transform;
  animation: drift 18s ease-in-out infinite alternate;
}

.ambient__blob--one { top: -42vmax; left: -15vmax; background: #00dbe7; }
.ambient__blob--two { right: -32vmax; bottom: -38vmax; background: #246cff; animation-delay: -7s; animation-duration: 24s; }
.ambient__blob--three { top: 28%; left: 42%; width: 34vmax; background: #13a073; animation-delay: -12s; animation-duration: 21s; }

.ambient__grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(77, 129, 167, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 129, 167, 0.07) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.page-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 32px 26px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.page-header { text-align: center; position: relative; z-index: 2; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(29px, 3.2vw, 46px); line-height: 1; letter-spacing: -0.05em; }
h1 span { color: var(--cyan); }
.welcome { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.welcome strong { color: var(--text); }

.system-orbit {
  position: relative;
  width: min(100%, 1040px);
  height: clamp(550px, 68vh, 720px);
  min-height: 550px;
  margin: 0 auto;
}

.orbit-line {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(54, 215, 232, 0.13);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-line--outer { width: min(76vw, 760px); aspect-ratio: 1.48; }
.orbit-line--inner { width: min(40vw, 390px); aspect-ratio: 1; border-style: dashed; animation: orbit-spin 48s linear infinite; }

.brand-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 210px;
  padding: 32px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(50, 226, 239, 0.27);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(16, 37, 57, 0.96), rgba(4, 13, 23, 0.96));
  box-shadow: 0 0 0 12px rgba(28, 167, 191, 0.025), 0 28px 70px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.05);
  transform: translate(-50%, -50%);
  z-index: 3;
}

.brand-core__halo {
  position: absolute;
  inset: -20px;
  border: 1px solid rgba(38, 230, 242, 0.13);
  border-radius: 50%;
  animation: pulse 3.5s ease-in-out infinite;
}

.brand-core__mark {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #031017;
  background: linear-gradient(135deg, #85f9ff, #21cddb 55%, #2195ff);
  box-shadow: 0 12px 30px rgba(32, 213, 230, 0.25);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.08em;
  transform: rotate(-6deg);
}

.brand-core strong { margin-top: 17px; font-size: 17px; letter-spacing: 0.14em; }
.brand-core strong span { color: var(--cyan); }
.brand-core small { margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: 0.08em; }

.systems { position: absolute; inset: 0; }

.system-card {
  --radius-x: min(37vw, 390px);
  --radius-y: min(26vh, 245px);
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--card-width);
  height: var(--card-height);
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(19, 37, 57, 0.92), rgba(8, 20, 33, 0.9));
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.26), inset 0 1px rgba(255, 255, 255, 0.035);
  text-decoration: none;
  transform:
    translate(-50%, -50%)
    translate(calc(cos(var(--angle)) * var(--radius-x)), calc(sin(var(--angle)) * var(--radius-y)));
  transition: border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  animation: arrive 600ms cubic-bezier(.2,.8,.2,1) both;
  animation-delay: var(--delay);
  overflow: hidden;
  z-index: 4;
}

.system-card__glow {
  position: absolute;
  inset: auto -30% -130% 20%;
  height: 140px;
  border-radius: 50%;
  background: var(--cyan);
  filter: blur(45px);
  opacity: 0.08;
  transition: opacity 180ms ease;
}

.system-card__icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(46, 224, 239, 0.19);
  border-radius: 14px;
  color: var(--cyan);
  background: rgba(38, 230, 242, 0.075);
}

.system-card__icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.system-card__content { min-width: 0; display: block; }
.system-card__name { display: block; font-size: 13px; line-height: 1.15; }
.system-card__status { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.system-card__arrow { margin-left: auto; color: #7eacbe; font-size: 15px; transform: translate(-2px, 2px); transition: transform 180ms ease, color 180ms ease; }

.system-card:hover, .system-card:focus-visible {
  border-color: rgba(38, 230, 242, 0.55);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38), 0 0 25px rgba(38, 230, 242, 0.09);
  outline: none;
}

.system-card:hover .system-card__glow, .system-card:focus-visible .system-card__glow { opacity: 0.17; }
.system-card:hover .system-card__arrow, .system-card:focus-visible .system-card__arrow { color: var(--cyan); transform: translate(1px, -1px); }

.system-card.is-disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.38;
  background: rgba(26, 31, 38, 0.8);
  box-shadow: none;
}

.system-card.is-disabled .system-card__icon { color: #8b939e; border-color: rgba(150, 158, 168, 0.16); background: rgba(150, 158, 168, 0.07); }
.system-card.is-disabled .system-card__glow { display: none; }

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
}

.page-footer p { margin: 0; }
.page-footer p span:first-child { color: var(--green); font-weight: 800; }
.legend { display: flex; gap: 20px; }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend__dot { width: 7px; height: 7px; border-radius: 50%; background: #606975; }
.legend__dot--active { background: var(--green); box-shadow: 0 0 10px rgba(55, 228, 155, 0.55); }

@keyframes drift {
  0% { transform: translate3d(-6%, -4%, 0) rotate(0deg) scale(0.9); }
  50% { transform: translate3d(10%, 8%, 0) rotate(35deg) scale(1.08); }
  100% { transform: translate3d(-2%, 16%, 0) rotate(75deg) scale(0.98); }
}

@keyframes orbit-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.06); opacity: 0.45; } }
@keyframes arrive { from { opacity: 0; filter: blur(5px); } to { opacity: 1; filter: blur(0); } }

@media (max-width: 900px) {
  :root { --card-width: 172px; }
  .page-shell { padding-inline: 20px; }
  .system-card { --radius-x: min(36vw, 315px); --radius-y: 225px; }
  .brand-core { width: 180px; height: 180px; }
  .brand-core__mark { width: 66px; height: 66px; }
}

@media (max-width: 700px) {
  .page-shell { min-height: 100svh; display: block; padding: 30px 18px 22px; }
  .system-orbit { height: auto; min-height: 0; margin-top: 28px; }
  .orbit-line { display: none; }
  .brand-core { position: relative; top: auto; left: auto; width: 154px; height: 154px; margin: 0 auto 28px; padding: 20px; transform: none; }
  .brand-core__mark { width: 58px; height: 58px; border-radius: 18px; font-size: 22px; }
  .brand-core strong { margin-top: 12px; font-size: 13px; }
  .brand-core small { font-size: 8px; }
  .systems { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .system-card { position: relative; top: auto; left: auto; width: 100%; height: 84px; transform: none; }
  .system-card__arrow { display: none; }
  .system-card__icon { width: 43px; height: 43px; }
  .system-card__name { font-size: 12px; }
  .page-footer { margin-top: 27px; flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .systems { grid-template-columns: 1fr; }
  .system-card { height: 72px; }
  .legend { gap: 12px; flex-wrap: wrap; justify-content: center; }
}

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