/*
 * pottyplan.com/partners (site/partners.ts). The homepage's look (site.css: hero, trust, faq,
 * stickers) with one picture of its own: an Instagram story with the link sticker. Form fields and
 * pills come from founding.css.
 */

/* ---------- Hero ---------- */

.pp-hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.5rem);
  line-height: 1.06;
}

.pp-hero .lede {
  max-width: 38ch;
}

.pp-hero__fine {
  margin: 16px 0 0;
  font-size: 0.92rem;
  color: var(--text-2);
}

/* Two phones: the creator's story in front, the app behind it. */
.pp-art {
  width: min(440px, 92vw);
  aspect-ratio: 1 / 1.08;
}

.pp-art::before {
  top: 2%;
}

.pp-art .phone {
  position: absolute;
  margin: 0;
  border-width: 7px;
  border-radius: 34px;
}

.pp-art .phone img {
  border-radius: 27px;
}

.pp-art .pp-art__app {
  right: 2%;
  top: 0;
  width: 46%;
  rotate: 5deg;
}

.pp-art .pp-art__story {
  left: 4%;
  top: 9%;
  width: 52%;
  rotate: -4deg;
  z-index: 1;
}

/* The story itself stays in its own colors in dark mode: it's someone's post, not our page. */
/* Sizes inside the story scale with the phone (cqw = 1% of the phone's screen width). */
.pp-art__story {
  container-type: inline-size;
}

.story {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 390 / 844;
  padding: 7cqw 6cqw 8cqw;
  border-radius: 27px;
  overflow: hidden;
  background: linear-gradient(160deg, #fbd27a, #f2b544 55%, #ee8a6b);
  color: #1f2a2e;
}

.story__bars {
  display: flex;
  gap: 1.6cqw;
}

.story__bars i {
  flex: 1;
  height: 1.2cqw;
  min-height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
}

.story__bars i.on {
  background: #fff;
}

.story__who {
  display: flex;
  align-items: center;
  gap: 3cqw;
  margin-top: 4cqw;
  font-size: 5.4cqw;
}

.story__who img {
  width: 12cqw;
  height: 12cqw;
  border-radius: 50%;
  object-fit: cover;
  object-position: 40% 25%;
  box-shadow: 0 0 0 0.8cqw #fff;
}

.story__who span {
  opacity: 0.65;
}

.story__big {
  margin: auto 0 0;
  font: 800 9.6cqw/1.16 var(--font-head);
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}

/* Instagram's link sticker: white, rounded, slightly turned. */
.story__link {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 1.6cqw;
  margin: 7cqw 0 auto;
  padding: 3.6cqw 4.4cqw;
  border-radius: 3.6cqw;
  background: #fff;
  color: #2f7d74;
  font: 800 4.6cqw/1 var(--font-body);
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 2.4cqw 4.8cqw -2.4cqw rgba(0, 0, 0, 0.4);
  rotate: -3deg;
}

.story__link svg {
  width: 6cqw;
  height: 6cqw;
}

.story .story__stk {
  position: absolute;
  left: 7%;
  bottom: 4%;
  width: 34%;
  height: auto;
  rotate: -8deg;
  filter: drop-shadow(0 6px 8px rgba(31, 42, 46, 0.25));
}

.pp-art .pp-art__sale {
  left: auto;
  right: -4%;
  bottom: 4%;
}

.pp-art__sale strong {
  font-size: 1.15rem;
  color: var(--teal-ink);
}

@media (max-width: 480px) {
  .pp-art .pp-art__sale {
    right: 0;
    bottom: 0;
  }
}

/* ---------- The math ---------- */

.pp-math {
  padding: 96px 0 72px;
}

.pp-math__in {
  display: grid;
  gap: 40px;
  align-items: center;
}

.pp-math h2,
.pp-product h2,
.pp-kit h2,
.pp-steps h2,
.pp-apply h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.5rem);
  letter-spacing: -0.015em;
}

.pp-math__text p {
  color: var(--text-2);
  font-size: 1.08rem;
  max-width: 52ch;
}

/* The earnings slider (partners.js): one card, the big number on top, the comparison under the slider. */
.pp-calc {
  padding: 32px 28px 26px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft);
}

.pp-calc__label {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--text-2);
}

.pp-calc__big {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
}

.pp-calc__big output {
  font: 800 clamp(3rem, 9vw, 4.2rem)/1 var(--font-head);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--teal-ink);
}

.pp-calc__big span {
  font: 700 1.1rem var(--font-head);
  color: var(--text-2);
}

.pp-calc__year {
  margin: 10px 0 0;
  color: var(--text-2);
}

.pp-calc__year strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.pp-calc__slider {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 20px 20px 22px;
  border-radius: 20px;
  background: var(--bg);
  cursor: pointer;
}

.pp-calc__slider strong {
  font-variant-numeric: tabular-nums;
}

/* The slider: teal up to the thumb, a big white thumb that's easy to grab with a thumb. */
.pp-calc__slider input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: grab;
  touch-action: pan-y;
}

.pp-calc__slider input:active {
  cursor: grabbing;
}

.pp-calc__slider input::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--teal) var(--p), var(--line-strong) var(--p));
}

.pp-calc__slider input::-moz-range-track {
  height: 8px;
  border-radius: 99px;
  background: var(--line-strong);
}

.pp-calc__slider input::-moz-range-progress {
  height: 8px;
  border-radius: 99px;
  background: var(--teal);
}

.pp-calc__slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px var(--teal), 0 6px 14px -4px rgba(31, 79, 74, 0.55);
  transition: transform 0.15s var(--ease-out);
}

.pp-calc__slider input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px var(--teal), 0 6px 14px -4px rgba(31, 79, 74, 0.55);
  transition: transform 0.15s var(--ease-out);
}

