/* ── Breed Match Quiz — storybook dog park ──────────────────────────
   Oatmeal-cream page, watercolor blobs of moss and honey, chunky
   rounded picture-book type, paw-print margin trail, biscuit-shaped
   choices with wagging bones, leash-clip progress, adoption card. */

:root {
  --oat: #f7f1e3;
  --oat-deep: #f0e7d2;
  --walnut: #5f4632;
  --walnut-deep: #48331f;
  --moss: #8aa86c;
  --moss-deep: #6b8a4f;
  --honey: #e7b054;
  --biscuit: #fffaf0;
  --stamp-red: #d95f43;
  --ink-soft: #99887a;
  --err: #cf4a33;
  --round: 'Baloo 2', cursive;
  --sans: 'Nunito', sans-serif;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--sans);
  color: var(--walnut);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, var(--oat), var(--oat-deep));
  background-attachment: fixed;
  min-height: 100vh;
}

.park { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.paw-trail {
  position: fixed;
  left: 3vw;
  top: 16vh;
  font-size: 1.3rem;
  line-height: 3.6;
  opacity: 0.16;
  transform: rotate(-8deg);
  pointer-events: none;
}

.wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 24px; position: relative; }

main { flex: 1 0 auto; padding-bottom: 60px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 54px 24px 8px; }

.blob {
  position: absolute;
  border-radius: 48% 52% 55% 45% / 55% 46% 54% 45%;
  filter: blur(2px);
  opacity: 0.35;
  pointer-events: none;
}

.blob-a { width: 210px; height: 170px; background: var(--moss); top: 20px; left: 8%; }
.blob-b { width: 170px; height: 150px; background: var(--honey); top: 60px; right: 10%; }

.kicker {
  position: relative;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--moss-deep);
  margin-bottom: 12px;
}

.hero h1 {
  position: relative;
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(2.1rem, 8vw, 3.3rem);
  line-height: 1.08;
  color: var(--walnut);
}

.wag { color: var(--stamp-red); }

.sub { position: relative; color: var(--ink-soft); max-width: 460px; margin: 12px auto 0; font-weight: 600; }

/* ── Kennel card ──────────────────────────────────────────────────── */
.kennel {
  position: relative;
  background: var(--biscuit);
  border: 3px solid var(--walnut);
  border-radius: 22px;
  padding: 30px 30px 28px;
  margin-top: 28px;
  box-shadow: 0 10px 0 rgba(95, 70, 50, 0.18);
}

/* leash progress */
.leash-line {
  border-bottom: 2.5px dashed rgba(95, 70, 50, 0.25);
  margin-bottom: 26px;
  padding-bottom: 14px;
}

.leash-clips { display: flex; justify-content: center; gap: 12px; }

.clip {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid var(--walnut);
  background: transparent;
  opacity: 0.3;
  transition: all 0.25s ease;
}

.clip.done { background: var(--moss); border-color: var(--moss-deep); opacity: 1; }
.clip.current { opacity: 1; transform: scale(1.2); border-color: var(--stamp-red); }

/* question */
.q-text {
  font-family: var(--round);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.3;
  text-align: center;
  margin-bottom: 20px;
}

.choices { display: grid; gap: 10px; }

.choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--walnut);
  background: var(--oat);
  border: 2.5px solid transparent;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.choice-btn .bone {
  flex: 0 0 auto;
  font-size: 1.05rem;
  opacity: 0.45;
  transition: all 0.18s ease;
}

.choice-btn:hover:not(:disabled) { border-color: var(--moss); background: #fff; }
.choice-btn:hover:not(:disabled) .bone { opacity: 1; transform: rotate(-16deg); }

.choice-btn.picked { border-color: var(--moss-deep); background: rgba(138, 168, 108, 0.18); }
.choice-btn.picked .bone { opacity: 1; transform: rotate(-16deg) scale(1.15); }
.choice-btn:disabled { cursor: default; }

/* ── Gate ─────────────────────────────────────────────────────────── */
.gate { text-align: center; }

.gate-icon { font-size: 2.2rem; display: block; margin-bottom: 8px; }

.gate h2 { font-family: var(--round); font-weight: 800; font-size: 1.8rem; }

.lead { color: var(--ink-soft); font-weight: 600; margin: 6px 0 22px; }

.field { margin-bottom: 16px; text-align: left; }

label {
  display: block;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--moss-deep);
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 13px 17px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--walnut);
  background: #fff;
  border: 2.5px solid var(--oat-deep);
  border-radius: 14px;
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--moss); }
input.error { border-color: var(--err); }
input::placeholder { color: #c6b8a4; }

/* ── Button ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  background: var(--stamp-red);
  border: none;
  border-radius: 999px;
  padding: 15px 32px;
  cursor: pointer;
  transition: transform 0.12s ease;
  box-shadow: 0 5px 0 #a83f28;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; }

.btn-block { width: 100%; }

.form-error { color: var(--err); font-weight: 800; text-align: center; margin-top: 14px; }

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Adoption card result ─────────────────────────────────────────── */
.adopt-card {
  position: relative;
  text-align: center;
  background: var(--biscuit);
  border: 3px solid var(--walnut);
  border-radius: 22px;
  padding: 40px 32px 32px;
  margin-top: 28px;
  box-shadow: 0 10px 0 rgba(95, 70, 50, 0.18);
  /* scalloped top edge */
  background-image: radial-gradient(circle at 12px -6px, transparent 10px, var(--biscuit) 10.5px);
  background-size: 24px 100%;
  background-repeat: repeat-x;
}

.match-stamp {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--round);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stamp-red);
  border: 2.5px solid var(--stamp-red);
  border-radius: 8px;
  padding: 5px 10px;
  transform: rotate(7deg);
  opacity: 0.85;
}

.adopt-tag {
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--moss-deep);
  margin-bottom: 8px;
}

.adopt-card h2 {
  font-family: var(--round);
  font-weight: 800;
  font-size: clamp(1.4rem, 5.5vw, 1.9rem);
  line-height: 1.2;
}

.adopt-art {
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  border: 3px solid var(--oat-deep);
  margin: 18px auto 6px;
  display: block;
}

.adopt-desc { color: var(--ink-soft); font-weight: 600; margin-top: 12px; }

.share-line { text-align: center; color: var(--ink-soft); font-weight: 700; margin-top: 22px; }

/* ── Footer ───────────────────────────────────────────────────────── */
.foot {
  text-align: center;
  padding: 30px 20px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .kennel { padding: 24px 18px 22px; }
  .paw-trail { display: none; }
  .adopt-card { padding: 34px 20px 26px; }
}
