/* ============================================================
   INSTITUTO ALMANÁ — BASE + COMPONENTES
   Requer tokens.css carregado antes.
   Convenção: .c-* componente, .u-* utilitário, .is-* estado.
   ============================================================ */

/* ---------- Reset mínimo e base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-h1); font-weight: var(--fw-heavy); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-heavy); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semi); }
p  { margin: 0 0 var(--space-4); }

.u-display {
  font-size: var(--fs-display);
  font-weight: var(--fw-heavy);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-heading);
}

/* Allan: só ênfase pontual (palavra de efeito, número grande) */
.u-accent {
  font-family: var(--font-accent);
  font-weight: 700;
  letter-spacing: 0;
}
.u-accent--rosa { color: var(--alm-rosa); }
.u-accent--lima { color: var(--alm-lima); }

.u-eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.u-lead { font-size: var(--fs-body-lg); }
.u-muted { color: var(--text-muted); }

/* Sublinha de destaque (grifo azul das peças da marca) */
.u-grifo {
  text-decoration: underline;
  text-decoration-color: var(--alm-azul-claro);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.18em;
}

/* ---------- Links ---------- */
a {
  color: var(--alm-petroleo);
  font-weight: var(--fw-semi);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--dur-fast) var(--ease-out);
}
a:hover { text-decoration-color: var(--alm-petroleo); }

/* ---------- Layout ---------- */
.l-container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.l-container--text { max-width: var(--container-text); }
.l-section { padding-block: var(--space-section); position: relative; }
.l-section--dark { background: var(--bg-dark); color: var(--text-inverse); }
.l-section--dark h1, .l-section--dark h2, .l-section--dark h3,
.l-section--dark h4, .l-section--dark .u-display { color: var(--text-inverse); }
.l-section--dark a { color: var(--text-inverse); }
.l-section--soft { background: var(--bg-soft); }
.l-section--surface { background: var(--bg-surface); }
.l-grid { display: grid; gap: var(--space-5); }
@media (min-width: 48em) {
  .l-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .l-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Botões ---------- */
.c-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.8em 1.6em;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-semi);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.c-btn:active { transform: scale(0.98); }
.c-btn .c-icon { width: 1.2em; height: 1.2em; }

/* Primário: institucional */
.c-btn--primary { background: var(--alm-petroleo); color: var(--alm-claro); }
.c-btn--primary:hover { background: var(--alm-petroleo-hover); }

/* CTA de conversão: lima = "siga" */
.c-btn--cta { background: var(--alm-lima); color: var(--alm-tinta); }
.c-btn--cta:hover { background: var(--alm-lima-hover); }

/* Secundário: contorno */
.c-btn--outline { border-color: var(--alm-petroleo); color: var(--alm-petroleo); background: transparent; }
.c-btn--outline:hover { background: color-mix(in srgb, var(--alm-petroleo) 8%, transparent); }

/* Sobre fundo escuro */
.c-btn--inverse { border-color: var(--alm-claro); color: var(--alm-claro); background: transparent; }
.c-btn--inverse:hover { background: color-mix(in srgb, var(--alm-claro) 12%, transparent); }

/* Botão-seta circular (assinatura das peças da marca) */
.c-btn--round {
  padding: 0;
  width: 3.25rem;
  height: 3.25rem;
  justify-content: center;
  background: var(--alm-petroleo);
  color: var(--alm-claro);
}
.c-btn--round:hover { background: var(--alm-petroleo-hover); }
.c-btn--round .c-icon { width: 1.4em; height: 1.4em; }

/* ---------- Badge / pill ---------- */
.c-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.3em 0.9em;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: var(--fw-semi);
}
.c-badge--lima { background: var(--alm-lima); color: var(--alm-tinta); }
.c-badge--rosa { background: var(--alm-rosa); color: var(--alm-tinta); }
.c-badge--azul { background: var(--alm-azul-claro); color: var(--alm-tinta); }
.c-badge--neutro { background: var(--alm-azul-tint); color: var(--alm-petroleo); }

/* ---------- Card ---------- */
.c-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 1;
}
.c-card--dark { background: var(--alm-petroleo); color: var(--text-inverse); }
.c-card--dark h3, .c-card--dark h4 { color: var(--text-inverse); }
.c-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: var(--alm-azul-tint);
  color: var(--alm-petroleo);
  margin-bottom: var(--space-4);
}
.c-card__icon .c-icon { width: 1.4rem; height: 1.4rem; }

/* ---------- Ícones (linha, estilo Lucide, herdam cor) ---------- */
.c-icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Callouts (seções recorrentes dos materiais) ---------- */
.c-callout {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  align-items: flex-start;
}
.c-callout__title { font-weight: var(--fw-bold); margin: 0 0 var(--space-1); color: inherit; }
.c-callout p:last-child { margin: 0; }
.c-callout--go     { background: var(--alm-lima-tint); color: var(--alm-tinta); border-left: 4px solid var(--signal-go); }
.c-callout--stop   { background: var(--alm-rosa-tint); color: var(--alm-tinta); border-left: 4px solid var(--signal-stop); }
.c-callout--ponder { background: var(--alm-azul-tint); color: var(--alm-tinta); border-left: 4px solid var(--signal-ponder); }
.c-callout .c-icon { margin-top: 0.15em; color: var(--alm-petroleo); }

/* ---------- Citação ---------- */
.c-quote {
  background: var(--alm-azul-claro);
  color: var(--alm-tinta);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-medium);
  margin: 0;
}
.c-quote footer { font-size: var(--fs-small); font-weight: var(--fw-semi); margin-top: var(--space-3); color: var(--alm-petroleo); }

/* ---------- Header / navegação ---------- */
.c-header {
  background: var(--bg-page);
  border-bottom: 1px solid var(--alm-borda);
}
.c-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: 4.5rem;
}
.c-header__logo svg { height: 2.25rem; width: auto; }
.c-nav { display: flex; align-items: center; gap: var(--space-5); }
.c-nav a {
  text-decoration: none;
  font-weight: var(--fw-medium);
  color: var(--alm-tinta);
  padding-block: 0.4em;
  border-bottom: 2px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.c-nav a:hover, .c-nav a.is-active { border-bottom-color: var(--alm-azul-claro); }

/* ---------- Footer ---------- */
.c-footer {
  background: var(--alm-petroleo);
  color: var(--text-inverse);
  padding-block: var(--space-8) var(--space-6);
}
.c-footer__logo svg { height: 2.5rem; width: auto; }
.c-footer a { color: var(--text-inverse); font-weight: var(--fw-regular); }
.c-footer__meta {
  border-top: 1px solid color-mix(in srgb, var(--alm-claro) 20%, transparent);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  font-size: var(--fs-small);
  color: color-mix(in srgb, var(--alm-claro) 75%, var(--alm-petroleo));
}

/* ---------- Grafismos (blobs) ----------
   Regras (MARCA.md): nunca sobre texto ou logo; nunca da cor do fundo. */
.c-blob {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.c-blob svg { width: 100%; height: auto; }
.l-section > .l-container { position: relative; z-index: 1; }
