/* welcome */
.welcome {
  display: grid;
  gap: 22px;
  grid-template-areas: 'intro' 'cards' 'go';
}
.w-intro {
  grid-area: intro;
}
.w-go {
  grid-area: go;
}
.w-go .note {
  margin-top: 0;
}
.w-go .actions {
  margin-top: 14px;
}
/* persona gallery: swipe on phones, 2x3 grid on laptops */
.pwrap {
  grid-area: cards;
  min-width: 0;
}
.pgrid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(var(--cardpad) * -1);
  padding: 8px var(--cardpad) 16px;
  scroll-padding-inline: var(--cardpad);
  list-style: none;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.pgrid::-webkit-scrollbar {
  display: none;
}
.pgrid:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: -4px;
  border-radius: 20px;
}
.pcard {
  flex: 0 0 78%;
  max-width: 300px;
  scroll-snap-align: start;
  background: var(--c);
  color: var(--ink);
  border-radius: 26px;
  padding: 24px 18px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pcard:not(.is-active) {
  transform: scale(0.93);
}
.pcard .pic {
  width: 110px;
  height: 110px;
  border-radius: 22px;
  background: #fff;
  padding: 6px;
  display: grid;
  place-items: center;
  font-size: 3.6rem;
  overflow: hidden;
  flex: none;
}
.pcard .pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pcard h3 {
  color: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.15;
}
.pcard p {
  font-size: 0.98rem;
  line-height: 1.4;
}
.pdots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.pdots span {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  transition:
    width 0.3s,
    background 0.3s;
}
.pdots span.on {
  width: 26px;
  background: var(--navy);
}
.swipe-hint {
  text-align: center;
  font-size: 0.9rem;
  color: #4a4a78;
  margin-top: 8px;
}

/* entrance motion */
@keyframes rise {
  from {
    opacity: 0;
    translate: 0 20px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
@keyframes tick {
  0% {
    transform: scale(0.7);
  }
  60% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}
.in {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.hero .badge {
  animation: pop 0.75s cubic-bezier(0.3, 1.4, 0.5, 1) 0.3s backwards;
}
.opt input:checked + label .letter {
  animation: tick 0.3s ease-out;
}

/* answers */
fieldset {
  border: 0;
  margin: 20px 0 0;
  padding: 0;
  min-width: 0;
}
legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.opts {
  display: grid;
  gap: 10px;
}
.opt {
  position: relative;
}
.opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.opt label {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 12px 16px 12px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.15s;
}
.opt .letter {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--mist);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--navy);
}
.opt input:hover + label {
  border-color: var(--navy);
}
.opt input:checked + label {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.opt input:checked + label .letter {
  background: var(--gold);
  color: var(--navy);
}
.opt input:checked + label::after {
  content: '✓';
  margin-left: auto;
  font-weight: 900;
  color: var(--gold);
  font-size: 1.3rem;
}
.opt input:focus-visible + label {
  outline: 4px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--navy);
}

/* buttons */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.btn {
  font: inherit;
  font-weight: 900;
  font-size: 1.05rem;
  border: 0;
  border-radius: 99px;
  padding: 15px 28px;
  min-height: 52px;
  cursor: pointer;
  background: var(--red);
  color: #fff;
  transition:
    transform 0.12s,
    background 0.15s;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #c8101c;
}
.btn:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}
.btn:disabled {
  background: #d6d8ee;
  color: #7b7ca8;
  cursor: not-allowed;
}
.btn.ghost {
  background: transparent;
  color: var(--navy);
  box-shadow: inset 0 0 0 2px var(--navy);
}
.btn.ghost:hover:not(:disabled) {
  background: var(--mist);
}
.btn.gold {
  background: var(--gold);
  color: var(--navy);
}
.btn.gold:hover:not(:disabled) {
  background: #e6b800;
}
.actions .grow {
  flex: 1 1 220px;
}

/* calc */
.calc {
  text-align: center;
  padding: 48px 8px;
}
.spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 6px solid var(--mist);
  border-top-color: var(--red);
  margin: 0 auto 22px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* result */
.reveal {
  display: grid;
  gap: 22px;
}
.hero {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 24px;
  padding: 26px 20px;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}
.badge {
  width: min(220px, 56vw);
  aspect-ratio: 1;
  border-radius: 12%;
  background: #fff;
  padding: 3%;
  display: grid;
  place-items: center;
  font-size: clamp(4.5rem, 22vw, 7.5rem);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.hero h2 {
  color: inherit;
  font-size: clamp(2.2rem, 9vw, 3.6rem);
}
.value {
  display: inline-block;
  margin-top: 10px;
  font-weight: 900;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  padding: 6px 16px;
  border-radius: 99px;
}
.power {
  font-size: 1.3rem;
  font-weight: 700;
  max-width: 30ch;
  line-height: 1.3;
}
.action-box h3 {
  font-size: 1.3rem;
}
.action-box p {
  margin-top: 8px;
}
.action-box .ask {
  font-weight: 700;
  color: var(--navy);
}
.invite {
  background: var(--mist);
  border-radius: 22px;
  padding: 20px;
}
.invite h3 {
  font-size: 1.25rem;
}
.invite p {
  margin-top: 8px;
}
