/* Base: tipografia, layout primitives, utilidades */

html {
  scroll-behavior: smooth;
  overflow-x: clip;            /* contém scroll horizontal sem quebrar sticky */
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--duration-slow) var(--easing-out),
              color var(--duration-slow) var(--easing-out);
  overflow-x: clip;           /* era hidden — clip não cria scroll container */
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* Textura papel kraft global — mesma SVG noise nos dois temas, opacidade controlada */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--noise-bg);
  background-repeat: repeat;
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] body::before { mix-blend-mode: screen; }

/* Glow dourado discreto vindo do topo */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(201, 166, 107, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Conteúdo acima das camadas decorativas */
body > * { position: relative; z-index: 1; }

/* Tipografia */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

.display {
  font-size: var(--fs-display);
  line-height: 1.05;
  font-weight: 500;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--gold);
  font-size: 1.15em;
  line-height: 0.9;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

p { color: var(--text); max-width: 65ch; }

.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.gold { color: var(--gold); }

a {
  color: var(--gold);
  transition: color var(--duration-base) var(--easing-out);
}
a:hover { color: var(--gold-light); }

strong, b { font-weight: 600; }

/* Layout primitives */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  width: 100%;
}

.section {
  padding-block: clamp(var(--space-10), 12vw, var(--space-16));
}

.section-tight {
  padding-block: clamp(var(--space-8), 7vw, var(--space-12));
}

.grid { display: grid; gap: var(--space-4); }

.grid-2 {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}

.grid-3 {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; gap: var(--space-6); } }

.grid-4 {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;            /* mobile: 1 coluna */
}
@media (min-width: 560px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-4); } }

.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-5); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.max-prose { max-width: 65ch; margin-inline: auto; }

/* Divisor dourado fino */
.divider {
  width: 80px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
  margin: var(--space-3) 0;
}
.divider-center { margin-inline: auto; }

/* Visualmente escondido (acessível para SR) */
.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;
}

/* Section title block */
.section-title {
  text-align: center;
  margin-bottom: var(--space-6);
}
.section-title h2 { margin-bottom: var(--space-2); }
.section-title .divider { margin: var(--space-2) auto; }
.section-title p { margin-inline: auto; }
