/* ========================================================================
   Intent page — conversational AI entry
   ======================================================================== */

.intent {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--bg);
}

.intent__rail {
  background: var(--cream-100);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.intent__rail-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink-500);
}
.intent__progress {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.intent__progress-step {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  position: relative;
}
.intent__progress-step .dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--ink-100);
  display: grid; place-items: center;
  font-size: 11px;
  color: var(--text-muted);
  z-index: 1;
  transition: all var(--dur-base) var(--ease-out);
}
.intent__progress-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 11.5px;
  top: 28px;
  width: 1.5px;
  height: 30px;
  background: var(--ink-100);
}
.intent__progress-step.is-active .dot {
  background: var(--ink-500);
  border-color: var(--ink-500);
  color: var(--cream-50);
}
.intent__progress-step.is-active { color: var(--ink-500); font-weight: 500; }
.intent__progress-step.is-done .dot {
  background: var(--clay-500);
  border-color: var(--clay-500);
  color: var(--cream-50);
}
.intent__progress-step.is-done .dot::after { content: "✓"; }

.intent__rail-tip {
  margin-top: auto;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--border);
  font-size: var(--text-sm);
}
.intent__rail-tip .label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay-500);
  margin-bottom: 8px;
  display: block;
}
.intent__rail-tip p { color: var(--text-muted); font-size: var(--text-sm); line-height: 1.5; }

.intent__back {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}
.intent__back:hover { color: var(--ink-500); }

/* Main canvas */
.intent__canvas {
  display: flex;
  flex-direction: column;
  padding: 32px clamp(20px, 5vw, 64px);
  position: relative;
  overflow: hidden;
}

/* Conversational area */
.intent__chat {
  max-width: 760px;
  margin: 40px auto 32px;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bubble {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  animation: fade-up 480ms var(--ease-out) both;
}
.bubble__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink-500);
  color: var(--cream-50);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.bubble__avatar--user { background: var(--clay-500); }

.bubble__body { flex: 1; min-width: 0; }
.bubble__body strong {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--ink-500);
  margin-bottom: 4px;
}
.bubble__body strong .time {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  font-weight: 400;
  margin-left: 8px;
}
.bubble__text {
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--ink-400);
}
.bubble--user .bubble__text { color: var(--ink-500); }

.bubble__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.bubble__chip {
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bubble__chip:hover { background: var(--ink-500); color: var(--cream-50); border-color: var(--ink-500); transform: translateY(-2px); }
.bubble__chip.is-selected {
  background: var(--clay-500); border-color: var(--clay-500); color: var(--cream-50);
}

/* Range slider */
.bubble__range {
  margin-top: 16px;
  max-width: 480px;
}
.bubble__range output {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--clay-500);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 12px;
}
.bubble__range output em {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-style: normal;
  margin-left: 10px;
}
.bubble__range input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  background: transparent;
}
.bubble__range input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(to right, var(--clay-500) var(--fill, 50%), var(--cream-200) var(--fill, 50%));
  border-radius: 999px;
}
.bubble__range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  background: var(--ink-500);
  border: 3px solid var(--cream-50);
  border-radius: 50%;
  margin-top: -9px;
  box-shadow: var(--shadow-md);
  cursor: grab;
}
.bubble__range input[type="range"]::-moz-range-track {
  height: 4px;
  background: var(--cream-200);
  border-radius: 999px;
}
.bubble__range input[type="range"]::-moz-range-progress {
  height: 4px;
  background: var(--clay-500);
  border-radius: 999px;
}
.bubble__range input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  background: var(--ink-500);
  border: 3px solid var(--cream-50);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  cursor: grab;
}
.bubble__range-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 8px;
}

/* Date/Location input */
.bubble__field {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  max-width: 480px;
}
.bubble__field .input { flex: 1; }
.bubble__field .btn { flex-shrink: 0; }

/* Composer */
.composer {
  position: sticky;
  bottom: 24px;
  margin: 24px auto 0;
  max-width: 760px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-2xl);
  padding: 18px 24px 18px 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.composer textarea {
  flex: 1;
  border: 0;
  background: transparent;
  resize: none;
  min-height: 28px;
  max-height: 200px;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  outline: 0;
  padding: 4px 0;
}
.composer textarea::placeholder { color: var(--text-subtle); }
.composer__send {
  width: 44px; height: 44px;
  background: var(--clay-500);
  color: var(--cream-50);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-base) var(--ease-out);
  flex-shrink: 0;
}
.composer__send:hover { background: var(--clay-600); transform: scale(1.05); }
.composer__send:disabled { background: var(--cream-300); cursor: default; transform: none; }
.composer__toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.composer__toolbar button {
  width: 36px; height: 36px;
  background: transparent;
  color: var(--text-muted);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: all var(--dur-fast) var(--ease-out);
}
.composer__toolbar button:hover { background: var(--cream-200); color: var(--ink-500); }

.intent__hint {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-top: 12px;
}
.intent__hint .key {
  background: var(--cream-200);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Decorative side ornament on canvas */
.intent__canvas::before {
  content: "";
  position: absolute;
  top: -150px; right: -150px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--clay-50), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

@media (max-width: 880px) {
  .intent { grid-template-columns: 1fr; }
  .intent__rail { display: none; }
  .intent__back { right: 20px; top: 16px; }
  .composer { padding: 12px 14px; }
}
@media (max-width: 560px) {
  .intent__canvas { padding: 60px 16px 16px; }
  .intent__chat { gap: 18px; margin: 16px auto; }
  .bubble__chips { gap: 8px; }
  .bubble__chip { padding: 9px 14px; font-size: 13px; }
  .bubble__field { flex-direction: column; gap: 10px; }
  .bubble__field .input { width: 100%; }
  .bubble__field .btn { width: 100%; }
  .bubble__avatar { width: 30px; height: 30px; font-size: 0.85rem; }
  .composer textarea { font-size: 16px; }  /* prevents iOS zoom */
  .composer__send { width: 40px; height: 40px; }
  .composer__toolbar { display: none; }
  .intent__hint { display: none; }
}
