/*
Theme Name: Hábito Para Vida — Protótipo Editorial
Theme URI: https://habitoparavida.com.br/
Author: Hábito Para Vida
Description: Protótipo editorial controlado para a nova identidade do Hábito Para Vida.
Version: 0.6.3
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: hpv
*/

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-variable.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("assets/fonts/source-serif-4-latin-variable.woff2") format("woff2-variations");
}

:root {
  --hpv-green-900: #173f35;
  --hpv-green-700: #365e50;
  --hpv-moss: #5f7d6e;
  --hpv-sand: #f3ede2;
  --hpv-cream: #fcfaf6;
  --hpv-amber: #d9903d;
  --hpv-coral: #c96a55;
  --hpv-ink: #1e2925;
  --hpv-muted: #61706a;
  --hpv-line: #d9ded9;
  --hpv-white: #ffffff;
  --hpv-font-display: "Source Serif 4", Georgia, serif;
  --hpv-font-ui: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hpv-step--1: clamp(.82rem, .8rem + .08vw, .88rem);
  --hpv-step-0: clamp(1rem, .96rem + .16vw, 1.08rem);
  --hpv-step-1: clamp(1.2rem, 1.08rem + .45vw, 1.46rem);
  --hpv-step-2: clamp(1.55rem, 1.28rem + .85vw, 2.05rem);
  --hpv-step-3: clamp(2rem, 1.55rem + 1.5vw, 2.9rem);
  --hpv-step-4: clamp(2.55rem, 1.7rem + 3vw, 4.6rem);
  --hpv-space-1: .375rem;
  --hpv-space-2: .75rem;
  --hpv-space-3: 1rem;
  --hpv-space-4: 1.5rem;
  --hpv-space-5: 2rem;
  --hpv-space-6: clamp(2.5rem, 5vw, 4.5rem);
  --hpv-space-7: clamp(4rem, 8vw, 7rem);
  --hpv-container: 1180px;
  --hpv-reading: 70ch;
  --hpv-radius-sm: .55rem;
  --hpv-radius: 1rem;
  --hpv-radius-lg: 1.5rem;
  --hpv-shadow: 0 18px 45px rgba(23, 63, 53, .09);
  --hpv-focus: 0 0 0 3px rgba(217, 144, 61, .42);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--hpv-ink);
  background: var(--hpv-cream);
  font-family: var(--hpv-font-ui);
  font-size: var(--hpv-step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--hpv-green-900); text-underline-offset: .18em; }
