/* ============================================================
   LANGUAGE ATELIER — Base (reset · tipografia · utilitários)
   ============================================================ */

/* ---------- RESET MODERNO ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem); /* compensa o header fixo nas âncoras */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-tight);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* trava qualquer estouro horizontal acidental */
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}
img { font-style: italic; color: var(--text-soft); } /* alt visível se a img falhar */

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: var(--c-navy); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--c-rose-gold); }

/* ---------- TIPOGRAFIA ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--c-navy);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.04; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-xl); line-height: var(--lh-snug); }

p { max-width: 68ch; }
p + p { margin-top: var(--sp-4); }

strong, b { font-weight: var(--fw-semi); }
em, i { font-style: italic; }

::selection { background: var(--c-champagne-24); color: var(--c-midnight); }

/* ---------- FOCO VISÍVEL (acessibilidade) ---------- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- LAYOUT / CONTAINERS ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }
.container--text { max-width: var(--container-text); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 1.8rem + 3vw, 4.5rem); }
.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--c-ivory); }
.section--marble { background: var(--bg-alt); }

/* ---------- ELEMENTOS DE MARCA ---------- */
/* Eyebrow — rótulo caixa alta com tracking generoso (Tomo VI) */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--c-champagne);
  margin-bottom: var(--sp-4);
}
.section--dark .eyebrow { color: var(--c-rose-light); }

/* Fio champagne — divisor do sistema gráfico */
.rule-gold {
  width: 56px;
  height: 1px;
  border: 0;
  background: var(--c-champagne);
  margin: var(--sp-5) 0;
}
.rule-gold--center { margin-inline: auto; }

/* Assinatura em script (Allura) — apenas detalhes */
.signature { font-family: var(--font-script); font-size: var(--fs-h3); color: var(--c-rose-gold); line-height: 1; }

/* Número/algarismo de destaque (Playfair) */
.numeral { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--c-champagne); }

.lead { font-size: var(--fs-lg); line-height: var(--lh-relaxed); color: var(--text); max-width: 60ch; }
.muted { color: var(--text-soft); }

/* ---------- UTILITÁRIOS ---------- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.flow > * + * { margin-top: var(--sp-4); }
.flow-lg > * + * { margin-top: var(--sp-6); }
.no-wrap { white-space: nowrap; }
.full-bleed { width: 100vw; margin-inline: calc(50% - 50vw); }

/* Acessibilidade: conteúdo só para leitor de tela */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--sp-4); top: -100px;
  z-index: var(--z-toast);
  background: var(--c-navy); color: var(--c-ivory);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-4); color: var(--c-ivory); }

/* Reveal on scroll (progressivo — só anima se JS marcar) */
[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- PLACEHOLDERS (conteúdo a preencher) ----------
   Marcadores visíveis para Mateus localizar o que falta.
   Remova as classes .ph-text / .ph-note ao publicar. */
.ph-text {
  background: linear-gradient(transparent 88%, var(--c-champagne-24) 0);
  border-bottom: 1px dashed var(--c-champagne);
  font-style: italic;
}
.ph-note {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem; font-weight: var(--fw-semi);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--c-rose); background: var(--c-champagne-12);
  border: 1px dashed var(--c-rose-gold-30);
  padding: 2px 8px; border-radius: var(--r-sm);
  vertical-align: middle;
}

/* Marca d'água M (selo a 6% — Tomo VI · 05) */
.watermark-m {
  position: absolute;
  inset: auto -4% -12% auto;
  width: clamp(180px, 28vw, 420px);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}
