/* ==========================================================================
   VERDE HAIR LOUNGE - product-finder.css
   Immersive, iPad-first hair consultation. Loads alongside core.css.
   No image hero; the quiz is the experience. Built to fill a landscape
   tablet beautifully and collapse cleanly to mobile.
   ========================================================================== */

/* ==========================================================================
   STAGE
   ========================================================================== */

.pf {
  position: relative;
  background: var(--color-cream);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.pf__progress {
  position: relative;
  z-index: 3;
  padding: clamp(5.5rem, 9vh, 7rem) var(--gutter, 1.5rem) 0;
  text-align: center;
}
.pf__progress:empty { display: none; }
.pf-dots {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}
.pf-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(19, 45, 32, 0.16);
  transition: all var(--t) var(--ease);
}
.pf-dot.is-done { background: var(--color-gold); }
.pf-dot.is-active {
  width: 26px;
  border-radius: 4px;
  background: var(--color-verde);
}
.pf-step {
  margin-top: var(--space-xs);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-muted);
}

.pf__stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
}

/* Entrance animation for each screen */
@keyframes pfIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.pf__stage > * { width: 100%; }
.js .pf__stage > .is-in {
  animation: pfIn 0.55s var(--ease) both;
}
@media (prefers-reduced-motion: reduce) {
  .js .pf__stage > .is-in { animation: none; }
}

.pf-sprig {
  width: 64px;
  height: 32px;
  color: var(--color-gold);
  margin: 0 auto var(--space-xs);
  display: block;
}

/* ==========================================================================
   INTRO  (full-bleed dark panel)
   ========================================================================== */

.pf-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100svh;
  margin-top: calc(-1 * clamp(5.5rem, 9vh, 7rem)); /* pull under the empty progress area */
  padding: clamp(7rem, 16vh, 11rem) var(--gutter, 1.5rem) clamp(3rem, 8vh, 5rem);
  background: var(--color-verde-deep);
  overflow: hidden;
}
.pf-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../images/aveda/aveda-products-studio.webp") center/cover no-repeat;
  opacity: 0.32;
}
.pf-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 90% at 50% 30%, rgba(13,31,22,0.55) 0%, rgba(13,31,22,0.88) 100%);
}
.pf-intro .pf-sprig { color: var(--color-gold); }
.pf-intro__title {
  color: var(--color-cream);
  font-size: var(--step-5);
  line-height: 1.02;
  max-width: 18ch;
  margin: var(--space-2xs) auto 0;
}
.pf-intro__lead {
  margin: var(--space-m) auto 0;
  max-width: 44ch;
  color: var(--color-cream);
  opacity: 0.84;
  font-size: var(--step-1);
  line-height: 1.55;
}
.pf-start { margin-top: var(--space-l); }
.pf-intro__time {
  margin-top: var(--space-s);
  color: var(--color-cream);
  opacity: 0.6;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   QUESTION
   ========================================================================== */

.pf-question {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vh, 3.5rem) var(--gutter, 1.5rem) clamp(2.5rem, 6vh, 4rem);
  max-width: 1100px;
  margin-inline: auto;
}
.pf-question__head {
  text-align: center;
  max-width: 40ch;
  margin: 0 auto clamp(1.75rem, 4vh, 2.75rem);
}
.pf-question__title {
  font-size: var(--step-4);
  line-height: 1.06;
}
.pf-question__help {
  margin-top: var(--space-xs);
  color: var(--color-muted);
  font-size: var(--step-0);
}

/* Centred flex so every row balances and any short final row sits centred,
   rather than the orphans hanging off to the left. */
.pf-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.85rem, 1.4vw, 1.25rem);
  margin-inline: auto;
}
.pf-grid > * { flex: 0 1 13.5rem; }
/* Width caps shape how each set wraps:
   3 -> single row, 4 -> single row, 5 -> 3+2, 7 -> 4+3 */
.pf-grid--3 { max-width: 46rem; }
.pf-grid--4 { max-width: 60rem; }
.pf-grid--5 { max-width: 46rem; }
.pf-grid--7 { max-width: 60rem; }

