/* Grupo Lu · base compartilhada (site do grupo, casas e painel) */
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-latin-wdth-normal.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'DM Serif Display'; src: url('../fonts/dm-serif-display-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'DM Serif Display'; font-style: italic; src: url('../fonts/dm-serif-display-latin-400-italic.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Anton'; src: url('../fonts/anton-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('../fonts/caveat-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Lilita One'; src: url('../fonts/lilita-one-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Marcellus'; src: url('../fonts/marcellus-latin-400-normal.woff2') format('woff2'); font-display: swap; }

:root {
  /* tokens do grupo (proposta) */
  --bg: #F7F3EC; --surface: #FFFFFF; --surface-2: #EFE9DE; --ink: #1D1A16; --muted: #625B51; --line: #E3DCCF;
  --accent: #1D1A16; --on-accent: #FFFFFF; --ring: #1D1A16;
  --ok: #1F7A3E; --warn: #9A5B00; --bad: #B42318; --info: #1F5EA8;
  --ok-bg: #E6F3EA; --warn-bg: #FBF0DB; --bad-bg: #FBE7E5; --info-bg: #E5EEF9;
  --font-display: 'Fraunces', Georgia, serif; --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 6px; --r: 10px; --r-lg: 16px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  /* séries das casas nos gráficos (validadas no dataviz: claro) */
  --serie-sapataria: #C8322B; --serie-matheus: #E3901E; --serie-joaquim: #0F8F78; --serie-luwasabi: #8FA417;
  --chart-surface: var(--surface); --chart-grid: #E9E3D8; --chart-axis: #8A8276;
  --seq-0: #FBF1DF; --seq-1: #F5D9A8; --seq-2: #E8B465; --seq-3: #CF8A2C; --seq-4: #A3620F; --seq-5: #6E4106;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--font-body); color: var(--ink); background: var(--bg); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r); text-decoration: none; font-weight: 600; }
.pular:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

/* botões */
.btn { --bh: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--bh); padding: 0 20px; border-radius: var(--r); border: 1.5px solid transparent; background: var(--accent); color: var(--on-accent); font-weight: 650; font-size: 15px; letter-spacing: .01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform var(--duration-quick, 150ms) var(--ease-smooth-out, ease), background-color var(--duration-quick, 150ms), box-shadow var(--duration-quick, 150ms), border-color var(--duration-quick, 150ms); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -10px rgba(0,0,0,.45); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--sec { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
.btn--sec:hover { border-color: var(--ink); }
.btn--sm { --bh: 40px; padding: 0 14px; font-size: 14px; }
.btn--xs { --bh: 34px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.btn--ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn--ghost:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); box-shadow: none; }
.btn--perigo { background: var(--bad); color: #fff; }
.btn--bloco { width: 100%; }
.icone { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn .icone { width: 18px; height: 18px; }

/* formulários */
.campo { display: grid; gap: 6px; }
.campo > label, .campo > .rotulo { font-size: 14px; font-weight: 600; }
.campo .dica { font-size: 13px; color: var(--muted); }
.entrada { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r); border: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent); background: var(--surface); color: var(--ink); font-size: 16px; transition: border-color var(--duration-quick, 150ms), box-shadow var(--duration-quick, 150ms); }
.entrada:hover { border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.entrada:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent); }
textarea.entrada { min-height: 92px; resize: vertical; }
select.entrada { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.campo.erro .entrada { border-color: var(--bad); }
.msg-erro { color: var(--bad); font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.campo.erro .entrada { animation: tremer var(--duration-fast, 250ms) var(--ease-smooth-out, ease); }
@keyframes tremer { 0%,100% { transform: translateX(0); } 25% { transform: translateX(calc(var(--shake-distance, 6px) * -1)); } 60% { transform: translateX(var(--shake-overshoot, 4px)); } }
.opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.opcao { position: relative; }
.opcao input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opcao span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent); font-weight: 600; font-size: 15px; transition: background-color var(--duration-quick, 150ms), border-color var(--duration-quick, 150ms); }
.opcao input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.opcao input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 2px; }

/* selos */
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; line-height: 1.4; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.selo--ok { background: var(--ok-bg); color: var(--ok); } .selo--warn { background: var(--warn-bg); color: var(--warn); }
.selo--bad { background: var(--bad-bg); color: var(--bad); } .selo--info { background: var(--info-bg); color: var(--info); }
.selo .ponto { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* aviso de toast */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: #1D1A16; color: #FAF7F1; box-shadow: 0 14px 40px -18px rgba(0,0,0,.6); font-size: 15px; animation: toast-in var(--duration-medium, 350ms) var(--ease-smooth-out, ease) both; }
.toast.sai { animation: toast-out var(--duration-quick, 150ms) var(--ease-smooth-out, ease) both; }
.toast--erro { background: #7A1A12; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* modal (dialog) */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.55); }
dialog.modal[open] { animation: modal-in var(--modal-open-dur, 250ms) var(--modal-ease, ease) both; }
dialog.modal.fechando { animation: modal-out var(--modal-close-dur, 150ms) var(--modal-ease, ease) both; }
dialog.modal::backdrop { background: rgba(20, 17, 13, .5); }
@keyframes modal-in { from { opacity: 0; transform: scale(var(--modal-scale, .96)); } }
@keyframes modal-out { to { opacity: 0; transform: scale(var(--modal-scale-close, .96)); } }
.modal__topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.modal__topo h2 { font-size: 20px; }
.modal__corpo { padding: 18px 20px; overflow: auto; max-height: calc(100dvh - 180px); display: grid; gap: 16px; }
.modal__rodape { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.fechar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.fechar:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* faixa da demonstração */
.faixa-demo { position: relative; z-index: 60; display: flex; justify-content: center; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 8px 16px; background: #1D1A16; color: #F3EEE5; font-size: 13.5px; text-align: center; }
.faixa-demo a { color: #F3EEE5; font-weight: 650; text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
.faixa-demo a:focus-visible { outline-color: #F3EEE5; }
