:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #fff4e5;
  background: #101319;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 5vw, 4rem);
  background: radial-gradient(ellipse at 80% 5%, #492623, transparent 65%);
}

.welcome {
  width: min(100%, 42rem);
  padding: clamp(1.4rem, 6vw, 4rem);
  border: 1px solid #79514a;
  border-radius: 1.25rem;
  background: linear-gradient(155deg, #261d22, #151920 72%);
  box-shadow: 0 1.5rem 5rem #090a0eb3;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #ffd291;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-detail {
  display: block;
  color: #e9c6b1;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.mark {
  flex: 0 0 2.9rem;
  height: 2.9rem;
  border: 1px solid #bd7c62;
  border-radius: 50%;
  background: radial-gradient(circle, #fff4d5 0 13%, #eda866 15% 22%,
    #402728 24% 42%, #d98564 44% 48%, transparent 50%);
}

h1 {
  margin: clamp(2rem, 7vw, 3.5rem) 0 1rem;
  font-size: clamp(2.35rem, 8vw, 4.35rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

p { line-height: 1.6; }
.greeting { font-size: 1.125rem; }

.help {
  margin: 1.65rem 0 0;
  padding-top: 1.3rem;
  border-top: 1px solid #62413d;
  color: #dcc6bf;
}

.startup {
  display: grid;
  place-items: center;
  min-height: clamp(8rem, 30vw, 12rem);
  margin-top: clamp(1.25rem, 5vw, 2rem);
  overflow: hidden;
  background: radial-gradient(ellipse, #15566c51, transparent 65%);
}

.reactor {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(7rem, 26vw, 10rem);
  aspect-ratio: 1;
}

.ring {
  position: absolute;
  border-radius: 50%;
}

.ring-outer {
  inset: 2%;
  border: 1px solid #6dd7ef70;
  border-top: 2px solid #a7f2ff;
  border-bottom: 2px solid #d58e66;
}

.ring-inner {
  inset: 13%;
  border: 2px dashed #68bfd4a0;
}

.reactor-core {
  display: grid;
  place-items: center;
  width: 52%;
  aspect-ratio: 1;
  border: 1px solid #a7f2ff;
  border-radius: 50%;
  background: radial-gradient(circle, #1a5671, #101d2c 72%);
  box-shadow: inset 0 0 1rem #53ddff50, 0 0 1.2rem #53ddff50;
  color: #d9faff;
  font-size: clamp(1.75rem, 7vw, 2.7rem);
  font-weight: 750;
  line-height: 1;
  text-shadow: 0 0 0.8rem #68eaff;
}

.startup + h1 {
  margin-top: clamp(0.75rem, 3vw, 1.75rem);
}

@media (prefers-reduced-motion: no-preference) {
  .ring-outer { animation: assemble 1.4s cubic-bezier(.18, .65, .3, 1) both; }
  .ring-inner { animation: assemble-inner 1.15s .1s ease-out both; }
  .reactor-core { animation: ignite 1.5s ease-out both; }
  .welcome h1, .greeting, .help { animation: greet .6s .65s ease-out both; }
}

@keyframes assemble {
  from { opacity: 0; transform: rotate(-150deg) scale(.72); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes ignite {
  0% { opacity: .2; transform: scale(.85); }
  60% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes greet {
  from { opacity: .35; transform: translateY(.45rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes assemble-inner {
  from { opacity: 0; transform: rotate(110deg) scale(1.15); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

.voice {
  margin-top: 1.25rem;
}

.voice p {
  margin: 0 0 0.5rem;
  color: #a7f2ff;
  font-weight: 600;
}

.voice audio {
  display: block;
  width: min(100%, 22rem);
}

.voice a { color: #a7f2ff; }

.startup {
  position: relative;
  min-height: clamp(11rem, 44vw, 16rem);
  isolation: isolate;
}

.startup::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 1.35rem, #50a9bc1a 1.35rem 1.4rem),
    repeating-linear-gradient(90deg, transparent 0 1.35rem, #50a9bc1a 1.35rem 1.4rem);
  mask-image: radial-gradient(ellipse, #000 10%, transparent 72%);
  content: "";
}

.reactor {
  width: clamp(8rem, 33vw, 12rem);
}

.ring-outer {
  background: conic-gradient(from 310deg, #63def04d, transparent 26%, transparent 89%, #63def04d);
  box-shadow: inset 0 0 1rem #53ddff30, 0 0 0.85rem #53ddff24;
}

.voice-wave {
  position: absolute;
  top: calc(100% + 0.15rem);
  display: flex;
  align-items: center;
  gap: 0.24rem;
  height: 1rem;
  opacity: 0;
}

.voice-wave i {
  width: 0.2rem;
  height: 0.9rem;
  border-radius: 1rem;
  background: #8ceeff;
  transform: scaleY(0.35);
}

.speaking .voice-wave { opacity: 1; }

.motion-toggle {
  display: block;
  margin: 1rem 0 0;
  min-height: 2.75rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid #52616a;
  border-radius: 0.5rem;
  color: #c7e9ed;
  background: #19252d;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.motion-toggle[hidden] { display: none; }
.motion-toggle:focus-visible { outline: 2px solid #8ceeff; outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .ring-outer {
    animation: assemble 1.4s ease-out both, orbit 14s 1.4s linear infinite;
  }

  .ring-inner {
    animation: assemble-inner 1.25s ease-out both, orbit 21s 1.25s linear infinite reverse;
  }

  .reactor-core > span { animation: glow 3.6s ease-in-out infinite; }
  .speaking .reactor-core > span { animation-duration: 0.95s; }

  .speaking .voice-wave i { animation: speak 0.7s ease-in-out infinite alternate; }
  .speaking .voice-wave i:nth-child(2n) { animation-delay: -0.23s; }
  .speaking .voice-wave i:nth-child(3) { animation-delay: -0.45s; }

  .animation-paused .ring,
  .animation-paused .reactor-core,
  .animation-paused .reactor-core > span,
  .animation-paused .voice-wave i {
    animation-play-state: paused;
  }
}

@keyframes orbit {
  to { transform: rotate(1turn); }
}

@keyframes glow {
  50% { text-shadow: 0 0 0.45rem #b8f8ff, 0 0 1.5rem #4ce7ff; }
}

@keyframes speak {
  to { transform: scaleY(1); }
}

.voice-button {
  display: block;
  width: min(100%, 24rem);
  min-height: 3.5rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid #d8faff;
  border-radius: 0.65rem;
  color: #09212a;
  background: #8ceeff;
  box-shadow: 0 0 1.3rem #65dfff38;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.voice-button:hover { background: #b4f6ff; }
.voice-button:focus-visible { outline: 2px solid #fff4e5; outline-offset: 4px; }
.voice-button[hidden] { display: none; }
.voice .voice-status { margin-top: 0.6rem; }

/* Keep the A upright while the two arcs orbit the emblem. */
.reactor-core { position: relative; }

.reactor-core::before,
.reactor-core::after {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  content: "";
}

.reactor-core::before {
  inset: -8%;
  border: 2px solid transparent;
  border-top-color: #a7f2ff;
  border-bottom-color: #58dffc;
  box-shadow: 0 0 0.65rem #58dffc40;
}

.reactor-core::after {
  inset: -16%;
  border: 1px solid transparent;
  border-right-color: #ffd291;
  border-left-color: #7ae7ff;
}

@media (prefers-reduced-motion: no-preference) {
  .reactor-core::before { animation: orbit 5.5s linear infinite; }
  .reactor-core::after { animation: reactor-pulse 3.4s ease-in-out infinite; }
  .speaking .reactor-core::before { animation-duration: 2.2s; }
  .animation-paused .reactor-core::before,
  .animation-paused .reactor-core::after { animation-play-state: paused; }
}

@keyframes reactor-pulse {
  0%, 100% { opacity: 0.5; transform: rotate(-16deg) scale(1); }
  50% { opacity: 1; transform: rotate(16deg) scale(1.09); }
}
