:root {
  --bg: #f4effa;
  --bg-grad-1: #f6f1fb;
  --bg-grad-2: #ede4f7;
  --bg-grad-3: #f8f4ed;
  --bg-grad-4: #faf6ee;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.65);
  --pill: #ece3f7;
  --pill-text: #4a3a78;
  --pill-good: #d6f0e2;
  --pill-good-text: #1f6b46;
  --pill-warn: #fde9c4;
  --pill-warn-text: #875100;
  --pill-pending: #e7e2eb;
  --pill-pending-text: #5c5677;
  --ink: #1a1538;
  --ink-soft: #5c5677;
  --ink-faint: #8c87a3;
  --border: rgba(26, 21, 56, 0.08);
  --border-strong: rgba(26, 21, 56, 0.16);
  --gold: #b8975c;
  --shadow-sm: 0 2px 8px rgba(26, 21, 56, 0.04);
  --shadow-md: 0 8px 32px rgba(26, 21, 56, 0.06);
  --shadow-lg: 0 16px 48px rgba(26, 21, 56, 0.08);
  --grad: linear-gradient(120deg, #4f3a8a 0%, #8a6dc4 60%, #b89ad5 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--bg-grad-2) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 30%, var(--bg-grad-3) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 0% 70%, var(--bg-grad-4) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-grad-1) 0%, var(--bg) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

main { max-width: 1080px; margin: 0 auto; padding: 0 24px 80px; }

/* === Top nav === */
.topbar {
  position: sticky;
  top: 16px;
  z-index: 50;
  padding: 0 24px;
  margin-top: 16px;
}
.nav-island {
  max-width: 1020px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px 10px 22px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 32px; height: 32px;
  background: var(--grad);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.brand-name { font-weight: 700; font-size: 16px; color: var(--ink); letter-spacing: -0.01em; }
.brand-tag {
  display: inline-block;
  background: var(--pill);
  color: var(--pill-text);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-left: 4px;
}
.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--pill-text); }

/* === Pills === */
.pill {
  display: inline-block;
  background: var(--pill);
  color: var(--pill-text);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill.good    { background: var(--pill-good);    color: var(--pill-good-text); }
.pill.warn    { background: var(--pill-warn);    color: var(--pill-warn-text); }
.pill.pending { background: var(--pill-pending); color: var(--pill-pending-text); }
.pill-card {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

/* === Buttons === */
.cta-dark {
  background: var(--ink);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.cta-dark:hover { transform: translateY(-1px); background: #2a2348; }
.cta-dark:active { transform: translateY(0); }
.cta-dark:disabled { opacity: 0.6; cursor: progress; }
.cta-small { padding: 9px 18px; font-size: 14px; }

.cta-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  padding: 13px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.cta-ghost:hover { background: rgba(26, 21, 56, 0.04); border-color: var(--ink); }

/* === Hero === */
.hero {
  text-align: center;
  padding: 72px 0 32px;
}
.hero .pill { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 22px;
  color: var(--ink);
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lead {
  font-size: clamp(16px, 1.6vw, 18.5px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 auto 32px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Stats === */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 56px 0 80px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat .num {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat .label {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* === Section heads === */
.section-head {
  text-align: center;
  margin: 80px 0 36px;
}
.section-head .pill { margin-bottom: 16px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.15;
}
.section-sub {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto;
}

/* === Demo Section === */
.demo-section { padding: 24px 0 60px; }
.showcase-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 14px 14px 22px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.avatar-stage {
  position: relative;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, #ede4f7 0%, transparent 70%),
    linear-gradient(180deg, #e7dcef 0%, #c9b8e0 100%);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
#avatar-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background: #000;
  filter: saturate(1.05) contrast(1.02);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: auto;
}
#avatar-video.active { display: block; }
.avatar-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
#avatar-video.active ~ .avatar-fallback { display: none; }
.avatar-portrait {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 32px rgba(106, 79, 184, 0.4);
}
.avatar-letter {
  color: white;
  font-size: 96px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.status-pill {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(26, 21, 56, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: white;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.status-pill.error    { background: rgba(220, 60, 60, 0.85); }
.status-pill.thinking { background: rgba(106, 79, 184, 0.85); }
.status-pill.speaking { background: rgba(31, 107, 70, 0.85); }
.status-pill.listening{ background: rgba(74, 158, 96, 0.85); }
.showcase-meta {
  padding: 20px 14px 4px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.showcase-meta h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}
.showcase-meta p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.showcase-actions { flex-shrink: 0; }

/* === Transcript === */
.transcript-section {
  max-width: 720px;
  margin: 24px auto 0;
}
.micro-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 8px;
}
.transcript-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
#transcript-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bubble {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 92%;
}
.bubble.user      { background: var(--ink); color: white; align-self: flex-end; }
.bubble.assistant { background: var(--pill); color: var(--ink); align-self: flex-start; }

/* === Journey timeline === */
.journey { padding: 0 0 32px; }
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--border-strong) 0%, var(--border) 100%);
}
.timeline li {
  position: relative;
  padding: 0 0 24px 56px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid #faf7fc;
  box-shadow: 0 0 0 1px var(--border-strong);
}
.t-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.t-step {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.timeline li h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.timeline li p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* === Cards grid === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card .pill { align-self: flex-start; margin-bottom: 6px; }
.card h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.card code {
  background: rgba(26, 21, 56, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, Menlo, monospace;
}

.pending .cards-grid {
  grid-template-columns: 1fr 1fr;
}

/* === Phases === */
.future { padding: 0 0 32px; }
.phases {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.phases li {
  display: flex;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.phases li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.phase-num {
  flex-shrink: 0;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  align-self: flex-start;
  min-width: 56px;
}
.phase-body { flex: 1; }
.phase-body .pill { margin-bottom: 8px; }
.phase-body h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.phase-body p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* === Comments === */
.comments-section { padding: 0 0 60px; }
.comment-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
  margin: 0 auto 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  background: #faf7fc;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.15s, background 0.15s;
}
.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--ink-faint);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: white;
}
.form-row textarea {
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
}
.form-actions {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.form-hint {
  font-size: 12px;
  color: var(--ink-faint);
}
.form-hint.error { color: #b3402d; }
.form-hint.success { color: var(--pill-good-text); }

.comments-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comments-empty {
  text-align: center;
  padding: 32px;
  color: var(--ink-faint);
  font-size: 14px;
  background: var(--surface-soft);
  border-radius: 16px;
  border: 1px dashed var(--border-strong);
}
.comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
}
.comment-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.comment-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 14.5px;
}
.comment-time {
  font-size: 12px;
  color: var(--ink-faint);
}
.comment-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  margin-top: 60px;
}
.footer-row {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-faint);
  gap: 16px;
}
.footer-row .legal { text-align: right; max-width: 620px; line-height: 1.5; }

/* === Responsive === */
@media (max-width: 980px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .brand-tag { display: none; }
  .nav-island { padding-right: 8px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-bottom: 56px; }
  .cards-grid { grid-template-columns: 1fr; }
  .pending .cards-grid { grid-template-columns: 1fr; }
  .phases li { flex-direction: column; gap: 10px; padding: 22px; }
  .phase-num { font-size: 28px; }
  .hero { padding: 56px 0 24px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-row .legal { text-align: left; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions button { width: 100%; }
  .showcase-meta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 12px; top: 12px; }
  main { padding: 0 16px 60px; }
  .pill-card { top: 12px; right: 12px; }
}
