/* prosperidad-es · quiz · base visual (tela 0)
   Paleta e tipos iguais aos cards da VSL v3.1 */

:root {
  --cream: #F7F1E8;
  --paper: #FFFDF8;
  --ink: #2C2A26;
  --ink-soft: #5E5A52;
  --gold: #C6A75E;
  --sage: #6B8F71;
  --sage-deep: #4E6B53;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Montserrat", "Segoe UI", Helvetica, Arial, sans-serif;

  --radius-card: 20px;
  --radius-btn: 10px;
  --shadow-card: 0 18px 40px rgba(44, 42, 38, 0.08);

  --content-max: 480px;
  --pad-x: 1.75rem;
  --pad-y: 2.25rem;
}

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-italic-400.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(107, 143, 113, 0.22);
  color: var(--ink);
}

/* ——— Estrutura reutilizável ——— */

.quiz {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

/* Barra do topo: "Atrás" + "1 de 7". Oculta na abertura. */
.quiz-top {
  display: none;
  width: 100%;
  max-width: var(--content-max);
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}

.quiz-top.is-visible {
  display: flex;
}

.btn-back {
  appearance: none;
  background: none;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  min-height: 2.75rem;
  padding: 0 0.35rem;
  cursor: pointer;
}

.btn-back:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}

.step-counter {
  margin-left: auto;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.screen {
  width: 100%;
  max-width: var(--content-max);
  background: var(--paper);
  border: 1px solid rgba(198, 167, 94, 0.7);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--pad-y) var(--pad-x);
  display: none;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screen-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}

/* No celular, o cartão ocupa a tela e a margem fica simétrica. */
@media (max-width: 799px) {
  .screen.is-active {
    min-height: calc(100dvh - 1.5rem);
  }
}

/* ——— Tela 0: abertura ——— */

.portrait {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  box-shadow:
    0 0 0 3px var(--paper),
    0 0 0 4.5px var(--gold);
  display: block;
}

.author-name {
  margin-top: 0.85rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.2;
  color: var(--ink);
}

#tela-0 .screen-title {
  margin-top: 1.75rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 5.8vw, 1.875rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.rule {
  width: 3.25rem;
  height: 1px;
  margin: 1.25rem auto 0;
  background: var(--gold);
  border: 0;
}

.screen-lead {
  margin-top: 1.2rem;
  max-width: 20rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: balance;
}

.screen-meta {
  margin-top: 1.15rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--ink-soft);
}

.btn-primary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.85rem;
  min-width: 13.5rem;
  min-height: 3.25rem;
  padding: 0.85rem 2rem;
  background: var(--sage-deep);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color 160ms ease, transform 100ms ease;
}

.btn-primary:hover {
  background: #45634a;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

.screen-foot {
  margin-top: 1.35rem;
  max-width: 21rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: balance;
}

@media (min-width: 800px) {
  :root {
    --content-max: 560px;
    --pad-x: 3rem;
    --pad-y: 3rem;
  }

  .quiz {
    padding: 2rem;
  }

  #tela-0 .screen-title {
    font-size: 2rem;
  }
}

@media (max-width: 370px) {
  #tela-0 .screen-title {
    font-size: 1.375rem;
  }
}

@media (max-height: 700px) {
  :root {
    --pad-y: 1.5rem;
  }

  #tela-0 .screen-title {
    margin-top: 1.15rem;
  }

  .btn-primary {
    margin-top: 1.25rem;
  }

  .screen-foot {
    margin-top: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary {
    transition: none;
  }

  .btn-primary:active {
    transform: none;
  }
}


/* ——— Quiz: telas 1–13 ——— */

#stage.screen.is-active {
  justify-content: flex-start;
}

#tela-0.screen.is-active {
  justify-content: center;
}

.quiz-top.is-visible .btn-back,
.quiz-top.is-visible .step-counter.is-visible {
  display: block;
}

.quiz-top.is-visible .step-counter {
  display: none;
}

.quiz-top.is-visible .step-counter.is-visible {
  display: block;
}

.btn-back[hidden],
.step-counter[hidden] {
  display: none !important;
}

#stage .screen-inner {
  align-items: stretch;
  text-align: left;
  max-width: none;
}

.q-casual {
  margin: 0 0 0.7rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft);
  text-align: center;
}

.q-title {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 4.8vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}

.q-sub {
  margin: 0.55rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: pretty;
}

