@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("./assets/fonts/orbitron-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --font-display: "Orbitron", "Bahnschrift", sans-serif;
  --font-body: "Orbitron", "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Orbitron", "Cascadia Mono", Consolas, monospace;
  --cursor-asteroid: url("./assets/asteroid-cursor.png") 9 23, auto;
  --bg: #080808;
  --surface: #0d0d0d;
  --text: #f5f5f3;
  --muted: #8c8c88;
  --faint: #545451;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --glow: rgba(255, 255, 255, 0.08);
  --grid: rgba(255, 255, 255, 0.032);
  --atmosphere-halo: rgba(255, 255, 255, 0.085);
  --atmosphere-star: rgba(255, 255, 255, 0.58);
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f1ef;
  --surface: #f8f8f6;
  --text: #111110;
  --muted: #6e6e68;
  --faint: #94948e;
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.22);
  --glow: rgba(255, 255, 255, 0.7);
  --grid: rgba(0, 0, 0, 0.035);
  --atmosphere-halo: rgba(0, 0, 0, 0.035);
  --atmosphere-star: rgba(0, 0, 0, 0.3);
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color 500ms var(--ease), color 500ms var(--ease);
  animation: grid-shift 28s linear infinite;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background: radial-gradient(circle at 72% 26%, var(--glow), transparent 32%);
  content: "";
  pointer-events: none;
}

.space-atmosphere {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.space-atmosphere__halo {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(360px, 44vw, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--atmosphere-halo), transparent 68%);
  filter: blur(8px);
  opacity: 0.9;
  transform: translate3d(72vw, 26vh, 0) translate(-50%, -50%);
  transition: opacity 500ms var(--ease);
  will-change: transform;
}

.star-field {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--atmosphere-star);
  pointer-events: none;
}

.star-field--far {
  opacity: 0.42;
  box-shadow:
    8vw 14vh 0 -0.5px var(--atmosphere-star),
    19vw 72vh 0 -0.5px var(--atmosphere-star),
    31vw 28vh 0 -0.5px var(--atmosphere-star),
    44vw 84vh 0 -0.5px var(--atmosphere-star),
    58vw 12vh 0 -0.5px var(--atmosphere-star),
    69vw 67vh 0 -0.5px var(--atmosphere-star),
    77vw 36vh 0 -0.5px var(--atmosphere-star),
    89vw 78vh 0 -0.5px var(--atmosphere-star),
    96vw 22vh 0 -0.5px var(--atmosphere-star);
  animation: stars-drift-far 24s ease-in-out infinite alternate;
}

.star-field--near {
  width: 3px;
  height: 3px;
  opacity: 0.3;
  box-shadow:
    14vw 44vh 0 -1px var(--atmosphere-star),
    36vw 18vh 0 -1px var(--atmosphere-star),
    52vw 73vh 0 -1px var(--atmosphere-star),
    71vw 26vh 0 -1px var(--atmosphere-star),
    84vw 58vh 0 -1px var(--atmosphere-star),
    93vw 41vh 0 -1px var(--atmosphere-star);
  animation: stars-drift-near 16s ease-in-out infinite alternate;
}

.shooting-star {
  position: absolute;
  top: 12vh;
  right: -180px;
  width: 150px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--text));
  opacity: 0;
  transform: rotate(-34deg);
  transform-origin: right center;
  animation: shooting-star-pass 13s 4.5s ease-in infinite;
}

button,
a {
  color: inherit;
  cursor: var(--cursor-asteroid);
}

body {
  cursor: var(--cursor-asteroid);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 1440px);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  height: 104px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  animation: header-in 900ms 80ms var(--ease) both;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-decoration: none;
}

.theme-toggle {
  display: grid;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: var(--cursor-asteroid);
  place-items: center;
}

.theme-toggle__track {
  position: relative;
  display: flex;
  width: 70px;
  height: 34px;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 250ms ease, background-color 500ms var(--ease);
}

.theme-toggle__thumb {
  position: absolute;
  top: 4px;
  left: 38px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: left 400ms var(--ease), background-color 500ms var(--ease);
}

[data-theme="light"] .theme-toggle__thumb {
  left: 6px;
}

.theme-toggle__icon {
  z-index: 1;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--faint);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: opacity 300ms ease, transform 500ms var(--ease);
}

[data-theme="dark"] .theme-toggle__icon--moon,
[data-theme="light"] .theme-toggle__icon--sun {
  transform: rotate(18deg);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 5px;
  border-radius: 999px;
}

.hero {
  display: grid;
  min-height: calc(100svh - 104px);
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
  align-items: center;
  gap: 5vw;
  border-bottom: 1px solid var(--line);
}

.hero__content {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding-block: 80px;
}

.hero__content > * {
  animation: reveal-up 900ms var(--ease) both;
}