a:hover { color: var(--hpv-green-700); }
:focus-visible { outline: 0; box-shadow: var(--hpv-focus); border-radius: .2rem; }
h1, h2, h3, h4 { margin: 0 0 .65em; color: var(--hpv-green-900); font-family: var(--hpv-font-display); line-height: 1.08; text-wrap: balance; }
h1 { font-size: var(--hpv-step-4); letter-spacing: -.035em; }
h2 { font-size: var(--hpv-step-3); letter-spacing: -.025em; }
h3 { font-size: var(--hpv-step-2); }
p { margin: 0 0 1.25em; }
.hpv-container { width: min(calc(100% - 2rem), var(--hpv-container)); margin-inline: auto; }
.hpv-reading { width: min(100%, var(--hpv-reading)); }
.hpv-section { padding-block: var(--hpv-space-7); }
.hpv-section--sand { background: var(--hpv-sand); }
.hpv-section--green { color: var(--hpv-white); background: var(--hpv-green-900); }
.hpv-section--green h2, .hpv-section--green h3, .hpv-section--green a { color: var(--hpv-white); }
.hpv-eyebrow { margin: 0 0 .8rem; color: var(--hpv-moss); font-size: var(--hpv-step--1); font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.hpv-section--green .hpv-eyebrow { color: #d9e8e1; }
.hpv-lede { max-width: 62ch; color: var(--hpv-muted); font-size: var(--hpv-step-1); }
.hpv-section--green .hpv-lede { color: #e6eee9; }
.hpv-grid { display: grid; gap: var(--hpv-space-4); }
.hpv-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hpv-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hpv-stack > * + * { margin-top: var(--hpv-space-4); }

.hpv-skip-link { position: fixed; z-index: 9999; top: .5rem; left: .5rem; transform: translateY(-150%); padding: .7rem 1rem; color: white; background: var(--hpv-green-900); }
.hpv-skip-link:focus { transform: none; }
.hpv-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid rgba(23,63,53,.12); background: rgba(252,250,246,.96); backdrop-filter: blur(12px); }
.admin-bar .hpv-header { top: 32px; }
.hpv-header__row { min-height: 72px; display: flex; align-items: center; gap: 1.2rem; }
.hpv-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--hpv-green-900); font-family: var(--hpv-font-display); font-size: 1.28rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.hpv-brand__mark { width: 1.9rem; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50% 50% 50% 18%; color: white; background: var(--hpv-green-900); font-family: var(--hpv-font-ui); font-size: .78rem; }
.hpv-nav { margin-left: auto; }
.hpv-nav ul { display: flex; align-items: center; gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.hpv-nav a { color: var(--hpv-ink); font-size: .9rem; font-weight: 700; text-decoration: none; }
.hpv-nav a:hover { color: var(--hpv-green-700); }
.hpv-search { display: flex; align-items: center; gap: .35rem; }
.hpv-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hpv-search input { width: 8.5rem; border: 1px solid var(--hpv-line); border-radius: 999px; padding: .62rem .85rem; background: white; font: inherit; font-size: .88rem; }
.hpv-search button, .hpv-menu-toggle { border: 0; border-radius: 999px; padding: .62rem .75rem; color: white; background: var(--hpv-green-900); font: inherit; cursor: pointer; }
.hpv-menu-toggle { display: none; }

.hpv-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.15rem; border: 1px solid var(--hpv-green-900); border-radius: 999px; color: white; background: var(--hpv-green-900); font-weight: 800; line-height: 1; text-decoration: none; transition: transform .18s ease, background .18s ease; }
.hpv-button:hover { transform: translateY(-2px); color: white; background: var(--hpv-green-700); }
.hpv-button--light { border-color: white; color: var(--hpv-green-900); background: white; }
.hpv-button--light:hover { color: var(--hpv-green-900); background: var(--hpv-sand); }
.hpv-button--ghost { color: var(--hpv-green-900); background: transparent; }
.hpv-button--coral { border-color: var(--hpv-coral); background: var(--hpv-coral); }

.hpv-hero { position: relative; overflow: hidden; padding-block: clamp(4.5rem, 10vw, 8.5rem); background: linear-gradient(145deg, var(--hpv-cream) 0 67%, var(--hpv-sand) 67% 100%); }
.hpv-hero::after { content: ""; position: absolute; right: max(-8rem, -8vw); bottom: -12rem; width: 28rem; aspect-ratio: 1; border: 1px solid rgba(95,125,110,.35); border-radius: 50%; box-shadow: 0 0 0 3rem rgba(95,125,110,.06), 0 0 0 7rem rgba(217,144,61,.05); }
.hpv-hero__content { position: relative; z-index: 1; max-width: 880px; }
.hpv-hero h1 { max-width: 14ch; }
.hpv-hero .hpv-lede { max-width: 55ch; }
.hpv-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }

