/* Mobile-first, plain CSS, no framework. */

:root {
  --bg: #faf9f7;
  --text: #1f1c19;
  --text-muted: #6b6560;
  --accent: #8a5a44;
  --accent-contrast: #ffffff;
  --border: #e3ddd6;
  --bubble-user: #efe8e0;
  --bubble-ai: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  line-height: 1.6;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

/* Landing page */

.hero { padding: 2.5rem 0 1.5rem; text-align: center; }
.eyebrow { color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; }
.hero h1 { font-size: 1.8rem; line-height: 1.4; margin: 0.5rem 0 1rem; }
.hero-sub { color: var(--text-muted); font-size: 1rem; margin-bottom: 1.5rem; }
.hero-thesis { font-size: 1.15rem; font-weight: 600; margin-bottom: 1.5rem; }

.section { padding: 1.75rem 0; border-top: 1px solid var(--border); }
.section h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.section .cta { margin-top: 0.5rem; }
.core-value { text-align: center; }
.core-value-text { font-size: 1.4rem; font-weight: 600; }
.cta-section { text-align: center; border-top: none; }

.philosophy-lead { color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.05em; margin-bottom: 1rem; }

.story-insight {
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
  margin-left: 0.25rem;
  font-style: italic;
  color: var(--text);
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-size: 1rem;
}

/* Chat page */

.chat-header { padding: 0.5rem 0 1rem; }
.back-link { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }

.phase.hidden { display: none; }

.messages {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 40vh;
  margin-bottom: 0.75rem;
}

.message {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  white-space: pre-wrap;
  font-size: 0.95rem;
}

.message.user {
  align-self: flex-end;
  background: var(--bubble-user);
}

.message.assistant {
  align-self: flex-start;
  background: var(--bubble-ai);
  border: 1px solid var(--border);
}

.typing-indicator {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.message-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

textarea, input[type="text"], select {
  width: 100%;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #fff;
  color: var(--text);
}

.message-form textarea { flex: 1; resize: none; }

button {
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
}

button.secondary-button {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  width: 100%;
  margin-top: 0.75rem;
}

.section-hint { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }

.understanding-textarea { margin-bottom: 1rem; }

.button-row { display: flex; justify-content: flex-end; }

.guidance-text { white-space: pre-wrap; font-size: 1rem; margin-bottom: 1.5rem; }

.feedback-form { display: flex; flex-direction: column; gap: 1.1rem; }
.feedback-form label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.95rem; }

@media (min-width: 640px) {
  .hero h1 { font-size: 2.1rem; }
}
