:root {
  --primary: #6b00e3;
  --primary-dark: #4e00a8;
  --dark: #1b1b1b;
  --white: #ffffff;
  --ink: #0f1117;
  --muted: #8a8f9e;
  --line: #d6dae3;
  --soft: #f5f2fb;
  --soft-strong: #eadcff;
  --danger: #c73232;
}

@font-face {
  font-family: "Verveine";
  src:
    url("./assets/fontes/Verveine-Regular.woff2") format("woff2"),
    url("./assets/fontes/Verveine-Regular.woff") format("woff"),
    url("./assets/fontes/VERVEINEREGULAR.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  color: var(--ink);
  background: var(--dark);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.quiz-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 47% 53%;
  background: var(--dark);
}

.story-panel {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
  background: url("./assets/FUNDO.webp") center / cover no-repeat;
}

.authority-page-2 .story-panel {
  background-image: url("./assets/capa-2.webp");
}

.authority-page-3 .story-panel {
  background-image: url("./assets/capa-3.webp");
}

.authority-page-4 .story-panel {
  background-image: url("./assets/capa-4.webp?v=20260703-0920");
}

.authority-page-5 .story-panel {
  background-image: url("./assets/capa-5.webp?v=20260703-0920");
}

.authority-page-6 .story-panel {
  background-image: url("./assets/capa-6.webp?v=20260703-0920");
}

.authority-page-7 .story-panel {
  background-image: url("./assets/capa-7.webp?v=20260703-0920");
}

.story-content {
  position: relative;
  width: 100%;
  max-width: 850px;
  padding: 72px 9vw 72px 5vw;
}

.story-content h1 {
  max-width: 710px;
  margin: 0;
  color: var(--white);
  font-size: 66px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}

.title-accent {
  display: inline-block;
  color: var(--primary);
  font-family: "Verveine", "Poppins", Arial, sans-serif;
  font-size: 1.28em;
  font-weight: 400;
  line-height: 0.78;
}

.story-content p {
  max-width: 750px;
  margin: 36px 0 0;
  font-size: 23px;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.92);
}

.story-content p[hidden],
.story-sectors[hidden] {
  display: none;
}

.story-sectors {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 42px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.story-sectors li {
  position: relative;
  padding-left: 12px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.story-sectors li::before {
  content: "";
  position: absolute;
  top: 0.18em;
  left: 0;
  width: 3px;
  height: 18px;
  background: var(--primary);
  border-radius: 999px;
}

.proof-grid {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 26px 42px;
  margin-top: 58px;
}

.proof-grid img {
  width: 100%;
  max-width: 190px;
  max-height: 64px;
  display: block;
  object-fit: contain;
  justify-self: start;
}

.hide-authority-logos .proof-grid {
  display: none;
}

.form-panel {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 86px 6.8vw 26px;
  background: var(--white);
  border-radius: 8px 0 0 8px;
}

.topbar {
  position: absolute;
  top: 20px;
  right: 0;
  left: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-button {
  position: absolute;
  left: 28px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition:
    background 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.back-button:hover {
  background: var(--soft);
}

.back-button:disabled {
  color: #a7a9b1;
  cursor: default;
  opacity: 0.74;
}

.is-success .back-button,
.is-success .legal p {
  display: none;
}

.back-button svg,
.next-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #8d8d8d;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  border-radius: 7px;
}

.quiz-form,
.success-state {
  width: min(660px, 100%);
  margin: auto;
}

.step-copy {
  margin-bottom: 36px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #9296a1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.step-copy h2,
.success-state h2 {
  margin: 0;
  color: #050506;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: 0;
}

.field-wrap {
  width: 100%;
}

.field-control {
  width: 100%;
  height: 44px;
  padding: 0 20px;
  color: #22242a;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.field-control::placeholder {
  color: #9da3b2;
}

.field-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(107, 0, 227, 0.1);
}

.field-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(199, 50, 50, 0.1);
}

.select-shell {
  position: relative;
}

.select-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  pointer-events: none;
  border-right: 2px solid #5e6472;
  border-bottom: 2px solid #5e6472;
  transform: translateY(-70%) rotate(45deg);
}

.select-shell select {
  appearance: none;
  padding-right: 46px;
  color: #22242a;
}

.select-shell select:invalid {
  color: #9da3b2;
}

.phone-shell {
  position: relative;
}

.country-picker {
  position: absolute;
  top: 50%;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 28px;
  color: #5c6472;
  font-size: 14px;
  transform: translateY(-50%);
  cursor: pointer;
}

.country-select {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  cursor: pointer;
  opacity: 0;
}

.country-chevron {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #7d8490;
  border-bottom: 1.5px solid #7d8490;
  transform: translateY(-2px) rotate(45deg);
}

.country-flag {
  flex: 0 0 auto;
}

.flag-br {
  position: relative;
  width: 22px;
  height: 15px;
  display: inline-block;
  overflow: hidden;
  background: #169b4f;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.flag-br::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #ffdf2e;
  transform: translate(-50%, -50%) rotate(45deg);
}

.flag-br::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #2144aa;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.country-emoji {
  width: 22px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}