.pf-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: clamp(112px, 15vh, 144px);
  padding: var(--space-l) var(--space-m);
  background: var(--color-white);
  border: 1px solid var(--color-cream-deep);
  border-radius: var(--radius-l);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(19, 45, 32, 0.04), 0 8px 22px rgba(19, 45, 32, 0.05);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease), background var(--t) var(--ease);
}
@media (hover: hover) {
  .pf-card:hover {
    border-color: var(--color-gold);
    box-shadow: 0 2px 4px rgba(19, 45, 32, 0.06), 0 16px 34px rgba(19, 45, 32, 0.10);
    transform: translateY(-3px);
  }
}
.pf-card:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}
.pf-card__label {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--color-verde);
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.pf-card__tick {
  position: absolute;
  top: 12px; right: 12px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(19, 45, 32, 0.18);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.pf-card.is-selected {
  border-color: var(--color-verde);
  background: var(--color-verde);
  box-shadow: 0 12px 30px rgba(19, 45, 32, 0.20);
  transform: translateY(-1px);
}
.pf-card.is-selected .pf-card__label { color: var(--color-cream); }
.pf-card.is-selected .pf-card__tick {
  opacity: 1;
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.pf-nav {
  display: flex;
  justify-content: flex-start;
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
}
.pf-back {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--color-muted);
  font-size: var(--step-0);
  padding: var(--space-2xs) 0;
  letter-spacing: 0.02em;
  transition: color var(--t) var(--ease);
}
.pf-back::before { content: "\2190"; margin-right: 0.5rem; }
.pf-back:hover { color: var(--color-verde); }

/* ==========================================================================
   RESULTS
   ========================================================================== */

.pf-results {
  padding: clamp(6.5rem, 10vh, 8.5rem) var(--gutter, 1.5rem) clamp(4rem, 9vh, 6rem);
  max-width: 1120px;
  margin-inline: auto;
}
.pf-results__head {
  text-align: center;
  max-width: 52ch;
  margin: 0 auto clamp(2.5rem, 6vh, 4rem);
}
.pf-results__head .pf-sprig { color: var(--color-gold-ink); }
.pf-results__title {
  font-size: var(--step-5);
  line-height: 1.03;
  margin-top: var(--space-2xs);
}
.pf-results__profile {
  margin-top: var(--space-m);
  color: var(--color-muted);
  font-size: var(--step-1);
  line-height: 1.6;
}

.pf-results__block { margin-top: clamp(2.5rem, 6vh, 4rem); }
.pf-results__label {
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: var(--step--1);
  color: var(--color-gold-ink);
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
}
.pf-results__label::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  margin: var(--space-s) auto 0;
}

/* Product grid */
.pf-products {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.pf-product {
  text-align: center;
  background: #fff;
  border: 1px solid rgba(19, 45, 32, 0.1);
  border-radius: var(--radius-l);
  padding: var(--space-m) var(--space-s) var(--space-l);
}
.pf-product__media {
  position: relative;
  height: 150px;
  margin-bottom: var(--space-s);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-product__media img {
  max-height: 150px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.pf-product__ph {
  width: 100px; height: 130px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-m);
  background: var(--color-cream-deep);
  color: var(--color-gold-ink);
}
.pf-product__ph span {
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: 0.04em;
}
.pf-product__role {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-gold-ink);
  margin-bottom: var(--space-2xs);
}
.pf-product__name {
  font-size: var(--step-0);
  line-height: 1.25;
}
.pf-product__note {
  margin-top: var(--space-2xs);
  font-size: var(--step--1);
  color: var(--color-muted);
  line-height: 1.5;
}

/* Services */
.pf-services {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
}
.pf-service {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-m) var(--space-s);
  border-top: 1px solid rgba(19, 45, 32, 0.12);
}
.pf-service:last-child { border-bottom: 1px solid rgba(19, 45, 32, 0.12); }
.pf-service__no {
  flex: none;
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  color: var(--color-gold-ink);
  font-family: var(--font-display);
  font-size: var(--step-0);
}
.pf-service__name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--color-verde);
}

/* CTA */
.pf-cta {
  text-align: center;
  margin-top: clamp(3rem, 7vh, 5rem);
  padding: clamp(2.5rem, 6vh, 4rem) var(--space-m);
  background: var(--color-verde-deep);
  border-radius: var(--radius-l);
  color: var(--color-cream);
}
.pf-cta__title {
  color: var(--color-cream);
  font-size: var(--step-3);
}
.pf-cta__text {
  margin: var(--space-s) auto 0;
  max-width: 48ch;
  color: var(--color-cream);
  opacity: 0.84;
  line-height: 1.55;
}
.pf-cta__actions {
  margin-top: var(--space-l);
  display: flex;
  gap: var(--space-s);
  justify-content: center;
  flex-wrap: wrap;
}
/* Outline button needs a light variant on this dark panel */
.pf-cta .btn--outline {
  border-color: rgba(245, 241, 231, 0.5);
  color: var(--color-cream);
}
.pf-cta .btn--outline:hover {
  border-color: var(--color-cream);
  background: rgba(245, 241, 231, 0.08);
}
.pf-restart {
  margin-top: var(--space-l);
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--color-cream);
  opacity: 0.7;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity var(--t) var(--ease);
}
.pf-restart:hover { opacity: 1; }

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 560px) {
  .pf-grid { gap: 0.7rem; }
  .pf-grid--3,
  .pf-grid--4,
  .pf-grid--5,
  .pf-grid--7 { max-width: 30rem; }
  .pf-grid > * { flex: 1 1 calc(50% - 0.7rem); }
  .pf-card {
    min-height: 92px;
    padding: var(--space-m) var(--space-s);
  }
  .pf-card__label { font-size: var(--step-0); }
  .pf-product__media { height: 120px; }
  .pf-product__media img { max-height: 120px; }
}