/* Página pública do programa de parceiros (index.html, a raiz do site). Entra depois de partners.css, de
   onde vêm o reset, a marca, os botões e os controles de tema e idioma; aqui fica só o que é da
   página. Tudo em cima dos tokens (tokens.css), então o tema claro já vem junto. */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* âncoras do menu: o título da seção não fica escondido atrás da barra fixa */
[id] {
  scroll-margin-top: 88px;
}

.pg-wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.pg-wrap--narrow {
  max-width: 760px;
}

.pg-note {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.5;
}

/* barra do topo */
.pg-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--void);
  border-bottom: 1px solid var(--line-soft);
}

.pg-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.pg-brand {
  color: var(--text);
  text-decoration: none;
}

/* os dois símbolos estão no HTML; aparece o do tema que está valendo (mesma regra do carregando
   da área logada, ver .loader__mark em partners.css). O .pg-brand na frente é pra vencer o
   ".brand img { display: block }" de partners.css */
.pg-brand .pg-mark--light {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .pg-brand .pg-mark--light {
    display: block;
  }

  :root:not([data-theme='dark']) .pg-brand .pg-mark--dark {
    display: none;
  }
}

:root[data-theme='light'] .pg-brand .pg-mark--light {
  display: block;
}

:root[data-theme='light'] .pg-brand .pg-mark--dark {
  display: none;
}

/* interruptor de tema: os dois ícones estão no HTML, aparece o do estado (ligado = escuro) */
.theme-switch .pg-icon-sun,
.theme-switch[aria-checked='true'] .pg-icon-moon {
  display: block;
}

.theme-switch .pg-icon-moon,
.theme-switch[aria-checked='true'] .pg-icon-sun {
  display: none;
}

.pg-locale-flag {
  display: block;
}

.pg-locale-flag svg {
  display: block;
  border-radius: 2px;
}

.pg-nav__links {
  display: flex;
  gap: 28px;
}

