:root {
  color-scheme: light;
  --primaria: #7D63AB;
  --secundaria: #AB8EC2;
  --lavanda: #D9C7E1;
  --rosa: #FAD5E2;
  --creme: #FEEBBD;
  --primaria-escura: #654b8e;
  --texto: #58416e;
  --muted: #765e8e;
  --borda: var(--lavanda);
  --lilas-claro: #D9C7E1;
  --fundo-suave: #fbf5fc;
  --branco: #FEFEFF;
  --texto-sobre-primaria: #FEFEFF;
  --texto-sobre-perigo: #FEFEFF;
  --fonte-titulo: "Gill Sans Ultra", "Gill Sans Ultra Bold", "Arial Rounded MT Bold", "Arial Black", sans-serif;
  --fonte-texto: "Calibri Light", Calibri, "Trebuchet MS", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --primaria: #D9C7E1;
  --secundaria: #7D63AB;
  --lavanda: #654B8E;
  --primaria-escura: #FEEBBD;
  --texto: #352B43;
  --muted: #49365F;
  --borda: #D9C7E1;
  --lilas-claro: #D9C7E1;
  --fundo-suave: #9C7FB5;
  --branco: #AB8EC2;
  --texto-sobre-primaria: #49365F;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--lavanda);
  color: var(--texto);
  font-family: var(--fonte-texto);
  font-size: 1.125rem;
  line-height: 1.5;
}

body > main {
  flex: 1;
  width: 100%;
}

button, input, select {
  font-family: inherit;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--borda);
  border-radius: 50%;
  background: var(--branco);
  color: var(--primaria-escura);
  font: 700 1.25rem/1 var(--fonte-texto);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--primaria);
  background: var(--rosa);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--primaria);
  outline-offset: 4px;
}

body, .home-header, .cabecalho, .panel, .admin-row, input, select, textarea, button, a {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

h1, h2, h3 {
  color: var(--primaria);
  font-family: var(--fonte-titulo);
}

strong, b, .nome-opcao {
  font-family: var(--fonte-titulo);
  font-weight: 400;
}

img {
  max-width: 100%;
}

.cabecalho {
  margin: 1.5rem 1.5rem 0;
  border-radius: 24px;
  background: var(--branco);
}

.cabecalho-conteudo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  max-width: 1300px;
  margin-inline: auto;
  padding: 0.4rem clamp(1rem, 4vw, 3rem);
}

.brand-logo {
  display: block;
  width: clamp(135px, 16vw, 180px);
}

.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.cabecalho .brand-logo {
  width: clamp(125px, 13vw, 160px);
}

.marca {
  line-height: 1;
}

.site-footer {
  margin-top: 3.5rem;
  padding: 0.8rem clamp(1.25rem, 5vw, 4rem);
  background-color: var(--secundaria);
  background-image: url("/assets/branding/estampa-cecipurin.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

:root[data-theme="dark"] .site-footer {
  background-blend-mode: multiply;
}

.site-footer .brand-logo {
  box-sizing: content-box;
  width: clamp(105px, 11vw, 135px);
  padding: 0.35rem 0.6rem;
  border-radius: 11px;
  background: var(--branco);
}

.footer-inner {
  max-width: 1240px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-contact {
  padding: 0.4rem 0.85rem;
  border-radius: 13px;
  background: var(--branco);
  color: var(--primaria-escura);
  font-size: 0.9rem;
}

.footer-contact p {
  margin: 0 0 0.2rem;
}

.footer-contact a {
  color: inherit;
  font-weight: 700;
}

@media (max-width: 600px) {
  .cabecalho {
    margin: 0.75rem 0.75rem 0;
    border-radius: 20px;
  }

  .cabecalho-conteudo {
    padding: 0.5rem 1rem;
  }

  .site-footer {
    margin-top: 2rem;
    padding: 0.6rem 0.75rem;
  }

  .site-footer .brand-logo {
    width: 90px;
    padding: 0.25rem 0.45rem;
  }

  .footer-inner {
    flex-wrap: nowrap;
    gap: 0.6rem;
  }

  .footer-contact {
    padding: 0.3rem 0.55rem;
    font-size: 0.78rem;
  }

  .footer-contact p {
    display: none;
  }
}

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

  *, *::before, *::after {
    transition: none !important;
  }
}
