@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500&display=swap');

:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: #080808;
  color: #f2f0ea;
  font-family: Manrope, system-ui, sans-serif;
}

main {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, #111 0, #080808 44%, #050505 100%);
}

.intro {
  position: absolute;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  cursor: pointer;
  transition: opacity 1s ease, filter 1s ease, transform 1.2s cubic-bezier(.22,1,.36,1);
}

.intro::before,
.intro::after {
  content: '';
  position: absolute;
  width: min(60vw, 720px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
}

.intro::after { transform: rotate(90deg); }

.halo,
.pulse,
.core { position: absolute; border-radius: 50%; }

.halo {
  width: min(46vw, 520px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(186,255,76,.06), transparent 62%);
  filter: blur(12px);
  animation: breathe 3s ease-in-out infinite alternate;
}

.pulse {
  width: 16px;
  aspect-ratio: 1;
  border: 1px solid rgba(186,255,76,.38);
  animation: pulse 2.4s ease-out infinite;
}

.pulse-two { animation-delay: -1.2s; }

.core {
  width: 7px;
  height: 7px;
  background: #baff4c;
  box-shadow: 0 0 26px 8px rgba(186,255,76,.35);
}

.intro.is-leaving {
  opacity: 0;
  filter: blur(18px);
  transform: scale(1.12);
  pointer-events: none;
}

.greeter {
  width: min(520px, calc(100vw - 40px));
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.greeter.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity .7s ease, transform .9s cubic-bezier(.22,1,.36,1);
}

h1 {
  margin: 0 0 30px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.12;
}

h1.is-changing { animation: question-in .45s ease; }

h1.reply {
  font-size: clamp(21px, 3vw, 30px);
  line-height: 1.28;
}

form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input,
button { font: inherit; }

#answer {
  min-width: 0;
  height: 44px;
  border: 1px solid #292929;
  border-radius: 8px;
  outline: none;
  padding: 0 14px;
  background: #101010;
  color: #f2f0ea;
  font-size: 15px;
  transition: border-color .2s ease;
}

#answer:focus { border-color: #666; }

#send {
  height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: #f2f0ea;
  color: #080808;
  font-size: 13px;
  cursor: pointer;
}

#send:disabled { opacity: .45; cursor: wait; }

.error {
  min-height: 16px;
  margin: 10px 0 0;
  color: #ff8f80;
  font-size: 11px;
}

@keyframes pulse {
  from { transform: scale(1); opacity: .9; }
  to { transform: scale(24); opacity: 0; }
}

@keyframes breathe { to { transform: scale(1.2); opacity: .65; } }
@keyframes question-in { from { opacity: 0; transform: translateY(7px); } }

@media (max-width: 560px) {
  .greeter { width: calc(100vw - 32px); }
  h1 { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
