:root {
  --bg: #0b1411;
  --mint: #4ee3a1;
  --mint-line: #4fd39a;
  --text: #f4f7f5;
  --muted: #8f9e97;
  --tagline: #9aa8a2;
}

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

html {
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100svh;
  font-family: Outfit, system-ui, sans-serif;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(78, 227, 161, 0.08), transparent 55%),
    radial-gradient(800px 500px at 50% 110%, rgba(78, 227, 161, 0.05), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 4.5rem 1.5rem;
}

.stage {
  width: min(42rem, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3.25rem;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  animation: fade-up 0.9s ease both;
}

.brand-glow {
  position: absolute;
  width: 18rem;
  height: 18rem;
  left: -3.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(78, 227, 161, 0.22), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.mark {
  position: relative;
  z-index: 1;
  width: 8.75rem;
  height: auto;
  flex-shrink: 0;
  overflow: visible;
}

.mark-lines line {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: draw-line 1.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mark-lines line:nth-child(1) {
  animation-delay: 0.05s;
}
.mark-lines line:nth-child(2) {
  animation-delay: 0.12s;
}
.mark-lines line:nth-child(3) {
  animation-delay: 0.18s;
}
.mark-lines line:nth-child(4) {
  animation-delay: 0.26s;
}
.mark-lines line:nth-child(5) {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation-delay: 0.38s;
}

.mark-nodes circle {
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  fill: var(--mint);
  animation: node-in 0.45s ease forwards;
}

.mark-sparks {
  pointer-events: none;
}

.mark-sparks .spark {
  opacity: 0;
  transition: opacity 3.2s ease-in-out;
}

.mark-sparks .spark-body {
  transform-origin: 0 0;
  transform: scale(0.55);
  transition: transform 3.2s ease-in-out;
}

.mark-sparks .spark.is-nova {
  opacity: 0.9;
}

.mark-sparks .spark.is-nova .spark-body {
  transform: scale(1);
}

.mark-nodes circle:nth-child(1) {
  animation-delay: 0.55s;
}
.mark-nodes circle:nth-child(2) {
  animation-delay: 0.62s;
}
.mark-nodes circle:nth-child(3) {
  animation-delay: 0.68s;
}
.mark-nodes circle:nth-child(4) {
  animation-delay: 0.74s;
}
.mark-nodes circle:nth-child(5) {
  animation-delay: 0.8s;
}
.mark-nodes circle:nth-child(6) {
  animation-delay: 0.9s;
}

.wordmark {
  position: relative;
  z-index: 1;
  text-align: left;
  min-width: 16rem;
}

.name {
  font-size: clamp(2.4rem, 6vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}

.ai {
  color: var(--mint);
}

.rule {
  height: 1.5px;
  margin: 0.85rem 0 0.75rem;
  background: linear-gradient(90deg, var(--mint-line), rgba(79, 211, 154, 0.15));
  transform-origin: left;
  animation: rule-in 0.7s ease 0.55s both;
}

.tagline {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tagline);
}

.manifesto {
  max-width: 38rem;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.28rem, 2.4vw, 1.55rem);
  line-height: 1.55;
  color: rgba(244, 247, 245, 0.9);
  animation: fade-up 0.9s ease 0.45s both;
}

.stay {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mint);
  animation: fade-up 0.9s ease 0.75s both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes node-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rule-in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 640px) {
  .page {
    padding: 3rem 1.25rem;
  }

  .stage {
    gap: 2.5rem;
  }

  .brand {
    flex-direction: column;
    gap: 1.1rem;
  }

  .brand-glow {
    left: 50%;
    top: 1.5rem;
    transform: translateX(-50%);
    width: 14rem;
    height: 14rem;
  }

  .mark {
    width: 7.25rem;
  }

  .wordmark {
    text-align: center;
    min-width: 0;
  }

  .rule {
    transform-origin: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand,
  .manifesto,
  .stay,
  .mark-lines line,
  .mark-nodes circle,
  .mark-sparks .spark,
  .mark-sparks .spark-body,
  .rule {
    animation: none;
    transition: none;
  }

  .mark-lines line {
    stroke-dashoffset: 0;
  }

  .mark-nodes circle {
    opacity: 1;
  }

  .rule {
    transform: none;
  }
}
