/* ============================================
   White Rabbit — Get in Touch
   Hand-drawn editorial aesthetic
   ============================================ */

:root {
  --bg: #FAF7F2;          /* warm off-white */
  --bg-soft: #F2EDE3;     /* paper */
  --ink: #1A1A1A;         /* main text */
  --ink-soft: #5A554E;    /* muted text */
  --line: #1A1A1A;        /* hand-drawn lines */
  --carrot: #FF6B3D;      /* primary accent */
  --carrot-deep: #E55524;
  --magic: #6B4EFF;       /* secondary accent */
  --magic-soft: #ECE6FF;
  --leaf: #4A8C5A;        /* carrot top */
  --border: #1A1A1A;
  --border-soft: #D9D3C5;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);
  --radius: 14px;
  --radius-sm: 8px;
  --max-w: 720px;
  --serif: 'Fraunces', Georgia, serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255, 107, 61, 0.05) 0%, transparent 35%),
    radial-gradient(circle at 80% 90%, rgba(107, 78, 255, 0.05) 0%, transparent 35%);
}

/* ===== Decorative sparkles ===== */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.sparkle {
  position: absolute;
  width: 28px;
  height: 28px;
  fill: var(--magic);
  opacity: 0.3;
  animation: twinkle 4s ease-in-out infinite;
}
.sparkle-1 { top: 12%; left: 8%; animation-delay: 0s; }
.sparkle-2 { top: 70%; right: 10%; animation-delay: 1.5s; fill: var(--carrot); }
.sparkle-3 { bottom: 20%; left: 15%; width: 18px; height: 18px; animation-delay: 3s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 0.5; transform: scale(1.1) rotate(20deg); }
}

/* ===== Top bar ===== */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-rabbit {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}
.brand-name {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 26px;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-left: -4px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 6px;
  font: inherit;
  transition: color 0.2s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--carrot);
  text-underline-offset: 4px;
}
.lang-sep { color: var(--border-soft); }

/* ===== Progress bar with hopping rabbit ===== */
.progress {
  position: relative;
  z-index: 1;
  margin: 8px auto 0;
  max-width: var(--max-w);
  padding: 0 32px;
  height: 28px;
}
.progress-line {
  width: 100%;
  height: 20px;
  color: var(--border-soft);
  display: block;
}
.progress-rabbit {
  position: absolute;
  top: -14px;
  left: 32px;
  width: 44px;
  height: 44px;
  transform-origin: center bottom;
  transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  animation: idleBounce 1.6s ease-in-out infinite;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.08));
  will-change: transform;
}
.progress-rabbit img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.progress-rabbit.is-hopping {
  animation: hop 0.7s cubic-bezier(0.34, 1.35, 0.64, 1);
}

@keyframes idleBounce {
  0%, 100% { transform: translateY(0)    scale(1, 1); }
  50%      { transform: translateY(-6px) scale(0.97, 1.03); }
}

@keyframes hop {
  0%   { transform: translateY(0)    rotate(0deg)   scale(1, 1); }
  8%   { transform: translateY(-2px) rotate(-10deg) scale(1.15, 0.82); }
  45%  { transform: translateY(-46px) rotate(-4deg) scale(0.90, 1.10); }
  60%  { transform: translateY(-42px) rotate(4deg)  scale(0.92, 1.08); }
  92%  { transform: translateY(-1px) rotate(8deg)   scale(1.18, 0.80); }
  100% { transform: translateY(0)    rotate(0deg)   scale(1, 1); }
}

/* Gentler hop loop for the thanks-screen rabbit */
@keyframes hopLoop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  35%      { transform: translateY(-14px) scale(0.97, 1.03); }
  70%      { transform: translateY(-2px) scale(1.06, 0.94); }
}

/* ===== Stage / form ===== */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px 60px;
  position: relative;
  z-index: 1;
}

#wrForm {
  width: 100%;
  max-width: var(--max-w);
}

.steps {
  position: relative;
  min-height: 380px;
}

