/* Página inicial: abertura com a estante, carrossel de livros, atalhos e "sobre o autor". */

/* ---------- Abertura ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 56px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); margin-bottom: .4em; }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.shelf { position: relative; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 22px; min-height: 360px; }
.shelf::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; border-radius: 4px; background: linear-gradient(#cdbfa6, #b8a888); box-shadow: 0 18px 30px -16px rgba(26, 23, 18, .5); }
.shelf-book { position: relative; display: block; width: 26%; margin: 0 -2.5%; border-radius: 3px 6px 6px 3px; overflow: hidden; box-shadow: var(--shadow), inset 4px 0 0 rgba(0, 0, 0, .15); transition: transform .25s ease; }
.shelf-book img { width: 100%; }
.shelf-book.b1 { transform: rotate(-6deg) translateY(6px); z-index: 1; }
.shelf-book.b2 { transform: rotate(-2deg); z-index: 2; }
.shelf-book.b3 { transform: rotate(2deg); z-index: 3; }
.shelf-book.b4 { transform: rotate(6deg) translateY(6px); z-index: 4; }
.shelf-book:hover { transform: translateY(-14px) rotate(0); z-index: 5; }

.stats { list-style: none; margin: 64px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stats li { display: flex; flex-direction: column; gap: 4px; }
.stats b { font: 600 clamp(1.9rem, 3.4vw, 2.6rem)/1 var(--display); color: var(--ink); }
.stats span { color: var(--muted); font-size: .92rem; }

/* ---------- Carrossel de livros ---------- */
.carousel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.carousel-head .section-head { margin-bottom: 0; }
.carousel-nav { display: flex; gap: 10px; flex-shrink: 0; }
.carousel-nav button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--ink); background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .15s ease, color .15s ease, opacity .15s ease; }
.carousel-nav button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.carousel-nav button:disabled { opacity: .3; cursor: default; }

/* A trilha ocupa a largura toda da tela; o primeiro cartão alinha com o texto da página. */
.books { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 4px var(--gutter) 28px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior-x: contain; }
.books::-webkit-scrollbar { height: 8px; }
.books::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.books:focus-visible { outline-offset: -3px; }

.book { flex: 0 0 min(372px, 84vw); scroll-snap-align: start; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.book:hover { box-shadow: var(--shadow); }
/* Altura fixa para a área da capa: as capas têm proporções um pouco diferentes e os textos ficam alinhados. */
.book-cover { position: relative; display: flex; align-items: center; justify-content: center; height: 340px; padding: 36px 32px 30px; background: var(--c-bg); }
.book-cover::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--c); }
.book-cover picture { display: block; height: 100%; border-radius: 3px 6px 6px 3px; overflow: hidden; box-shadow: var(--shadow), inset 4px 0 0 rgba(0, 0, 0, .15); transition: transform .25s ease; }
.book-cover img { height: 100%; width: auto; }
.book-cover:hover picture { transform: translateY(-6px) rotate(-1deg); }
.book-body { padding: 26px 28px 30px; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.book-year { font: 600 .82rem/1 var(--sans); letter-spacing: .14em; color: var(--c-deep); margin-bottom: 14px; display: inline-flex; align-items: center; gap: 10px; }
.book-year::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--c); }
.book h3 { font-size: 1.45rem; margin-bottom: .35em; }
.book-meta { color: var(--muted); font-size: .88rem; margin-bottom: 1em; }
.book-desc { color: var(--ink-2); font-size: .96rem; }
.book-for { font-family: var(--display); font-style: italic; font-size: 1rem; color: var(--ink); border-left: 3px solid var(--c); padding-left: 12px; }
.tags { list-style: none; padding: 0; margin: 4px 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding: 5px 11px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.tags li:first-child { background: var(--c-bg); color: var(--c-deep); }
.btn-book { margin-top: auto; background: var(--c-deep); color: #fff; }
.btn-book:hover { filter: brightness(1.12); }
.b2 .btn-book { background: var(--ink); color: var(--c); }

.carousel-dots { display: flex; justify-content: center; gap: 8px; }
.carousel-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; transition: background .2s ease, width .2s ease; }
.carousel-dots button[aria-current="true"] { width: 28px; border-radius: 5px; background: var(--c, var(--ink)); }

/* ---------- Além dos livros ---------- */
.more { padding-top: 0; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.more-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(26px, 3.4vw, 36px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.more-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.more-card.is-dark { background: var(--dark); border-color: var(--dark); color: #e9e3d6; }
.more-card.is-dark h3 { color: #fff; }
.more-card.is-dark p { color: var(--muted-dark); }
.more-card.is-dark .more-n, .more-card.is-dark .more-go { color: #e9a36d; }
.more-n { font: 600 clamp(2.4rem, 4.4vw, 3.2rem)/1 var(--display); color: var(--accent); margin-bottom: 14px; }
.more-card h3 { font-size: 1.4rem; }
.more-card p { color: var(--ink-2); font-size: .96rem; }
.more-go { margin-top: auto; font-weight: 600; color: var(--accent); }

/* ---------- Sobre o autor ---------- */
.author { display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: center; }
.author-photo img { border-radius: var(--radius); box-shadow: var(--shadow); }
.author-copy p:not(.eyebrow) { color: var(--ink-2); }
.author-copy .btn { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .shelf-book, .book-cover picture, .book { transition: none; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .shelf { min-height: 0; max-width: 520px; margin: 0 auto; width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .more-grid { grid-template-columns: 1fr; }
  .author { grid-template-columns: 1fr; gap: 32px; }
  .author-photo { max-width: 320px; }
}

@media (max-width: 640px) {
  .hero-cta .btn { flex: 1 1 auto; }
  .carousel-nav { display: none; }
}

/* ---------- Palestras e consultoria ---------- */
.talks { padding-top: 0; }
.talks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; padding: clamp(32px, 5vw, 56px); border-radius: var(--radius); background: var(--paper-2); }
.talks-lead { color: var(--ink-2); font-size: 1.05rem; }
.talks-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.talks-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.talks-topics li { display: grid; gap: 4px; padding: 16px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.talks-topics b { font: 600 1.08rem/1.3 var(--display); }
.talks-topics span { color: var(--ink-2); font-size: .94rem; }
.cite-btn { margin-top: 12px; font-size: .9rem; color: var(--c-deep); }
@media (max-width: 900px) { .talks-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Reconhecimento acadêmico ---------- */
.recog { padding-top: 0; }
.recog-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.recog-grid li { display: grid; gap: 2px; align-content: start; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.recog-grid b { font: 600 clamp(2rem, 3.4vw, 2.6rem)/1.1 var(--display); color: var(--accent); }
.recog-grid span { font-weight: 600; color: var(--ink-2); font-size: .95rem; }
.recog-grid small { color: var(--muted); font-size: .84rem; margin-top: 6px; }
.recog-grid small a { color: inherit; }
.recog-note { margin: 20px 0 0; color: var(--muted); font-size: .94rem; max-width: 62em; }
.recog-more { margin: 14px 0 0; font-weight: 600; }
.recog-more a { text-decoration: none; }
.recog-more a:hover { text-decoration: underline; }
@media (max-width: 900px) { .recog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .recog-grid li { padding: 18px; } }
