/* Tema "Papel e Fita": base formal e editorial (serifa nos títulos, linhas finas), com as fitas do logótipo como motivo.
   Alternância via [data-theme] no <html>. Fontes locais (Inter + Fraunces, licença OFL) por causa da política de segurança (font-src 'self'). */
@font-face {
  font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Fraunces Variable"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --font: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces Variable", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --blue-900: #061a3f;
  --blue-700: #0a2a5c;
  --blue-500: #1f4f8f;
  --lavender: #9a98d6;
  --lavender-soft: #ecedf8;
  --sage: #8fb592;
  --sage-soft: #e5f0e6;

  --bg: #f4f7f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --border: #e0e7ee;
  --border-strong: #ccd6e1;
  --text: #0f2142;
  --text-muted: #566a85;
  --primary: var(--blue-700);
  --primary-contrast: #ffffff;
  --accent: #6f6cc4;
  --success: #3a8a5e;
  --warning: #a8691a;
  --danger: #bd3a2c;
  --info: #3a6fb0;

  --shadow-sm: 0 1px 2px rgba(10, 42, 92, .05);
  --shadow: 0 1px 2px rgba(10, 42, 92, .04), 0 10px 28px -8px rgba(10, 42, 92, .10);
  --shadow-lg: 0 24px 64px -12px rgba(6, 26, 63, .35);
  --glow: 0 10px 28px -8px rgba(10, 42, 92, .55);

  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --sidebar-w: 256px;
  --sidebar-w-collapsed: 74px;

  /* A "fita": três camadas do logótipo */
  --ribbon: linear-gradient(90deg, var(--blue-700) 0 34%, var(--lavender) 34% 67%, var(--sage) 67% 100%);
}

[data-theme="dark"] {
  --bg: #06142d;
  --surface: #0c2146;
  --surface-2: #122a55;
  --border: #1e3668;
  --border-strong: #2b4880;
  --text: #e8eef9;
  --text-muted: #93a8c9;
  --primary: #8fb4ec;
  --primary-contrast: #06142d;
  --accent: #aaa8e6;
  --lavender-soft: #1f2d5e;
  --sage-soft: #16372f;
  --success: #6cc79a;
  --warning: #e0b05a;
  --danger: #ef7a6c;
  --info: #7fb0ec;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -8px rgba(0, 0, 0, .45);
  --glow: 0 10px 28px -8px rgba(143, 180, 236, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light dark; }
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.015em; }
h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.025em; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barras de deslocamento discretas */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

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