.phone-shell .field-control {
  padding-left: 62px;
}

.action-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 18px;
  margin-top: 14px;
}

.field-error {
  min-height: 34px;
  margin: 0;
  padding-top: 8px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.35;
}

.next-button {
  min-width: 148px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  color: var(--white);
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(107, 0, 227, 0.18);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.next-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(107, 0, 227, 0.22);
}

.next-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.next-button svg {
  width: 16px;
  height: 16px;
}

.next-button > * {
  pointer-events: none;
}

.testimonial {
  position: relative;
  min-height: 114px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 10px;
  margin-top: 22px;
  padding: 24px 22px 0 18px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid #eceff4;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(18, 22, 33, 0.16);
  text-align: left;
}

.testimonial > div:last-child {
  display: contents;
}

.testimonial::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 22px;
  background: rgba(107, 0, 227, 0.12);
}

.quote-mark {
  align-self: center;
  color: var(--primary);
  font-size: 40px;
  font-weight: 800;
  line-height: 0.74;
}

.testimonial p {
  position: relative;
  z-index: 1;
  margin: 0;
}

#testimonial-text {
  color: #8f95a2;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.42;
}

#testimonial-author {
  grid-column: 1 / -1;
  margin: 20px 0 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

#testimonial-author a {
  color: inherit;
  text-decoration: none;
}

.success-state {
  text-align: left;
}

.success-state[hidden],
.quiz-form[hidden] {
  display: none;
}

.success-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--white);
  background: var(--primary);
  border-radius: 8px;
  font-size: 24px;
  font-weight: 800;
}

.success-state p:last-child {
  max-width: 520px;
  margin: 16px 0 0;
  color: #69707f;
  font-size: 16px;
  line-height: 1.55;
}

.legal {
  width: min(660px, 100%);
  margin: 34px auto 0;
  color: #1d2230;
  text-align: center;
}

.legal p {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}

.legal a {
  font-weight: 700;
}

.legal small {
  display: block;
  margin-top: 14px;
  color: #9ca1ad;
  font-size: 10px;
}

.legal-modal {
  width: min(980px, calc(100% - 32px));
  height: min(760px, calc(100svh - 32px));
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
}

.legal-modal::backdrop {
  background: rgba(15, 17, 23, 0.62);
}

.legal-modal__surface {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.legal-modal__header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px 14px 22px;
  border-bottom: 1px solid #eceff4;
}

.legal-modal__header h2 {
  margin: 0;
  color: #050506;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.legal-modal__close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #5e6472;
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.legal-modal__close:hover {
  color: var(--primary);
  background: var(--soft);
}

.legal-modal__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.legal-modal__frame {
  width: 100%;
  flex: 1;
  border: 0;
  background: var(--white);
}

@media (max-width: 1180px) {
  .story-content {
    padding-right: 6vw;
  }

  .story-content h1 {
    font-size: 52px;
  }

  .story-content p {
    font-size: 22px;
  }

  .proof-grid {
    gap: 22px 30px;
  }
}

@media (max-width: 860px) {
  .quiz-shell {
    display: block;
    background: var(--white);
  }

  .story-panel {
    display: none;
  }

  .form-panel {
    min-height: 100svh;
    padding: 116px 28px 26px;
    border-radius: 0;
  }

  .topbar {
    top: 28px;
    right: 0;
    left: 0;
    justify-content: center;
  }

  .back-button {
    left: 22px;
  }

  .quiz-form,
  .success-state,
  .legal {
    width: 100%;
  }

  .quiz-form,
  .success-state {
    margin: 0 auto;
  }

  .field-control {
    height: 56px;
    border-radius: 10px;
    font-size: 16px;
  }

  .action-row {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 4px;
  }

  .next-button {
    width: min(190px, 100%);
    height: 44px;
    justify-self: center;
    font-size: 12px;
  }

  .testimonial {
    min-height: 0;
    margin-top: 46px;
    padding: 24px 18px 0;
  }

  .testimonial::after {
    height: 22px;
  }

  .quote-mark {
    font-size: 38px;
    line-height: 0.74;
  }

  #testimonial-text {
    font-size: 15px;
    line-height: 1.42;
  }

  #testimonial-author {
    margin-top: 22px;
  }

  .legal {
    margin: auto auto 0;
    padding-top: 48px;
  }

  .legal-modal {
    width: calc(100% - 20px);
    height: calc(100svh - 20px);
  }
}

@media (max-width: 520px) {
  .form-panel {
    padding: 116px 28px 24px;
  }

  .step-copy {
    margin-bottom: 46px;
  }

  .step-copy h2,
  .success-state h2 {
    font-size: 19px;
  }

  .testimonial {
    padding-right: 16px;
    padding-left: 16px;
  }

  #testimonial-text {
    font-size: 15px;
  }
}
