/* ============================================================
   FORVUM — Design System  ·  "Mármore & Ouro"
   Do fórum romano (forvm): a praça onde se administra a justiça.
   Estética: clássica, serena, institucional, minimalista.
   Acessibilidade: alto contraste, alvos grandes, fonte ajustável.
   ============================================================ */

:root {
  /* Escala de texto (ajustável por A− / A+) */
  --fs: 19px;

  /* Cores — Mármore & Ouro */
  --marble-0: #FCFAF4;   /* superfícies (cards) */
  --marble:   #F4EEE1;   /* fundo marfim/mármore */
  --marble-2: #ECE4D3;   /* divisórias suaves */
  --ink:      #201D17;   /* texto principal (preto quente) */
  --ink-2:    #5B5447;   /* texto secundário (pedra) */
  --ink-3:    #8A8273;   /* terciário / legendas */
  --gold:     #9A7634;   /* ouro velho — acentos, fios, ênfase */
  --gold-2:   #BE9A53;   /* ouro claro — hover/realce */
  --gold-soft:#E3D6B4;   /* ouro suave — bordas/fios */
  --porphyry: #6E2A22;   /* pórfira — erros/alertas */
  --aegean:   #2C4A52;   /* azul-egeu — eventual ação fria */
  --line:     #DCD0B8;   /* fios decorativos */

  --shadow-sm: 0 2px 10px rgba(60, 46, 18, .06);
  --shadow:    0 18px 50px rgba(60, 46, 18, .10);
  --shadow-gold: 0 10px 30px rgba(154, 118, 52, .18);

  --radius: 10px;
  --radius-lg: 18px;
  --target: 56px;            /* alvo mínimo clicável */
  --maxw: 1200px;

  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body: 'Spectral', 'Iowan Old Style', Georgia, 'Times New Roman', serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs);
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 760px at 72% -12%, #FFFEFA, transparent 60%),
    radial-gradient(900px 620px at -12% 112%, #EFE7D6, transparent 55%),
    var(--marble);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Grão de mármore sutil sobre o fundo */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 1; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: .01em; color: var(--ink); margin: 0 0 .4em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: .04em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
.overline { font-family: var(--font-display); font-weight: 600; letter-spacing: .28em; text-transform: uppercase; font-size: .72rem; color: var(--gold); }
.lead { font-size: 1.18em; color: var(--ink-2); line-height: 1.7; }
.muted { color: var(--ink-3); }
em { font-style: italic; }
a { color: var(--gold); text-decoration: none; }

/* ---------- Fio duplo clássico ---------- */
.rule-double {
  height: 6px; border: 0;
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
  background: transparent; margin: 0;
}

/* ---------- Meandro grego (faixa decorativa) ---------- */
.meander {
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cpath d='M0 13h6V3h7v7h-4V6h-2v10h11V0h-7' fill='none' stroke='%239A7634' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center; opacity: .5;
}

/* ---------- Emblema (estela) ---------- */
.emblem { display: inline-block; line-height: 0; }
.emblem svg { display: block; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--target); padding: 0 26px;
  font-family: var(--font-body); font-size: 1.02em; font-weight: 600;
  color: var(--ink); background: var(--marble-0);
  border: 1.5px solid var(--gold-soft); border-radius: var(--radius);
  cursor: pointer; transition: all .2s var(--ease); text-align: center;
}
.btn:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  color: var(--marble-0); background: var(--ink);
  border-color: var(--ink); position: relative; overflow: hidden;
}
.btn-primary:hover { background: #2c2820; border-color: var(--gold); box-shadow: var(--shadow-gold); }
.btn-primary::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 8px; height: 1px;
  background: var(--gold-2); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.btn-primary:hover::after { transform: scaleX(1); }

.btn-gold { color: var(--ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: var(--gold); font-weight: 700; }
.btn-gold:hover { box-shadow: var(--shadow-gold); }

.btn-xl { min-height: 66px; font-size: 1.12em; padding: 0 34px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { border-color: var(--gold-soft); background: var(--marble-0); }

.btn-icon {
  min-width: 50px; min-height: 50px; padding: 0 14px; font-weight: 700; font-family: var(--font-display);
  background: var(--marble-0); color: var(--ink); border: 1.5px solid var(--gold-soft); border-radius: 10px; cursor: pointer;
}
.btn-icon:hover { border-color: var(--gold); }
.btn-icon:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }

/* ---------- Campos ---------- */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], input[type="url"],
select, textarea {
  font-family: var(--font-body); font-size: 1.05em; color: var(--ink);
  background: var(--marble-0); border: 1.5px solid var(--gold-soft); border-radius: var(--radius);
  min-height: var(--target); padding: 0 16px; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
textarea { padding: 14px 16px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="search"]:focus, input[type="number"]:focus, input[type="tel"]:focus, input[type="url"]:focus,
select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(154,118,52,.15); }

/* ---------- Cards ---------- */
.card {
  background: var(--marble-0); border: 1px solid var(--marble-2); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 26px; transition: all .25s var(--ease); position: relative;
}
.card-top-rule::before {
  content: ""; position: absolute; top: 0; left: 26px; right: 26px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- Topbar / Footer compartilhados ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px;
  flex-wrap: wrap;                 /* evita corte da área de conta em telas estreitas */
  min-height: 78px;                /* mesma altura de barra em todas as páginas */
  padding: 14px clamp(16px, 4vw, 40px); background: rgba(252,250,244,.82);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--marble-2);
  position: sticky; top: 0; z-index: 20;
}
@media (max-width: 560px) {
  .topbar { justify-content: center; }
  .topbar-right { flex-wrap: wrap; justify-content: center; gap: 10px 12px; }
}
.brand-lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-lockup .emblem svg { width: 30px; height: 40px; }   /* logo idêntica em todas as telas */
.brand-lockup .wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .22em; line-height: 1; }
.brand-lockup .wordmark b { color: var(--gold); font-weight: 700; }

.font-controls { display: flex; gap: 8px; }

.site-footer { padding: 40px; text-align: center; color: var(--ink-3); font-size: .92em; }
.site-footer .wordmark { font-family: var(--font-display); letter-spacing: .2em; color: var(--ink-2); }

/* ---------- Util ---------- */
.hidden { display: none !important; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.center { text-align: center; }

/* ---------- Animações de entrada ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes drawline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; animation: rise .8s var(--ease) forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
