/* Krive landing page. Scoped so capsule rendering remains unchanged. */
body.homepage-active {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

#homepage[hidden] {
  display: none;
}

#homepage {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

.homepage-sky,
.star-layer,
.star-copy {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.homepage-sky {
  z-index: -1;
  overflow: hidden;
}

.star-layer,
.star-copy {
  width: var(--star-size, 1px);
  height: var(--star-size, 1px);
  background: transparent;
  box-shadow: var(--star-field);
  animation: krive-stars var(--star-speed, 50s) linear infinite;
}

.star-copy {
  top: 2000px;
}

#stars { --star-speed: 50s; }
#stars2 { --star-speed: 100s; }
#stars3 { --star-speed: 150s; }

@keyframes krive-stars {
  from { transform: translateY(0); }
  to { transform: translateY(-2000px); }
}

.homepage-hero {
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 96px 24px 112px;
  text-align: center;
}

.homepage-hero h1 {
  margin: 0;
  color: transparent;
  background: linear-gradient(to bottom, #fff 25%, #a9b7c5 62%, #38495a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-family: Lato, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.1rem, 6vw, 4rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: clamp(0.22rem, 1vw, 0.68rem);
  text-indent: clamp(0.22rem, 1vw, 0.68rem);
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.08);
}

.homepage-capabilities {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.homepage-typewriter {
  box-sizing: border-box;
  min-height: 2rem;
  margin: 28px 0 0;
  color: #b7c3cf;
  font-family: Lato, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(0.78rem, 2.3vw, 1.15rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: clamp(0.08rem, 0.45vw, 0.28rem);
  text-transform: uppercase;
}

.homepage-typewriter::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 0.35em;
  vertical-align: -0.1em;
  background: currentColor;
  animation: krive-caret 0.9s steps(1, end) infinite;
}

@keyframes krive-caret {
  50% { opacity: 0; }
}

.homepage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 38px;
}

.homepage-action {
  min-width: 136px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #e9f0f6;
  background: rgba(255, 255, 255, 0.045);
  font: 400 0.76rem/1.2 Lato, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.12rem;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.homepage-action:hover,
.homepage-action:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.homepage-action:focus-visible,
.homepage-footer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.homepage-footer {
  box-sizing: border-box;
  position: absolute;
  right: 0;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0 20px;
  font: 400 0.72rem/1.5 Lato, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.homepage-footer a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition: color 180ms ease;
}

.homepage-footer a:hover {
  color: #fff;
}

body.homepage-active #menu {
  z-index: 10;
}

@media (max-width: 600px) {
  .homepage-hero {
    padding: 82px 18px 122px;
  }

  .homepage-actions {
    margin-top: 30px;
  }

  .homepage-footer {
    gap: 16px;
    font-size: 0.64rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .star-layer,
  .star-copy,
  .homepage-typewriter::after {
    animation: none;
  }

  .homepage-action {
    transition: none;
  }
}
