:root {
  color-scheme: dark;
  --bg: #07101f;
  --panel: rgba(13, 26, 47, 0.68);
  --line: rgba(164, 190, 235, 0.16);
  --text: #f3f7ff;
  --muted: #9fadc4;
  --blue: #56a8ff;
  --violet: #8f7cff;
  --green: #6ee7b7;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(49, 108, 192, 0.16), transparent 32%),
    linear-gradient(145deg, #060d19 0%, #091426 52%, #07101f 100%);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.16;
  pointer-events: none;
}

.ambient--one {
  top: -220px;
  right: 8%;
  background: var(--blue);
}

.ambient--two {
  bottom: -280px;
  left: 2%;
  background: var(--violet);
}

.page-shell {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  flex-direction: column;
}

.topbar {
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(122, 169, 255, 0.26);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(71, 137, 236, 0.28), rgba(103, 81, 216, 0.16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.brand__mark svg {
  width: 24px;
  fill: none;
  stroke: #a5ccff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.8;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(110, 231, 183, 0.16);
  border-radius: 999px;
  color: #c7d2e5;
  background: rgba(10, 23, 39, 0.62);
  font-size: 0.78rem;
  font-weight: 500;
}

.status-pill__dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.09);
}

.status-pill__dot::after {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(110, 231, 183, 0.4);
  border-radius: inherit;
  content: "";
  animation: pulse 2.1s ease-out infinite;
}

.hero {
  display: grid;
  flex: 1;
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  padding: 72px 0 76px;
}

.hero__copy {
  max-width: 650px;
  animation: reveal 0.8s ease-out both;
}

.eyebrow {
  display: flex;
  margin: 0 0 21px;
  align-items: center;
  gap: 11px;
  color: #91bcf4;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  content: "";
}

h1 {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: clamp(3rem, 6.6vw, 5.8rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

h1 span {
  color: transparent;
  background: linear-gradient(95deg, #f3f7ff 5%, #69b2ff 58%, #a292ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero__text {
  max-width: 590px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  line-height: 1.75;
}

.progress-card {
  max-width: 520px;
  margin-top: 34px;
  padding: 18px 20px 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(130deg, rgba(13, 27, 49, 0.78), rgba(11, 21, 39, 0.54));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
}

.progress-card__header {
  display: flex;
  margin-bottom: 13px;
  align-items: center;
  justify-content: space-between;
  color: #d1d9e7;
  font-size: 0.79rem;
  font-weight: 600;
}

.progress-card__signal {
  display: flex;
  align-items: end;
  gap: 3px;
}

.progress-card__signal i {
  width: 3px;
  border-radius: 3px;
  background: var(--green);
  animation: signal 1.2s ease-in-out infinite alternate;
}

.progress-card__signal i:nth-child(1) { height: 5px; }
.progress-card__signal i:nth-child(2) { height: 9px; animation-delay: 0.2s; }
.progress-card__signal i:nth-child(3) { height: 13px; animation-delay: 0.4s; }

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(129, 160, 205, 0.12);
}

.progress-track span {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  box-shadow: 0 0 18px rgba(86, 168, 255, 0.5);
  animation: progress-glow 2.4s ease-in-out infinite alternate;
}

.thanks {
  margin: 19px 0 0;
  color: #7889a4;
  font-size: 0.83rem;
}

.hero__visual {
  position: relative;
  display: grid;
  min-height: 470px;
  place-items: center;
  animation: reveal 0.9s 0.15s ease-out both;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(124, 160, 220, 0.11);
  border-radius: 50%;
}

.orbit--outer {
  width: 440px;
  height: 440px;
  animation: spin 38s linear infinite;
}

.orbit--outer::before,
.orbit--inner::before {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 15px var(--blue);
  content: "";
}

.orbit--inner {
  width: 330px;
  height: 330px;
  border-style: dashed;
  animation: spin 25s linear infinite reverse;
}

.orbit--inner::before {
  top: 12%;
  left: auto;
  right: 38px;
  background: var(--violet);
  box-shadow: 0 0 15px var(--violet);
}

.visual-card {
  position: relative;
  z-index: 2;
  width: min(310px, 72vw);
  overflow: hidden;
  border: 1px solid rgba(155, 188, 239, 0.19);
  border-radius: 23px;
  background: rgba(11, 23, 43, 0.68);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  transform: rotate(-3deg);
}

.visual-card__top {
  display: flex;
  height: 45px;
  align-items: center;
  gap: 6px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
}

.visual-card__top span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #506079;
}

.visual-card__top span:first-child { background: #6f91bb; }

.visual-card__body {
  display: flex;
  min-height: 285px;
  align-items: center;
  padding: 38px;
  flex-direction: column;
}

.visual-card__icon {
  display: grid;
  width: 82px;
  height: 82px;
  margin-bottom: 28px;
  place-items: center;
  border: 1px solid rgba(101, 169, 255, 0.24);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(52, 127, 230, 0.22), rgba(108, 80, 220, 0.14));
  box-shadow: 0 18px 40px rgba(45, 95, 180, 0.18);
}

.visual-card__icon svg {
  width: 48px;
  fill: none;
  stroke: #a8d1ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.visual-card__line {
  width: 48%;
  height: 8px;
  margin: 5px 0;
  border-radius: 20px;
  background: rgba(159, 182, 218, 0.13);
}

.visual-card__line--wide {
  width: 76%;
  background: rgba(159, 182, 218, 0.2);
}

.visual-card__loader {
  width: 100%;
  height: 4px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(159, 182, 218, 0.1);
}

.visual-card__loader span {
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  animation: loading 2.8s ease-in-out infinite;
}

.floating-tag {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid rgba(158, 188, 233, 0.14);
  border-radius: 12px;
  color: #bdc9da;
  background: rgba(12, 25, 44, 0.78);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25);
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(16px);
}

.floating-tag--secure {
  top: 76px;
  left: 8px;
  animation: float 4.5s ease-in-out infinite;
}

.floating-tag--secure svg {
  width: 16px;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.floating-tag--update {
  right: 0;
  bottom: 82px;
  animation: float 4.5s 1.1s ease-in-out infinite;
}

.floating-tag--update span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
}

footer {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #64748d;
  font-size: 0.75rem;
}

.footer__domain {
  color: #8493aa;
  letter-spacing: 0.05em;
}

/* Error 404 */
.error-page {
  min-height: 100vh;
}

.error-shell {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  flex-direction: column;
}

.error-topbar {
  flex: 0 0 auto;
}

.error-code-small {
  padding: 8px 12px;
  border: 1px solid rgba(143, 124, 255, 0.18);
  border-radius: 999px;
  color: #9cacc4;
  background: rgba(11, 23, 43, 0.5);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.error-content {
  display: flex;
  width: min(760px, 100%);
  margin: auto;
  align-items: center;
  padding: 60px 0;
  flex: 1;
  flex-direction: column;
  text-align: center;
  animation: reveal 0.75s ease-out both;
}

.error-visual {
  position: relative;
  display: flex;
  min-height: 190px;
  margin-bottom: 34px;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 22px);
}

.error-visual__glow {
  position: absolute;
  width: 270px;
  height: 150px;
  border-radius: 50%;
  background: rgba(74, 129, 228, 0.16);
  filter: blur(48px);
}

.error-visual__number {
  position: relative;
  color: rgba(199, 218, 247, 0.9);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: clamp(7.5rem, 19vw, 11rem);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.8;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.error-visual__portal {
  position: relative;
  z-index: 1;
  display: grid;
  width: clamp(98px, 15vw, 132px);
  height: clamp(98px, 15vw, 132px);
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, rgba(86, 168, 255, 0.25), rgba(16, 29, 54, 0.86) 65%);
  box-shadow:
    0 0 0 13px rgba(86, 168, 255, 0.035),
    0 0 65px rgba(86, 168, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.error-visual__portal svg {
  width: 53%;
  fill: none;
  stroke: #acd4ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.error-visual__ring {
  position: absolute;
  inset: -15px;
  border: 1px dashed rgba(143, 124, 255, 0.32);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.error-eyebrow {
  justify-content: center;
  margin-bottom: 18px;
}

.error-eyebrow::after {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  content: "";
}

.error-title {
  max-width: 680px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.error-text {
  max-width: 590px;
  margin: 23px auto 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.7;
}

.home-button {
  display: inline-flex;
  margin-top: 32px;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: 1px solid rgba(131, 183, 255, 0.25);
  border-radius: 12px;
  color: #f4f8ff;
  background: linear-gradient(135deg, rgba(47, 126, 231, 0.85), rgba(103, 78, 210, 0.85));
  box-shadow: 0 14px 38px rgba(40, 97, 190, 0.24);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-button:hover {
  border-color: rgba(177, 211, 255, 0.46);
  box-shadow: 0 18px 45px rgba(40, 97, 190, 0.34);
  transform: translateY(-2px);
}

.home-button:focus-visible {
  outline: 3px solid rgba(110, 183, 255, 0.35);
  outline-offset: 4px;
}

.home-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.error-note {
  display: flex;
  margin: 20px 0 0;
  align-items: center;
  gap: 8px;
  color: #71829b;
  font-size: 0.75rem;
}

.error-note span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(110, 231, 183, 0.7);
}

.error-footer {
  flex: 0 0 auto;
}

@keyframes pulse {
  0% { opacity: 0.7; transform: scale(0.4); }
  75%, 100% { opacity: 0; transform: scale(1.5); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes signal {
  from { opacity: 0.35; transform: scaleY(0.65); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes progress-glow {
  from { filter: saturate(0.9); opacity: 0.78; }
  to { filter: saturate(1.3); opacity: 1; }
}

@keyframes loading {
  0% { transform: translateX(-105%); }
  55%, 100% { transform: translateX(225%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 58px;
  }

  .hero__copy {
    max-width: 720px;
  }

  .hero__visual {
    min-height: 440px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 30px, 1180px);
  }

  .topbar {
    min-height: 88px;
  }

  .brand {
    font-size: 0.78rem;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
  }

  .status-pill {
    width: 37px;
    height: 37px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .hero {
    gap: 40px;
    padding: 48px 0 55px;
  }

  h1 {
    font-size: clamp(2.75rem, 15vw, 4.3rem);
  }

  .hero__text {
    line-height: 1.65;
  }

  .hero__visual {
    min-height: 370px;
  }

  .orbit--outer {
    width: 340px;
    height: 340px;
  }

  .orbit--inner {
    width: 265px;
    height: 265px;
  }

  .visual-card__body {
    min-height: 240px;
    padding: 28px 34px;
  }

  .floating-tag--secure {
    top: 42px;
    left: -3px;
  }

  .floating-tag--update {
    right: -3px;
    bottom: 44px;
  }

  footer {
    min-height: 64px;
  }

  .error-shell {
    width: min(100% - 30px, 1180px);
  }

  .error-content {
    padding: 46px 0;
  }

  .error-visual {
    min-height: 135px;
    margin-bottom: 31px;
  }

  .error-visual__number {
    font-size: clamp(6.2rem, 31vw, 8rem);
  }

  .error-visual__portal {
    width: clamp(78px, 24vw, 102px);
    height: clamp(78px, 24vw, 102px);
  }
}

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