.pg-nav__links a,
.pg-nav__area {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.pg-nav__links a:hover,
.pg-nav__area:hover {
  color: var(--text);
}

.pg-nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pg-nav__actions .btn {
  white-space: nowrap;
}

/* abertura */
.pg-hero {
  padding-block: 88px 96px;
}

.pg-hero__title {
  max-width: 880px;
  margin: 0;
  font-size: clamp(34px, 5.2vw, 62px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.pg-hero__lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--text-2);
  font-size: 19px;
  line-height: 1.5;
}

.pg-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* níveis: uma escada, com a altura de cada degrau proporcional à comissão */
.pg-levels {
  margin-top: 88px;
}

.pg-levels__title {
  margin: 0 0 32px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pg-ladder {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.pg-ladder__step {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: var(--step-height, 120px);
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pg-ladder__rate {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.pg-ladder__name {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
}

.pg-ladder__range {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 14px;
}

/* o último degrau é o destaque da página: o único bloco com o acento cheio */
.pg-ladder__step--top {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--void);
}

.pg-ladder__step--top .pg-ladder__range {
  color: inherit;
  opacity: 0.75;
}

/* seções */
.pg-section {
  padding-block: 88px;
  border-top: 1px solid var(--line-soft);
}

.pg-section__title {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pg-section__lead {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.5;
}

.pg-grid {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

.pg-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.pg-card {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pg-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.pg-card__text {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.55;
}

.pg-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.5;
}

.pg-list li {
  position: relative;
  padding-left: 18px;
}

.pg-list li::before {
  content: '';
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
}

/* como funciona: quatro passos em ordem, por isso numerados */
.pg-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.pg-step {
  padding-top: 20px;
  border-top: 2px solid var(--line-strong);
  counter-increment: step;
}

.pg-step::before {
  content: counter(step);
  display: block;
  color: var(--signal);
  font-size: 15px;
  font-weight: 700;
}

.pg-step__title {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 600;
}

.pg-step__text {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.55;
}

/* simulador */
.pg-sim {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  margin-block: 40px 20px;
}

.pg-sim__inputs,
.pg-sim__result {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pg-sim__inputs {
  display: grid;
  gap: 28px;
  align-content: start;
}

.pg-field__label {
  display: block;
  margin-bottom: 12px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}

.pg-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.pg-plan {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
}

.pg-plan:hover {
  border-color: var(--text-3);
}

.pg-plan[aria-checked='true'] {
  background: var(--signal-bg);
  border-color: var(--signal);
}

.pg-plan__name {
  font-size: 15px;
  font-weight: 600;
}

.pg-plan__price {
  color: var(--text-2);
  font-size: 13px;
}

.pg-range {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pg-range__value {
  min-width: 92px;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

/* a régua: a parte preenchida vem de --fill, que o programa.js atualiza */
.pg-range__input {
  flex: 1;
  min-width: 0;
  height: 6px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(to right, var(--signal) var(--fill, 0%), var(--line-strong) var(--fill, 0%));
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.pg-range__input::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid var(--panel);
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 1px var(--signal);
  -webkit-appearance: none;
}

.pg-range__input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--panel);
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 1px var(--signal);
}

/* os clientes repartidos pelos níveis: um trecho por nível, do mais apagado ao acento cheio */
.pg-bands {
  display: flex;
  gap: 3px;
}

.pg-bands__band {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--line-strong);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-bands__band--1 {
  background: var(--signal-line);
}

.pg-bands__band--2 {
  background: var(--signal-deep);
  color: #fff;
}

.pg-bands__band--3 {
  background: var(--signal);
  color: var(--void);
}

.pg-sim__breakdown {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.pg-sim__result {
  display: flex;
  flex-direction: column;
}

.pg-sim__level {
  align-self: flex-start;
  margin: 0 0 28px;
  padding: 4px 10px;
  border: 1px solid var(--signal-line);
  border-radius: 999px;
  background: var(--signal-bg);
  color: var(--signal);
  font-size: 13px;
  font-weight: 600;
}

.pg-sim__label {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}

.pg-sim__value {
  margin: 6px 0 0;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.pg-sim__rows {
  margin: auto 0 0;
  padding-top: 28px;
}

.pg-sim__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.pg-sim__row dt {
  color: var(--text-2);
}

.pg-sim__row dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* dúvidas */
.pg-faq {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.pg-faq__item {
  border-bottom: 1px solid var(--line);
}

.pg-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.pg-faq__item summary::-webkit-details-marker {
  display: none;
}

.pg-faq__item summary::after {
  content: '+';
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.pg-faq__item[open] summary::after {
  content: '−';
}

.pg-faq__item p {
  margin: 0;
  padding-bottom: 20px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

/* formulário de interesse (sem ação por enquanto, ver o comentário em index.html) */
.pg-form {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.pg-form__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pg-input {
  display: grid;
  gap: 6px;
}

.pg-input span {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}

.pg-input input,
.pg-input select,
.pg-input textarea {
  width: 100%;
  padding: 11px 12px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
}

.pg-input input,
.pg-input select {
  height: 44px;
}

.pg-input textarea {
  resize: vertical;
}

.pg-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

/* rodapé */
.pg-footer {
  padding-block: 28px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
  font-size: 14px;
}

.pg-footer__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pg-footer a {
  color: var(--text-2);
  text-decoration: none;
}

.pg-footer a:hover {
  color: var(--text);
}

@media (max-width: 960px) {
  .pg-nav__links {
    display: none;
  }

  .pg-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .pg-sim {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pg-wrap {
    padding-inline: 16px;
  }

  /* no celular a barra fica só com a marca e os controles: o "Quero ser parceiro" não cabe ao
     lado deles, e o mesmo botão está logo abaixo, na abertura */
  .pg-nav__area,
  .pg-nav__actions .btn {
    display: none;
  }

  .pg-nav__row {
    gap: 12px;
  }

  .pg-nav__actions {
    gap: 10px;
  }

  .pg-nav .brand__tag {
    display: none;
  }

  .pg-hero {
    padding-block: 56px 64px;
  }

  .pg-hero__lead {
    font-size: 17px;
  }

  .pg-levels {
    margin-top: 56px;
  }

  .pg-ladder,
  .pg-grid--2,
  .pg-form__row {
    grid-template-columns: 1fr;
  }

  /* um embaixo do outro, a altura deixa de dizer alguma coisa: degraus da mesma altura */
  .pg-ladder__step {
    min-height: 0;
  }

  .pg-steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pg-section {
    padding-block: 56px;
  }

  .pg-card,
  .pg-sim__inputs,
  .pg-sim__result {
    padding: 20px;
  }
}
