/* ==========================================================================
   BASE — tokens, reset, tipografia, botões e utilitários
   ========================================================================== */

:root {
  /* Paleta: tons quentes + escarlate (alusão ao nome) */
  --ink: #1b1714;
  --ink-soft: #3a322d;
  --muted: #6e645c;
  --cream: #f8f3ec;
  --sand: #eee4d7;
  --sand-deep: #e1d3c1;
  --scarlet: #b42a1f;
  --scarlet-dark: #8e1e16;
  --scarlet-soft: #f3d9d4;
  --white: #fffdfa;

  /* Tipografia */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --radius: 20px;
  --radius-lg: 32px;
  --sheet-r: clamp(28px, 5vw, 64px); /* curvatura entre seções */
  --header-h: 76px;

  --shadow-soft: 0 24px 60px -28px rgba(27, 23, 20, 0.35);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

em { font-style: italic; color: var(--scarlet); }

:focus-visible {
  outline: 3px solid var(--scarlet);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--cream);
  border-radius: 10px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Utilitários ---------- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-top: var(--section-y);
  /* espaço extra: a próxima seção sobe por cima desta */
  padding-bottom: calc(var(--section-y) + var(--sheet-r));
}

/* Seção "em camadas": desliza sobre a anterior com topo arredondado.
   Deve vir antes dos modificadores de cor (que sobrescrevem o fundo). */
.sheet {
  position: relative;
  margin-top: calc(var(--sheet-r) * -1);
  background-color: var(--cream);
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
}

.section--dark { background: var(--ink); color: var(--cream); }
.section--dark em { color: #ff8f82; }
.section--sand { background: var(--sand); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--scarlet);
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 2px;
  background: currentColor;
}
.section--dark .eyebrow { color: #ff8f82; }

.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--muted); font-size: 1.15rem; }
.section--dark .section-head p { color: rgba(248, 243, 236, 0.72); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 1.9rem;
  font: 600 1rem/1 var(--font-body);
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  background: var(--scarlet);
  color: var(--white);
  box-shadow: 0 14px 30px -14px rgba(180, 42, 31, 0.8);
}
.btn--primary:hover { background: var(--scarlet-dark); transform: translateY(-2px); }

.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.section--dark .btn--ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.btn--sm { padding: 0.8rem 1.4rem; font-size: 0.92rem; }

/* ---------- Espaço reservado para fotos ----------
   Para usar: salve a imagem em assets/img/ com o nome indicado no src.
   Se o arquivo existir, ele cobre o placeholder automaticamente. */
.photo-slot {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: var(--ratio, 4 / 5);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--sand) 0%, var(--sand-deep) 100%);
  box-shadow: var(--shadow-soft);
}
.photo-slot__placeholder {
  position: absolute;
  inset: 14px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.6rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1.5px dashed rgba(110, 100, 92, 0.55);
  border-radius: calc(var(--radius-lg) - 12px);
}
.photo-slot__placeholder svg { width: 2.2rem; height: 2.2rem; opacity: 0.7; }
.photo-slot__placeholder small { font-weight: 500; opacity: 0.8; }
.photo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, center); /* ajuste fino do corte por foto */
}

/* ---------- Animação de entrada ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal--left { transform: translateX(-26px); }
.js .reveal--scale { transform: scale(0.95) translateY(18px); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__badge { animation: none !important; }
  .btn, .btn svg { transition: none; }
}
