/* ============================================================
   BASE · reset, tipografia, layout, utilitários
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, picture { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--ink-warm);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }

p { text-wrap: pretty; }

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  color: var(--ink-warm);
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--sage-700);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1.5px;
  background: var(--gold-500);
  display: inline-block;
}
.eyebrow.center::after {
  content: "";
  width: 28px; height: 1.5px;
  background: var(--gold-500);
  display: inline-block;
}

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--ink-soft);
  font-weight: 400;
}
.muted { color: var(--ink-muted); }
.serif { font-family: var(--font-display); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { width: 100%; max-width: var(--maxw-wide); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-text { width: 100%; max-width: var(--maxw-text); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section-sm { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }

.bg-surface { background: var(--surface); }
.bg-alt { background: var(--bg-alt); }
.bg-petrol { background: var(--petrol-700); color: var(--on-dark); }
.bg-petrol-deep { background: var(--petrol-900); color: var(--on-dark); }

.center { text-align: center; }
.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.section-head { max-width: 640px; }
.section-head.center { margin-inline: auto; }
.section-head .eyebrow { margin-bottom: var(--sp-4); }
.section-head p { margin-top: var(--sp-4); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* divisor dourado fino */
.rule-gold { width: 56px; height: 2px; background: var(--gold-500); border: none; }

/* ---------- Placeholder de imagem (até termos fotos reais) ---------- */
.ph {
  position: relative;
  background-color: var(--surface);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(62,119,133,0.07) 0, rgba(62,119,133,0.07) 1px,
      transparent 1px, transparent 11px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--petrol-600);
  min-height: 220px;
}
.ph::after {
  content: attr(data-label);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--petrol-500);
  background: rgba(247,244,239,0.82);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.4rem 0.9rem;
  text-align: center;
  max-width: 80%;
}
.ph.on-dark { background-color: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.14); }
.ph.on-dark::after { background: rgba(17,45,54,0.5); color: var(--on-dark-mut); border-color: rgba(255,255,255,0.18); }

/* Placeholder preenchido com foto real: mantém moldura (borda, raio, recorte e
   dimensões responsivas já calibradas por contexto) e some com padrão/selo. */
.ph.has-img { background-image: none; }
.ph.has-img::after { content: none; }
.ph.has-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Foco acessível ---------- */
:focus-visible {
  outline: 3px solid var(--petrol-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* skip link */
.skip {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--petrol-700); color: var(--on-dark);
  padding: 0.6rem 1.1rem; border-radius: var(--r-pill); z-index: 200;
  transition: top 0.2s var(--ease); font-size: var(--fs-sm); font-weight: 600;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
