/* Warm, soft colors with large, easy-to-read text (spec.md > Look and Feel). */
:root {
  --cream: #fbf6ee;
  --ink: #3b2f2a;
  --soft-ink: #6e5d54;
  --terracotta: #c8693f;
  --peach: #f3c9a8;
  --sage: #8fa98f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.6;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}

h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin: 0 0 24px;
}

a {
  color: var(--terracotta);
}

/* ---- Shared ---- */

.brand {
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--soft-ink);
  margin: 0 0 40px;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.lede {
  font-size: 1.2rem;
  color: var(--soft-ink);
  margin: 0 auto 40px;
  max-width: 34em;
}

.button {
  display: inline-block;
  padding: 18px 40px;
  border: none;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fff;
  font: inherit;
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(200, 105, 63, 0.3);
}

.button:hover {
  background: #b65a33;
}

.button:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 4px;
}

/* ---- Home ---- */

.home {
  padding-top: 12vh;
}

.home h1 {
  font-size: 2.8rem;
}

.subhead {
  font-size: 1.6rem;
  margin: 0 0 24px;
}

/* ---- Questionnaire ---- */

.questionnaire {
  text-align: left;
}

.questionnaire h1,
.questionnaire .brand {
  text-align: center;
}

.questionnaire .lede {
  text-align: center;
}

form label {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 36px 0 10px;
}

form .help {
  margin: -4px 0 10px;
  color: var(--soft-ink);
  font-size: 1.05rem;
}

form input,
form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--peach);
  border-radius: 12px;
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1.5;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--terracotta);
}

form .button {
  display: block;
  margin: 48px auto 0;
}

.voice-choice {
  border: none;
  padding: 0;
  margin: 36px 0 0;
}

.voice-choice legend {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.voice-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.voice-option input {
  width: 26px;
  height: 26px;
  accent-color: var(--terracotta);
}

.voice-option label {
  margin: 0;
  font-weight: 400;
  font-size: 1.2rem;
  flex: 1;
}

.hear {
  padding: 8px 20px;
  border: 2px solid var(--terracotta);
  border-radius: 999px;
  background: transparent;
  color: var(--terracotta);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.error {
  color: #a23b1d;
  font-weight: 600;
  margin: 8px 0 0;
}

.notice {
  margin: 32px auto 0;
  max-width: 30em;
  font-size: 1.2rem;
}

.problem {
  padding: 16px 20px;
  border-radius: 12px;
  background: #fbe6dc;
  color: #7a2e12;
}

/* The big round Start button on the Conversation page. */
.start-button {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: none;
  background: var(--terracotta);
  color: #fff;
  font-size: 2rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(200, 105, 63, 0.35);
}

.start-button:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 6px;
}

.status {
  margin-top: 32px;
  color: var(--soft-ink);
  min-height: 2em;
}

.hint {
  margin-top: 8px;
  font-size: 1rem;
  color: var(--soft-ink);
}

.debug {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--soft-ink);
  font-family: Consolas, monospace;
  white-space: pre-line;
}

[hidden] {
  display: none !important;
}

/* ---- The glowing orb (Conversation page) ---- */

.orb {
  width: 220px;
  height: 220px;
  margin: 8px auto 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff1e2 0%, var(--peach) 45%, var(--terracotta) 100%);
  box-shadow: 0 0 60px rgba(200, 105, 63, 0.35);
  cursor: pointer;
  transition: background 0.6s ease, box-shadow 0.6s ease, opacity 0.6s ease;
}

/* Listening: soft sage green, a slow, gentle breath. */
.orb.listening {
  background: radial-gradient(circle at 40% 35%, #f1f7ee 0%, #b9d0b4 45%, #6f9a6f 100%);
  box-shadow: 0 0 60px rgba(111, 154, 111, 0.4);
  animation: orb-breathe 3.2s ease-in-out infinite;
}

/* Thinking: pale gold, dimmer and slower. */
.orb.thinking {
  background: radial-gradient(circle at 40% 35%, #fffaeb 0%, #f4dca0 45%, #d6ac4e 100%);
  box-shadow: 0 0 50px rgba(214, 172, 78, 0.35);
  opacity: 0.75;
  animation: orb-dim 1.8s ease-in-out infinite;
}

/* Speaking: bright terracotta, livelier. */
.orb.speaking {
  background: radial-gradient(circle at 40% 35%, #ffe9d9 0%, #f0a77c 40%, #c8693f 100%);
  animation: orb-speak 0.9s ease-in-out infinite;
}

@keyframes orb-breathe {
  50% { transform: scale(1.06); box-shadow: 0 0 85px rgba(111, 154, 111, 0.5); }
}

@keyframes orb-dim {
  50% { opacity: 0.5; transform: scale(0.97); }
}

@keyframes orb-speak {
  50% { transform: scale(1.12); box-shadow: 0 0 110px rgba(200, 105, 63, 0.6); }
}

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none !important; }
  .orb.thinking { opacity: 0.75; }
  .orb.speaking { box-shadow: 0 0 110px rgba(200, 105, 63, 0.6); }
}

.conversation-page main {
  padding-top: 10vh;
}

/* The small Stop button, bottom-right corner, shown during a conversation. */
.stop-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--soft-ink);
  background: var(--cream);
  color: var(--soft-ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.8;
}

.stop-button:hover,
.stop-button:focus-visible {
  opacity: 1;
  border-color: var(--ink);
  color: var(--ink);
}

.stop-button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

