:root {
  color-scheme: dark;
  --page-bg: #07111c;
  --surface: rgba(14, 29, 44, 0.82);
  --text: #f3f8fc;
  --muted: #9bb0c3;
  --line: rgba(181, 216, 232, 0.15);
  --grid: rgba(150, 194, 213, 0.045);
  --brand: #62e8cf;
  --brand-blue: #629dff;
  --button-text: #071720;
  --glow-a: rgba(40, 187, 166, 0.17);
  --glow-b: rgba(67, 112, 222, 0.16);
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.32);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --page-bg: #eef5f5;
    --surface: rgba(255, 255, 255, 0.82);
    --text: #102438;
    --muted: #526b80;
    --line: rgba(32, 78, 98, 0.14);
    --grid: rgba(35, 82, 100, 0.055);
    --brand: #087f74;
    --brand-blue: #154c9f;
    --button-text: #f7fffd;
    --glow-a: rgba(42, 194, 167, 0.18);
    --glow-b: rgba(81, 128, 229, 0.13);
    --shadow: 0 32px 90px rgba(27, 62, 78, 0.15);
  }
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 9% 8%, var(--glow-a), transparent 34rem),
    radial-gradient(circle at 91% 86%, var(--glow-b), transparent 32rem),
    var(--page-bg);
  color: var(--text);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  pointer-events: none;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

.page-shell {
  display: flex;
  width: min(100% - 40px, 1160px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  flex-direction: column;
}

.site-header {
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 720;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(39, 170, 179, 0.2);
}

.network-label {
  display: inline-flex;
  margin: 0;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 680;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.network-label span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 12%, transparent);
}

main {
  display: grid;
  flex: 1;
  align-items: center;
}

.hero-card {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 570px;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.12fr) minmax(350px, 0.88fr);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.hero-copy {
  display: flex;
  min-width: 0;
  padding: clamp(42px, 7vw, 82px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 22px;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 24px;
  height: 1px;
  background: currentColor;
  content: "";
}

h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(2.65rem, 5.2vw, 4.75rem);
  font-weight: 740;
  letter-spacing: -0.058em;
  line-height: 0.98;
  text-wrap: balance;
}

.intro {
  max-width: 560px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.7;
}

.actions {
  margin-top: 38px;
}

.primary-action {
  display: inline-flex;
  min-height: 54px;
  padding: 0 22px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand-blue) 88%, white));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 20%, transparent);
  color: var(--button-text);
  font-size: 0.96rem;
  font-weight: 760;
  text-decoration: none;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.primary-action:hover {
  box-shadow: 0 16px 34px color-mix(in srgb, var(--brand) 28%, transparent);
  transform: translateY(-2px);
}

.primary-action:active {
  transform: translateY(0);
}

.primary-action:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 4px;
}

.primary-action svg {
  flex: 0 0 auto;
}

.access-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.network-art {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid rgba(190, 222, 237, 0.11);
  background:
    radial-gradient(circle at 48% 38%, rgba(79, 211, 198, 0.19), transparent 26%),
    radial-gradient(circle at 74% 9%, rgba(92, 140, 255, 0.24), transparent 32%),
    linear-gradient(155deg, #10263a, #081522 72%);
}

.network-art::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.signal-stage {
  position: absolute;
  inset: 36px 18px 108px;
}

.signal-ring,
.center-mark,
.signal-node {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.signal-ring {
  border: 1px solid rgba(148, 225, 218, 0.14);
  box-shadow: inset 0 0 28px rgba(86, 190, 190, 0.025);
}

.ring-one {
  width: min(88%, 330px);
  aspect-ratio: 1;
}

.ring-two {
  width: min(63%, 238px);
  aspect-ratio: 1;
}

.ring-three {
  width: min(37%, 140px);
  aspect-ratio: 1;
  border-color: rgba(148, 225, 218, 0.22);
}

.center-mark {
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  border: 1px solid rgba(190, 255, 245, 0.2);
  background: rgba(8, 23, 34, 0.78);
  box-shadow: 0 0 60px rgba(74, 224, 205, 0.2);
}

.center-mark img {
  width: 62px;
  height: 62px;
  border-radius: 18px;
}

.signal-node {
  width: 10px;
  height: 10px;
  border: 2px solid #10263a;
  background: #8ff4df;
  box-shadow: 0 0 0 5px rgba(104, 232, 207, 0.12), 0 0 24px rgba(104, 232, 207, 0.45);
}

.node-one {
  top: 22%;
  left: 29%;
}

.node-two {
  top: 40%;
  left: 84%;
}

.node-three {
  top: 83%;
  left: 37%;
}

.portal-card {
  position: absolute;
  right: 30px;
  bottom: 30px;
  left: 30px;
  display: grid;
  min-height: 72px;
  padding: 14px 16px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(190, 222, 237, 0.14);
  border-radius: 17px;
  background: rgba(13, 32, 47, 0.82);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
  color: #edf8fb;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.portal-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #71ead3;
  box-shadow: 0 0 0 6px rgba(113, 234, 211, 0.11);
}

.portal-card strong,
.portal-card small {
  display: block;
}

.portal-card strong {
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.portal-card small {
  margin-top: 2px;
  color: #8fa8ba;
  font-size: 0.7rem;
}

.portal-arrow {
  color: #8fa8ba;
  font-size: 1.1rem;
}

.site-footer {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.site-footer p {
  margin: 0;
}

.error-main {
  justify-items: center;
}

.error-card {
  width: min(100%, 720px);
  padding: clamp(44px, 8vw, 84px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.error-card .eyebrow {
  margin-bottom: 18px;
}

.error-card .intro {
  margin-inline: auto;
}

.error-code {
  margin: -28px 0 -22px;
  background: linear-gradient(135deg, var(--brand), var(--brand-blue));
  background-clip: text;
  color: transparent;
  font-size: clamp(6rem, 22vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 1;
  opacity: 0.14;
  -webkit-background-clip: text;
}

.compact-action {
  margin-top: 34px;
}

@media (max-width: 840px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 490px;
  }

  .network-art {
    min-height: 360px;
    border-top: 1px solid rgba(190, 222, 237, 0.11);
    border-left: 0;
  }

  .signal-stage {
    inset: 18px 18px 88px;
  }

  .ring-one {
    width: min(75%, 290px);
  }

  .ring-two {
    width: min(53%, 205px);
  }

  .ring-three {
    width: min(32%, 124px);
  }

  .site-footer {
    min-height: 78px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 24px, 1160px);
  }

  .site-header {
    min-height: 88px;
  }

  .brand {
    font-size: 1.16rem;
  }

  .brand img {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .network-label {
    font-size: 0;
  }

  .network-label span {
    width: 8px;
    height: 8px;
  }

  .hero-card,
  .error-card {
    border-radius: 24px;
  }

  .hero-copy {
    min-height: 465px;
    padding: 38px 28px;
  }

  .eyebrow {
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 3.65rem);
  }

  .intro {
    margin-top: 22px;
  }

  .actions,
  .primary-action {
    width: 100%;
  }

  .primary-action {
    min-height: 56px;
  }

  .access-note {
    text-align: center;
  }

  .network-art {
    min-height: 330px;
  }

  .center-mark {
    width: 82px;
    height: 82px;
  }

  .center-mark img {
    width: 54px;
    height: 54px;
  }

  .portal-card {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }

  .error-card {
    padding: 42px 26px 48px;
  }

  .error-card h1 {
    font-size: 2.7rem;
  }

  .error-code {
    margin-top: -18px;
  }
}

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