.option-list {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-icon {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.option-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  stroke: currentColor;
  fill: none;
}

.option.is-selected .option-icon {
  color: var(--sage-deep);
}

.option-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.option {
  appearance: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  text-align: left;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  border: 1px solid #E8DFCF;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 100ms ease;
}

.option:hover {
  border-color: var(--sage);
}

.option:active {
  transform: scale(0.98);
}

.option:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

.option.is-selected {
  border-color: var(--sage);
  background: rgba(107, 143, 113, 0.14);
}

.option-check {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 1.5px solid #E8DFCF;
  position: relative;
  background: var(--paper);
}

.option.is-selected .option-check {
  border-color: var(--sage-deep);
  background: var(--sage-deep);
}

.option.is-selected .option-check::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.1rem;
  width: 0.32rem;
  height: 0.55rem;
  border: solid var(--paper);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.option.is-playfair {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.3;
  min-height: 3.35rem;
}

.option.is-playfair .option-label {
  text-align: left;
}

.option.is-playfair .option-check {
  display: none;
}

.btn-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.btn-row .btn-primary {
  margin-top: 0;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.btn-ghost {
  appearance: none;
  background: none;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  min-height: 2.75rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-ghost:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Cartões de notícia: print real + legenda curta, sem link */
.news-card {
  margin-top: 0.75rem;
  background: var(--paper);
  border: 1px solid #E8DFCF;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

.news-print {
  margin: 0;
  background: #F3EFE6;
  line-height: 0;
}

.news-print img {
  width: 100%;
  height: auto;
  display: block;
}

.news-caption {
  padding: 0.65rem 0.85rem 0.75rem;
  text-align: left;
}

.news-kicker {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  line-height: 1.4;
}

.news-hed {
  display: block;
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.news-quote {
  margin: 0.5rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--ink);
}

.news-credit {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft);
}

.news-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sage-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-link:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

.news-body,
.pause-body {
  margin: 0.85rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-soft);
}

.news-stack {
  margin-top: 0.85rem;
}

.news-stack .news-card {
  margin-top: 0;
}

.news-stack .news-card + .news-card {
  margin-top: 0.75rem;
}

.news-card.is-large {
  box-shadow: 0 1px 0 rgba(44, 42, 38, 0.04);
}

.news-print.is-large img {
  width: 100%;
  height: auto;
  display: block;
}

.news-closing {
  margin: 1.1rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 4.4vw, 1.35rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}

.pause-closing {
  margin: 0.95rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
}

.news-disclaimer {
  margin: 0.55rem 0 0;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft);
  opacity: 0.75;
  text-align: center;
}

/* Tela 10: escribir */
.write-field {
  margin-top: 1.1rem;
  width: 100%;
  min-height: 6.5rem;
  padding: 0.85rem 1rem;
  resize: vertical;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  border: 1px solid #E8DFCF;
  border-radius: 12px;
}

.write-field:focus {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
  border-color: var(--sage);
}

.write-count {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-align: right;
}

/* Tela 12: preparando */
.load-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.load-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
}

.load-item.is-on {
  opacity: 1;
  transform: none;
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.load-tick {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--sage-deep);
  position: relative;
}

.load-tick::after {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.14rem;
  width: 0.32rem;
  height: 0.55rem;
  border: solid var(--paper);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Resultado (rolagem longa) */
#stage.screen.is-result {
  max-width: var(--content-max);
}

.result {
  padding-bottom: 0.5rem;
}

.result-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}

.result-title {
  margin: 0.55rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 5.4vw, 1.875rem);
  line-height: 1.28;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}

.result-eco,
.result-body,
.result-side,
.result-start,
.result-hook,
.result-close {
  margin: 0.85rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
}

.result-body {
  margin-top: 1rem;
}

.result-eco,
.result-side,
.result-close {
  color: var(--ink-soft);
}

.result-label {
  margin: 1.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.result-body p + p,
.result-hook {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.result-hook p + p {
  margin-top: 0.8rem;
}

.result-portrait {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.85rem;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  box-shadow:
    0 0 0 3px var(--paper),
    0 0 0 4.5px var(--gold);
}

.video-slot {
  margin: 1.25rem 0 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #F7F1E8;
  border: 1px solid #E8DFCF;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 1rem;
}

.result-links {
  margin: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.other-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: none;
}

.other-list.is-open {
  display: block;
}

.other-list li {
  margin: 0.45rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
}

.other-list em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink);
}

.result-aviso,
.result-legal {
  margin: 1.15rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
}

.result-legal a {
  color: var(--ink-soft);
}

.quote-mine {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink);
}

.btn-erase {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: var(--font-sans);
}

@media (max-width: 799px) {
  .quiz-top.is-visible ~ #stage.screen.is-active {
    min-height: calc(100dvh - 1.5rem - 3.25rem);
  }

  #stage.screen.is-result {
    min-height: 0;
  }
}

@media (max-height: 700px) {
  .option {
    min-height: 2.85rem;
    padding: 0.65rem 0.85rem;
  }

  .option-list {
    margin-top: 0.85rem;
    gap: 0.4rem;
  }

  .q-casual {
    margin-bottom: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .option,
  .load-item {
    transition: none;
    animation: none;
  }

  .option:active {
    transform: none;
  }

  .load-item {
    transform: none;
  }
}

.quiz:has(#stage.is-result) {
  justify-content: flex-start;
}

.q-title:focus,
.result-title:focus,
#tela-0 .screen-title:focus {
  outline: none;
}

.news-card + .news-card {
  margin-top: 0.65rem;
}

@media (max-height: 700px) {
  .news-card {
    margin-top: 0.55rem;
  }

  .news-caption {
    padding: 0.5rem 0.75rem 0.6rem;
  }

  .news-closing {
    margin-top: 0.85rem;
    font-size: clamp(1.05rem, 4.2vw, 1.25rem);
  }

  .pause-body,
  .news-disclaimer {
    margin-top: 0.55rem;
  }

  .news-stack .news-card + .news-card {
    margin-top: 0.55rem;
  }
}

@media (max-width: 370px) {
  .option-icon {
    flex-basis: 1.2rem;
    width: 1.2rem;
    height: 1.2rem;
  }

  .option-icon svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .option {
    gap: 0.6rem;
    padding: 0.7rem 0.75rem;
  }
}