.pp-calc__slider input:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

.pp-calc__slider input:active::-moz-range-thumb {
  transform: scale(1.12);
}

.pp-calc__slider input:focus-visible {
  outline: none;
}

.pp-calc__slider input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--teal), 0 0 0 7px var(--sun);
}

.pp-calc__slider input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--teal), 0 0 0 7px var(--sun);
}

.pp-calc__fine {
  margin: 20px 0 0;
  font-size: 0.85rem;
  color: var(--text-2);
}

.pp-bars {
  display: grid;
  gap: 20px;
  margin: 24px 0 0;
}

.pp-bars__row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 16px;
}

.pp-bars__label {
  grid-column: 1 / -1;
  font-weight: 600;
}

.pp-bars__bar {
  display: block;
  height: 16px;
  width: var(--w);
  min-width: 8px;
  border-radius: 99px;
  background: var(--line-strong);
}

.pp-bars__bar--us {
  background: var(--teal);
}

.pp-bars strong {
  font: 800 1.35rem var(--font-head);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}

.pp-bars__row:first-child strong {
  color: var(--teal-ink);
}

/* The bars grow once when the chart scrolls into view; the numbers are there from the start. */
.js .pp-calc .pp-bars__bar {
  transform-origin: left center;
  transform: scaleX(0.4);
  transition: transform 0.7s var(--ease-out) 0.15s;
}

.js .pp-calc.is-in .pp-bars__bar {
  transform: none;
}

@media (min-width: 900px) {
  .pp-math__in {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 72px;
  }
}

/* ---------- What followers get ---------- */

.pp-product {
  padding: 24px 0 96px;
}

.pp-product__in {
  display: grid;
  gap: 24px;
  align-items: center;
}

.pp-product__art {
  margin: 0;
}

.pp-product__art img {
  display: block;
  width: 100%;
  height: auto;
}

.pp-product__text > p:not(.small) {
  color: var(--text-2);
  font-size: 1.08rem;
}

.pp-product .ticks {
  margin: 24px 0;
}

@media (min-width: 900px) {
  .pp-product__in {
    grid-template-columns: 1.2fr 1fr;
    gap: 56px;
  }
}

/* ---------- Creator kit ---------- */

.pp-kit {
  padding: 96px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pp-kit__in {
  position: relative;
}

.pp-kit__head {
  max-width: 560px;
  margin-bottom: 40px;
}

.pp-kit__head p {
  color: var(--text-2);
  font-size: 1.08rem;
  margin: 0;
}

.pp-kit__stickers {
  --w: 56px;
  --gap: 24px;
  margin: -8px 0 40px 8px;
}

.pp-kit__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.pp-kit__list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border-radius: 22px;
  background: var(--bg);
}

.pp-kit__list svg {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal-ink);
}

.pp-kit__list h3 {
  font-size: 1.1rem;
  margin: 2px 0 6px;
}

.pp-kit__list p {
  margin: 0;
  color: var(--text-2);
}

@media (min-width: 760px) {
  .pp-kit__list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .pp-kit__stickers {
    position: absolute;
    right: 48px;
    top: 0;
    margin: 0;
    --w: 76px;
    --gap: 30px;
  }
}

/* ---------- Steps ---------- */

.pp-steps {
  padding: 96px 0 56px;
}

.pp-steps__list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
  position: relative;
}

.pp-steps__list li {
  position: relative;
  padding-left: 60px;
}

.pp-steps__n {
  position: absolute;
  left: 0;
  top: -4px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--on-sun);
  font: 800 1.1rem var(--font-head);
  box-shadow: 0 0 0 6px var(--bg);
}

.pp-steps__list h3 {
  font-size: 1.15rem;
  margin: 4px 0 6px;
}

.pp-steps__list p {
  margin: 0;
  color: var(--text-2);
}

/* One line connects the steps: down the side on phones, across the top on wide screens. */
.pp-steps__list::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 8px;
  bottom: 24px;
  border-left: 2px dashed var(--line-strong);
}

@media (min-width: 900px) {
  .pp-steps__list {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
  .pp-steps__list li {
    padding: 64px 0 0;
  }
  .pp-steps__n {
    top: 0;
  }
  .pp-steps__list::before {
    /* From the first number to the last one: a column is 25% minus its share of the gaps. */
    left: 21px;
    right: calc(25% - 24px - 21px);
    top: 20px;
    bottom: auto;
    border-left: 0;
    border-top: 2px dashed var(--line-strong);
  }
}

/* ---------- Apply ---------- */

.pp-apply {
  padding: 56px 0 112px;
  scroll-margin-top: 72px;
}

.pp-apply__in {
  display: grid;
  gap: 40px;
  align-items: start;
}

.pp-apply__sub {
  color: var(--text-2);
  font-size: 1.08rem;
}

.pp-apply h3 {
  font-size: 1.1rem;
  margin: 32px 0 14px;
}

.pp-note {
  margin: 32px 0 0;
  padding: 22px 24px;
  border-radius: 22px;
  background: var(--teal-light);
}

.pp-note p {
  margin: 0 0 14px;
  font-size: 1.05rem;
  line-height: 1.55;
}

.pp-note__sign {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 1rem var(--font-head);
  color: var(--teal-ink);
}

.pp-note__sign::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.pp-apply .fd__done h2 {
  font-size: 1.5rem;
}

.pp-done__stk {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
}

@media (min-width: 900px) {
  .pp-apply__in {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
  }
  .pp-apply__side {
    position: sticky;
    top: 96px;
  }
}

.faq .section-head a {
  color: var(--teal-ink);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .js .pp-calc .pp-bars__bar {
    transform: none;
    transition: none;
  }
}
