/* ═══════════════════════════════════════════════════════════════════════
   Mimo: o sistema visual da marca pública (landing, compra, pagamento, editor, ajuda). Refeito em 2026-11-17 a pedido do dono ("o design não está nada
   profissional nem premium"). Direção: papelaria de luxo. Pinheiro profundo, marfim e latão; Fraunces nos títulos (com itálico), Instrument Sans no texto;
   superfícies com acabamento (brilho interno, sombra em camadas, filete de latão), blocos de cor inteiros em vez de caixas contornadas. Sempre claro por
   padrão (o escuro só existe nos blocos de marca, nunca por tema do sistema). As fontes são embutidas (public/vendor/mimo-fonts, OFL).
   O PAINEL (/admin/mimo, dentro do back-office) segue a identidade do rbdev (tokens.css), não esta; a página do PRESENTE tem as cores de cada modelo (mimo-gift.css).
   Documentação: docs/apps/mimo.md
   ═══════════════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Fraunces'; src: url('/vendor/mimo-fonts/fraunces.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/vendor/mimo-fonts/fraunces-italic.woff2') format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/vendor/mimo-fonts/instrument-sans.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
	color-scheme: light;
	/* superfícies claras */
	--ivory: #f7f2e9;
	--ivory-2: #eee7d8;
	--card: #fffdf8;
	/* tinta */
	--ink: #15110e;
	--ink-2: #554d44; /* 7,4:1 sobre o marfim */
	--ink-3: #6b6258; /* 5,2:1: só para o secundário e grande */
	/* marca */
	--forest: #0e2a23;
	--forest-2: #16382f;
	--forest-3: #21493e;
	--gold: #c9a45c;
	--gold-2: #e8d3a0;
	--gold-ink: #7a5a1c; /* latão para texto sobre claro: 5,6:1 */
	--wine: #8c1d2c;
	--wine-2: #6f1522;
	--pine: #1d5a45; /* confirmado, no ar */
	--amber: #8a5a00;
	--tint-wine: #f8e8e6;
	--tint-pine: #e3efe8;
	--tint-amber: #f8eed3;
	--line: rgb(21 17 14 / .12);
	--line-2: rgb(21 17 14 / .24);
	/* nomes antigos que o editor ainda usa (cada um aponta para o equivalente novo) */
	--paper: var(--ivory);
	--paper-2: var(--ivory-2);
	--hair: var(--line);
	--red: var(--wine);
	--red-dark: var(--wine-2);
	--tint-red: var(--tint-wine);
	--r: 14px;
	--r-lg: 22px;
	--shadow-sm: 0 1px 2px rgb(21 17 14 / .06), 0 4px 10px -4px rgb(21 17 14 / .12);
	--shadow: 0 1px 2px rgb(21 17 14 / .05), 0 14px 34px -14px rgb(21 17 14 / .28);
	--shadow-lg: 0 2px 4px rgb(21 17 14 / .06), 0 28px 60px -22px rgb(14 42 35 / .5);
	--ease: cubic-bezier(.2, .8, .2, 1);
	--display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
	--sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
	--gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; min-height: 100dvh; background: var(--ivory); color: var(--ink);
	font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
.sprite { position: absolute; } /* os ícones (views/partials/mimo-sprite.eta): sem estilo escrito na página, que a CSP do painel não deixa */
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 500; line-height: 1.1; letter-spacing: -.012em; font-optical-sizing: auto; text-wrap: balance; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--forest-3); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
/* título que recebe o foco por programa (a tela mudou sozinha): o leitor de tela anuncia, e não há o que "usar" nele, então sem anel */
[tabindex='-1']:focus { outline: none; }
::selection { background: var(--forest); color: var(--gold-2); }
[hidden] { display: none !important; }
.wrap { width: min(100% - 2 * var(--gutter), 74rem); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 42rem); margin-inline: auto; }
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--forest); color: var(--ivory); padding: .8rem 1.1rem; border-radius: var(--r); z-index: 100; transition: top .15s; }
.skip:focus { top: .75rem; }

/* ───────── texto ───────── */
.kicker { display: inline-flex; align-items: center; gap: .7rem; font: 600 .75rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); }
.kicker::before { content: ''; width: 1.8rem; height: 1px; background: currentColor; }
.lead { font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.6; color: var(--ink-2); max-width: 36em; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); font-size: .92em; }

