/* Blog Incantato NeuroPsi — identidade Incantato (só Rethink Sans, carregada do Google Fonts; creme e verde-profundo). */


:root {
  --page: #efe7db;
  --sheet: #fffdf9;
  --card: #f8f3ec;
  --line: #e6ddcf;
  --ink: #193b39;
  --text: #4f4a40;
  --muted: #6d665a;
  --accent: #02746f;
  --accent-strong: #025b57;
  --accent-soft: #e3f0ee;
  --sun: #fdc543;
  --dot: var(--accent);
  --radius-sheet: 36px;
  --radius: 20px;
  --radius-sm: 12px;
  --gutter: clamp(20px, 4vw, 56px);
  --sans: "Rethink Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  padding: clamp(0px, 2.4vw, 32px);
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}

/* ------------------------------------------------------------ folha */

.sheet {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  background: var(--sheet);
  border-radius: var(--radius-sheet);
  box-shadow: 0 30px 60px -48px rgba(25, 59, 57, 0.45);
}

.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
}
.brand img {
  width: 168px;
}
.site-nav {
  margin-left: auto;
}
.site-nav ul {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn--pill {
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.btn--pill:hover {
  background: var(--accent-strong);
}
.btn--ghost {
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ------------------------------------------------------------ peças */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}
.chip__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot);
}
.chip__label:empty::before {
  content: "Artigo";
}

