:root {
  --bg: #141618;
  --bg-deep: #0e1012;
  --border: #2a2e33;
  --ink-teal: #0c9a8e;
  --ink-teal-light: #0fb0a2;
  --slate: #94a3b8;
  --text: #e8eef2;
  --text-secondary: #94a3b8;
  --font-brand: "RocknRoll One", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 50% 45%, rgba(15, 176, 162, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 20% 85%, rgba(100, 116, 139, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #181a1d 0%, var(--bg) 40%, var(--bg-deep) 100%);
}

.aether-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(15, 176, 162, 0.09) 0%, transparent 42%);
  animation: aetherBreath 8s ease-in-out infinite;
}

.aether-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

.lodestone {
  opacity: 0.22;
  animation: lodestoneTurn 120s linear infinite;
}

.lodestone-ring {
  stroke: var(--slate);
  stroke-width: 0.75;
  stroke-dasharray: 4 14;
}

.lodestone-ring--inner {
  stroke-dasharray: 2 10;
  opacity: 0.7;
}

.lodestone-spokes line {
  stroke: var(--slate);
  stroke-width: 0.5;
  opacity: 0.35;
}

.aether-link {
  stroke: url(#aether-beam);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 12 28;
  opacity: 0.45;
  animation: aetherFlow 14s linear infinite;
}

.aether-link--alt {
  animation-duration: 18s;
  animation-direction: reverse;
  opacity: 0.32;
}

.mote {
  fill: #a7f3ec;
  opacity: 0;
  animation: moteDrift 9s ease-in-out infinite;
}

.mote:nth-child(1) { animation-delay: 0s; }
.mote:nth-child(2) { animation-delay: 1.1s; }
.mote:nth-child(3) { animation-delay: 2.4s; }
.mote:nth-child(4) { animation-delay: 3.6s; }
.mote:nth-child(5) { animation-delay: 4.8s; }
.mote:nth-child(6) { animation-delay: 5.9s; }
.mote:nth-child(7) { animation-delay: 7.1s; }
.mote:nth-child(8) { animation-delay: 8.3s; }

.crystal-body {
  fill: rgba(15, 176, 162, 0.18);
  stroke: var(--ink-teal-light);
  stroke-width: 1;
}

.crystal-core {
  fill: rgba(167, 243, 236, 0.55);
  stroke: none;
  transform-origin: center;
  transform-box: fill-box;
  animation: crystalPulse 4.5s ease-in-out infinite;
}

.crystal:nth-child(1) .crystal-core { animation-delay: 0s; }
.crystal:nth-child(2) .crystal-core { animation-delay: 0.7s; }
.crystal:nth-child(3) .crystal-core { animation-delay: 1.4s; }
.crystal:nth-child(4) .crystal-core { animation-delay: 2.1s; }
.crystal:nth-child(5) .crystal-core { animation-delay: 2.8s; }
.crystal:nth-child(6) .crystal-core { animation-delay: 3.5s; }

@keyframes aetherBreath {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes lodestoneTurn {
  to { transform: rotate(360deg); }
}

@keyframes aetherFlow {
  to { stroke-dashoffset: -160; }
}

@keyframes moteDrift {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  15% {
    opacity: 0.85;
  }
  85% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translateY(-28px);
  }
}

@keyframes crystalPulse {
  0%, 100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

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

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  max-width: 36rem;
  margin: 0 auto;
  animation: reveal 0.85s ease-out both;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.brand-kaia {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: #fff;
}

.brand-tools {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: var(--ink-teal-light);
  /* Lead space balances trailing letter-spacing so letterforms center under Kaia */
  padding-left: 0.48em;
}

.lede {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.tool-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  border-top: 1px solid var(--border);
}

.tool-link {
  display: block;
  width: 100%;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  text-align: center;
  transition: color 0.2s ease;
}

.tool-link:hover {
  color: var(--ink-teal-light);
}

@media (prefers-reduced-motion: reduce) {
  .aether-glow,
  .lodestone,
  .aether-link,
  .mote,
  .crystal-core,
  .page {
    animation: none;
  }

  .mote {
    opacity: 0.35;
  }
}
