/* ======================================================================
   BF Capital · base.css
   Fundação: tokens, reset, tipografia editorial.
   Sistema charcoal + bronze.
   ====================================================================== */

/* --- TOKENS DE MARCA ------------------------------------------------- */
:root {
  /* Paleta principal */
  --charcoal: #2a2724;
  --charcoal-soft: #3d3833;
  --charcoal-deep: #1a1815;

  --bronze: #b08d57;
  --bronze-dark: #8b6f44;
  --bronze-light: #c9a574;
  --bronze-pale: #efe4d2;

  /* Neutros */
  --cream: #faf8f3;
  --cream-deep: #f5f1e8;
  --white: #ffffff;
  --line: #e6e2db;
  --line-soft: #f0ece4;
  --muted: #6b6760;

  /* Tipografia */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Escala fluida */
  --fs-h1: clamp(40px, 6vw, 72px);
  --fs-h2: clamp(28px, 3.6vw, 44px);
  --fs-h3: clamp(20px, 2.2vw, 26px);
  --fs-lede: clamp(17px, 1.7vw, 21px);
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-micro: 11px;

  /* Espaçamento */
  --section-y: clamp(64px, 9vw, 120px);
  --section-y-curto: clamp(40px, 6vw, 72px);
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1240px;
  --max-text: 720px;

  /* Geometria */
  --radius: 6px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Sombras (mínimas, marca não é "sombrenta") */
  --shadow-soft: 0 1px 2px rgba(42, 39, 36, 0.04), 0 8px 24px rgba(42, 39, 36, 0.06);
  --shadow-card: 0 1px 3px rgba(42, 39, 36, 0.05), 0 12px 32px rgba(42, 39, 36, 0.08);
  --shadow-warm: 0 1px 3px rgba(176, 141, 87, 0.08), 0 12px 32px rgba(176, 141, 87, 0.10);

  /* Transições padronizadas */
  --t-fast: 150ms;
  --t-base: 250ms;
  --t-slow: 400ms;
  --t-very-slow: 700ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET ----------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: var(--charcoal);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover {
  color: var(--bronze-dark);
}

input, select, textarea {
  font: inherit;
  color: inherit;
}

ul, ol {
  padding-left: 1.2em;
}

p {
  margin: 0 0 1em;
}

/* --- TIPOGRAFIA EDITORIAL ------------------------------------------- */
.serif {
  font-family: var(--serif);
}

.h1, h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: var(--charcoal);
  margin: 0 0 0.4em;
}

.h2, h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--charcoal);
  margin: 0 0 0.4em;
}

.h3, h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--charcoal);
  margin: 0 0 0.4em;
}

em {
  font-style: italic;
  color: var(--bronze-dark);
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--charcoal-soft);
  max-width: 64ch;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze-dark);
  margin: 0 0 16px;
}

.eyebrow--claro {
  color: var(--bronze-light);
}

.muted {
  color: var(--muted);
}

/* --- CONTAINERS ----------------------------------------------------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--estreito {
  max-width: 820px;
}

/* --- UTILITIES SIMPLES ---------------------------------------------- */
.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 {
  position: absolute;
  top: -100px;
  left: 12px;
  background: var(--charcoal);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 1000;
  transition: top var(--t-base) var(--ease);
}

.skip:focus {
  top: 12px;
  color: var(--cream);
}

[hidden] { display: none !important; }


/* ======================================================================
   R3 POLISH: Acessibilidade global - focus-visible consistente
   ====================================================================== */

/* Foco visível com anel bronze elegante */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Botões e links interativos: foco com sombra adicional */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}

/* Inputs de formulário: foco com borda + sombra */
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="tel"]:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
}

/* Skip link visível ao receber foco */
.skip:focus-visible {
  position: fixed;
  top: 10px;
  left: 10px;
  background: var(--charcoal);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: var(--radius);
  z-index: 9999;
  font-family: var(--sans);
  font-size: 14px;
  text-decoration: none;
}

/* Scroll-margin-top global pra ancoras não ficarem atrás do header sticky */
section[id], article[id] {
  scroll-margin-top: 90px;
}
