/* =====================================================================
   Warmth layer (2026-11-30) — makes the site more encouraging without
   making it busy. Loaded after theme.css / animations.css on the home,
   quiz, results and roadmap pages.
   1. Warm accent colour (sun yellow), used in small touches only
   3. MBSK avatar with speech bubbles ("coach")
   4. Quiz encouragements + progress milestones
   5. Gentle motion (all of it switched off with prefers-reduced-motion)
   ===================================================================== */

:root {
  --warm: #f4b740;
  --warm-deep: #c98a12;
  --warm-soft: #fff4d9;
  --warm-line: rgba(244, 183, 64, 0.55);
}

/* ---------- 1. Warm accent ---------- */

/* Badges: the little dot becomes a warm, gently pulsing light */
.hero-badge .dot,
.results-badge .dot,
.rm-badge-dot {
  background: var(--warm) !important;
  box-shadow: 0 0 0 4px rgba(244, 183, 64, 0.22) !important;
  animation: warmPulse 2.6s ease-in-out infinite;
}
@keyframes warmPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(244, 183, 64, 0.22); }
  50% { box-shadow: 0 0 0 7px rgba(244, 183, 64, 0.08); }
}

/* Progress bars end on a warm note */
.quiz-progress-fill,
.xp-bar-fill {
  background: linear-gradient(90deg, #588840 0%, #2f8f83 55%, var(--warm) 100%) !important;
}

/* ---------- 3. Coach: avatar + speech bubble ---------- */

.coach {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  max-width: 560px;
  margin: 28px auto 0;
  text-align: left;
}
.coach-img {
  height: 104px;
  width: auto;
  flex: none;
  animation: coachFloat 6s ease-in-out infinite;
}
.coach-bubble {
  position: relative;
  margin-bottom: 34px;
  padding: 12px 16px;
  background: var(--warm-soft);
  border: 1px solid var(--warm-line);
  border-radius: 18px 18px 18px 6px;
  color: #2a2205;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(201, 138, 18, 0.12);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transform-origin: left bottom;
}
.coach.is-shown .coach-bubble {
  animation: bubbleIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}
.coach-bubble::before {
  content: '';
  position: absolute;
  left: -7px;
  bottom: 12px;
  width: 12px;
  height: 12px;
  background: var(--warm-soft);
  border-left: 1px solid var(--warm-line);
  border-bottom: 1px solid var(--warm-line);
  transform: rotate(45deg);
}
/* On a white card page (results, roadmap) keep it aligned with the content */
.coach--left { justify-content: flex-start; margin-left: 0; }

@keyframes coachFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
  .coach { gap: 8px; margin-top: 22px; }
  .coach-img { height: 84px; }
  .coach-bubble { font-size: 0.88rem; padding: 10px 13px; margin-bottom: 26px; }
}

/* ---------- 4. Quiz: avatar speech bubble + milestones ---------- */

.quiz-bubble {
  position: absolute;
  right: 150px;
  bottom: calc(100% + 26px);
  z-index: 3;
  max-width: 230px;
  padding: 8px 14px;
  background: var(--warm-soft);
  border: 1px solid var(--warm-line);
  border-radius: 16px 16px 6px 16px;
  color: #2a2205;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(201, 138, 18, 0.14);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.92);
  transform-origin: right bottom;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.quiz-bubble.is-on { opacity: 1; transform: translateY(0) scale(1); }
.quiz-bubble::after {
  content: '';
  position: absolute;
  right: -6px;
  bottom: 9px;
  width: 10px;
  height: 10px;
  background: var(--warm-soft);
  border-right: 1px solid var(--warm-line);
  border-top: 1px solid var(--warm-line);
  transform: rotate(45deg);
}
@media (max-width: 600px) {
  .quiz-bubble { right: 108px; bottom: calc(100% + 18px); font-size: 0.82rem; padding: 7px 12px; }
}

/* Progress bar a little thicker, with 3 milestones that light up */
.quiz-progress-bar {
  position: relative;
  height: 6px !important;
  overflow: visible !important;
}
.quiz-milestone {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(16, 16, 16, 0.14);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.quiz-milestone.is-reached {
  background: var(--warm);
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--warm-line);
  animation: milestonePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* The bar is very short on a phone: milestones would crowd it */
@media (max-width: 600px) {
  .quiz-milestone { display: none; }
}
@keyframes milestonePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.6); }
  100% { transform: scale(1); }
}

/* ---------- 5. Gentle motion ---------- */

/* Main buttons: a small bounce when the mouse comes over them */
@media (hover: hover) {
  .btn-primary:hover,
  .btn-next:not(:disabled):hover,
  .btn-start:hover,
  .unlock-roadmap-btn:hover {
    animation: softBounce 0.5s ease-out forwards;
  }
}
@keyframes softBounce {
  0% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  70% { transform: translateY(-1px); }
  100% { transform: translateY(-3px); }
}

/* Quiz answers appear one after the other when a question opens */
.quiz-step.active .option-tile {
  animation: tileIn 0.4s ease-out both;
}
.quiz-step.active .option-tile:nth-child(2) { animation-delay: 0.05s; }
.quiz-step.active .option-tile:nth-child(3) { animation-delay: 0.1s; }
.quiz-step.active .option-tile:nth-child(4) { animation-delay: 0.15s; }
.quiz-step.active .option-tile:nth-child(5) { animation-delay: 0.2s; }
.quiz-step.active .option-tile:nth-child(6) { animation-delay: 0.25s; }
.quiz-step.active .option-tile:nth-child(n+7) { animation-delay: 0.3s; }
@keyframes tileIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* A few soft rings floating slowly in the hero */
.float-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.float-shape {
  position: absolute;
  border-radius: 50%;
  animation: shapeFloat var(--d, 14s) ease-in-out infinite alternate;
}
.float-shape.s1 { width: 46px; height: 46px; left: 12%; top: 26%; border: 3px solid rgba(244, 183, 64, 0.45); --d: 13s; }
.float-shape.s2 { width: 18px; height: 18px; left: 82%; top: 20%; background: rgba(244, 183, 64, 0.4); --d: 11s; }
.float-shape.s3 { width: 30px; height: 30px; left: 86%; top: 68%; border: 3px solid rgba(88, 136, 64, 0.3); --d: 16s; }
.float-shape.s4 { width: 14px; height: 14px; left: 8%; top: 72%; background: rgba(47, 143, 131, 0.3); --d: 12s; }
.float-shape.s5 { width: 10px; height: 10px; left: 24%; top: 12%; background: rgba(88, 136, 64, 0.35); --d: 15s; }
@keyframes shapeFloat {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(14px, -22px) rotate(20deg); }
}
.hero > *:not(.float-shapes) { position: relative; z-index: 1; }
@media (max-width: 600px) {
  .float-shape.s1 { left: 3%; top: 34%; width: 30px; height: 30px; }
  .float-shape.s3 { left: 88%; top: 84%; }
}

/* Everything above stays still for people who asked their device for less motion */
@media (prefers-reduced-motion: reduce) {
  .coach-img,
  .float-shape,
  .hero-badge .dot, .results-badge .dot, .rm-badge-dot,
  .quiz-step.active .option-tile,
  .quiz-milestone.is-reached,
  .btn-primary:hover, .btn-next:hover, .btn-start:hover, .unlock-roadmap-btn:hover {
    animation: none !important;
  }
  .coach-bubble { opacity: 1; transform: none; animation: none !important; }
  .quiz-bubble { transition: opacity 0.2s ease; transform: none; }
}
