:root {
  color-scheme: dark;
  --ink: #f7efe2;
  --muted: #b7ad9b;
  --deep: #08070f;
  --night: #111827;
  --sand: #d9a441;
  --spice: #f06b3f;
  --cyan: #6ce5e8;
  --green: #9be27d;
  --violet: #8c6aff;
  --panel: rgba(14, 18, 29, 0.72);
  --line: rgba(247, 239, 226, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 18%, rgba(84, 220, 226, 0.18), transparent 31rem),
    radial-gradient(circle at 84% 22%, rgba(214, 162, 74, 0.16), transparent 28rem),
    linear-gradient(135deg, #070812 0%, #10242a 46%, #271108 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

#jv-field,
.grain {
  position: fixed;
  inset: 0;
}

#jv-field {
  z-index: 0;
  pointer-events: none;
}

.grain {
  z-index: 1;
  opacity: 0.08;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  pointer-events: none;
}

.keeper-proclamation {
  position: fixed;
  left: var(--keeper-pop-x, 72vw);
  top: var(--keeper-pop-y, 44vh);
  z-index: 4;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.95rem 1.05rem;
  border: 1px solid rgba(108, 229, 232, 0.38);
  border-radius: 8px;
  color: #fff4db;
  background:
    radial-gradient(circle at 18% 12%, rgba(108, 229, 232, 0.2), transparent 10rem),
    linear-gradient(140deg, rgba(8, 7, 15, 0.88), rgba(34, 19, 12, 0.82));
  box-shadow:
    0 18px 56px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(108, 229, 232, 0.2);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(0.98rem, 2vw, 1.18rem);
  font-weight: 800;
  line-height: 1.22;
  text-wrap: balance;
  text-shadow: 0 0 18px rgba(108, 229, 232, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -100%) scale(0.92);
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.keeper-proclamation::after {
  position: absolute;
  left: 50%;
  bottom: -0.55rem;
  width: 1rem;
  height: 1rem;
  content: "";
  border-right: 1px solid rgba(108, 229, 232, 0.34);
  border-bottom: 1px solid rgba(108, 229, 232, 0.34);
  background: rgba(19, 13, 15, 0.9);
  transform: translateX(-50%) rotate(45deg);
}

.keeper-proclamation.is-visible {
  opacity: 1;
  transform: translate(-50%, -112%) scale(1);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem clamp(1rem, 4vw, 3.5rem);
  background: linear-gradient(to bottom, rgba(8, 7, 15, 0.88), rgba(8, 7, 15, 0));
  backdrop-filter: blur(12px);
}

.brand,
nav,
.hero-actions,
.signal-list,
.telemetry {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1px solid rgba(108, 229, 232, 0.5);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(8, 7, 15, 0.58);
  box-shadow: 0 0 28px rgba(108, 229, 232, 0.22);
}

nav {
  gap: clamp(0.75rem, 2vw, 1.6rem);
  color: var(--muted);
  font-size: 0.92rem;
}

nav a:hover {
  color: var(--ink);
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
  padding: clamp(7rem, 12vh, 9rem) clamp(1rem, 5vw, 5rem) clamp(4rem, 8vh, 6rem);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 64rem;
  min-width: 0;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 1rem;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", Inter, sans-serif;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.2rem;
  font-size: clamp(4.2rem, 10vw, 9.2rem);
  line-height: 0.82;
  text-transform: uppercase;
  text-shadow:
    0 0 30px rgba(240, 107, 63, 0.32),
    0 0 70px rgba(108, 229, 232, 0.15);
}

h1 span {
  display: block;
}

.lede {
  max-width: 42rem;
  color: #e0d4bf;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.6;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  min-height: 3.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.button.primary {
  color: #130b04;
  background: linear-gradient(135deg, var(--sand), var(--spice));
  border-color: transparent;
  box-shadow: 0 18px 42px rgba(240, 107, 63, 0.28);
}

.button.ghost {
  color: var(--ink);
  background: rgba(247, 239, 226, 0.08);
}

.hero-scene-space,
.keeper-scene-space {
  min-height: clamp(28rem, 58vw, 46rem);
  position: relative;
}

.hero-scene-space::before,
.keeper-scene-space::before {
  position: absolute;
  inset: 13% 0 8%;
  content: "";
  border: 1px solid rgba(108, 229, 232, 0.14);
  border-radius: 50%;
  filter: blur(0.4px);
  opacity: 0.54;
  transform: rotateX(69deg) rotateZ(-12deg);
  box-shadow:
    0 0 90px rgba(108, 229, 232, 0.12),
    inset 0 0 80px rgba(217, 164, 65, 0.1);
  mix-blend-mode: screen;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 5vw, 5rem);
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 2rem;
}

h2 {
  max-width: 15ch;
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.system-panel {
  min-height: 18rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 239, 226, 0.09), rgba(14, 18, 29, 0.68));
  box-shadow: var(--shadow);
}

