/* ──────────────────────── tokens ──────────────────────────────── */

:root {
  --brand: #6b7280;          /* neutral until the user picks a color */
  --brand-soft: #f3f4f6;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --fg: #111827;
  --fg-muted: #6b7280;
  --line: #e5e7eb;
  --chat-bg: #f5f5f4;
  --chat-bubble-bot: #ffffff;
  --chat-bubble-user: var(--brand);
  --chat-bubble-user-fg: #ffffff;
  --display: "DM Serif Display", serif;
  --body: "DM Sans", sans-serif;
  --t-fast: 200ms cubic-bezier(0.22, 1, 0.36, 1);
  --t-med:  500ms cubic-bezier(0.22, 1, 0.36, 1);
  --t-slow: 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--body);
  color: var(--fg);
  background: var(--bg);
  overflow: hidden;
}

/* ──────────────────────── layout ──────────────────────────────── */

.app {
  display: grid;
  grid-template-columns: 440px 1fr;
  height: 100vh;
  width: 100vw;
}

/* ──────────────────────── chat pane ───────────────────────────── */

.chat-pane {
  display: flex;
  flex-direction: column;
  background: var(--chat-bg);
  border-right: 1px solid var(--line);
  height: 100vh;
  position: relative;
}

.chat-header {
  padding: 2rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--chat-bg);
}

.chat-back {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color var(--t-fast);
}
.chat-back:hover { color: var(--fg); }

.chat-header h2 {
  font-family: var(--body);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.chat-sub {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

.chat-progress {
  position: relative;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.chat-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--brand);
  border-radius: 999px;
  transition: width var(--t-med), background var(--t-med);
}
.chat-progress-label {
  position: absolute;
  right: 0;
  top: -1.4rem;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
}

/* messages */

.messages {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.5rem 0.5rem;
  scroll-behavior: smooth;
}

.message {
  display: flex;
  margin-bottom: 0.85rem;
  animation: bubbleIn 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.message.bot { justify-content: flex-start; }
.message.user { justify-content: flex-end; }

.bubble {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
}

.message.bot .bubble {
  background: var(--chat-bubble-bot);
  color: var(--fg);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 0 var(--line);
}

.message.user .bubble {
  background: var(--chat-bubble-user);
  color: var(--chat-bubble-user-fg);
  border-bottom-right-radius: 4px;
  transition: background var(--t-med);
}

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

/* typing indicator */

.typing {
  display: inline-flex;
  gap: 4px;
  padding: 0.85rem 1rem;
  background: var(--chat-bubble-bot);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 0 var(--line);
}
.typing .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-muted);
  animation: typingDot 1.2s infinite ease-in-out both;
}
.typing .dot:nth-child(1) { animation-delay: -0.32s; }
.typing .dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.35; }
  40%           { transform: scale(1); opacity: 1; }
}

/* quick replies */

.quick-replies {
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.quick-replies:empty { display: none; }

.quick-reply {
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--t-fast);
  animation: bubbleIn 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.quick-reply:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}
.quick-reply .swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* "next" hint — what this answer will mutate. Useful when the connected
   bot doesn't ask the same question as the current wizard step expects. */

.next-hint {
  margin: 0 1.5rem 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4em;
}
.next-hint[hidden] { display: none; }
.next-hint-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.next-hint strong {
  color: var(--fg);
  font-weight: 600;
}

/* input */

.composer-input {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--chat-bg);
}

.composer-input input {
  flex: 1;
  font-family: var(--body);
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  border-radius: 999px;
  outline: none;
  transition: border-color var(--t-fast);
}
.composer-input input:focus {
  border-color: var(--brand);
}
.composer-input input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.composer-input button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-med), transform var(--t-fast);
}
.composer-input button:hover:not(:disabled) {
  transform: scale(1.05);
}
.composer-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ──────────────────────── canvas pane ─────────────────────────── */

.canvas-pane {
  height: 100vh;
  overflow-y: auto;
  background: var(--bg);
}

/* nav */

.mock-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}

.mock-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--fg);
}
.mock-logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  transition: background var(--t-med);
}
.mock-logo-text { font-size: 1rem; }

.mock-nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-size: 0.9rem;
  color: var(--fg-muted);
}
.mock-nav-links li { cursor: default; }

.mock-cta-secondary {
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  background: var(--brand);
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--t-med), filter var(--t-fast);
}
.mock-cta-secondary:hover { filter: brightness(0.92); }

/* hero */

.mock-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 3rem 4rem;
}

.mock-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.5rem;
  transition: color var(--t-med);
}

.mock-h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  transition: color var(--t-med);
}

.mock-subhead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--fg-muted);
  max-width: 640px;
  margin-bottom: 2rem;
}

.mock-cta-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.mock-cta-primary {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85rem 1.5rem;
  background: var(--brand);
  color: #ffffff;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--t-med), transform var(--t-fast);
}
.mock-cta-primary:hover { transform: translateY(-1px); }

.mock-link {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--t-med);
}
.mock-link:hover { text-decoration: underline; }

/* features */

.mock-features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 3rem;
}

.mock-section-title {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin-bottom: 2.5rem;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  transition: border-color var(--t-med), background var(--t-fast), transform var(--t-fast);
}
.feature-card:hover {
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--brand);
  margin-bottom: 1rem;
  transition: color var(--t-med);
}

.feature-title {
  font-family: var(--body);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  transition: color var(--t-fast);
}

.feature-body {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* audience */

.mock-audience {
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 3rem 4rem;
  text-align: center;
}

.mock-audience p {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 2rem;
}

.mock-audience-word {
  font-style: italic;
  color: var(--brand);
  transition: color var(--t-med);
}

/* footer */

.mock-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

/* ──────────────────────── placeholder state ───────────────────── */

/* Anything still showing default placeholder copy gets a subtle
   washed-out look so the user can see what's been filled in. */
.placeholder {
  opacity: 0.35;
  filter: saturate(0.4);
  transition: opacity var(--t-slow), filter var(--t-slow), color var(--t-med);
}

.placeholder.is-filled {
  opacity: 1;
  filter: none;
  animation: fillIn var(--t-slow) cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* nav back-link goes solid as soon as filling starts */

.chat-pane.is-active .chat-back { color: var(--fg); }

/* ──────────────────────── completion banner ───────────────────── */

.canvas-pane.is-done::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.04) 100%);
  animation: doneFlash 1.4s ease-out;
}
@keyframes doneFlash {
  0%   { background: radial-gradient(ellipse at center, var(--brand-soft) 0%, transparent 70%); }
  100% { background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.04) 100%); }
}

/* ──────────────────────── responsive fallback ─────────────────── */

@media (max-width: 900px) {
  body { overflow: auto; }
  html, body { height: auto; }
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    min-height: 100vh;
  }
  .chat-pane {
    height: auto;
    max-height: 70vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .canvas-pane { height: auto; }
  .mock-nav { padding: 1rem 1.5rem; }
  .mock-hero { padding: 3rem 1.5rem; }
  .mock-features { padding: 2rem 1.5rem; }
  .mock-nav-links { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
}
