/* ==========================================================================
   Veltapress — styles.css
   Vitrine de e-books · Ramos Digital Ltd
   ========================================================================== */

/* Fontes próprias (SIL OFL 1.1 — licenças em /fonts) — nada carregado de terceiros */
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/fraunces-latin-opsz-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces'; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url('/fonts/fraunces-latin-opsz-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
}

:root {
  --ink:        #14181f;
  --ink-soft:   #5b6573;
  --ink-faint:  #8a929e;
  --paper:      #ffffff;
  --cream:      #f7f2ea;   /* papel quente — seções alternadas */
  --line:       #e8e1d5;
  --deep:       #15202c;   /* tinta azul-marinho — seções escuras */
  --deep-2:     #213041;

  /* AÇÃO — todo CTA usa esta cor, e nada mais.
     Âmbar de encadernação; texto --ink por cima dá ~8:1. */
  --action:      #d6a23e;
  --action-dark: #a77a20;   /* hover e destaque sobre branco (~4,6:1) */
  --action-soft: #fbf4e3;

  --w-read: 720px;
  --w-wide: 1180px;
  --r:      12px;
  --r-lg:   20px;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --shadow-soft: 0 1px 2px rgba(20,24,31,.04), 0 8px 24px -12px rgba(20,24,31,.18);
  --shadow-lift: 0 2px 4px rgba(20,24,31,.06), 0 22px 48px -22px rgba(20,24,31,.42);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.35rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.005em; }
p  { margin: 0 0 18px; }

a { color: var(--action-dark); }

::selection { background: var(--action); color: var(--ink); }
:focus-visible { outline: 3px solid var(--action-dark); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: 12px 18px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.wrap      { width: 100%; max-width: var(--w-read); margin: 0 auto; padding: 0 22px; }
.wrap--wide{ max-width: var(--w-wide); }

/* ---------- Faixa de aviso ---------- */
.topbar {
  background: var(--deep); color: #d9dee5;
  text-align: center; padding: 10px 20px; font-size: 0.86rem; letter-spacing: .01em;
}
.topbar strong { color: var(--action); font-weight: 600; }

/* ---------- Navegação ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__in {
  max-width: var(--w-wide); margin: 0 auto; padding: 0 22px;
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 1.36rem; font-weight: 600;
  letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
}
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.94rem; font-weight: 500;
  transition: color .15s;
}
.nav__links a:hover { color: var(--ink); }
@media (max-width: 820px) { .nav__links { display: none; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 0.98rem; letter-spacing: .005em;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background .18s, color .18s, transform .18s, box-shadow .18s;
}
.btn--primary {
  background: var(--action); color: var(--ink);
  box-shadow: 0 8px 22px -10px rgba(214,162,62,.85);
}
.btn--primary:hover { background: var(--action-dark); color: #fff; transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--small { padding: 10px 18px; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* ---------- Herói ---------- */
.hero { padding: 64px 0 76px; overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.02fr 1fr; gap: 64px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--action-dark); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--action-dark); }
.hero .lede { font-size: 1.14rem; color: var(--ink-soft); max-width: 520px; margin-bottom: 30px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__note { display: block; margin-top: 14px; font-size: 0.86rem; color: var(--ink-faint); }
@media (max-width: 420px) {
  .hero .eyebrow { font-size: 0.7rem; letter-spacing: .1em; }
  .hero .eyebrow::before { display: none; }
}

.hero__visual { position: relative; }
.hero__photo {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lift);
  aspect-ratio: 4 / 3;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 80% 50%; }

/* pilha de capas em leque, sobre o canto da foto */
.fan {
  position: absolute; left: -42px; bottom: -34px;
  display: flex; align-items: flex-end;
}
.fan .cover { width: 118px; box-shadow: var(--shadow-lift); }
.fan .cover + .cover { margin-left: -10px; }
.fan .cover:nth-child(1) { transform: rotate(-6deg) translateY(8px); }
.fan .cover:nth-child(2) { transform: translateY(-10px); z-index: 2; }
.fan .cover:nth-child(3) { transform: rotate(6deg) translateY(8px); }

@media (max-width: 920px) {
  .hero { padding: 40px 0 64px; }
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .fan { left: 12px; bottom: -28px; }
  .fan .cover { width: 86px; }
  .fan .cover + .cover { margin-left: -8px; }
}

