/**
 * Páginas legais estáticas — alinhadas ao tema do site Vue
 * (html.dark + localStorage educaverso-theme).
 */

:root {
  --accent: #26d0ce;
  --accent-strong: #0891b2;
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #52525b;
  --border: rgba(24, 24, 27, 0.12);
  --header-bg: rgba(250, 250, 250, 0.86);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --ring: rgba(6, 182, 212, 0.55);
  --footer-bg: #f4f4f5;
  --code-bg: rgba(24, 24, 27, 0.06);
  --grad-a: rgba(38, 208, 206, 0.12);
  --grad-b: rgba(217, 70, 239, 0.08);
}

html.dark {
  --accent: #26d0ce;
  --accent-strong: #67e8f9;
  --bg: #27272a;
  --bg-elevated: #303036;
  --surface: #303036;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.1);
  --header-bg: rgba(39, 39, 42, 0.88);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --ring: rgba(34, 211, 238, 0.55);
  --footer-bg: #27272a;
  --code-bg: rgba(255, 255, 255, 0.08);
  --grad-a: rgba(38, 208, 206, 0.1);
  --grad-b: rgba(192, 38, 211, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body,
  .page-header,
  .theme-toggle {
    transition: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Raleway', ui-sans-serif, system-ui, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--grad-a), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, var(--grad-b), transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.15em;
}

html.dark a {
  color: var(--accent);
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.page-header__inner,
.page-main,
.page-footer__inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.page-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 80rem;
  min-height: 3.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .page-header__inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  text-decoration: none;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 5%, transparent);
}

.site-nav a.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.site-nav a.site-nav__login {
  color: var(--accent-strong);
}

html.dark .site-nav a.site-nav__login {
  color: #67e8f9;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:hover {
  background: color-mix(in srgb, var(--text) 5%, transparent);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }
}

.site-nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 95%, transparent);
  padding: 0.75rem 1.25rem 1rem;
}

.site-nav-mobile.is-open {
  display: block;
}

@media (min-width: 900px) {
  .site-nav-mobile {
    display: none !important;
  }
}

.site-nav-mobile nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
  max-width: 80rem;
  margin: 0 auto;
}

.site-nav-mobile a {
  display: block;
  border-radius: 0.5rem;
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-nav-mobile a:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--text) 5%, transparent);
}

.back-link--compact {
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
}

@media (max-width: 899px) {
  .back-link--desktop {
    display: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.back-link {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.back-link:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

html.dark .theme-toggle .icon-sun {
  display: block;
}

html.dark .theme-toggle .icon-moon {
  display: none;
}

.page-main {
  padding-top: 2.25rem;
  padding-bottom: 3.5rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.meta {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta strong {
  color: var(--text);
  font-weight: 600;
}

.intro,
.summary {
  margin: 0 0 2rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.intro {
  border-left: 4px solid var(--accent);
  border-radius: 0 0.85rem 0.85rem 0;
}

.summary {
  border-radius: 0.85rem;
}

.summary h2 {
  margin-top: 0;
}

section {
  margin-bottom: 2rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text);
}

p,
li {
  color: var(--muted);
}

p {
  margin: 0 0 0.85rem;
}

ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

strong {
  color: var(--text);
  font-weight: 600;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 0.35rem;
  background: var(--code-bg);
  color: var(--text);
}

.contact-box {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-box p:last-child {
  margin-bottom: 0;
}

.page-footer {
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  padding: 0.25rem 0 2rem;
  margin-top: auto;
}

.page-footer__inner {
  color: var(--muted);
  font-size: 0.875rem;
  max-width: 72rem;
}

.page-footer__inner a {
  font-weight: 500;
  text-decoration: none;
}

.page-footer__inner a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .back-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
  }

  .brand span {
    font-size: 0.95rem;
  }
}
