/* Identidade do site público (docs/rebrand/02-plano.md, seção 4). Os tokens são a única fonte
   de cor: componente novo usa var(--...), nunca hex solto. Os contrastes estão medidos no plano. */

@font-face {
  font-family: "Inter";
  src: url("/assets/inter-latin-5e6b0c47.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/space-grotesk-latin-7389e64e.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --brand: #7a1446;
  --brand-strong: #5e0f37;
  --ink: #2d294a;
  --muted: #4a4458;
  --bg: #faf7f2;
  --surface: #dad3c0;
  --accent: #a63569;
  --sand: #b49579;

  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-text);

  --bs-body-font-family: var(--font-text);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 122, 20, 70;
  --bs-link-hover-color: var(--brand-strong);
  --bs-link-hover-color-rgb: 94, 15, 55;
  --bs-border-color: rgba(45, 41, 74, 0.15);
}

body {
  line-height: 1.65;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Botões */

.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-strong);
  --bs-btn-hover-border-color: var(--brand-strong);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-strong);
  --bs-btn-active-border-color: var(--brand-strong);
  --bs-btn-padding-x: 1.25rem;
  --bs-btn-padding-y: 0.6rem;
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: 999px;
}

/* Cabeçalho */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--bs-border-color);
}

.site-header .navbar-brand img {
  height: 40px;
  width: auto;
}

.site-header .nav-link {
  color: var(--ink);
  font-weight: 500;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  color: var(--brand);
}

@media (max-width: 991.98px) {
  .site-header .navbar-nav {
    padding: 0.75rem 0 1rem;
  }

  .site-header .btn-brand {
    margin-top: 0.5rem;
  }
}

/* Topo das páginas internas: faixa com o H1 e o caminho, no lugar da foto de banco de imagens. */

.page-hero {
  background: var(--surface);
  padding: 3rem 0 2.5rem;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.page-hero .breadcrumb {
  --bs-breadcrumb-divider-color: var(--muted);
  --bs-breadcrumb-item-active-color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

/* Texto longo vindo do banco (políticas, posts): largura de leitura e títulos proporcionais. */

.prose {
  max-width: 72ch;
  padding: 3rem 0 4rem;
  /* O texto das políticas tem URLs coladas sem espaço, mais largas que a tela de 390 px. */
  overflow-wrap: anywhere;
}

.prose h1, .prose h2 {
  font-size: 1.5rem;
  margin-top: 2.25rem;
}

.prose h3, .prose h4 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
}

/* Rodapé */

.site-footer {
  background: var(--ink);
  color: #f1edf5;
  padding: 3rem 0 1.5rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.site-footer a:hover {
  text-decoration-color: currentColor;
}

.site-footer li {
  margin-bottom: 0.35rem;
}

.site-footer__name {
  margin-bottom: 1rem;
}

.site-footer__name img {
  height: 40px;
  width: auto;
}

.site-footer__title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  color: #d8cfe6;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
}

/* Seções */

.section {
  padding: 3.5rem 0;
  /* O cabeçalho é fixo: sem isto, o link para #contato esconde o título da seção atrás dele. */
  scroll-margin-top: 64px;
}

.section--surface {
  background: var(--surface);
}

/* Teste psicológico: formulário e resultado */

.test-card {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-top: 4px solid var(--brand);
  border-radius: 1.25rem;
  padding: 2rem 1.25rem;
  box-shadow: 0 1px 2px rgba(45, 41, 74, 0.06), 0 8px 24px rgba(45, 41, 74, 0.06);
}

.test-card + .test-card {
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .test-card {
    padding: 2.5rem 3rem;
  }
}

.test-card__header {
  text-align: center;
  margin-bottom: 2rem;
}

.test-card__header h3 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.test-card__header p {
  color: var(--muted);
  margin: 0;
}

.test-question {
  margin-bottom: 1.75rem;
}

.test-question legend {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.test-options {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 576px) {
  .test-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

.test-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

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

.test-option input {
  accent-color: var(--brand);
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.test-option:has(input:checked) {
  border-color: var(--brand);
  background: #f6e9ef;
}

.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

.form-control:focus,
.form-check-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(122, 20, 70, 0.2);
}

.test-score {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--brand);
  text-align: center;
}

.test-card--share {
  text-align: center;
}

.test-card--share h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* Cartões de conteúdo (testes, posts, cursos) */

.content-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-top: 4px solid var(--brand);
  border-radius: 1rem;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(45, 41, 74, 0.06), 0 8px 24px rgba(45, 41, 74, 0.06);
  transition: transform 0.15s;
}

.content-card:hover {
  transform: translateY(-2px);
  color: inherit;
}

.content-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Capa de post: 840 x 360, o tamanho que o backoffice pede (7:3). Na mesma proporção do card, nada é
   cortado. */
.content-card__image--cover {
  aspect-ratio: 7 / 3;
}

/* Imagem inteira, sem corte: a do teste é uma faixa larga com texto nas pontas. */
.content-card__image--natural {
  aspect-ratio: auto;
}

.content-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  flex: 1;
}

