/* ============================================================
   PotsAlive — Plant Matcher (loads AFTER pages.css)
   Quiz flow + results + care kit
   ============================================================ */

.matcher-sec { padding-bottom: clamp(60px, 9vw, 130px); }

/* ---------- edge-to-edge launch band (homepage section variant) ---------- */
.matcher-edge {
  background: var(--forest);
  color: var(--paper);
  padding: clamp(40px, 5vw, 64px) 0;
  position: relative;
  overflow: hidden;
}
.matcher-edge .launch-edge {
  text-align: center;
  max-width: 760px;
  position: relative;
  z-index: 2;
}
.matcher-edge .eyebrow { color: var(--ochre); justify-content: center; }
.matcher-edge h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-top: 14px;
  color: var(--paper);
}
.matcher-edge p {
  color: rgba(244, 238, 225, 0.72);
  font-size: 1.02rem;
  max-width: 50ch;
  margin: 14px auto 0;
  line-height: 1.55;
}
.matcher-edge .launch-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 20px;
}
.matcher-edge .launch-meta span {
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(244, 238, 225, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.matcher-edge .launch-meta span::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50% 50% 50% 0;
  background: var(--ochre);
  transform: rotate(45deg);
}
.matcher-edge .btn-ochre { background: var(--ochre); color: var(--forest-deep); margin-top: 24px; }
.matcher-edge .btn-ochre:hover { background: #e6b257; }
.launch-seed-edge {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50% 50% 50% 0;
  background: rgba(255, 255, 255, 0.04);
  transform: rotate(45deg);
  right: -90px; bottom: -110px;
  pointer-events: none;
  z-index: 1;
}

/* ---------- shared shell ---------- */
.matcher {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

/* ============================================================
   LAUNCH CARD (in-page funnel CTA)
   ============================================================ */
.launch {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  background: var(--forest);
  color: var(--paper);
  border-radius: 28px;
  padding: clamp(34px, 5vw, 64px);
  overflow: hidden;
  text-align: center;
  box-shadow: 0 50px 90px -56px rgba(30, 42, 32, 0.55);
}
.launch .eyebrow { color: var(--ochre); justify-content: center; }
.launch h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-top: 16px;
  color: var(--paper);
}
.launch p {
  color: rgba(244, 238, 225, 0.72);
  font-size: 1.06rem;
  max-width: 48ch;
  margin: 16px auto 0;
  line-height: 1.55;
}
.launch-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 24px;
}
.launch-meta span {
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(244, 238, 225, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.launch-meta span::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50% 50% 50% 0;
  background: var(--ochre);
  transform: rotate(45deg);
}
.launch .btn-ochre { background: var(--ochre); color: var(--forest-deep); margin-top: 30px; }
.launch .btn-ochre:hover { background: #e6b257; }
.launch-seed {
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50% 50% 50% 0;
  background: rgba(255, 255, 255, 0.04);
  transform: rotate(45deg);
  right: -70px; bottom: -70px;
  pointer-events: none;
}

/* ============================================================
   POPUP / MODAL
   ============================================================ */
.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(14px, 3.5vw, 54px);
  overflow-y: auto;
  background: rgba(26, 38, 28, 0.5);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease);
}
.pm-overlay.open { opacity: 1; pointer-events: auto; }

.pm-dialog {
  position: relative;
  width: 100%;
  max-width: 940px;
  margin: auto;
  transform: translateY(26px) scale(.985);
  transition: transform .5s var(--ease);
}
.pm-overlay.open .pm-dialog { transform: none; }

.pm-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  margin-bottom: -14px;
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 10px 26px -10px rgba(30, 42, 32, 0.55);
  cursor: pointer;
  z-index: 3;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.pm-close:hover { background: var(--ink); color: var(--card); transform: rotate(90deg); }
.pm-close svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .pm-overlay, .pm-dialog { transition: none; }
  .pm-close:hover { transform: none; }
}

/* ---------- quiz card ---------- */
.quiz {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(26px, 4vw, 52px);
  box-shadow: 0 50px 90px -56px rgba(30, 42, 32, 0.5);
  position: relative;
  overflow: hidden;
}

