/* ==========================================================
   base.css — reset, tipografia base, container, superfícies, revelação
   ========================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--gold-line) var(--linen);
  interpolate-size: allow-keywords;   /* permite animar até height:auto (FAQ) */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
}

::selection { background: var(--accent-light); color: var(--espresso); }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, picture { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
summary { cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.surface--dark :focus-visible { outline-color: var(--accent-light); }

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

.icon { width: 1em; height: 1em; flex: none; display: inline-block; }

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -80px; z-index: 100;
  padding: 12px 20px; background: var(--espresso); color: var(--ivory);
}
.skip-link:focus { top: 12px; }

.section { padding-block: var(--section-pad); }

/* ---------- Tipografia ---------- */
.h2 {
  font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h2);
  line-height: 1.06; letter-spacing: -0.015em; text-wrap: balance;
}
.h3 {
  font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3);
  line-height: 1.15; letter-spacing: -0.01em;
}
.lead { max-width: 52ch; font-size: var(--fs-lead); line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.surface--dark .lead { color: var(--text-on-dark-muted); }

.label { font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--ls-label); text-transform: uppercase; }

/* Cabeçalho de seção: título + uma linha de apoio */
.section-head { display: grid; gap: var(--space-4); margin-bottom: var(--space-7); }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; gap: var(--space-7); margin-bottom: var(--space-8); }
  .section-head .lead { justify-self: end; }
}

/* ---------- Superfícies (backgrounds) ----------
   Granulado sem mix-blend-mode: mescla em camadas do tamanho da seção
   obriga o navegador a recompor tudo que se anima por baixo. */
.surface { position: relative; isolation: isolate; }
.surface::before,
.surface::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.surface--ivory { background: linear-gradient(180deg, #f8f4ee 0%, #f4eee5 100%); }
.surface--ivory::after { background-image: var(--noise-dark); opacity: 0.04; }

.surface--linen { background: linear-gradient(180deg, #f1eadf 0%, #ebe2d5 100%); }
.surface--linen::after { background-image: var(--noise-dark); opacity: 0.05; }

.surface--dark { background: var(--espresso); color: var(--text-on-dark); }
.surface--dark::before {
  background:
    radial-gradient(70% 90% at 8% 0%, rgba(180, 140, 87, 0.2), transparent 62%),
    radial-gradient(55% 70% at 100% 100%, rgba(180, 140, 87, 0.1), transparent 65%);
}
.surface--dark::after { background-image: var(--noise-white); opacity: 0.035; }

.watermark {
  position: absolute; z-index: -1; pointer-events: none;
  aspect-ratio: 373 / 330;
  background: url("../assets/img/logo-monograma.png") center / contain no-repeat;
  opacity: 0.07;
}

/* Movimento reduzido: as fotos só aparecem, sem deslocamento */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal="image"] img { opacity: 0; transition: opacity 0.4s linear; }
  .js [data-reveal="image"].is-visible img { opacity: 1; }
}

/* ---------- Revelação ao rolar ----------
   Só esconde com JS ativo (.js no <html>) e movimento permitido. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(16px);
    transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  /* Fotos: a imagem assenta de 108% para 100% enquanto surge.
     Só transform e opacity: a GPU anima sem recalcular layout nem repintar. */
  .js [data-reveal="image"] { opacity: 1; transform: none; }
  .js [data-reveal="image"] picture { overflow: hidden; }
  .js [data-reveal="image"] img {
    opacity: 0; transform: scale(1.08);
    transition: opacity 0.9s var(--ease-photo), transform 1.6s var(--ease-photo);
    transition-delay: var(--d, 0ms);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
  .js [data-reveal="image"].is-visible img { opacity: 1; transform: none; }
}