/* ---------- Faixa de garantias ---------- */
.trust { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust__in {
  max-width: var(--w-wide); margin: 0 auto; padding: 22px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.trust__item { display: flex; align-items: center; gap: 12px; font-size: 0.92rem; color: var(--ink); font-weight: 500; }
.trust__icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--paper); display: grid; place-items: center; color: var(--action-dark);
  box-shadow: 0 0 0 1px var(--line);
}
@media (max-width: 860px) { .trust__in { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) {
  .trust__in { gap: 16px 12px; padding: 20px 16px; }
  .trust__item { font-size: 0.84rem; gap: 10px; line-height: 1.35; }
  .trust__icon { width: 32px; height: 32px; }
}

/* ---------- Seções ---------- */
section { padding: 92px 0; }
.section--cream { background: var(--cream); }
.section-head { max-width: 640px; margin: 0 0 52px; }
.section-head--center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head--center .eyebrow { justify-content: center; }
.section-head p { color: var(--ink-soft); font-size: 1.06rem; }

/* ---------- Por que existem ---------- */
.pillars { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pillar {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 32px 28px; transition: box-shadow .2s, transform .2s;
}
.pillar:hover { box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.pillar__icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 20px;
  display: grid; place-items: center; background: var(--action-soft); color: var(--action-dark);
}
.pillar h3 { margin-bottom: 10px; }
.pillar p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Quem publica ---------- */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.split__photo { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lift); aspect-ratio: 5 / 4; }
.split__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.split p { color: var(--ink-soft); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.fact { border-top: 2px solid var(--action); padding-top: 12px; }
.fact b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--ink); line-height: 1.1; }
.fact span { font-size: 0.84rem; color: var(--ink-soft); }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Capa de livro (foto + título por CSS) ---------- */
.cover {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: 3px 9px 9px 3px;
  background: var(--deep);
  container-type: inline-size;
  isolation: isolate;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
/* lombada: luz e sombra na borda esquerda, como um livro de verdade */
.cover::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; z-index: 2;
  background: linear-gradient(90deg, rgba(0,0,0,.34), rgba(255,255,255,.12) 45%, rgba(0,0,0,.08));
}
/* véu no topo para garantir leitura do título */
.cover::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 58%; z-index: 1;
  background: linear-gradient(to bottom, rgba(8,12,18,.42), rgba(8,12,18,0));
}
.cover__head {
  position: absolute; z-index: 3; top: 9%; left: 13%; right: 9%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 5cqw;
}
.cover__mark {
  font-family: var(--sans); font-weight: 600; font-size: 0.6rem; font-size: 3.7cqw;
  letter-spacing: .3em; text-transform: uppercase; line-height: 1;
  color: rgba(255,255,255,.8);
}
.cover__title {
  font-family: var(--display); font-weight: 600; font-size: 1.4rem; font-size: 12.5cqw;
  line-height: 1.02; letter-spacing: -0.012em; color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.cover__rule { width: 16cqw; height: 2px; background: var(--action); }
/* capa de fundo claro: título em tinta */
.cover[data-tone="light"]::after { background: linear-gradient(to bottom, rgba(255,255,255,.28), rgba(255,255,255,0)); }
.cover[data-tone="light"] .cover__title { color: var(--ink); text-shadow: none; }
.cover[data-tone="light"] .cover__mark  { color: rgba(20,24,31,.7); }
.cover[data-tone="light"] .cover__rule  { background: var(--action-dark); }

/* ---------- Catálogo ---------- */
.shelf { display: grid; gap: 34px 26px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1060px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; } }
@media (max-width: 340px)  { .shelf { grid-template-columns: minmax(0, 1fr); } }