/* Each step */
.step {
  display: none;
  animation: stepIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.step.is-active { display: block; }

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

.eyebrow {
  font-family: var(--hand);
  font-size: 24px;
  color: var(--carrot);
  margin-bottom: 6px;
  display: inline-block;
  transform: rotate(-2deg);
}

.step h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.step h1 em {
  font-style: italic;
  font-family: var(--serif);
  color: var(--carrot);
}

.step .lead {
  font-size: 17px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 540px;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

/* Inputs */
.input, .textarea {
  width: 100%;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .textarea:focus {
  outline: none;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--carrot);
  border-color: var(--carrot-deep);
}
.textarea {
  min-height: 130px;
  resize: vertical;
  font-family: var(--sans);
}

.field-row {
  display: grid;
  gap: 16px;
}
.field-row.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 540px) {
  .field-row.two { grid-template-columns: 1fr; }
}

.error-msg {
  margin-top: 8px;
  font-size: 14px;
  color: var(--carrot-deep);
  font-family: var(--hand);
  font-size: 18px;
  display: none;
}
.error-msg.is-visible { display: block; }

/* ===== Choice cards (services, single-select) ===== */
.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.choices.cols-2 { grid-template-columns: repeat(2, 1fr); }
.choices.cols-1 { grid-template-columns: 1fr; }

@media (max-width: 720px) {
  .choices { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .choices { grid-template-columns: 1fr; }
}

.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.choice:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.choice .icon {
  width: 40px;
  height: 40px;
  color: var(--ink);
}
.choice .icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.choice .title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
}
.choice .sub {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.choice.is-selected {
  background: var(--magic-soft);
  border-color: var(--magic);
  box-shadow: 4px 4px 0 var(--magic);
}
.choice.is-selected .icon { color: var(--magic); }
.choice.is-selected::after {
  content: "✓";
  position: absolute;
  top: 8px; right: 12px;
  font-family: var(--hand);
  font-size: 28px;
  color: var(--magic);
  font-weight: 700;
}

/* For single-select, color carrot */
.choices.single .choice.is-selected {
  background: #FFF1EA;
  border-color: var(--carrot);
  box-shadow: 4px 4px 0 var(--carrot);
}
.choices.single .choice.is-selected .icon { color: var(--carrot); }
.choices.single .choice.is-selected::after { color: var(--carrot); }

/* Compact list-style choices for stage/timeline/budget/source */
.choices.list {
  grid-template-columns: 1fr;
  gap: 10px;
}
.choices.list .choice {
  flex-direction: row;
  align-items: center;
  padding: 14px 18px;
}
.choices.list .choice .icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}
.choices.list .choice .title { font-size: 16px; }

/* ===== Controls ===== */
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px dashed var(--border-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 11px 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn:active {
  transform: translate(0, 0);
  box-shadow: 1px 1px 0 var(--ink);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}
.btn-primary {
  background: var(--carrot);
  border-color: var(--carrot-deep);
  color: #fff;
}
.btn-primary:hover {
  box-shadow: 4px 4px 0 var(--carrot-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--ink);
  transform: translate(0, 0);
  box-shadow: none;
}
.btn-ghost:disabled { opacity: 0.3; }

.btn .arrow { font-size: 18px; line-height: 1; }

.step-counter {
  font-family: var(--hand);
  font-size: 22px;
  color: var(--ink-soft);
}

.hint {
  margin-top: 14px;
  text-align: right;
  font-size: 13px;
  color: var(--ink-soft);
}
.hint kbd {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 1px 1px 0 var(--ink);
  margin-right: 4px;
}

/* ===== Welcome / Thank-you specific ===== */
.welcome, .thanks {
  text-align: center;
  padding: 20px 0;
}
.welcome .eyebrow, .thanks .eyebrow {
  display: block;
  margin-bottom: 12px;
}
.welcome h1, .thanks h1 {
  font-size: clamp(36px, 6vw, 64px);
  margin-bottom: 18px;
}
.welcome .lead, .thanks .lead {
  margin: 0 auto 32px;
  font-size: 18px;
}
.welcome .btn-primary, .thanks .btn-primary {
  font-size: 17px;
  padding: 14px 26px;
}

.thanks .big-rabbit {
  width: 160px;
  height: 160px;
  object-fit: contain;
  transform-origin: center bottom;
  margin: 0 auto 16px;
  display: block;
  animation: hopLoop 1.6s ease-in-out infinite;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 18px 24px 28px;
  font-size: 13px;
  color: var(--ink-soft);
  font-family: var(--hand);
  font-size: 18px;
}
.footer a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--carrot);
  text-underline-offset: 3px;
}

/* ===== Loading state ===== */
.is-submitting .btn-primary { opacity: 0.6; pointer-events: none; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .step, .progress-rabbit, .sparkle, .thanks .big-rabbit {
    animation: none !important;
    transition: none !important;
  }
}
