/*
Theme Name: Turma do Farofa
Theme URI: https://www.turmadofarofa.com.br/
Author: João Paulo Soares Martins
Description: Tema editorial da Turma do Farofa, preparado para administrar artigos e páginas pelo WordPress sem alterar as URLs públicas.
Version: 1.2.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: turma-do-farofa
*/

html { scroll-behavior: smooth; }
body.admin-bar .content-nav { top: 32px; }
[hidden] { display: none !important; }
.consent-banner a {
  color: #ffd75e;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.consent-banner a:focus-visible {
  border-radius: 4px;
  outline: 3px solid #58bee8;
  outline-offset: 3px;
}
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: fixed;
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  background: #fff;
  color: #17233b;
}

/* v1.1 — rodapé editorial unificado */
footer {
  --footer-ink: #fffaf0;
  --footer-muted: #d8c9bd;
  --footer-line: rgba(255, 250, 240, 0.16);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 14%, rgba(245, 185, 31, 0.17), transparent 25rem),
    radial-gradient(circle at 92% 88%, rgba(17, 118, 185, 0.18), transparent 28rem),
    #241711;
  color: var(--footer-ink);
  border-top: 7px solid #f5b91f;
}

footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(circle, #fffaf0 1px, transparent 1.2px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(110deg, #000, transparent 48%, #000);
  mask-image: linear-gradient(110deg, #000, transparent 48%, #000);
}

footer::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -86px;
  right: clamp(28px, 7vw, 120px);
  width: 180px;
  aspect-ratio: 1;
  border: 30px solid rgba(245, 185, 31, 0.14);
  border-radius: 42% 58% 56% 44%;
  transform: rotate(18deg);
}

footer .footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-areas:
    "brand links"
    "copy links"
    "legal legal";
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.45fr);
  grid-template-rows: auto 1fr auto;
  gap: 22px clamp(52px, 8vw, 120px);
  width: min(1180px, calc(100% - 48px));
  min-height: 0;
  margin: 0 auto;
  padding: clamp(70px, 8vw, 110px) 0 88px;
}

footer .footer-brand {
  grid-area: brand;
  width: fit-content;
  color: var(--footer-ink);
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
}

footer .footer-brand strong {
  color: #ffad69;
  font-size: 1.24em;
}

footer .footer-brand .brand-paw {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
  background-color: #f5b91f;
  filter: drop-shadow(0 8px 20px rgba(245, 185, 31, 0.22));
}

footer .footer-inner > p {
  grid-area: copy;
  align-self: start;
  justify-self: start;
  max-width: 360px;
  margin: 0;
  color: var(--footer-muted);
  text-align: left;
  font-size: clamp(0.96rem, 1.4vw, 1.1rem);
  line-height: 1.75;
}

footer .footer-inner > p::before {
  content: "Leitura, vínculo e imaginação";
  display: block;
  margin-bottom: 12px;
  color: #f5b91f;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

footer .footer-links {
  grid-area: links;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 0 28px;
  color: var(--footer-ink);
  font-size: 0.84rem;
}

footer .footer-links::before {
  content: "Explore a Turma do Farofa";
  grid-column: 1 / -1;
  margin-bottom: 18px;
  color: #78c9e8;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

footer .footer-links a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 10px 0;
  border-bottom: 1px solid var(--footer-line);
  color: var(--footer-ink);
  font-weight: 780;
  line-height: 1.3;
  transition: color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

footer .footer-links a::after {
  content: "›";
  flex: none;
  margin-left: 10px;
  color: #f5b91f;
  font-size: 1.1rem;
  line-height: 1;
}

footer .footer-links a[target="_blank"]::after {
  content: "↗";
  font-size: 0.78rem;
}

footer .footer-links a:hover {
  color: #ffd75e;
  border-color: rgba(245, 185, 31, 0.5);
  transform: translateX(4px);
}

footer .footer-links a:focus-visible,
footer .footer-brand:focus-visible {
  border-radius: 6px;
  outline: 3px solid #78c9e8;
  outline-offset: 4px;
}

footer .footer-inner > small {
  grid-area: legal;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--footer-line);
  color: #aa9689;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

footer .footer-inner > small::after {
  content: "Feito no Brasil com cuidado editorial";
  color: #c9b8ac;
}

@media (max-width: 900px) {
  footer .footer-inner {
    grid-template-areas:
      "brand"
      "copy"
      "links"
      "legal";
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 70px;
  }

  footer .footer-inner > p {
    max-width: 560px;
    margin-bottom: 24px;
  }

  footer .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;
  }
}

@media (max-width: 620px) {
  footer .footer-inner {
    width: min(100% - 30px, 1180px);
    padding: 58px 0 78px;
  }

  footer .footer-brand .brand-paw {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  footer .footer-links {
    grid-template-columns: 1fr;
  }

  footer .footer-links a {
    min-height: 48px;
  }

  footer .footer-inner > small {
    display: grid;
    gap: 8px;
    margin-top: 24px;
    line-height: 1.5;
  }
}
