:root {
  --ink: #f4ead6;
  --muted: rgba(244, 234, 214, 0.72);
  --gold: #e2b657;
  --gold-deep: #b8882c;
  --night: #07110e;
  --serif: "Spectral", "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html,
body {
  min-height: 100%;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  min-height: 100svh;
  overflow-x: hidden;
}

.hero {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 28%;
  z-index: 0;
  animation: rise 1.1s ease both;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7, 17, 14, 0.12) 0%, rgba(7, 17, 14, 0.38) 52%, rgba(7, 17, 14, 0.84) 100%),
    radial-gradient(70% 45% at 18% 78%, rgba(7, 17, 14, 0.4), transparent 70%);
}

.top,
.stage,
.credit {
  position: relative;
  z-index: 2;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem 1.4rem 0;
  animation: fade 0.8s ease both;
}

.brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.voice {
  appearance: none;
  border: 0;
  background: none;
  color: var(--gold);
  font: 500 0.85rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.stage {
  min-height: calc(100svh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 1.4rem 5.5rem;
  max-width: 36rem;
  animation: fade 1s ease 0.15s both;
}

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.55rem;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 12vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.lede {
  margin-top: 0.85rem;
  max-width: 22rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--muted);
}

body.has-talk .lede {
  display: none;
}

.talk {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
  max-height: 28vh;
  overflow: auto;
  animation: up 0.55s ease both;
}

.orb-wrap {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  margin: 1.8rem 0 0.9rem;
}

.orb {
  position: relative;
  z-index: 1;
  width: 7.5rem;
  height: 7.5rem;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f0d48a, var(--gold-deep) 62%, #6b4a12 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  color: var(--night);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}

.orb:hover {
  transform: scale(1.04);
}

.orb:active,
body.recording .orb {
  transform: scale(0.96);
}

.orb-core {
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--night);
  transition: border-radius 0.2s ease, width 0.2s ease, height 0.2s ease;
}

body.recording .orb-core {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 4px;
}

.orb-label {
  position: absolute;
  bottom: 1.05rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ring,
.ring-2 {
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(226, 182, 87, 0.35);
  border-radius: 50%;
  opacity: 0;
}

body.recording .ring,
body.thinking .ring {
  animation: pulse 1.6s ease-out infinite;
  opacity: 1;
}

body.recording .ring-2,
body.thinking .ring-2 {
  animation: pulse 1.6s ease-out 0.45s infinite;
}

.hint,
.timer {
  font-size: 0.92rem;
  color: var(--muted);
  min-height: 1.3em;
}

.line {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.35;
}

.you {
  color: var(--muted);
}

.bot {
  color: var(--ink);
}

.play {
  justify-self: start;
  appearance: none;
  border: 0;
  background: none;
  color: var(--gold);
  font: 600 0.8rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.4rem 0;
}

.file {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  width: max-content;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
}

.file.demo {
  display: block;
  margin-top: 0.55rem;
  color: var(--gold);
}

.file input {
  display: none;
}

.credit {
  position: fixed;
  right: 1rem;
  bottom: 0.85rem;
  font-size: 0.68rem;
  color: rgba(244, 234, 214, 0.45);
}

.credit a {
  color: inherit;
}

body.busy .orb {
  pointer-events: none;
}

@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    transform: scale(1.04);
    opacity: 0.85;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

@media (max-width: 640px) {
  .stage {
    padding-bottom: 6.2rem;
  }

  .hero {
    object-position: 62% 22%;
  }
}