/* progress bar */
.quiz-bar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--paper-2);
}
.quiz-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--clay);
  border-radius: 0 100px 100px 0;
  transition: width .55s var(--ease);
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(20px, 3vw, 34px);
  gap: 16px;
}
.quiz-step {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.quiz-step::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--clay);
}
.quiz-back {
  border: none;
  background: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 6px 4px;
  transition: color .25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.quiz-back:hover { color: var(--ink); }
.quiz-back[hidden] { display: none; }

/* question */
.quiz-stage { min-height: 300px; }
.q-prompt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 18ch;
}
.q-sub {
  color: var(--ink-soft);
  margin-top: 12px;
  font-size: 1.02rem;
  max-width: 46ch;
}

.q-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: clamp(26px, 3.5vw, 40px);
}
.q-options.two { grid-template-columns: repeat(2, 1fr); }

.opt {
  text-align: left;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 24px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.opt:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 40px -28px rgba(30, 42, 32, 0.4);
}
.opt.sel {
  border-color: var(--clay);
  background: var(--card-2);
  box-shadow: 0 0 0 1px var(--clay), 0 22px 40px -26px rgba(196, 98, 58, 0.5);
}
.opt-ic {
  width: 46px; height: 46px;
  margin-bottom: 12px;
  color: var(--forest);
  display: flex;
  align-items: center;
}
.opt.sel .opt-ic { color: var(--clay); }
.opt-ic svg { width: 100%; height: 100%; display: block; }
.opt-text { display: flex; flex-direction: column; gap: 2px; }
.opt b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.32rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.opt span {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* seed icon (brand motif) used for experience */
.seed-row { display: flex; gap: 5px; align-items: flex-end; height: 100%; }
.seed-ico {
  width: 13px; height: 13px;
  border-radius: 50% 50% 50% 0;
  background: currentColor;
  transform: rotate(45deg);
  display: inline-block;
}
.seed-ico.dim { opacity: 0.26; }

/* question entrance */
.q-enter { animation: qEnter .5s var(--ease) both; }
@keyframes qEnter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.q-leave { animation: qLeave .28s var(--ease) both; }
@keyframes qLeave {
  to { opacity: 0; transform: translateY(-12px); }
}

@media (max-width: 720px) {
  .q-options, .q-options.two { grid-template-columns: 1fr; gap: 10px; }
  .opt { flex-direction: row; align-items: center; gap: 16px; padding: 16px 18px; }
  .opt-ic { width: 38px; height: 38px; margin-bottom: 0; flex: none; }
  .opt-text { display: flex; flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .q-enter, .q-leave { animation: none; }
}

/* ============================================================
   RESULTS
   ============================================================ */
.results[hidden] { display: none; }

.r-summary {
  text-align: center;
  margin-bottom: clamp(30px, 4vw, 48px);
}
.r-summary .eyebrow { justify-content: center; }
.r-summary h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-top: 16px;
  line-height: 1.0;
}
.r-summary p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 56ch;
  margin: 18px auto 0;
}
.r-summary .pf { color: var(--ink); font-weight: 600; }

/* match cards */
.r-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.rcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  opacity: 0;
  transform: translateY(26px);
  text-decoration: none;
  color: inherit;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.rcard.show {
  animation: rIn .7s var(--ease) forwards;
}
@keyframes rIn { to { opacity: 1; transform: none; } }
.rcard.top { border-color: var(--clay); box-shadow: 0 36px 60px -40px rgba(196, 98, 58, 0.5); }
.rcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 44px 70px -42px rgba(30, 42, 32, 0.4);
  border-color: var(--leaf);
}
.rcard.top:hover { border-color: var(--clay); box-shadow: 0 44px 70px -38px rgba(196, 98, 58, 0.6); }
.rcard:hover .rcard-guide .arr { transform: translateX(6px); }
.rcard:hover .rcard-media img { transform: scale(1.04); }