/* ───────── botões (alvo de 52 px; o principal tem o maior peso) ───────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 52px; padding: .75rem 1.6rem;
	font: 600 1rem/1.2 var(--sans); letter-spacing: .005em; text-decoration: none; text-align: center; cursor: pointer;
	border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--ink);
	box-shadow: var(--shadow-sm), inset 0 1px 0 rgb(255 255 255 / .9);
	transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, border-color .18s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink-3); background: #fff; color: var(--ink); box-shadow: var(--shadow), inset 0 1px 0 #fff; }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn--primary {
	background: linear-gradient(180deg, var(--forest-3), var(--forest) 70%); border-color: var(--forest); color: var(--ivory);
	box-shadow: 0 10px 24px -10px rgb(14 42 35 / .75), inset 0 1px 0 rgb(255 255 255 / .16);
}
.btn--primary:hover { background: linear-gradient(180deg, #2a5a4d, var(--forest-2) 70%); border-color: var(--forest-2); color: #fff; box-shadow: 0 16px 30px -12px rgb(14 42 35 / .8), inset 0 1px 0 rgb(255 255 255 / .2); }
.btn--gold {
	background: linear-gradient(180deg, #ecd69b, var(--gold) 80%); border-color: #b48f45; color: #2a1d06;
	box-shadow: 0 12px 28px -12px rgb(201 164 92 / .8), inset 0 1px 0 rgb(255 255 255 / .6);
}
.btn--gold:hover { background: linear-gradient(180deg, #f4e1ae, #d4b068 80%); color: #1a1204; box-shadow: 0 18px 34px -12px rgb(201 164 92 / .9), inset 0 1px 0 rgb(255 255 255 / .7); }
.btn--light { background: transparent; color: var(--ivory); border-color: rgb(247 242 233 / .4); box-shadow: none; }
.btn--light:hover { background: rgb(247 242 233 / .1); border-color: var(--gold-2); color: #fff; box-shadow: none; }
.btn--quiet { border-color: transparent; background: transparent; box-shadow: none; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; padding-inline: .6rem; }
.btn--quiet:hover { background: rgb(21 17 14 / .05); box-shadow: none; transform: none; border-color: transparent; }
.btn--danger { color: var(--wine); border-color: rgb(140 29 44 / .4); }
.btn--danger:hover { background: var(--tint-wine); border-color: var(--wine); color: var(--wine-2); }
.btn--small { min-height: 44px; padding: .5rem 1.05rem; font-size: .9375rem; border-radius: 10px; }
.btn--wide { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn[aria-busy='true'] { cursor: progress; }
.btn[aria-busy='true']::after { content: ''; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── campos ───────── */
.field { display: grid; gap: .45rem; align-content: start; }
.field > label, .field > .label, legend.label { font-weight: 600; font-size: .9375rem; }
.field .hint { font-size: .875rem; color: var(--ink-2); }
.input, .select, .textarea {
	width: 100%; min-height: 52px; padding: .7rem 1rem; font: 400 1rem/1.4 var(--sans); color: var(--ink);
	background: #fff; border: 1px solid var(--line-2); border-radius: 12px; appearance: none;
	box-shadow: inset 0 1px 2px rgb(21 17 14 / .05); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 8rem; resize: vertical; }
.select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 1.2rem) 55%, calc(100% - .85rem) 55%; background-size: .35rem .35rem; background-repeat: no-repeat; padding-right: 2.4rem; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--forest-3); box-shadow: 0 0 0 4px rgb(201 164 92 / .45); }
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--wine); background: #fff8f7; }
.error { display: flex; gap: .5rem; align-items: flex-start; color: var(--wine-2); font-size: .9375rem; font-weight: 500; }
.error::before { content: '!'; flex: none; display: grid; place-items: center; width: 1.15rem; height: 1.15rem; margin-top: .12rem; border-radius: 50%; background: var(--wine); color: #fff; font: 700 .72rem/1 var(--sans); }
/* A dica e o erro de um campo dividem o MESMO espaço: o erro entra no lugar da dica e nada embaixo se mexe. Sem isto, corrigir um campo e tocar logo no
   próximo botão errava o alvo (a mensagem some, a tela pula entre o toque e o clique). */
.slot { display: grid; }
.slot > * { grid-area: 1 / 1; }
.slot:has(.error:not([hidden])) .hint { visibility: hidden; }
.check { display: flex; gap: .8rem; align-items: flex-start; min-height: 44px; cursor: pointer; }
.check input { flex: none; width: 1.5rem; height: 1.5rem; margin: .1rem 0 0; accent-color: var(--forest-3); }

/* ───────── avisos, selos e cartões ───────── */
.notice { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.15rem; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ink-3); box-shadow: var(--shadow-sm); }
.notice--ok { background: var(--tint-pine); border-color: rgb(29 90 69 / .25); border-left-color: var(--pine); }
.notice--warn { background: var(--tint-amber); border-color: rgb(138 90 0 / .25); border-left-color: var(--amber); }
.notice--bad { background: var(--tint-wine); border-color: rgb(140 29 44 / .22); border-left-color: var(--wine); }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .7rem; border-radius: 99px; font: 600 .78rem/1.4 var(--sans); letter-spacing: .02em; background: var(--ivory-2); color: var(--ink-2); }
.badge--ok { color: var(--pine); background: var(--tint-pine); }
.badge--warn { color: var(--amber); background: var(--tint-amber); }
.badge--bad { color: var(--wine-2); background: var(--tint-wine); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow); }
.rule { border: 0; height: 1px; background: var(--line-2); margin: 0; }
.perforation { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 0; }

/* ───────── esqueleto (no lugar de spinner) ───────── */
.skeleton { position: relative; overflow: hidden; background: var(--ivory-2); border-radius: var(--r); min-height: 1rem; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / .75), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ───────── movimento reduzido ───────── */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