.content-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

.content-card__text {
  color: var(--muted);
  font-size: 0.95rem;
}

.content-card__more {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bs-border-color);
  color: var(--brand);
  font-weight: 600;
}

.content-card__more::after {
  content: " →";
}

/* Utilitários de texto */

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.measure {
  max-width: 44rem;
}

.text-muted-ink {
  color: var(--muted);
}

/* Botão sobre a faixa vinho: o btn-brand invertido. */
.btn-on-brand {
  --bs-btn-color: var(--brand);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-color: var(--brand-strong);
  --bs-btn-hover-bg: #f6e9ef;
  --bs-btn-hover-border-color: #f6e9ef;
  --bs-btn-active-color: var(--brand-strong);
  --bs-btn-active-bg: #f6e9ef;
  --bs-btn-active-border-color: #f6e9ef;
  --bs-btn-padding-x: 1.25rem;
  --bs-btn-padding-y: 0.6rem;
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: 999px;
}

.btn-outline-brand {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-strong);
  --bs-btn-active-border-color: var(--brand-strong);
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: 999px;
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

/* Home */

.home-hero {
  padding: 3.5rem 0 4rem;
}

.home-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.home-hero .lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.home-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.home-hero__facts .bi {
  color: var(--brand);
  margin-right: 0.35rem;
}

.home-hero__photo {
  width: 100%;
  height: auto;
  border-radius: 2rem 2rem 2rem 0.5rem;
  box-shadow: 0 20px 40px rgba(122, 20, 70, 0.15);
  max-width: 440px;
  display: block;
  margin: 0 auto;
}

/* Item solto, sem cartão: ícone, título e texto ("Para quem é"). */
.feature {
  height: 100%;
}

.feature h3 {
  font-size: 1.15rem;
  margin: 0.75rem 0 0.5rem;
}

.feature p {
  color: var(--muted);
  margin: 0;
}

.feature__icon {
  font-size: 1.75rem;
  color: var(--brand);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 900px;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 3.25rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
}

.steps h3 {
  font-size: 1.15rem;
}

.steps p {
  color: var(--muted);
}

.section--brand {
  background: var(--brand);
  color: #fff;
}

.section--brand h2 {
  color: #fff;
}

.section--brand .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

.faq {
  max-width: 820px;
  margin: 0 auto;
}

.faq__item {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(45, 41, 74, 0.06);
}

.faq__item + .faq__item {
  margin-top: 0.75rem;
}

.faq__item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

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

.faq__item summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.4rem;
  line-height: 1;
}

.faq__item[open] summary::after {
  content: "−";
}

.faq__item p,
.faq__item div {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

/* Topo da página do teste: imagem, abertura e o bloco "Sobre o teste", na largura do formulário. */
/* O fundo da imagem é o --surface da seção, então ela se funde à página, sem borda nem canto. */
.test-banner {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
}

/* Na largura da página, como a imagem e o teste; o hyphens evita os buracos da justificação no
   celular. */
.test-intro {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  text-align: justify;
  hyphens: auto;
}

.test-about {
  margin-bottom: 2rem;
}

.test-about .prose {
  padding: 0;
}

.test-about .prose h2 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
}

/* O formulário ocupa a largura da página, e as 4 opções cabem numa linha no desktop. */
/* Na largura padrão da página, como a imagem e a abertura do teste: o formulário e os cartões do
   resultado. */
.test-card--wide {
  max-width: none;
}

@media (min-width: 992px) {
  .test-card--form .test-options {
    grid-template-columns: repeat(4, 1fr);
  }
}