.hero__content > :nth-child(1) {
  animation-delay: 180ms;
}

.hero__content > :nth-child(2) {
  animation-delay: 260ms;
}

.hero__content > :nth-child(3) {
  animation-delay: 360ms;
}

.hero__content > :nth-child(4) {
  animation-delay: 460ms;
}

.eyebrow,
.section-index {
  margin: 0 0 28px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow span {
  width: 28px;
  height: 1px;
  background: var(--text);
}

h1 {
  max-width: 770px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 4vw, 68px);
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.04;
  text-transform: uppercase;
}

.intro {
  max-width: 520px;
  margin: 40px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.6;
}

.status {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  margin-top: 42px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.status__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px var(--line);
  animation: pulse 2.8s ease-in-out infinite;
}

.hero__visual {
  position: relative;
  top: clamp(-300px, -22vh, -170px);
  display: grid;
  aspect-ratio: 1;
  width: min(100%, 720px);
  justify-self: end;
  place-items: center;
  overflow: visible;
  animation: asteroid-arrival 1.5s 180ms var(--ease) both;
  pointer-events: none;
}

.hero__visual::before {
  position: absolute;
  z-index: 3;
  top: 18%;
  left: 17%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text);
  box-shadow:
    29vw 5vw 0 -1px var(--faint),
    22vw 21vw 0 -1px var(--text),
    5vw 28vw 0 -1px var(--faint),
    30vw 31vw 0 -1px var(--faint),
    14vw 8vw 0 -1px var(--text);
  content: "";
  opacity: 0.7;
  animation: particle-drift 7s ease-in-out infinite alternate;
  pointer-events: none;
}

.filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.logo-art {
  position: absolute;
  z-index: 1;
  width: 112%;
  height: 112%;
  object-fit: cover;
  transition: opacity 500ms var(--ease), transform 1.2s var(--ease);
  animation: logo-float 6.5s 1.7s ease-in-out infinite alternate;
  filter: url("#logo-luma") drop-shadow(0 28px 30px rgba(0, 0, 0, 0.22));
}

[data-theme="light"] .logo-art {
  filter: url("#logo-luma") invert(1) drop-shadow(0 28px 30px rgba(0, 0, 0, 0.12));
}

.hero__visual:hover .logo-art {
  transform: translate(-6px, 6px) scale(1.018);
}

.infrastructure {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 7vw;
  padding-block: 140px;
  border-bottom: 1px solid var(--line);
}

.infrastructure h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 76px);
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.04;
  text-transform: uppercase;
}

.infrastructure__grid {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  list-style: none;
}

.infrastructure__grid li {
  display: grid;
  min-height: 72px;
  grid-template-columns: 64px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: clamp(15px, 1.4vw, 19px);
  letter-spacing: -0.015em;
}

.infrastructure__grid span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.site-footer {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.infrastructure__grid.reveal {
  transition-delay: 120ms;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@keyframes grid-shift {
  to {
    background-position: 72px 72px, 72px 72px, 0 0;
  }
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
}

@keyframes asteroid-arrival {
  from {
    opacity: 0;
    transform: translate(18%, -18%) scale(0.9);
  }
}

@keyframes logo-float {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-7px, 9px);
  }
}

@keyframes particle-drift {
  to {
    transform: translate(10px, -12px);
    opacity: 0.35;
  }
}

@keyframes stars-drift-far {
  to {
    transform: translate3d(10px, -14px, 0);
  }
}

@keyframes stars-drift-near {
  to {
    transform: translate3d(-16px, 18px, 0);
  }
}

@keyframes shooting-star-pass {
  0%,
  72% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-34deg);
  }
  75% {
    opacity: 0.5;
  }
  83% {
    opacity: 0;
    transform: translate3d(-48vw, 34vh, 0) rotate(-34deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(-48vw, 34vh, 0) rotate(-34deg);
  }
}

@media (max-width: 1040px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 96px;
  }

  .hero__content {
    padding: 0;
  }

  .hero__visual {
    top: -110px;
    width: min(82vw, 680px);
    justify-self: center;
  }

  .infrastructure {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 30px, 1440px);
  }

  .site-header {
    height: 84px;
  }

  .hero {
    gap: 64px;
    padding-block: 76px 64px;
  }

  h1 {
    font-size: clamp(31px, 8.4vw, 40px);
  }

  .intro {
    margin-top: 30px;
  }

  .status {
    margin-top: 34px;
  }

  .hero__visual {
    width: 100%;
  }

  .infrastructure {
    padding-block: 92px;
  }

  .infrastructure__grid li {
    min-height: 66px;
    grid-template-columns: 44px 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }

  .space-atmosphere__halo {
    opacity: 0.55;
  }

  .shooting-star {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}
