/* ScrubSites - free demo form */

.demo-page {
  background:
    radial-gradient(circle at 6% 88%, var(--bubble) 0 140px, transparent 141px),
    radial-gradient(circle at 96% 10%, var(--sponge) 0 70px, transparent 71px),
    var(--suds);
  padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
  min-height: 80vh;
}
.demo-wrap {
  max-width: 760px;
}
.demo-intro h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-stretch: 80%;
  margin-bottom: 0.3em;
}
.demo-intro p {
  color: var(--ink-soft);
  max-width: 34em;
}

.quiz {
  margin-top: 28px;
  background: var(--white);
  border: var(--edge);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--ink);
  padding: clamp(22px, 4.5vw, 44px);
  overflow: hidden;
}

/* progress: a sponge wiping its way along */
.quiz-progress .track {
  position: relative;
  height: 14px;
  border: var(--edge);
  border-radius: 999px;
  background:
    repeating-linear-gradient(-45deg, #e9e2d2 0 6px, #ddd3bd 6px 12px);
  overflow: visible;
}
.quiz-progress .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 999px;
  background: var(--bubble);
  transition: width 0.45s cubic-bezier(0.3, 1.2, 0.5, 1);
}
.quiz-progress .fill::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 50%;
  width: 32px;
  height: 24px;
  margin-top: -12px;
  background: url("../img/sponge.svg") center / contain no-repeat;
}
.quiz-count {
  margin: 14px 0 26px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.step {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.step[data-anim="next"] {
  animation: slide-next 0.38s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.step[data-anim="back"] {
  animation: slide-back 0.38s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes slide-next {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slide-back {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .step[data-anim] {
    animation: none;
  }
  .quiz-progress .fill {
    transition: none;
  }
}

.step legend {
  padding: 0;
  margin-bottom: 14px;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 86%;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.step legend label {
  cursor: default;
}
.help {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: -4px 0 18px;
}
.step .help:last-child {
  margin: 18px 0 0;
}

.step input[type="text"],
.step input[type="email"],
.step input[type="tel"],
.step textarea {
  width: 100%;
  font: inherit;
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--suds);
  border: var(--edge);
  border-radius: 10px;
  padding: 14px 16px;
}
.step textarea {
  resize: vertical;
  min-height: 110px;
}
.step input::placeholder,
.step textarea::placeholder {
  color: #8593a6;
}
.step input:focus,
.step textarea:focus {
  outline: 3px solid var(--sponge-deep);
  outline-offset: 1px;
  background: var(--white);
}
.sub-label {
  display: block;
  font-weight: 700;
  margin: 18px 0 8px;
}
.optional {
  font-weight: 400;
  color: var(--ink-soft);
}

/* chips (multi select) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip input,
.option input,
.look input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.chip span {
  display: inline-block;
  padding: 10px 16px;
  border: var(--edge);
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  background: var(--white);
  transition: background 0.12s ease;
}
.chip span::before {
  content: "+ ";
}
.chip input:checked + span {
  background: var(--sponge);
}
.chip input:checked + span::before {
  content: "\2713  ";
}
.chip input:focus-visible + span,
.option input:focus-visible + span,
.look input:focus-visible + .look-card {
  outline: 3px solid var(--scourer);
  outline-offset: 3px;
}

/* options (single select) */
.options {
  display: grid;
  gap: 10px;
}
.option span {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: var(--edge);
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  background: var(--white);
}
.option span::before {
  content: "";
  width: 22px;
  height: 22px;
  border: var(--edge);
  border-radius: 50%;
  flex: none;
  background: var(--white);
}
.option input:checked + span {
  background: var(--scourer-light);
}
.option input:checked + span::before {
  background: var(--scourer);
  box-shadow: inset 0 0 0 4px var(--white);
}
.reveal {
  margin-top: 4px;
}

/* look picker */
.looks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.look-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 12px;
  border: var(--edge);
  border-radius: 12px;
  cursor: pointer;
  background: var(--white);
}
.look-card b {
  font-family: var(--display);
  font-size: 1.2rem;
  margin-top: 6px;
}
.look-card small {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.3;
}
.swatch {
  display: flex;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--ink);
}
.swatch i {
  flex: 1;
}
.swatch.unsure i {
  background: repeating-linear-gradient(45deg, #eef2f7 0 6px, #dfe6ef 6px 12px);
}
.look input:checked + .look-card {
  background: var(--sponge);
  box-shadow: 3px 3px 0 var(--ink);
}
@media (max-width: 620px) {
  .looks {
    grid-template-columns: 1fr 1fr;
  }
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 22px;
  font-size: 1rem;
  cursor: pointer;
}
.consent input {
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--scourer);
}

.error {
  min-height: 1.6em;
  margin: 16px 0 0;
  color: var(--danger);
  font-weight: 700;
  font-size: 1rem;
}
.error:empty {
  min-height: 0;
  margin: 0;
}

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}
.quiz-nav .btn {
  margin-left: auto;
  min-width: 150px;
}
.quiz-nav .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.back {
  font: inherit;
  font-weight: 700;
  background: none;
  border: 0;
  padding: 12px 4px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.enter-tip {
  text-align: right;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 10px 0 0;
}
@media (hover: none) {
  .enter-tip {
    display: none;
  }
}

.done {
  outline: none;
}
.done h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
}
.done ol {
  padding-left: 1.3em;
  margin: 0 0 28px;
}
.done li {
  margin-bottom: 10px;
}
.test-mode {
  background: var(--sponge);
  border: var(--edge);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 700;
}

.demo-aside {
  margin-top: 28px;
  font-size: 1rem;
  color: var(--ink-soft);
}
