:root {
  --bg-deep: #000000;
  --ink: #e6f5ea;
  --muted: #7f9888;
  --matrix: #00ff41;
  --matrix-bright: #7dff9a;
  --matrix-dim: rgba(0, 255, 65, 0.22);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font-body);
  background: #000000;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 28%, rgba(0, 255, 65, 0.07), transparent 58%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(0, 0, 0, 0.55), transparent 55%),
    #000000;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.5rem, 4vh, 3rem) 1.25rem 2rem;
  min-height: 100vh;
  min-height: 100dvh;
}

.hero-portal {
  justify-content: center;
}

.back-home {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.back-home:hover {
  color: var(--matrix);
  text-shadow: 0 0 12px var(--matrix-dim);
}

.hero-mark {
  position: relative;
  width: min(78vw, 30rem);
  margin: 0 auto 1.25rem;
  animation: logo-rise 1.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-mark-sm {
  width: min(42vw, 10.5rem);
  margin-bottom: 1.5rem;
}

.hero-mark::after {
  content: "";
  position: absolute;
  inset: 10% 14% 6%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--matrix-dim), transparent 70%);
  z-index: -1;
  filter: blur(10px);
  animation: glow-pulse 4.8s ease-in-out infinite;
}

.hero-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(1) contrast(1.05) drop-shadow(0 0 22px rgba(0, 255, 65, 0.18));
}

.portal-eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--matrix);
  text-shadow: 0 0 14px var(--matrix-dim);
  animation: copy-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7.5vw, 4.75rem);
  letter-spacing: 0.12em;
  line-height: 1.05;
  text-transform: none;
  color: var(--matrix);
  animation: copy-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.brand-glow {
  display: inline-block;
  text-shadow:
    0 0 4px rgba(0, 255, 65, 0.85),
    0 0 18px rgba(0, 255, 65, 0.45),
    0 0 42px rgba(0, 255, 65, 0.2);
}

.brand-sm {
  font-size: clamp(1.75rem, 5.5vw, 2.85rem);
  letter-spacing: 0.1em;
}

.tagline {
  margin: 1.1rem 0 0;
  max-width: 36rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.65rem;
  font-size: clamp(0.98rem, 2.1vw, 1.15rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
  animation: copy-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.tag-phrase {
  color: var(--muted);
  transition: color 0.4s ease;
  animation: phrase-glow 7.5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 2.5s);
}

@keyframes phrase-glow {
  0%, 100% {
    color: var(--muted);
    text-shadow: none;
    opacity: 0.72;
  }
  /* Soft peak for this phrase's turn in the cycle */
  8%, 22% {
    color: #c8f5d4;
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.28);
    opacity: 1;
  }
  30%, 92% {
    color: var(--muted);
    text-shadow: none;
    opacity: 0.72;
  }
}

.cta-row {
  margin-top: 2.1rem;
  animation: copy-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.42s both;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--matrix);
  background: transparent;
  border: 1px solid rgba(0, 255, 65, 0.55);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cta-primary:hover {
  color: #001408;
  background: var(--matrix);
  border-color: var(--matrix);
}

.cta-primary:focus-visible {
  outline: 2px solid var(--matrix);
  outline-offset: 3px;
}

.cta-primary.cta-disabled,
.cta-primary:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  color: var(--muted);
  border-color: rgba(127, 152, 136, 0.4);
  background: transparent;
}

.cta-primary.cta-disabled:hover,
.cta-primary:disabled:hover {
  color: var(--muted);
  background: transparent;
  border-color: rgba(127, 152, 136, 0.4);
}

.cta-ghost {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.cta-ghost:hover {
  color: var(--matrix);
  text-shadow: 0 0 12px var(--matrix-dim);
}

.site-foot {
  position: relative;
  z-index: 2;
  padding: 1rem 1.25rem 1.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(127, 152, 136, 0.65);
}

@keyframes logo-rise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes copy-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.05); }
}

@media (max-width: 640px) {
  .hero-mark {
    width: min(84vw, 21rem);
  }

  .back-home {
    position: static;
    margin-bottom: 1rem;
    align-self: flex-start;
  }

}

@media (prefers-reduced-motion: reduce) {
  .hero-mark,
  .hero-mark::after,
  .brand,
  .tagline,
  .cta-row,
  .portal-eyebrow,
  .tag-phrase {
    animation: none;
  }

  .tag-phrase {
    opacity: 1;
    color: var(--muted);
  }
}
