/* Conceito "capa UFPE": o azul-ciano e o preto da capa original, com as espirais
   da árvore como ornamento. Serifada nos títulos, como no livro. */
:root {
  --night: #1b1c1e;
  --night-2: #242629;
  --night-3: #2e3135;
  --line-night: #3a3e44;
  --ink: #17191c;
  --muted: #5e6670;
  --muted-night: #a7b0ba;
  --bg: #ffffff;
  --tint: #f1f7fb;
  --line: #e1e8ee;
  --cyan: #0093d6;
  --cyan-deep: #0079b3;
  --cyan-soft: #d9eef9;
  --cyan-light: #6fc6ef;
  --radius: 16px;
  --shadow: 0 24px 60px -28px rgba(20, 22, 26, .45);
  --display: 'Source Serif 4', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.62 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-deep); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.16; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.fine { font-size: .82rem; color: var(--muted); margin: .9em 0 0; }
.eyebrow { font: 700 .78rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-deep); margin-bottom: 1rem; }
.h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }

/* Seções escuras */
.night { position: relative; background: var(--night); color: #dde3ea; overflow: hidden; }
.night h1, .night h2, .night h3, .night .h2 { color: #fff; }
.night .eyebrow { color: var(--cyan-light); }
.night .muted { color: var(--muted-night); }
.night a:not(.btn) { color: var(--cyan-light); }
.tint { background: var(--tint); }
.night > .wrap { position: relative; }

/* Espirais da árvore da capa */
.curls { position: absolute; inset: 0; pointer-events: none; }
.curls svg { position: absolute; fill: none; stroke: var(--cyan); stroke-width: 9; stroke-linecap: round; opacity: .16; }
.curls .cl1 { width: 420px; right: -90px; bottom: -40px; }
.curls .cl3 { width: 300px; right: 4%; bottom: -60px; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(27, 28, 30, .94); backdrop-filter: blur(10px); border-bottom: 3px solid var(--cyan); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.1rem var(--display); color: #fff; text-decoration: none; }
.brand-curl { width: 24px; height: 24px; fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; }
.lang { display: flex; gap: 2px; border: 1px solid var(--line-night); border-radius: 999px; padding: 3px; }
.lang button { font: 600 .8rem var(--sans); border: 0; background: none; color: var(--muted-night); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.lang button:hover { color: #fff; }
.lang button[aria-pressed="true"] { background: var(--cyan); color: #fff; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1.02rem var(--sans); padding: 14px 26px; border-radius: 10px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .7; cursor: wait; transform: none; }
.btn-primary { background: var(--cyan); color: #fff; box-shadow: 0 12px 26px -12px rgba(0, 147, 214, .8); }
.btn-primary:hover { background: var(--cyan-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: #c5d0da; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; padding: 12px 16px; font-size: .94rem; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { background: #fff; color: var(--night); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 92px) 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.hero-grid > *, .hero-copy > * { min-width: 0; }
.hero-copy { display: grid; grid-template-columns: 1fr 220px; column-gap: 32px; align-items: start; }
.hero-copy > :not(.checks):not(.hero-cover) { grid-column: 1 / -1; }
.hero h1 { font-size: clamp(2rem, 3.9vw, 3.05rem); }
.lead { font-size: 1.18rem; color: #c9d2dc; max-width: 52ch; }
.checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before { content: ''; position: absolute; left: 2px; top: .38em; width: 16px; height: 16px; border: 3px solid var(--cyan); border-radius: 50%; border-right-color: transparent; transform: rotate(-30deg); }
.hero-cover { margin: 6px 0 0; }
.hero-cover img { border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .08); transform: rotate(2deg); transition: transform .4s; }
.hero-cover:hover img { transform: rotate(0); }

/* Cartão / formulário */
.card { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(24px, 3.5vw, 36px); }
.card h2, .card h3 { color: var(--ink) !important; }
.card .muted { color: var(--muted) !important; }
.form-card { position: sticky; top: 88px; border-top: 5px solid var(--cyan); }
.form-card h2 { font-size: 1.6rem; }
form { display: grid; gap: 14px; margin-top: 18px; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea { font: 400 1rem var(--sans); color: var(--ink); width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fbfdfe; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 147, 214, .18); }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fdecea; color: #a12a1c; font-size: .92rem; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--cyan); color: #fff; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; margin-bottom: 16px; }
.email-note { background: var(--tint); border-radius: 10px; padding: 10px 14px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* Números da pesquisa */
.numbers { background: var(--cyan); color: #fff; padding: 34px 0; }
.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.num { display: grid; gap: 4px; border-left: 2px solid rgba(255, 255, 255, .4); padding-left: 18px; }
.num b { font: 700 2.4rem/1 var(--display); }
.num span { font-size: .95rem; line-height: 1.4; color: #eaf7fd; }

/* Seções */
.section { padding: clamp(68px, 9vw, 112px) 0; }

/* Capítulos */
.chapters { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.chapters li { background: var(--tint); border-radius: var(--radius); padding: 26px 24px; border-top: 4px solid var(--cyan); }
.ch-n { display: block; font: 700 2.4rem/1 var(--display); color: var(--cyan); margin-bottom: 12px; }
.chapters h3 { font-size: 1.22rem; }
.chapters p { color: var(--muted); font-size: .97rem; margin: 0; }

/* Prática x relevância */
.ranks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px auto 0; max-width: 940px; }
.rank { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.rank h3 { font-size: 1.15rem; margin-bottom: 14px; }
.rank ol { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 8px; }
.rank li { counter-increment: r; display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank li::before { content: counter(r) 'º'; font: 700 1.05rem var(--display); color: var(--muted); min-width: 1.8em; }
.rank li span { flex: 1; }
.rank li em { font-style: normal; font-size: .85rem; color: var(--cyan-deep); font-weight: 600; white-space: nowrap; }
.rank-hi { border: 2px solid var(--cyan); box-shadow: var(--shadow); }
.rank-hi li::before { color: var(--cyan); }
.rank-note { margin-top: 20px; max-width: 760px; }

/* Programas */
.teams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 40px auto 24px; max-width: 900px; }
.teams button { display: grid; gap: 2px; text-align: left; border: 1.5px solid var(--line-night); background: var(--night-2); color: var(--muted-night); border-radius: 14px; padding: 14px 18px; cursor: pointer; font: 400 .9rem/1.35 var(--sans); transition: border-color .15s, background .15s; }
.teams button b { font: 700 1.15rem var(--display); color: #fff; }
.teams button:hover { border-color: var(--cyan); }
.teams button[aria-selected="true"] { background: var(--cyan); border-color: var(--cyan); color: #eaf7fd; }
.program { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pg-desc { max-width: 820px; margin: 0 auto 22px; text-align: center; color: #c9d2dc; }
.pg-det { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 18px; }
.pg-det-l { font-size: .85rem; color: var(--muted-night); }
.chip { background: #fff; color: var(--ink); font-weight: 600; font-size: .9rem; padding: 5px 12px; border-radius: 999px; }
.pg-leg { margin-left: auto; font-size: .85rem; color: var(--muted-night); display: inline-flex; align-items: center; gap: 8px; }
.pg-leg::before { content: ''; width: 14px; height: 14px; border-radius: 4px; background: var(--cyan); }
.pg-grid { display: grid; grid-template-columns: 92px repeat(3, 1fr); gap: 8px; }
.pg-corner { }
.pg-scope { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--night-3); }
.pg-scope b { font: 700 1.05rem var(--display); color: #fff; }
.pg-scope span { font-size: .85rem; color: var(--muted-night); font-style: italic; }
.pg-stage { display: grid; place-items: center; font: 700 .82rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--cyan-light); background: var(--night-2); border-radius: 12px; }
.pg-cell { position: relative; display: grid; align-content: center; gap: 4px; min-height: 64px; padding: 12px 54px 12px 14px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line-night); font-size: .95rem; line-height: 1.35; }
.pg-cell b { color: var(--cyan-light); font-weight: 700; }
.pg-cell.hi { background: var(--cyan); border-color: var(--cyan); color: #fff; font-weight: 600; }
.pg-cell.hi b { color: #fff; }
.pg-cell.hyg { padding: 10px 14px; background: transparent; border-style: dashed; font-size: .86rem; color: var(--muted-night); }
.pg-w { position: absolute; top: 10px; right: 12px; font-size: .74rem; font-style: italic; opacity: .8; }
.pg-cell-scope { display: none; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }

/* Higiene */
.hyg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hyg { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.hyg li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.hyg li::after { content: ''; grid-column: 1 / -1; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--cyan) calc(var(--v) / .4 * 100%), var(--cyan-soft) 0); }
.hyg b { font: 700 1.05rem var(--display); color: var(--cyan-deep); }

/* Depoimentos */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.quote { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.quote.featured { grid-column: 1 / -1; background: var(--night); border-color: var(--night); color: #e6ecf2; padding: clamp(28px, 5vw, 48px); }
.quote blockquote { margin: 0; font: 500 1.08rem/1.6 var(--sans); }
.quote.featured blockquote { font: italic 500 clamp(1.15rem, 2.1vw, 1.45rem)/1.5 var(--display); color: #fff; }
.quote figcaption { display: grid; gap: 2px; font-size: .92rem; border-top: 1px solid var(--line); padding-top: 14px; }
.quote.featured figcaption { border-color: var(--line-night); }
.quote figcaption span { color: var(--muted); }
.quote.featured figcaption span { color: var(--muted-night); }
.quote-name { font-weight: 700; color: var(--ink); }
.testi-cta { display: flex; align-items: center; justify-content: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 32px; text-align: center; }
.testi-cta p { margin: 0; }

/* Autor */
.author { display: grid; grid-template-columns: 380px 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.author-media { display: grid; gap: 16px; min-width: 0; }
.author-photo img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; box-shadow: var(--shadow); }
.stats { list-style: none; padding: 0; margin: 24px 0 0; display: flex; gap: 32px; flex-wrap: wrap; }
.stats li { display: grid; }
.stats b { font: 700 2rem var(--display); color: var(--cyan-light); }
.stats span { color: var(--muted-night); font-size: .9rem; }
.social { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.social a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-night); color: #dde3ea !important; font-size: .88rem; font-weight: 600; text-decoration: none; transition: border-color .15s; }
.social a:hover { border-color: var(--cyan); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* Reels */
.reels { min-width: 0; }
.reels-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.reels-track::-webkit-scrollbar { display: none; }
.reel { flex: 0 0 100%; scroll-snap-align: center; display: flex; justify-content: center; align-items: flex-start; min-width: 0; }
.reel .instagram-media { margin: 0 !important; min-width: 0 !important; width: 100% !important; background: #fff; border-radius: var(--radius) !important; }
.reel iframe { border-radius: var(--radius) !important; }
.reels-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.reels-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-night); background: var(--night-2); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.reels-dots { display: flex; gap: 6px; }
.reels-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: var(--line-night); cursor: pointer; }
.reels-dots button[aria-current="true"] { background: var(--cyan); }

/* Apoie */
.support-one { max-width: 560px; margin: 40px auto 0; }
.support-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.support-card h3 { font-size: 1.4rem; }
.support-card .btn { margin-top: 6px; }
#intl-donate { margin-top: 12px; }
.pix-qr { width: 180px; height: auto; margin: 8px 0 12px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.seg { display: inline-flex; gap: 4px; margin: 16px 0 8px; background: var(--tint); border-radius: 999px; padding: 4px; }
.seg button { font: 600 .86rem var(--sans); border: 0; background: none; color: var(--muted); padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--night); color: #fff; }
.donate-panel { margin-top: 8px; }
.bank-fields { margin: 0; display: grid; gap: 2px; font-size: .92rem; }
.bank-fields dt { color: var(--muted); font-size: .82rem; margin-top: 8px; }
.bank-fields dd { margin: 0; display: flex; align-items: baseline; gap: 10px; word-break: break-word; }
.copy-btn { flex: none; font: inherit; font-size: .82rem; color: var(--cyan-deep); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; cursor: pointer; }
code { font-size: .86rem; background: var(--tint); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

/* CTA final */
.final { padding: clamp(80px, 10vw, 112px) 0; }
.final .h2 { margin-bottom: 28px; }
.contact-cta { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line-night); }
.contact-cta h3 { font-size: 1.4rem; }
.contact-cta p { margin-bottom: 20px; color: #c9d2dc; }

/* Rodapé */
.footer { padding: 32px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--cyan-deep); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--night); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .94rem; z-index: 50; }

/* Modais */
.modal { width: min(560px, 100% - 32px); max-height: calc(100dvh - 32px); padding: clamp(24px, 4vw, 36px); border: 0; border-top: 5px solid var(--cyan); border-radius: var(--radius); background: #fff; color: var(--ink); box-shadow: var(--shadow); overflow: auto; }
.modal::backdrop { background: rgba(20, 22, 26, .65); backdrop-filter: blur(3px); }
.modal h2 { font-size: 1.5rem; padding-right: 32px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--tint); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.modal-done { text-align: center; }
.modal-done .success-icon { margin-inline: auto; }
body:has(dialog[open]) { overflow: hidden; }

/* Entrada suave ao rolar */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Responsivo */
@media (max-width: 1000px) {
  .chapters, .numbers-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .hero-grid, .author, .hyg-grid { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .author-photo, .author-media { max-width: 420px; }
  .pg-grid { grid-template-columns: 1fr; }
  .pg-corner, .pg-scope { display: none; }
  .pg-stage { justify-content: start; place-items: start; padding: 14px 4px 2px; background: none; }
  .pg-cell-scope { display: block; }
}
@media (max-width: 760px) {
  .chapters, .quotes, .ranks, .teams { grid-template-columns: 1fr; }
  .hero-copy { grid-template-columns: 1fr; }
  .hero-cover { order: -1; width: 170px; margin: 0 auto 28px; }
  .hero-copy > .eyebrow { order: -2; text-align: center; }
  .row2 { grid-template-columns: 1fr; }
  .pg-leg { margin-left: 0; }
}
@media (max-width: 480px) {
  .numbers-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .hero-cover img { transition: none; }
  .program { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