.system-panel h3 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.system-panel p:last-child,
.orbit-copy p,
.keeper-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.keeper-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 1.05fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: 92svh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 8, 18, 0.6), rgba(7, 8, 18, 0.14) 58%, rgba(7, 8, 18, 0.02)),
    radial-gradient(circle at calc(69% + (var(--field-x, 0.5) * 8%)) 52%, rgba(84, 220, 226, 0.12), transparent 24rem),
    radial-gradient(circle at 48% calc(18% + (var(--field-y, 0.5) * 8%)), rgba(217, 164, 65, 0.1), transparent 20rem);
}

.keeper-section::before,
.keeper-section::after {
  position: absolute;
  inset: 4% -18%;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 12%, rgba(108, 229, 232, 0.11) 32%, transparent 54%),
    linear-gradient(288deg, transparent 18%, rgba(217, 164, 65, 0.1) 42%, transparent 66%);
  filter: blur(22px);
  opacity: 0.72;
  transform: translate3d(0, 0, 0) rotate(-8deg);
  animation: keeperSectionFlow 18s ease-in-out infinite;
}

.keeper-section::after {
  inset: 16% -24%;
  opacity: 0.46;
  filter: blur(38px);
  transform: translate3d(7vw, 0, 0) rotate(12deg);
  animation-duration: 24s;
  animation-direction: reverse;
}

.keeper-copy {
  position: relative;
  z-index: 2;
  max-width: 44rem;
}

.keeper-powers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.5rem;
}

.keeper-powers span,
.keeper-trait-line {
  border: 1px solid rgba(108, 229, 232, 0.22);
  border-radius: 999px;
  background: rgba(8, 7, 15, 0.58);
  color: #e9dcc8;
  font-size: 0.82rem;
  font-weight: 800;
}

.keeper-trait-line {
  width: fit-content;
  max-width: 100%;
  margin: 1.35rem 0 0;
  padding: 0.7rem 0.95rem;
  overflow-wrap: anywhere;
}

.keeper-powers span {
  min-height: 2.65rem;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.9rem;
}

.keeper-scene-space {
  display: grid;
  min-height: clamp(34rem, 64vw, 52rem);
  align-items: end;
  justify-items: end;
}

.keeper-scene-marker {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  margin: 0 clamp(1rem, 8vw, 7rem) clamp(2rem, 7vw, 6rem) 0;
  padding: 0.64rem 0.9rem;
  border: 1px solid rgba(108, 229, 232, 0.22);
  border-radius: 999px;
  color: rgba(247, 239, 226, 0.76);
  background: rgba(7, 8, 18, 0.36);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

@keyframes keeperSectionFlow {
  0%,
  100% {
    transform: translate3d(-7vw, 0, 0) rotate(-8deg);
  }

  50% {
    transform: translate3d(9vw, -3vh, 0) rotate(5deg);
  }
}

.signal-band,
.orbit {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(100deg, rgba(217, 164, 65, 0.08), transparent),
    rgba(8, 7, 15, 0.36);
}

.signal-list {
  flex-wrap: wrap;
  align-content: center;
  gap: 0.85rem;
}

.signal-list span {
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(247, 239, 226, 0.16);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  background: rgba(247, 239, 226, 0.06);
  color: #ece0cc;
  font-weight: 800;
}

.orbit {
  border-bottom: 0;
  background:
    linear-gradient(120deg, rgba(108, 229, 232, 0.1), transparent 44%),
    linear-gradient(300deg, rgba(155, 226, 125, 0.08), transparent 50%);
}

.orbit-copy {
  max-width: 42rem;
}

.telemetry {
  align-items: stretch;
  justify-content: end;
  gap: 1rem;
}

.telemetry div {
  width: min(14rem, 31vw);
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 7, 15, 0.62);
}

.telemetry span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.telemetry strong {
  font-family: "Space Grotesk", Inter, sans-serif;
  color: var(--cyan);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
  }

  nav {
    display: none;
  }

  .hero,
  .keeper-section,
  .signal-band,
  .orbit {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 6.5rem;
  }

  .hero-scene-space {
    min-height: min(72vw, 26rem);
    order: -1;
  }

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

  .keeper-scene-space {
    min-height: clamp(30rem, 112vw, 42rem);
    order: -1;
    margin-right: 0;
  }

  .telemetry {
    flex-direction: column;
  }

  .telemetry div {
    width: 100%;
  }
}

@media (max-width: 560px) {
  h1 {
    max-width: 100%;
    font-size: clamp(2.9rem, 13vw, 3.2rem);
    line-height: 0.9;
  }

  .hero {
    gap: 1.5rem;
  }

  .hero-copy {
    max-width: calc(100vw - 3rem);
  }

  .hero-scene-space {
    min-height: 19rem;
  }

  .lede {
    max-width: 19rem;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
  }

  .keeper-scene-space {
    min-height: 31rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

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

  .keeper-section::before,
  .keeper-section::after {
    transform: none !important;
  }
}
