@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Inter:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --background: #05070b;
  --foreground: #eef3ff;
  --muted: #7f899e;
  --cyan: #5de4ff;
  --violet: #a88bff;
  --line: rgba(168, 188, 230, 0.14);
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(51, 86, 131, 0.11), transparent 42%),
    var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

#particle-field,
.aurora,
.grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#particle-field {
  z-index: 0;
  opacity: 0;
  animation: fade-in 1.6s 1.2s forwards;
}

.aurora {
  z-index: 0;
  background:
    radial-gradient(ellipse at 16% 8%, rgba(55, 145, 191, 0.1), transparent 35%),
    radial-gradient(ellipse at 85% 90%, rgba(113, 77, 185, 0.09), transparent 38%);
  filter: blur(12px);
  animation: breathe 9s ease-in-out infinite alternate;
}

.grid {
  z-index: 0;
  opacity: 0.27;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 73%);
  transform: perspective(650px) rotateX(58deg) scale(1.8) translateY(28%);
  transform-origin: center bottom;
  animation: grid-arrival 2.2s 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100% - 64px, 1380px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 38px 0 32px;
}

.nav,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.88rem;
  letter-spacing: -0.025em;
}

.wordmark-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(93, 228, 255, 0.55);
  border-radius: 7px;
  background: rgba(93, 228, 255, 0.06);
  color: var(--cyan);
  font-size: 0.78rem;
  box-shadow: inset 0 0 15px rgba(93, 228, 255, 0.08);
}

.accent,
.status-dot {
  color: var(--cyan);
}

.system-status {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(93, 228, 255, 0.08), 0 0 14px currentColor;
  animation: pulse 2.2s infinite;
}

.hero {
  align-self: center;
  max-width: 900px;
  padding: 8vh 0 4vh;
}

.title-lockup h1 {
  margin: 0;
  font-size: clamp(5rem, 13vw, 10.7rem);
  font-weight: 500;
  letter-spacing: -0.087em;
  line-height: 0.78;
  text-transform: uppercase;
}

.loading-status {
  width: min(100%, 650px);
  margin-top: 38px;
}

.loading-command {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: #8995aa;
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1.2vw, 0.8rem);
  letter-spacing: 0.045em;
}

.shell-prompt,
.command-slashes {
  color: var(--cyan);
}

.shell-prompt {
  opacity: 0.82;
}

.command-slashes {
  margin-right: 10px;
  text-shadow: 0 0 16px rgba(93, 228, 255, 0.45);
}

.loading-output {
  display: flex;
  align-items: baseline;
  margin-top: 12px;
  color: #cbd5e7;
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.32rem);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cursor {
  color: var(--violet);
  animation: cursor-blink 900ms steps(1, end) infinite;
}

.progress-track {
  position: relative;
  height: 4px;
  margin-top: 16px;
  overflow: hidden;
  background: rgba(127, 137, 158, 0.18);
}

.progress-track::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(10% - 1px),
    rgba(5, 7, 11, 0.78) calc(10% - 1px),
    rgba(5, 7, 11, 0.78) 10%
  );
  content: "";
}

.progress-fill {
  position: relative;
  display: block;
  width: 76%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    var(--cyan),
    #72bfff 28%,
    var(--violet) 52%,
    #72bfff 76%,
    var(--cyan)
  );
  background-size: 220% 100%;
  box-shadow: 0 0 18px rgba(93, 228, 255, 0.58);
  transform-origin: left;
  animation:
    progress-load 1.8s 1.55s cubic-bezier(0.16, 1, 0.3, 1) both,
    energy-flow 2.8s 3.35s linear infinite;
}

.progress-fill::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 18%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.9),
    transparent
  );
  content: "";
  filter: blur(0.4px);
  transform: translateX(-120%);
  animation: data-pulse 1.9s 3.4s ease-in-out infinite;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #5f6b81;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
}

.intro {
  max-width: 600px;
  margin: 44px 0 0;
  color: #aab4c7;
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  letter-spacing: -0.025em;
  line-height: 1.65;
}

.actions {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-top: 38px;
}

.primary-action {
  display: flex;
  width: 154px;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  overflow: hidden;
  border: 1px solid rgba(93, 228, 255, 0.34);
  border-radius: 2px;
  background: rgba(93, 228, 255, 0.07);
  font-family: var(--mono);
  font-size: 0.76rem;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  border-color: var(--cyan);
  background: rgba(93, 228, 255, 0.13);
  outline: none;
  transform: translateY(-2px);
}

.footer {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer p {
  margin: 0;
}

.build-label span {
  color: #b8c1d2;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav.reveal { animation-delay: 1.05s; }
.title-lockup.reveal { animation-delay: 1.34s; }
.intro.reveal { animation-delay: 1.5s; }
.actions.reveal { animation-delay: 1.62s; }
.footer.reveal { animation-delay: 1.78s; }

.boot-screen {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 16px;
  background: #030509;
  animation: boot-away 700ms 720ms cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.boot-screen p {
  margin: 0;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-align: center;
}

.boot-line {
  width: 180px;
  height: 1px;
  overflow: hidden;
  background: rgba(93, 228, 255, 0.14);
}

.boot-line::after {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  content: "";
  transform: translateX(-100%);
  animation: boot-line 580ms 80ms ease-out forwards;
}

.boot-dots {
  animation: blink 600ms steps(2, end) infinite;
}

@keyframes boot-line { to { transform: translateX(0); } }
@keyframes boot-away { to { opacity: 0; visibility: hidden; transform: scale(1.03); } }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes pulse { 50% { opacity: 0.42; } }
@keyframes breathe { to { opacity: 0.6; transform: scale(1.08); } }
@keyframes cursor-blink { 50% { opacity: 0; } }
@keyframes progress-load { from { transform: scaleX(0); } }
@keyframes energy-flow { to { background-position: -220% 0; } }
@keyframes data-pulse { to { transform: translateX(660%); } }
@keyframes grid-arrival {
  from { opacity: 0; transform: perspective(650px) rotateX(58deg) scale(2.1) translateY(42%); }
}

@media (max-width: 700px) {
  main {
    width: min(100% - 40px, 1380px);
    padding: 25px 0 22px;
  }

  .hero {
    padding-top: 5vh;
  }

  .title-lockup h1 {
    font-size: clamp(4.7rem, 25vw, 7rem);
  }

  .loading-status {
    margin-top: 30px;
  }

  .intro {
    margin-top: 36px;
  }

  .actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid {
    background-size: 48px 48px;
  }
}

@media (max-height: 680px) {
  .hero {
    padding: 4vh 0 2vh;
  }

  .title-lockup h1 {
    font-size: clamp(4.2rem, 18vh, 8rem);
  }

  .intro {
    margin-top: 28px;
  }

  .actions {
    margin-top: 24px;
  }
}

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