/* Cada tema leva uma cor do logo da Incantato. */
[data-category="Neuropsicologia"] { --dot: #02746f; }
[data-category="Psicologia"] { --dot: #eb5d48; }
[data-category="Psicopatologia"] { --dot: #9820c5; }
[data-category="Psicopatologia Infantil"] { --dot: #ff8d47; }
[data-category="Desenvolvimento Infantil"] { --dot: #e2a50c; }
[data-category="Reabilitação Neuropsicológica"] { --dot: #1ca350; }
[data-category="Neurociências"] { --dot: #0061fe; }
[data-category="Avaliação Neuropsicológica"] { --dot: #409c96; }

.meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.meta__sep {
  font-size: 8px;
}
.read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Post sem tempo de leitura preenchido: a linha não aparece. */
.read:has(.read__min:empty) {
  display: none;
}

.round {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--sheet);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.round:hover {
  border-color: var(--ink);
}
.round:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ------------------------------------------------------------ home */

.intro {
  padding: 40px 0 36px;
  max-width: 900px;
}
.intro__title,
.list-head__title,
.post__title {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
}
.intro__title {
  font-size: clamp(36px, 5vw, 64px);
}
.intro__title em,
.list-head__title em {
  color: var(--accent);
  font-style: italic;
}

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 36px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.feature__card {
  position: relative;
  display: flex;
  min-height: 460px;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  isolation: isolate;
}
.feature__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.feature__card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(25, 59, 57, 0) 35%, rgba(25, 59, 57, 0.86) 100%);
}
.feature__card:hover .feature__img {
  transform: scale(1.03);
}
.feature__body {
  align-self: flex-end;
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 32px;
  color: #fff;
}
.feature__body .chip {
  background: rgba(255, 253, 249, 0.94);
}
.feature__body .meta {
  color: rgba(255, 255, 255, 0.82);
}
.feature__title {
  margin: 0;
  max-width: 22ch;
  font-family: var(--sans);
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.feature__title a {
  color: #fff;
  text-decoration: none;
}
.feature__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.latest .section-title {
  margin-bottom: 20px;
}
.latest__list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* O primeiro já é o destaque. */
.latest__list > .mini:first-child:not(:only-child) {
  display: none;
}
.mini {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.mini__media img {
  width: 92px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.mini__title {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}
.mini__title a,
.card__title a {
  text-decoration: none;
}
.mini__title a:hover,
.card__title a:hover {
  color: var(--accent);
}

/* Prateleira com rolagem horizontal */
.shelf {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.shelf__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.shelf__nav {
  display: flex;
  gap: 10px;
}
.shelf__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 3);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.shelf__track::-webkit-scrollbar {
  display: none;
}
/* Os 5 primeiros já aparecem no destaque e nos recentes. */
.shelf__track > .card:nth-child(-n + 5):not(:only-child) {
  display: none;
}
.card--slide {
  scroll-snap-align: start;
}

/* Card de artigo */
.card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -26px rgba(25, 59, 57, 0.5);
}
.card__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
}
.card__body {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 18px 12px 14px;
}
.card .chip {
  background: var(--sheet);
}
.card__title {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.28;
}
.card__excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Temas */
.themes {
  display: grid;
  gap: 24px;
  justify-items: start;
  padding: 56px 0 64px;
}
.themes__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.theme {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.theme:hover {
  border-color: var(--dot);
  background: var(--card);
}
.theme__count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

/* ------------------------------------------------------------ artigos */

.list-head {
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--line);
}
.list-head__title {
  font-size: clamp(36px, 4.6vw, 58px);
}
.list-head__sub {
  margin: 14px 0 28px;
  color: var(--muted);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 760px;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.field--grow {
  flex: 1;
}
.field select,
.field input {
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sheet);
  color: var(--ink);
  font: 400 16px var(--sans);
}
.field select:focus,
.field input:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
}
.list-head__count {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 40px 0 64px;
}
.grid > [hidden] {
  display: none;
}
.empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 40px 0 64px;
  color: var(--muted);
}

/* ------------------------------------------------------------ post */

.post {
  padding: 48px 0 0;
}
.post__head {
  display: grid;
  gap: 22px;
  justify-items: center;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.post__title {
  font-size: clamp(32px, 4.4vw, 54px);
}
.post__lede {
  display: -webkit-box;
  max-width: 640px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 18px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.post__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  margin: 44px auto 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.post__author {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.share__label {
  margin-right: 4px;
  color: var(--muted);
  font-size: 14px;
}
.share__btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--ink);
  font: 500 13px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.share__btn:hover {
  border-color: var(--ink);
}
.post__cover {
  max-width: 1040px;
  margin: 8px auto 0;
}
.post__cover img {
  width: 100%;
  aspect-ratio: 16 / 8;
  border-radius: var(--radius);
  object-fit: cover;
}

/* Corpo do post: sumário fixo ao lado do texto no computador, menu que abre no celular. */
.post__body {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  justify-content: center;
  gap: 64px;
  max-width: 1040px;
  margin: 56px auto 0;
}
.post__body--sem-sumario {
  grid-template-columns: minmax(0, 720px);
}
.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 2px 0 8px;
}
.toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 13px/1.3 var(--sans);
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  cursor: default;
}
.toc__icon {
  display: none;
}
.toc__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
  list-style: none;
}
.toc__item a {
  display: block;
  margin-left: -1px;
  padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toc__item--h3 a {
  padding-left: 30px;
  font-size: 13px;
}
.toc__item a:hover {
  color: var(--ink);
}
.toc__item a[aria-current="true"] {
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Texto do post (vem do editor do WordPress) */
.prose {
  min-width: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
}
.prose > * {
  margin: 0 0 1.25em;
}
.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: 24px;
  margin: 1.9em 0 0.6em;
  color: var(--ink);
  line-height: 1.2;
}
.prose h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.prose h3 {
  font-size: 22px;
  font-weight: 600;
}
.prose h4 {
  font-size: 18px;
  font-weight: 600;
}
.prose a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose strong {
  color: var(--ink);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li {
  margin-bottom: 0.45em;
}
.prose li::marker {
  color: var(--accent);
}
.prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--sun);
  color: var(--ink);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.5;
}
.prose blockquote p {
  margin: 0;
}
.prose figure {
  margin: 2em 0;
}
.prose img {
  border-radius: var(--radius-sm);
}
.prose figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
}
.prose iframe {
  max-width: 100%;
}

.more {
  max-width: 1040px;
  margin: 80px auto 0;
  padding: 48px 0 72px;
  border-top: 1px solid var(--line);
}
.more__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.link-arrow {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.more__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.more__grid > .is-current,
.more__grid > .card:nth-child(n + 4 of :not(.is-current)) {
  display: none;
}

/* ------------------------------------------------------------ contato */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 48px 0 80px;
}
.contact__text p:last-child {
  max-width: 460px;
  margin: 20px 0 0;
  color: var(--muted);
}
.contact__form {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--card);
}
.contact .bfc-kodety {
  --bfc-label-color: var(--ink);
  --bfc-input-bg: #ffffff;
  --bfc-input-color: var(--ink);
  --bfc-input-border: var(--line);
  --bfc-input-focus: var(--accent);
  --bfc-button-bg: var(--accent);
  --bfc-button-hover-bg: var(--accent-strong);
  --bfc-button-text: #ffffff;
  --bfc-button-radius: 999px;
  --bfc-input-radius: 14px;
}

/* ------------------------------------------------------------ rodapé */

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding: 48px 0 36px;
  border-top: 1px solid var(--line);
}
.site-footer__brand p {
  max-width: 340px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.site-footer__brand img {
  width: 150px;
}
.site-footer h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a {
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--accent);
}
.site-footer__legal {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------------------------------------ responsivo */

@media (max-width: 1200px) {
  .lead {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .post__body {
    grid-template-columns: minmax(0, 720px);
    gap: 0;
  }
  .toc {
    position: static;
    max-height: none;
    margin-bottom: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    overflow: hidden;
  }
  .toc__toggle {
    margin: 0;
    padding: 16px 20px;
    cursor: pointer;
  }
  .toc__icon {
    display: block;
    width: 10px;
    height: 10px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }
  .toc.is-open .toc__icon {
    margin-top: 4px;
    transform: rotate(-135deg);
  }
  .toc__list {
    display: none;
    margin: 0 20px 18px;
  }
  .toc.is-open .toc__list {
    display: grid;
  }
}

@media (max-width: 810px) {
  body {
    padding: 0;
  }
  .sheet {
    border-radius: 0;
  }
  .site-header {
    flex-wrap: wrap;
    padding: 20px 0;
  }
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  .site-nav ul {
    gap: 22px;
  }
  .btn--pill {
    margin-left: auto;
    padding: 12px 16px;
    font-size: 14px;
  }
  .lead,
  .contact,
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature__card {
    min-height: 420px;
  }
  .shelf__track {
    grid-auto-columns: 72%;
  }
  .grid,
  .more__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .more__grid > .card:nth-child(n + 3 of :not(.is-current)) {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  .brand img {
    width: 140px;
  }
  .btn--pill span {
    display: none;
  }
  .feature__body {
    padding: 22px;
  }
  .shelf__track {
    grid-auto-columns: 86%;
  }
  .shelf__nav {
    display: none;
  }
  .grid,
  .more__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .more__grid > .card:nth-child(n + 3 of :not(.is-current)) {
    display: flex;
  }
  .more__grid > .card:nth-child(n + 4 of :not(.is-current)) {
    display: none;
  }
  .post__bar {
    justify-content: center;
  }
  .prose {
    font-size: 17px;
  }
  .prose h2 {
    font-size: 25px;
  }
  .contact__form {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none;
    scroll-behavior: auto;
  }
}
