/* ============================================================
   Dra. Juliana Borges — Sistema de marca (Brand Book Ed. 01)
   Arquétipo do Sábio · terroso, editorial, silencioso.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --brown-deep: #3D2817;
  --brown-mid:  #8B6F47;
  --gold:       #C9A961;
  --gold-soft:  #D9BE84;
  --beige:      #F5EFE4;
  --beige-deep: #EBE1CE;
  --ink:        #2A1F15;
  --white:      #FFFFFF;

  --rule:      rgba(61, 40, 23, 0.16);
  --rule-soft: rgba(61, 40, 23, 0.08);
  --rule-lite: rgba(245, 239, 228, 0.16);

  --serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --wrap: 1160px;
  --gut: clamp(20px, 5vw, 56px);

  --step--1: clamp(11.5px, 0.72vw + 9.6px, 13px);
  --step-0:  clamp(15px, 0.35vw + 14px, 17px);
  --step-1:  clamp(18px, 0.6vw + 16.4px, 22px);
  --step-2:  clamp(23px, 1.3vw + 19.5px, 32px);
  --step-3:  clamp(28px, 2.4vw + 21.5px, 46px);
  --step-4:  clamp(34px, 4.2vw + 22px, 68px);
  --step-5:  clamp(40px, 6.2vw + 22px, 92px);

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--beige);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--brown-deep); }

/* Grão de papel — o luxo vem do papel, não da tinta. */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 900;
  opacity: 0.045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24  0 0 0 0 0.16  0 0 0 0 0.09  0 0 0 0 0.85 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- 3. Layout ---------- */
.wrap { width: min(100% - (var(--gut) * 2), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - (var(--gut) * 2), 780px); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 116px); position: relative; }
.section--tight { padding-block: clamp(40px, 5.5vw, 76px); }
.section--dark { background: var(--brown-deep); color: var(--beige); }
.section--mid { background: var(--brown-mid); color: var(--beige); }
.section--paper { background: var(--white); }
.section--deepbeige { background: var(--beige-deep); }
.section--dark h2, .section--dark h3, .section--dark h4, .section--mid h2, .section--mid h3 { color: var(--beige); }

.grid { display: grid; gap: clamp(20px, 3vw, 40px); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-57 { grid-template-columns: 5fr 7fr; }
.g-75 { grid-template-columns: 7fr 5fr; }
.g-48 { grid-template-columns: 4fr 8fr; }

/* ---------- 4. Tipografia ---------- */
.serif { font-family: var(--serif); }
.it { font-style: italic; font-weight: 500; }
.gold { color: var(--gold); }
.mid  { color: var(--brown-mid); }
.deep { color: var(--brown-deep); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--brown-mid);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--gold); flex: none; }
.section--dark .eyebrow, .section--mid .eyebrow { color: var(--gold); }
.section--dark .eyebrow::before, .section--mid .eyebrow::before { background: var(--gold); }

.h-display { font-family: var(--serif); font-size: var(--step-5); line-height: 0.98; letter-spacing: -0.028em; color: var(--brown-deep); font-weight: 700; }
.h-1 { font-family: var(--serif); font-size: var(--step-4); line-height: 1.02; letter-spacing: -0.024em; color: var(--brown-deep); }
.h-2 { font-family: var(--serif); font-size: var(--step-3); line-height: 1.06; letter-spacing: -0.018em; color: var(--brown-deep); }
.h-3 { font-family: var(--serif); font-size: var(--step-2); line-height: 1.12; letter-spacing: -0.014em; color: var(--brown-deep); }
.h-4 { font-family: var(--serif); font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.01em; color: var(--brown-deep); }
.h-1 em, .h-2 em, .h-3 em, .h-4 em, .h-display em { font-style: italic; font-weight: 500; color: var(--brown-mid); }
.section--dark .h-1 em, .section--dark .h-2 em, .section--dark .h-display em,
.section--mid .h-2 em { color: var(--gold); }

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--brown-mid); font-family: var(--serif); font-weight: 400; max-width: 60ch; }
.body { font-size: var(--step-0); line-height: 1.68; color: var(--ink); max-width: 62ch; }
.body em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--brown-deep); }
.section--dark .body, .section--mid .body { color: rgba(245,239,228,0.82); }
.section--dark .body em, .section--mid .body em { color: var(--gold-soft); }
.small { font-size: var(--step--1); line-height: 1.55; color: var(--brown-mid); }

