/* ==========================================================================
   BASE — reset, tipografia e utilitários
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) - 8px);
  -webkit-text-size-adjust: 100%;
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Entradas laterais em 3D começam fora da tela: não podem criar rolagem horizontal */
main { overflow-x: clip; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
p, figure, blockquote { margin: 0; }

/* Hierarquia tipográfica ------------------------------------------------- */
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; color: inherit; }

h1 {
  font-size: clamp(2.5rem, 1.4rem + 4.6vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
h2 {
  font-size: clamp(2rem, 1.2rem + 2.8vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
h3 {
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 600;
}

.eyebrow {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.eyebrow--light { color: var(--gold-soft); }

.ph-text {
  padding: 0.05em 0.35em;
  border-radius: 2px;
  background: rgba(179, 146, 98, 0.16);
  box-shadow: inset 0 -1px 0 rgba(126, 99, 56, 0.4);
  color: inherit;
}

/* Layout ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--ivory { background: var(--ivory); }
.section--cream { background: var(--cream); }
.section--wood {
  background: var(--grain-dark), var(--wood-800);
  color: var(--on-dark);
}

.section-head { max-width: 40rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section-head__lead { margin-top: 1.25rem; color: var(--ink-soft); }
.section-head--light .section-head__lead { color: var(--on-dark-soft); }
.section-head h2::after {
  content: '';
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: 1.5rem auto 0;
  background: var(--gold);
}

.section-cta { margin-top: clamp(2rem, 4vw, 3rem); text-align: center; }

/* Acessibilidade ---------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--ivory);
  color: var(--wood-800);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

.show-md { display: none; }
@media (max-width: 1079px) {
  .hide-md { display: none; }
  .show-md { display: inline; }
}

/* Animações de entrada (sutis) ------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal--left { transform: translateX(-32px); }
.js .reveal--right { transform: translateX(32px); }
.js .reveal--zoom { transform: scale(0.9); }
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Depois da entrada, hover sem atraso (classe posta em js/main.js) */
.js .reveal.is-done {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), box-shadow 0.6s var(--ease), border-color 0.6s var(--ease);
  transition-delay: 0s;
}

/* Linha dourada dos títulos cresce do centro quando a seção aparece */
.js .section-head.reveal h2::after { transform: scaleX(0); transition: transform 1.2s var(--ease) 0.35s; }
.js .section-head.reveal.is-visible h2::after { transform: scaleX(1); }

@keyframes enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  :root:root { --intro: 0s; }
  .js .intro { display: none; }
}

/* Placeholders longos que quebram linha mantêm o destaque em cada linha */
.ph-text { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* Em números e títulos, os colchetes já sinalizam o placeholder */
.stat__value .ph-text, .card__title .ph-text { background: none; box-shadow: none; padding: 0; }
