/* Samuel Chereghini — site de livros (tema claro) */
:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --tint: #efe9e1;
  --ink: #1c1917;
  --text: #2b2724;
  --muted: #7a716a;
  --line: rgba(28, 25, 23, .1);
  --accent: #6e4848;        /* tom da capa de "Vai piorar" */
  --accent-soft: #f1e6e3;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1160px;
  --book-shadow: 0 1px 2px rgba(28,25,23,.08), 0 18px 40px -12px rgba(28,25,23,.28), 0 40px 80px -30px rgba(28,25,23,.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ---------- Topo ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: 20px 0;
  transition: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(247, 244, 239, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
  padding: 12px 0;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-family: var(--serif); font-size: 21px; color: var(--ink); white-space: nowrap; }
.brand span { color: var(--accent); }
.nav ul { display: flex; gap: 30px; list-style: none; font-size: 14px; font-weight: 500; }
.nav ul a { color: var(--muted); transition: color .2s; }
.nav ul a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 150px 0 110px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -10%; top: -20%; width: 70%; height: 140%;
  background: radial-gradient(closest-side, rgba(110,72,72,.10), transparent);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 70px; align-items: center; position: relative; }
.hero h1 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(52px, 8vw, 112px); line-height: .95;
  letter-spacing: -.03em; margin-bottom: 40px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { color: var(--muted); font-size: 20px; max-width: 470px; margin-bottom: 38px; }
.hero-book { display: block; justify-self: center; width: 100%; max-width: 680px; }
.hero-book img { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(28,25,23,.18)); transition: transform .5s; }
.hero-book:hover img { transform: translateY(-6px); }
.hero-book .cover { transition: transform .5s; }
.hero-book:hover .cover { transform: translateY(-8px); }
.hero-book figcaption { margin-top: 26px; text-align: center; }
.hero-book figcaption small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.hero-book figcaption strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--ink); margin-top: 4px; }

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn-ghost { border: 1px solid rgba(28,25,23,.2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Seções ---------- */
section { padding: 110px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 56px; flex-wrap: wrap; }
.section-head h2, .h2 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(36px, 5vw, 58px); line-height: 1.05; letter-spacing: -.02em;
}
.section-head p { color: var(--muted); max-width: 420px; }

/* ---------- Capa: livro 11 x 18 cm, cantos retos ---------- */
.cover {
  position: relative; aspect-ratio: 11 / 18; border-radius: 0;
  overflow: hidden; background: var(--tint);
  box-shadow: var(--book-shadow);
}
.cover img { width: 100%; height: 100%; object-fit: fill; }
.cover-art {
  position: absolute; inset: 0; padding: 12% 11%;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(170deg, #f3eee7, #e6ddd1);
}
.cover-art .ca-author { font-size: clamp(9px, 1vw, 11px); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.cover-art .ca-title { font-family: var(--serif); font-weight: 400; line-height: 1.05; font-size: clamp(22px, 2.6vw, 32px); color: var(--ink); }
.cover-art .ca-line { height: 1px; background: var(--accent); opacity: .5; }
.cover.soon { box-shadow: none; border: 1px dashed rgba(28,25,23,.22); background: transparent; }
.cover.soon .cover-art { background: transparent; }

/* ---------- Selo da coleção ---------- */
.colecao {
  display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 26px; padding: 8px 16px 9px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink);
}
.colecao span {
  font-family: var(--sans); font-style: normal; font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
}
.book-hero .colecao { display: flex; width: fit-content; }

/* ---------- Grade de livros ---------- */
#livros { background: var(--surface); border-block: 1px solid var(--line); }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 56px 44px; }
.book-card { display: block; }
.book-card .cover { transition: transform .4s, box-shadow .4s; }
.book-card:hover .cover { transform: translateY(-8px); }
.book-card h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--ink); margin-top: 24px; line-height: 1.2; }
.book-card .meta { font-size: 13px; color: var(--accent); margin-top: 6px; font-weight: 500; }
.book-card.is-soon { pointer-events: none; }
.book-card.is-soon .meta { color: var(--muted); }

/* ---------- Sobre ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: center; }
.about-photo { overflow: hidden; aspect-ratio: 4 / 5; border-radius: 4px; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 25%; }
.about p { color: var(--text); margin-top: 20px; max-width: 560px; }

/* ---------- Contato ---------- */
.contact { text-align: center; background: var(--tint); }
.contact .h2 { max-width: 760px; margin: 0 auto 20px; }
.contact p { color: var(--muted); max-width: 520px; margin: 0 auto 32px; }
.contact .btn-row { justify-content: center; }

footer { padding: 34px 0; color: var(--muted); font-size: 14px; background: var(--tint); border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- Página do livro ---------- */
.book-hero { padding: 150px 0 100px; position: relative; overflow: hidden; }
.book-hero::before {
  content: ""; position: absolute; left: -15%; top: -10%; width: 60%; height: 120%;
  background: radial-gradient(closest-side, rgba(110,72,72,.10), transparent);
  pointer-events: none;
}
.book-hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: center; position: relative; }
.book-hero .cover { max-width: 380px; }
.back { display: inline-flex; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 26px; transition: color .2s; }
.back:hover { color: var(--accent); }
.book-hero h1 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: clamp(54px, 8vw, 104px); line-height: .95; letter-spacing: -.03em; margin-bottom: 18px; }
.book-hero .subtitle { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--accent); margin-bottom: 34px; max-width: 520px; }
.facts { display: flex; flex-wrap: wrap; gap: 36px; margin: 0 0 38px; padding: 22px 0; border-block: 1px solid var(--line); }
.facts div { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts strong { display: block; font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 500; margin-top: 4px; }

#sobre-o-livro { background: var(--surface); border-top: 1px solid var(--line); }
.prose { max-width: 720px; }
.prose h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 40px; margin-bottom: 22px; }
.prose p { color: var(--text); margin-bottom: 20px; font-size: 18px; }
.learn { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 44px; }
.learn div { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 26px; }
.learn b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--accent); margin-bottom: 8px; }
.learn span { color: var(--muted); font-size: 16px; }

.excerpt { background: var(--bg); }
.excerpt blockquote {
  font-family: var(--serif); font-style: italic; font-weight: 300; color: var(--ink);
  font-size: clamp(26px, 3.4vw, 42px); line-height: 1.3; max-width: 880px; margin: 0 auto; text-align: center;
}
.excerpt cite { display: block; text-align: center; margin-top: 26px; font-style: normal; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Animação de entrada ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  section { padding: 80px 0; }
  .brand { font-size: 18px; }
  .nav ul { gap: 18px; font-size: 13px; }
  .nav ul li.hide-sm { display: none; }
  .hero { padding: 120px 0 80px; }
  .hero-grid, .about-grid, .book-hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero h1 { font-size: 54px; }
  .hero p { font-size: 18px; }
  .hero-book { max-width: 100%; }
  .book-hero { padding-top: 116px; }
  .book-hero .cover { max-width: 260px; margin-inline: auto; }
  .books { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .book-card h3 { font-size: 19px; }
  .facts { gap: 22px 30px; }
}

.book-card.is-soon .meta { margin-top: 24px; font-size: 15px; }