.page-hero__lead {
  font-family: var(--font-display);
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.lead-text {
  font-size: 1.15rem;
}

/* Subtítulo de seção que é h2 na hierarquia mas não título de faixa (Formação, Registro no Sobre). */
.section h2.h4 {
  font-size: 1.25rem;
}

/* Blog */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.chip {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  background: #fff;
}

.chip:hover,
.chip--active {
  border-color: var(--brand);
  color: var(--brand);
}

.chip--active {
  background: #f6e9ef;
}

.post {
  max-width: 760px;
  margin: 0 auto;
}

.post__meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.post__image {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
}

.post__body {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.post__body img {
  max-width: 100%;
  height: auto;
}

/* Vídeo do YouTube colado no TinyMCE vem com width="560" fixo e estourava a tela do celular. */
.prose iframe {
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.author-box {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.author-box__photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box p {
  margin: 0;
  color: var(--muted);
}

.author-box__name {
  font-family: var(--font-display);
  font-weight: 600;
}

/* Paginação do Kaminari (markup padrão da gem) */

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.pagination > span > a,
.pagination .current {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  text-align: center;
  text-decoration: none;
  background: #fff;
}

.pagination .current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Texto longo dentro de uma seção (o apoio do teste): o h2 é de leitura, não título de faixa. */
.section .prose h2 {
  font-size: 1.5rem;
}

.post__cta {
  background: #f6e9ef;
  border-left: 4px solid var(--brand);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

/* Chamada vinho em cartão, no padrão da ficha de personagem da home (.section--brand): o convite ao
   teste no fim dos posts de autoestima e o bloco do Psipront no resultado do teste. Botão é o
   .btn-on-brand. */
.brand-callout {
  padding: 2rem;
  border-radius: 1rem;
  background: var(--brand);
  color: #fff;
}

.brand-callout .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

.brand-callout h2,
.brand-callout h3 {
  color: #fff;
  font-size: 1.5rem;
  margin: 0.25rem 0 0.75rem;
}

.brand-callout p {
  margin-bottom: 1.25rem;
}

.post-test {
  margin: 2.5rem 0;
}

/* No resultado do teste, entre o resultado e o compartilhamento, centralizado como a ficha da home. */
.psipront-block {
  margin: 1.5rem 0;
  text-align: center;
}

@media (min-width: 768px) {
  .psipront-block {
    padding: 2.5rem 3rem;
  }
}

/* Cartão da marca: filete vinho, topo com número, ícone ou rótulo, e rodapé separado por linha. É o
   cartão de tudo que não é link inteiro (temas, bios, projetos, recursos); o único ponto clicável é o
   link ou botão do rodapé. Listagem com imagem que leva a uma página é o .content-card. */
.brand-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 1.5rem;
  background: #fff;
  border-top: 4px solid var(--brand);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(45, 41, 74, 0.06), 0 8px 24px rgba(45, 41, 74, 0.06);
}

.brand-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brand-card__number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}

.brand-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  color: var(--accent);
}

.brand-card__eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.brand-card__header > .brand-card__eyebrow:not(:only-child) {
  text-align: right;
}

.brand-card h3 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

.brand-card__text {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.brand-card__text:last-child {
  margin-bottom: 0;
}

.brand-card__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}

.brand-card__meta {
  margin: 0;
  font-size: 0.9rem;
}

.brand-card__meta dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-card__meta dd {
  margin: 0.15rem 0 0;
}

.brand-card__cta {
  font-weight: 600;
  text-decoration: none;
}

.brand-card__cta:hover {
  text-decoration: underline;
}

/* Sinopse da palestra dentro do cartão: abre no lugar, sem levar a outra página. */
.talk-synopsis {
  margin: -0.5rem 0 1.25rem;
  font-size: 0.95rem;
}

/* Os cartões esticam até a altura da linha; com uma sinopse aberta, os vizinhos ficariam com um vão
   em branco, então voltam à altura deles enquanto ela estiver aberta. */
.row:has(.talk-synopsis[open]) {
  align-items: flex-start;
}

.talk-synopsis summary {
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
}

.talk-synopsis p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

/* Tema da palestra, não filtro: texto miúdo, sem borda nem fundo de pílula, para não parecer botão. */
.talk-tags {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--ink);
  position: relative;
  cursor: pointer;
}

.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Botão de play desenhado no CSS: as miniaturas do YouTube não trazem o ícone. */
.video::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4rem;
  height: 4rem;
  margin: -2rem 0 0 -2rem;
  border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 1.75rem no-repeat;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.video:hover::after,
.video:focus-visible::after {
  transform: scale(1.1);
}

.video-card {
  margin: 0;
}

.video-card__caption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.video-card__caption span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Dado pendente da Zara: visível de propósito até ser preenchido. */
.pending {
  background: #fbf0da;
  color: #8a5a00;
  padding: 0 0.25rem;
  border-radius: 0.25rem;
}