.book { display: flex; flex-direction: column; }
.book .cover {
  box-shadow: 0 1px 2px rgba(20,24,31,.08), 0 18px 34px -20px rgba(20,24,31,.55);
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s;
  margin-bottom: 20px;
}
.book:hover .cover {
  transform: translateY(-6px) rotate(-1.2deg);
  box-shadow: 0 2px 4px rgba(20,24,31,.1), 0 30px 46px -22px rgba(20,24,31,.6);
}
.book__tag {
  font-size: 0.72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--action-dark); margin-bottom: 6px;
}
.book__title { font-size: 1.16rem; margin-bottom: 8px; }
.book__desc  { font-size: 0.93rem; color: var(--ink-soft); margin-bottom: 16px; flex: 1; }
.book__foot  { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.book__price { font-family: var(--display); font-size: 1.32rem; font-weight: 600; }
.book__price small { font-family: var(--sans); font-size: .72rem; font-weight: 500; color: var(--ink-faint); margin-left: 3px; }

/* ---------- Como chega ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 25px; left: 8%; right: 8%;
  border-top: 1.5px dashed var(--line); z-index: 0;
}
.step { position: relative; z-index: 1; text-align: center; padding: 0 10px; }
.step__n {
  width: 52px; height: 52px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); color: var(--ink);
  font-family: var(--display); font-size: 1.3rem; font-weight: 600;
  box-shadow: 0 0 0 1.5px var(--action), 0 0 0 7px var(--paper);
}
.section--cream .step__n { box-shadow: 0 0 0 1.5px var(--action), 0 0 0 7px var(--cream); }
.step h3 { margin-bottom: 8px; }
.step p  { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .steps::before { display: none; }
}

/* ---------- Lista de espera ---------- */
.waitlist {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(214,162,62,.16), transparent 55%),
    var(--deep);
  color: #d9dee5; text-align: center;
}
.waitlist h2 { color: #fff; }
.waitlist .eyebrow { color: var(--action); justify-content: center; }
.waitlist p { color: #a9b4c2; max-width: 560px; margin-left: auto; margin-right: auto; }
.form {
  display: flex; gap: 10px; flex-wrap: wrap;
  max-width: 520px; margin: 32px auto 0;
  background: rgba(255,255,255,.06); padding: 8px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}
.form input[type="email"] {
  flex: 1 1 220px; min-width: 0; padding: 14px 20px; font-size: 1rem; font-family: var(--sans);
  border: 0; border-radius: 999px; background: transparent; color: #fff;
}
.form input[type="email"]::placeholder { color: #8090a3; }
.form input[type="email"]:focus { outline: none; }
.form:focus-within { box-shadow: inset 0 0 0 1.5px var(--action); }
.form__note { font-size: 0.84rem; color: #8090a3 !important; margin-top: 18px; }
@media (max-width: 500px) {
  .form { border-radius: var(--r-lg); }
  .form .btn { width: 100%; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--line); }
.faq__item summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 24px 48px 24px 0;
  font-family: var(--display); font-size: 1.14rem; font-weight: 600;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line);
  background:
    linear-gradient(var(--action-dark), var(--action-dark)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--action-dark), var(--action-dark)) center / 1.5px 10px no-repeat;
  transition: transform .2s;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 0 24px; color: var(--ink-soft); margin: 0; }

/* ---------- Rodapé ---------- */
.foot { background: var(--deep); color: #a9b4c2; font-size: 0.9rem; }
.foot__top {
  max-width: var(--w-wide); margin: 0 auto; padding: 64px 22px 40px;
  display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 40px;
}
.foot .brand { color: #fff; margin-bottom: 14px; }
.foot__blurb { max-width: 300px; color: #8f9cad; margin: 0; }
.foot h4 {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: #fff; margin-bottom: 16px;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 10px; }
.foot a { color: #d4dae2; text-decoration: none; }
.foot a:hover { color: var(--action); }
.foot address { font-style: normal; line-height: 1.75; }
.foot__legal {
  width: calc(100% - 44px); max-width: calc(var(--w-wide) - 44px); margin: 0 auto; padding: 26px 0 40px;
  border-top: 1px solid var(--deep-2);
  font-size: 0.8rem; color: #7d8a9b; line-height: 1.75;
}
.foot__legal p { margin: 0 0 8px; }
@media (max-width: 760px) { .foot__top { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Páginas de documento ---------- */
.doc { max-width: var(--w-read); margin: 0 auto; padding: 56px 22px 84px; }
.doc__back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 30px; font-size: 0.92rem; text-decoration: none; font-weight: 500; }
.doc h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); }
.doc__date { color: var(--ink-faint); font-size: 0.9rem; margin-bottom: 36px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.doc h2 { font-size: 1.32rem; margin-top: 40px; }
.doc p, .doc li { color: #3b4350; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 9px; }