.rcard-media {
  aspect-ratio: 3/4;
  background: var(--sage-soft);
  position: relative;
  overflow: hidden;
}
.rcard-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.rcard-rank {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(251, 247, 238, 0.94);
  backdrop-filter: blur(6px);
  color: var(--forest);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rcard.top .rcard-rank { background: var(--clay); color: #fff; }
.rcard-match {
  position: absolute;
  bottom: 14px; right: 14px;
  background: var(--forest);
  color: var(--paper);
  border-radius: 14px;
  padding: 8px 12px;
  text-align: center;
  line-height: 1;
}
.rcard-match b { font-family: var(--serif); font-size: 1.5rem; display: block; }
.rcard-match span { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }

.rcard-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.rcard-body h3 { font-size: 1.5rem; line-height: 1.05; }
.rcard-latin { font-family: var(--serif); font-style: italic; color: var(--ink-faint); font-size: 0.96rem; margin-top: 3px; }

.rcard-traits { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.trait {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--forest);
  background: var(--sage-soft);
  border-radius: 100px;
  padding: 5px 11px;
  white-space: nowrap;
}
.trait.safe { background: var(--leaf); color: #fff; }

.rcard-why {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-top: 16px;
  flex: 1;
}
.rcard-why b { color: var(--ink); font-weight: 600; }

.rcard-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.rcard-guide {
  color: var(--leaf);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rcard-guide .arr { transition: transform .35s var(--ease); }

@media (max-width: 880px) { .r-cards { grid-template-columns: 1fr; } }

/* ---------- care kit ---------- */
.kit {
  margin-top: clamp(40px, 6vw, 72px);
  background: var(--forest);
  color: var(--paper);
  border-radius: 26px;
  padding: clamp(30px, 4vw, 54px);
}
.kit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.kit-head .eyebrow.on-dark { color: var(--ochre); }
.kit-head h3 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); margin-top: 14px; color: var(--paper); max-width: 16ch; }
.kit-head p { color: rgba(244, 238, 225, 0.7); margin-top: 12px; max-width: 40ch; }
.kit-total { text-align: right; flex: none; }
.kit-total .t-lbl { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ochre); font-weight: 700; }
.kit-total .t-val { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; margin-top: 6px; }

.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: clamp(26px, 3vw, 38px);
}
.kit-item {
  background: var(--forest-soft);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--paper);
  border: 1px solid var(--line-light);
  transition: transform .4s var(--ease);
}
.kit-item:hover { transform: translateY(-5px); }
.kit-item-media { aspect-ratio: 16/11; background: #0e1c13; overflow: hidden; }
.kit-item-media img { width: 100%; height: 100%; object-fit: cover; }
.kit-item-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.kit-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ochre); }
.kit-item-body h4 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; margin-top: 7px; }
.kit-item-body p { color: rgba(244, 238, 225, 0.65); font-size: 0.88rem; margin-top: 6px; flex: 1; line-height: 1.45; }
.kit-price { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; }
.kit-price .now { font-family: var(--serif); font-size: 1.4rem; color: var(--ochre); }
.kit-price s { color: rgba(244, 238, 225, 0.5); font-size: 0.92rem; }

.kit-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: clamp(26px, 3vw, 34px);
}
.kit-cta .btn-ochre { background: var(--ochre); color: var(--forest-deep); }
.kit-cta .btn-ochre:hover { background: #e6b257; }

/* ---------- results footer ---------- */
.r-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: clamp(34px, 5vw, 52px);
  text-align: center;
}
.r-foot .retake {
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: 100px;
  padding: 0.92em 1.5em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.r-foot .retake:hover { background: var(--ink); color: var(--card); border-color: var(--ink); }

/* ---------- how it works (SEO) ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: clamp(36px, 4vw, 56px);
}
.how-step .hn {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--clay);
  line-height: 1;
}
.how-step h3 { font-size: 1.4rem; margin-top: 12px; }
.how-step p { color: var(--ink-soft); margin-top: 10px; font-size: 0.98rem; line-height: 1.55; }
@media (max-width: 760px) { .how-grid { grid-template-columns: 1fr; gap: 28px; } }