.label {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--brown-mid);
}
.num-it { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--gold); line-height: 1; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- 5. Filetes e ornamentos ---------- */
.rule-gold { height: 1px; background: var(--gold); width: 80px; margin: 18px 0 26px; transform-origin: left; }
.rule-full { height: 1px; background: var(--rule); width: 100%; }
.rule-dot { height: 1px; width: 100%; background: repeating-linear-gradient(90deg, var(--gold) 0 4px, transparent 4px 10px); opacity: .8; }
.section--dark .rule-full { background: var(--rule-lite); }

/* ---------- 6. Botões ---------- */
.btn {
  --btn-bg: var(--gold);
  --btn-fg: var(--brown-deep);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 12px; padding: 19px 30px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; text-align: center;
  border: 1px solid var(--btn-bg); cursor: pointer;
  overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease), border-color .45s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--brown-deep);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.btn:hover { color: var(--gold); border-color: var(--brown-deep); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn .arrow { transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:focus-visible { outline: 2px solid var(--brown-deep); outline-offset: 3px; }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--brown-deep); border-color: var(--brown-deep); }
.btn--ghost::before { background: var(--brown-deep); }
.btn--ghost:hover { color: var(--beige); }
.section--dark .btn--ghost { --btn-fg: var(--beige); border-color: var(--gold); }
.section--dark .btn--ghost::before { background: var(--gold); }
.section--dark .btn--ghost:hover { color: var(--brown-deep); }
.btn--wide { width: 100%; }

.micro {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin-top: 16px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brown-mid);
}
.micro span { display: inline-flex; align-items: center; gap: 8px; }
.micro span::before { content: ""; width: 4px; height: 4px; background: var(--gold); border-radius: 50%; flex: none; }
.section--dark .micro { color: rgba(245,239,228,0.62); }

/* ---------- 7. Cartões e listas ---------- */
.card {
  background: var(--white); border: 1px solid var(--rule);
  padding: clamp(22px, 2.6vw, 32px);
}
.card--flat { background: transparent; border: none; border-top: 1px solid var(--rule); padding: 24px 0 0; }
.card--gold-top { border-top: 2px solid var(--gold); }
.section--dark .card { background: rgba(245,239,228,0.04); border-color: var(--rule-lite); }

.list-check li,
.list-x li {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px;
  padding: 11px 0; border-bottom: 1px dotted var(--rule-soft);
  font-size: var(--step-0); line-height: 1.45;
}
.list-check li::before { content: "✓"; color: var(--gold); font-family: var(--serif); }
.list-x li::before { content: "×"; color: var(--brown-mid); font-family: var(--serif); font-size: 1.15em; line-height: 1.2; }
.list-x li { color: var(--brown-mid); font-style: italic; }
.section--dark .list-check li { border-bottom-color: var(--rule-lite); }

/* ---------- 8. Nota de escopo ---------- */
.scope {
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 20px;
  font-size: var(--step--1); line-height: 1.6; color: var(--brown-mid);
  max-width: 72ch;
}
.scope strong { color: var(--brown-deep); font-weight: 600; }
.section--dark .scope { color: rgba(245,239,228,0.7); }
.section--dark .scope strong { color: var(--gold-soft); }

