:root {
  --color-bg: #07110c;
  --color-bg-deep: #030705;
  --color-surface: rgba(10, 22, 16, 0.72);
  --color-text: #f6faf7;
  --color-text-soft: rgba(246, 250, 247, 0.72);
  --color-line: rgba(143, 255, 188, 0.12);
  --color-accent: #3be37d;
  --color-accent-soft: rgba(59, 227, 125, 0.18);
  --shadow-glow: 0 0 48px rgba(59, 227, 125, 0.18);
  --font-stack: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --content-width: 68rem;
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(36, 102, 64, 0.18), transparent 32%),
    radial-gradient(circle at 80% 25%, rgba(59, 227, 125, 0.08), transparent 24%),
    linear-gradient(145deg, var(--color-bg) 0%, var(--color-bg-deep) 55%, #020302 100%);
  color: var(--color-text);
  font-family: var(--font-stack);
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(143, 255, 188, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 255, 188, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 78%);
  pointer-events: none;
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  isolation: isolate;
}

.ambient,
.grid-glow,
.gorilla-presence {
  position: absolute;
  pointer-events: none;
}

.ambient {
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.72;
  animation: drift 14s ease-in-out infinite;
}

.ambient-one {
  top: 10%;
  left: -8%;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(59, 227, 125, 0.18), transparent 70%);
}

.ambient-two {
  right: -6%;
  bottom: 12%;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(30, 125, 74, 0.16), transparent 72%);
  animation-delay: -7s;
}

.grid-glow {
  inset: auto 0 18vh;
  margin: 0 auto;
  width: min(68rem, calc(100% - 3rem));
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 227, 125, 0.4),
    transparent
  );
  box-shadow: var(--shadow-glow);
}

.gorilla-presence {
  z-index: 0;
  top: 52%;
  left: 50%;
  width: min(54rem, 86vw);
  aspect-ratio: 470 / 625;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: presence-arrive 2.2s ease 180ms forwards;
}

.gorilla-presence::before,
.gorilla-presence::after {
  content: "";
  position: absolute;
  inset: 0;
}

.gorilla-presence::before {
  background: url("../assets/images/gorilla.webp") center / contain no-repeat;
  filter: invert(1) contrast(1.18) brightness(0.88) drop-shadow(0 0 34px rgba(59, 227, 125, 0.34));
  mix-blend-mode: screen;
  opacity: 0.075;
  -webkit-mask-image: radial-gradient(ellipse at center, black 42%, rgba(0, 0, 0, 0.8) 58%, transparent 82%);
  mask-image: radial-gradient(ellipse at center, black 42%, rgba(0, 0, 0, 0.8) 58%, transparent 82%);
}

.gorilla-presence::after {
  background:
    radial-gradient(circle at 50% 41%, rgba(59, 227, 125, 0.15), transparent 24%),
    radial-gradient(ellipse at center, rgba(246, 250, 247, 0.08), transparent 54%);
  filter: blur(26px);
  opacity: 0.58;
}

.site-footer {
  width: min(var(--content-width), calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  width: min(var(--content-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0 5rem;
}

.hero > * {
  margin: 0;
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 900ms ease forwards;
}

.eyebrow {
  max-width: 46rem;
  margin-bottom: 1.4rem;
  color: var(--color-text-soft);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
  animation-delay: 120ms;
}

h1 {
  max-width: 12ch;
  font-size: 6.75rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.95;
  text-wrap: balance;
  animation-delay: 240ms;
}

h1::after {
  content: "";
  display: block;
  width: min(18rem, 48vw);
  height: 0.25rem;
  margin: 1.5rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  box-shadow: var(--shadow-glow);
  animation: pulse 4.5s ease-in-out infinite;
}

.status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.85rem;
  color: var(--color-text);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  animation-delay: 360ms;
}

.status::before,
.status::after {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 227, 125, 0.76));
  box-shadow: 0 0 20px rgba(59, 227, 125, 0.28);
  transform-origin: center;
  animation: signal-line 3.8s ease-in-out infinite;
}

.status::after {
  background: linear-gradient(90deg, rgba(59, 227, 125, 0.76), transparent);
  animation-delay: 420ms;
}

.status span {
  background: linear-gradient(
    90deg,
    rgba(246, 250, 247, 0.78),
    var(--color-text),
    var(--color-accent),
    var(--color-text)
  );
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: signal-text 5.2s ease-in-out infinite;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 0 0 1.5rem;
  text-align: center;
  color: rgba(246, 250, 247, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.motion-reduce * {
  animation: none !important;
  transition: none !important;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, -18px, 0) scale(1.04);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scaleX(1);
  }

  50% {
    opacity: 1;
    transform: scaleX(1.06);
  }
}

@keyframes presence-arrive {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes signal-line {
  0%,
  100% {
    opacity: 0.48;
    transform: scaleX(0.82);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes signal-text {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@media (max-width: 900px) {
  h1 {
    font-size: 4.75rem;
  }
}

@media (max-width: 640px) {
  .gorilla-presence {
    top: 51%;
    width: 34rem;
  }

  .gorilla-presence::before {
    opacity: 0.13;
  }

  .hero {
    padding: 3rem 0 4rem;
  }

  .eyebrow {
    max-width: 24rem;
    margin-bottom: 1.15rem;
    font-size: 0.98rem;
    letter-spacing: 0;
  }

  h1 {
    font-size: 3.35rem;
  }

  .status {
    gap: 0.65rem;
    font-size: 0.88rem;
    letter-spacing: 0;
  }

  .status::before,
  .status::after {
    width: 1.45rem;
  }
}

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

  .ambient,
  .gorilla-presence,
  .hero > *,
  h1::after,
  .status::before,
  .status::after,
  .status span {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .gorilla-presence {
    transform: translate(-50%, -50%);
  }
}