.hpv-card { position: relative; height: 100%; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--hpv-line); border-radius: var(--hpv-radius); background: var(--hpv-white); box-shadow: 0 1px 0 rgba(23,63,53,.03); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.hpv-card:hover { transform: translateY(-4px); border-color: #b9c7c0; box-shadow: var(--hpv-shadow); }
.hpv-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: clamp(1.2rem, 2vw, 1.7rem); }
.hpv-card__media { display: block; flex: 0 0 auto; aspect-ratio: 16 / 9; overflow: hidden; background: var(--hpv-sand); }
.hpv-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hpv-card h3 { margin-bottom: .7rem; font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.13; }
.hpv-card h3 a { text-decoration: none; }
.hpv-card p:last-child { margin-bottom: 0; }
.hpv-card__meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-bottom: .8rem; color: var(--hpv-muted); font-size: var(--hpv-step--1); }
.hpv-card__meta-link { color: var(--hpv-muted); font-weight: 750; text-decoration: none; }
.hpv-card__excerpt { display: -webkit-box; overflow: hidden; margin-bottom: 1rem; color: var(--hpv-muted); line-height: 1.58; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.hpv-card__cta { align-self: flex-start; margin-top: auto; padding-top: .2rem; }
.hpv-route { border-top: 4px solid var(--hpv-amber); }
.hpv-route--50 { border-top-color: var(--hpv-coral); }
.hpv-route__index { color: var(--hpv-moss); font-family: var(--hpv-font-display); font-size: 2rem; font-weight: 700; }
.hpv-link-arrow { font-weight: 800; text-decoration: none; }
.hpv-link-arrow::after { content: " →"; }

.hpv-feature { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--hpv-space-6); align-items: center; }
.hpv-feature__media { overflow: hidden; border-radius: var(--hpv-radius-lg); background: #dfe6e1; box-shadow: var(--hpv-shadow); }
.hpv-feature__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hpv-future-tool { display: grid; grid-template-columns: 1.2fr .8fr; gap: var(--hpv-space-5); align-items: center; padding: clamp(1.5rem, 4vw, 3.5rem); border: 1px dashed var(--hpv-moss); border-radius: var(--hpv-radius-lg); background: rgba(255,255,255,.52); }
.hpv-pill { display: inline-flex; padding: .32rem .62rem; border-radius: 999px; color: var(--hpv-green-900); background: #e2ebe6; font-size: var(--hpv-step--1); font-weight: 800; }
.hpv-pill--coral { color: #7d3426; background: #f4ddd7; }
.hpv-newsletter { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--hpv-space-5); align-items: center; padding: clamp(1.5rem, 4vw, 3.5rem); border-radius: var(--hpv-radius-lg); background: var(--hpv-green-900); color: white; }
.hpv-newsletter h2, .hpv-newsletter p { color: white; }
.hpv-newsletter__form { display: flex; gap: .6rem; }
.hpv-newsletter input { flex: 1; min-width: 0; min-height: 48px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .7rem 1rem; background: white; font: inherit; }
.hpv-newsletter button[disabled] { opacity: .78; cursor: not-allowed; }
.hpv-note { margin-top: .6rem; font-size: var(--hpv-step--1); opacity: .82; }

.hpv-page-hero { padding-block: var(--hpv-space-6); border-bottom: 1px solid var(--hpv-line); background: var(--hpv-sand); }
.hpv-hub-hero h1 { max-width: 17ch; }
.hpv-hub-hero .hpv-lede { max-width: 64ch; }
.hpv-hub-feature h2 a { text-decoration: none; }
.hpv-hub-paths { margin-top: var(--hpv-space-5); }
.hpv-hub-path { border-top: 4px solid var(--hpv-amber); }
.hpv-hub-path p { color: var(--hpv-muted); }
.hpv-article-grid { margin-top: var(--hpv-space-5); align-items: stretch; }
.hpv-hub-discovery { padding-block: var(--hpv-space-6); border-top: 1px solid var(--hpv-line); background: #edf2ef; }
.hpv-hub-discovery__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: var(--hpv-space-5); align-items: center; }
.hpv-hub-discovery h2 { margin-bottom: 0; }
.hpv-hub-discovery ul { margin: 0; padding: 0; list-style: none; }
.hpv-hub-discovery li + li { margin-top: .7rem; }
.hpv-pagination { margin-top: var(--hpv-space-5); }
.hpv-pagination ul, .nav-links { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.hpv-pagination a, .hpv-pagination .current, .nav-links a, .nav-links .current { display: inline-flex; min-width: 42px; min-height: 42px; align-items: center; justify-content: center; padding: .45rem .75rem; border: 1px solid var(--hpv-line); border-radius: 999px; background: var(--hpv-white); text-decoration: none; }
.hpv-pagination .current, .nav-links .current { border-color: var(--hpv-green-900); color: white; background: var(--hpv-green-900); }
.hpv-breadcrumbs { margin-bottom: 1.25rem; color: var(--hpv-muted); font-size: var(--hpv-step--1); }
.hpv-breadcrumbs a { color: inherit; }
.hpv-article-header { padding-block: clamp(3rem, 7vw, 6rem); }
.hpv-article-header__inner { width: min(calc(100% - 2rem), 920px); margin-inline: auto; }
.hpv-article-header h1 { max-width: 18ch; }
.hpv-article-deck { max-width: 60ch; color: var(--hpv-muted); font-size: var(--hpv-step-1); }
.hpv-article-meta { display: flex; flex-wrap: wrap; gap: .55rem 1rem; color: var(--hpv-muted); font-size: .92rem; }
.hpv-article-featured { width: min(calc(100% - 2rem), 1120px); margin: 0 auto var(--hpv-space-6); overflow: hidden; border-radius: var(--hpv-radius-lg); background: var(--hpv-sand); }
.hpv-article-featured img { width: 100%; max-height: 680px; object-fit: cover; }
.hpv-article-layout { width: min(calc(100% - 2rem), 1040px); margin-inline: auto; display: grid; grid-template-columns: 220px minmax(0, var(--hpv-reading)); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-bottom: var(--hpv-space-7); }
.hpv-toc { position: sticky; top: 96px; padding: 1rem; border-left: 3px solid var(--hpv-amber); font-size: .88rem; }
.hpv-toc strong { display: block; margin-bottom: .6rem; color: var(--hpv-green-900); }
.hpv-toc ol { margin: 0; padding-left: 1.15rem; }
.hpv-toc li + li { margin-top: .5rem; }
.hpv-toc a { text-decoration: none; }
.hpv-article-content { min-width: 0; font-size: 18px; line-height: 1.72; }
.hpv-article-content > * { max-width: var(--hpv-reading); }
.hpv-article-content h2 { margin-top: 2.15em; scroll-margin-top: 100px; }
.hpv-article-content h3 { margin-top: 1.75em; scroll-margin-top: 100px; }
.hpv-article-content ul, .hpv-article-content ol { padding-left: 1.35em; }
.hpv-article-content li + li { margin-top: .45em; }
.hpv-article-content blockquote { margin: 2rem 0; padding: 1.2rem 1.4rem; border-left: 4px solid var(--hpv-amber); background: var(--hpv-sand); font-family: var(--hpv-font-display); font-size: 1.22em; }
.hpv-article-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.hpv-article-content th, .hpv-article-content td { padding: .75rem; border: 1px solid var(--hpv-line); text-align: left; }
.hpv-article-content th { background: var(--hpv-sand); }
.hpv-editorial-box { margin: 2.2rem 0; padding: 1.25rem 1.4rem; border-radius: var(--hpv-radius); background: #e8f0ec; }
.hpv-editorial-box--apply { border-left: 5px solid var(--hpv-amber); }
.hpv-editorial-box h2, .hpv-editorial-box h3 { margin-top: 0; }
.hpv-references { margin-top: var(--hpv-space-6); padding-top: var(--hpv-space-4); border-top: 1px solid var(--hpv-line); }
.hpv-references h2 { font-size: var(--hpv-step-2); }
.hpv-references li + li { margin-top: .55rem; }
.hpv-related { padding-block: var(--hpv-space-6); border-top: 1px solid var(--hpv-line); }

.hpv-footer { padding-block: var(--hpv-space-6) var(--hpv-space-4); color: #dce7e2; background: #102e27; }
.hpv-footer__grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: var(--hpv-space-5); }
.hpv-footer h2, .hpv-footer h3 { color: white; font-family: var(--hpv-font-ui); font-size: 1rem; }
.hpv-footer ul { margin: 0; padding: 0; list-style: none; }
.hpv-footer li + li { margin-top: .45rem; }
.hpv-footer a { color: #dce7e2; text-decoration: none; }
.hpv-footer__bottom { margin-top: var(--hpv-space-5); padding-top: var(--hpv-space-3); border-top: 1px solid rgba(255,255,255,.16); font-size: var(--hpv-step--1); }

@media (max-width: 980px) {
  .hpv-menu-toggle { display: inline-flex; margin-left: auto; }
  .hpv-nav { position: absolute; top: 72px; left: 1rem; right: 1rem; display: none; padding: 1rem; border: 1px solid var(--hpv-line); border-radius: var(--hpv-radius); background: var(--hpv-cream); box-shadow: var(--hpv-shadow); }
  .hpv-nav.is-open { display: block; }
  .hpv-nav ul { display: grid; gap: .35rem; }
  .hpv-nav a { display: block; padding: .65rem; }
  .hpv-search { display: none; }
  .hpv-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hpv-article-layout { grid-template-columns: 1fr; }
  .hpv-toc { position: static; width: min(100%, var(--hpv-reading)); }
  .hpv-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hpv-hub-discovery__inner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .admin-bar .hpv-header { top: 46px; }
  .hpv-header__row { min-height: 64px; }
  .hpv-nav { top: 64px; }
  .hpv-brand { font-size: 1.1rem; }
  .hpv-brand__mark { width: 1.7rem; }
  .hpv-section { padding-block: var(--hpv-space-6); }
  .hpv-grid--3, .hpv-grid--2, .hpv-feature, .hpv-future-tool, .hpv-newsletter, .hpv-footer__grid { grid-template-columns: 1fr; }
  .hpv-hero { background: var(--hpv-cream); }
  .hpv-hero::after { opacity: .55; }
  .hpv-hero h1 { max-width: 12ch; }
  .hpv-newsletter__form { flex-direction: column; }
  .hpv-article-content { font-size: 17px; }
  .hpv-article-header h1 { font-size: clamp(2.35rem, 11vw, 3.5rem); }
  .hpv-card h3 { font-size: clamp(1.35rem, 7vw, 1.75rem); }
  .hpv-card__body { padding: 1.25rem; }
  .hpv-card__excerpt { -webkit-line-clamp: 3; }
  .hpv-hub-hero h1 { max-width: 13ch; }
  .hpv-hub-feature { gap: var(--hpv-space-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