/* ---------- 9. FAQ ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: var(--step-1); line-height: 1.3;
  color: var(--brown-deep); font-weight: 500;
  transition: color .3s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brown-mid); }
.faq summary .sign {
  flex: none; width: 16px; height: 16px; position: relative; margin-top: 6px;
}
.faq summary .sign::before,
.faq summary .sign::after {
  content: ""; position: absolute; background: var(--gold);
  transition: transform .4s var(--ease);
}
.faq summary .sign::before { inset: 50% 0 auto 0; height: 1px; }
.faq summary .sign::after  { inset: 0 50% 0 auto; width: 1px; }
.faq details[open] summary .sign::after { transform: scaleY(0); }
.faq .answer { padding: 0 0 24px; max-width: 68ch; font-size: var(--step-0); line-height: 1.65; color: var(--ink); }
.faq .answer p + p { margin-top: 0.8em; }

/* ---------- 10. Rodapé ---------- */
.foot { background: var(--brown-deep); color: rgba(245,239,228,0.66); padding-block: clamp(44px, 6vw, 72px); font-size: var(--step--1); }
.foot a { border-bottom: 1px solid rgba(201,169,97,.4); }
.foot a:hover { color: var(--gold); }
.foot .brandmark { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--beige); letter-spacing: -0.02em; }
.foot .fnav { display: flex; flex-wrap: wrap; gap: 10px 26px; letter-spacing: .14em; text-transform: uppercase; font-size: 10px; }

/* ---------- 11. Barra fixa de conversão ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 800;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  padding: 12px clamp(16px, 4vw, 34px);
  background: rgba(61, 40, 23, 0.97);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid rgba(201,169,97,0.35);
  transform: translateY(110%);
  transition: transform .5s var(--ease);
}
.sticky-cta.is-on { transform: translateY(0); }
.sticky-cta .txt { color: var(--beige); font-family: var(--serif); font-size: 15px; line-height: 1.25; }
.sticky-cta .txt b { display: block; font-family: var(--sans); font-size: 9px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.sticky-cta .btn { padding: 14px 22px; font-size: 10px; }
@media (max-width: 640px) {
  .sticky-cta { grid-template-columns: 1fr; gap: 10px; }
  .sticky-cta .txt { font-size: 13px; }
  .sticky-cta .txt b { margin-bottom: 2px; }
}

/* ---------- 12. Marcador de conteúdo pendente ----------------
   Dois níveis: o texto corrido só recebe realce (nunca é coberto);
   os blocos grandes recebem também a etiqueta de canto.
------------------------------------------------------------- */
[data-placeholder] {
  position: relative;
  outline: 1px dashed rgba(139, 111, 71, .55);
  outline-offset: 3px;
  background: rgba(201, 169, 97, .12);
}
[data-placeholder="badge"]::after {
  content: "substituir por conteúdo real";
  position: absolute; top: 0; right: 0;
  font-family: var(--sans); font-size: 7.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--brown-deep); background: var(--gold-soft);
  padding: 3px 7px; z-index: 2;
}

/* ---------- 13. Movimento ---------- */
/* Só esconde se o JS estiver ativo — sem JS, tudo aparece. */
.js [data-reveal] { opacity: 0; transform: translateY(22px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity .85s var(--ease), transform .85s var(--ease);
  transition-delay: var(--d, 0ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes drawx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.anim-rise { animation: rise .95s var(--ease) both; animation-delay: var(--d, 0ms); }
.anim-draw { animation: drawx 1s var(--ease) both; animation-delay: var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 14. Responsivo base ---------- */
@media (max-width: 900px) {
  .g-3, .g-4, .g-57, .g-75, .g-48 { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .g-2, .g-4 { grid-template-columns: 1fr; }
  /* Rótulos longos de CTA respiram melhor em tela estreita */
  .btn { padding: 17px 20px; font-size: 10.5px; letter-spacing: .14em; }
  .micro { font-size: 9.5px; letter-spacing: .14em; gap: 6px 14px; }
  .faq summary { font-size: var(--step-0); gap: 16px; }
}
