/* ===========================================================================
   site.css - o unico CSS proprio do projeto.

   style.min.css e o tema comprado e nao deve ser editado: tudo que e nosso
   mora aqui, usando as mesmas variaveis (--p300, --n700...) para nao destoar.
   Cobre o que o tema nao tinha: consentimento de cookies, seletor de idioma,
   avisos de formulario, paginas legais e alguns ajustes de acessibilidade.
   =========================================================================== */

/* --- Acessibilidade --------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 12px 20px;
  background: var(--p300);
  color: var(--n900);
  font-family: var(--head-font);
  font-weight: 600;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

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

/* Foco visivel para quem navega pelo teclado. O tema removia o outline sem
   colocar nada no lugar. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--p300);
  outline-offset: 2px;
  border-radius: 4px;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--p300);
}

/* Campo-armadilha do antibot: precisa existir no DOM e ficar fora da tela.
   `display:none` seria detectado por bots mais espertos. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* --- Seletor de idioma ------------------------------------------------------ */

.lang-switch {
  position: relative;
}

.lang-switch .icon-area {
  width: 40px;
  height: 40px;
}

.lang-current {
  font-family: var(--head-font);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 150px;
  padding: 8px;
  margin: 0;
  list-style: none;
  background: var(--n800);
  border: 1px solid var(--n700);
  border-radius: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}

.lang-switch.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--n40);
  font-size: 14px;
}

.lang-menu a:hover,
.lang-menu a.active {
  background: var(--n700);
  color: var(--p300);
}

.side-lang {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-lang a {
  display: block;
  padding: 4px 6px;
  font-family: var(--head-font);
  font-size: 12px;
  font-weight: 600;
  color: var(--n70);
  border-radius: 4px;
}

.side-lang a.active,
.side-lang a:hover {
  color: var(--p300);
}

/* --- Rodape ----------------------------------------------------------------- */

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--n70);
  font-size: 15px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--p300);
}

.footer-legal a,
.footer-legal .link-button {
  color: var(--n70);
  font-size: 14px;
  text-decoration: none;
}

.footer-legal a:hover,
.footer-legal .link-button:hover {
  color: var(--p300);
}

.footer-consent {
  color: var(--n70);
  line-height: 1.5;
  cursor: pointer;
}

.footer-consent input {
  margin-top: 3px;
  accent-color: var(--p300);
  flex-shrink: 0;
}

/* --- Avisos de formulario --------------------------------------------------- */

/* Substitui o alert() nativo que era disparado com texto lido da querystring. */
.site-alert {
  padding: 14px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--n700);
  background: var(--n800);
  color: var(--n30);
}

.site-alert--success {
  border-left: 4px solid var(--success-color);
}

.site-alert--error {
  border-left: 4px solid var(--danger-color);
}

.site-alert .link-button {
  line-height: 0;
  color: var(--n60);
}

/* --- Consentimento de cookies (LGPD) ---------------------------------------- */

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding: 16px;
  background: rgba(13, 13, 18, 0.97);
  border-top: 1px solid var(--n700);
  backdrop-filter: blur(8px);
  animation: cookie-rise 0.35s ease both;
}

.cookie-consent.is-hidden {
  display: none;
}

@keyframes cookie-rise {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent { animation: none; }
}

.cookie-consent__inner {
  max-width: 1140px;
  margin: 0 auto;
}

.cookie-consent__main {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.cookie-consent__text {
  flex: 1 1 420px;
}

.cookie-consent__text h4 {
  margin: 0 0 6px 0;
  font-size: 18px;
  color: var(--n0);
}

.cookie-consent__text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--n60);
}

.cookie-consent__text a {
  color: var(--p300);
  text-decoration: underline;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Recusar precisa ter o mesmo destaque de aceitar: o art. 8 da LGPD exige que
   o consentimento seja livre, e um "recusar" escondido nao e livre. */
.cookie-consent__actions .btn-box {
  padding: 10px 22px;
  font-size: 14px;
  white-space: nowrap;
}

.cookie-consent__prefs {
  max-height: 70vh;
  overflow-y: auto;
}

.cookie-consent__prefs h4 {
  margin: 0;
  font-size: 18px;
  color: var(--n0);
}

.cookie-consent__group {
  padding: 14px 0;
  border-top: 1px solid var(--n700);
}

.cookie-consent__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-consent__group h5 {
  margin: 0;
  font-size: 15px;
  color: var(--n20);
}

.cookie-consent__group p {
  margin: 6px 0 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--n70);
  max-width: 70ch;
}

.cookie-consent__always {
  font-size: 12px;
  color: var(--p300);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  flex-shrink: 0;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cookie-switch__track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--n600);
  border: 1px solid var(--n500);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cookie-switch__track::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  border-radius: 50%;
  background: var(--n30);
  transition: transform 0.2s ease;
}

.cookie-switch input:checked + .cookie-switch__track {
  background: var(--p500);
  border-color: var(--p300);
}

.cookie-switch input:checked + .cookie-switch__track::after {
  transform: translateX(20px);
  background: var(--p50);
}

.cookie-switch input:focus-visible + .cookie-switch__track {
  outline: 2px solid var(--p300);
  outline-offset: 2px;
}

@media (max-width: 575px) {
  .cookie-consent__actions {
    width: 100%;
  }
  .cookie-consent__actions .btn-box {
    flex: 1 1 100%;
    text-align: center;
    justify-content: center;
  }
}

/* --- Paginas legais --------------------------------------------------------- */

.legal-page {
  color: var(--n40);
  line-height: 1.8;
}

.legal-page h3 {
  margin: 48px 0 16px 0;
  scroll-margin-top: 110px;
}

.legal-page h4 {
  margin: 28px 0 12px 0;
  font-size: 18px;
  color: var(--n20);
}

.legal-page p {
  margin-bottom: 16px;
}

.legal-page a {
  color: var(--p300);
  text-decoration: underline;
}

.legal-page ul {
  margin: 0 0 20px 22px;
  padding: 0;
}

.legal-page li {
  margin-bottom: 8px;
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 24px 0;
  border: 1px solid var(--n700);
  border-radius: 10px;
}

.legal-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}

.legal-table th,
.legal-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--n700);
}

.legal-table th {
  background: var(--n800);
  color: var(--n10);
  font-family: var(--head-font);
  font-weight: 600;
  white-space: nowrap;
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

/* Sumario lateral fixo, como nas paginas legais da Rockstar. */
.legal-toc {
  position: sticky;
  top: 100px;
  padding: 20px;
  background: var(--n800);
  border: 1px solid var(--n700);
  border-radius: 12px;
}

.legal-toc h4 {
  margin: 0 0 14px 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--n60);
}

.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.legal-toc li {
  margin-bottom: 8px;
}

.legal-toc a {
  color: var(--n60);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  display: block;
  padding-left: 12px;
  border-left: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.legal-toc a:hover,
.legal-toc a.is-active {
  color: var(--p300);
  border-left-color: var(--p300);
}

.legal-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--n60);
  background: var(--n800);
  border: 1px solid var(--n700);
  border-radius: 999px;
}

/* --- Blog ------------------------------------------------------------------- */

.post-body {
  line-height: 1.85;
  color: var(--n40);
}

.post-body p {
  margin-bottom: 18px;
}

.post-body h4 {
  margin: 32px 0 14px 0;
  color: var(--n10);
}

.post-body a {
  color: var(--p300);
  text-decoration: underline;
}

.post-empty {
  padding: 60px 20px;
  text-align: center;
  border: 1px dashed var(--n600);
  border-radius: 12px;
  color: var(--n60);
}

.pagination-area {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.pagination-area a,
.pagination-area span {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--n700);
  border-radius: 8px;
  color: var(--n50);
  font-family: var(--head-font);
  text-decoration: none;
}

.pagination-area a:hover {
  border-color: var(--p300);
  color: var(--p300);
}

.pagination-area .is-current {
  background: var(--p500);
  border-color: var(--p300);
  color: var(--n0);
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--n70);
}

/* --- Equipe / sobre --------------------------------------------------------- */

.team-bio {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--n70);
}

/* --- Aparicao ao rolar ------------------------------------------------------ */

/* Usado por site.js com IntersectionObserver. Sem JS ou com movimento
   reduzido, o conteudo simplesmente ja aparece visivel. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* --- Turnstile -------------------------------------------------------------- */

.turnstile-wrap {
  margin: 16px 0 4px 0;
  min-height: 65px;
}

/* --- Cursor customizado ----------------------------------------------------- */

/*
   main.js passou a posicionar o cursor por transform (translate3d) em vez de
   animar left/top a cada mousemove. Duas consequencias aqui:

   1. left/top precisam ir a zero, senao o -10px do tema entra como
      deslocamento fixo e o cursor fica fora do ponteiro;
   2. a transicao curinga de 100ms do tema disputava com o
      requestAnimationFrame e produzia tremor - agora so a opacidade transita.
*/
.mouse-follower span {
  top: 0;
  left: 0;
  transform: none;
  opacity: 0;
  transition: opacity 200ms ease-in-out, border-color 200ms ease-in-out, background 200ms ease-in-out;
}

/* Sem mouse (toque) nao existe cursor para seguir. */
@media (hover: none), (pointer: coarse) {
  .mouse-follower {
    display: none;
  }
}

/* --- Banners internos ------------------------------------------------------- */

/*
   O tema poe a ilustracao como background do banner e escreve o titulo por
   cima, sem nenhuma separacao. Em telas largas o subtitulo cai justamente
   sobre a parte clara do desenho e fica ilegivel (era o caso em /career e
   /about-us).

   Um veu na diagonal resolve: opaco do lado do texto, transparente do lado da
   arte. A ilustracao continua aparecendo, o texto passa a ter contraste, e o
   conjunto fica mais sobrio.
*/
.banner-section.inner-banner {
  position: relative;
  background-size: cover;
  background-position: center right;
}

.banner-section.inner-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    var(--n900) 0%,
    rgba(22, 24, 41, 0.94) 30%,
    rgba(22, 24, 41, 0.55) 60%,
    rgba(22, 24, 41, 0.15) 100%
  );
}

/* O conteudo precisa ficar acima do veu. */
.banner-section.inner-banner > .container,
.banner-section.inner-banner .banner-content,
.banner-section.inner-banner .breadcrumb-area {
  position: relative;
  z-index: 2;
}

/* Em tela estreita a arte fica atras do texto inteiro; o veu vira vertical
   para o titulo nao competir com o desenho. */
@media (max-width: 991px) {
  .banner-section.inner-banner::before {
    background: linear-gradient(
      180deg,
      rgba(22, 24, 41, 0.92) 0%,
      rgba(22, 24, 41, 0.86) 60%,
      rgba(22, 24, 41, 0.75) 100%
    );
  }
}

/*
   Trava o giro das ilustracoes de banner.

   .banner-section .shape-area .shape-1 traz `animation: rotate 35s linear
   infinite` no tema. Em forma abstrata (bolha, elipse) o efeito faz sentido;
   numa ilustracao com pessoas, o desenho gira de cabeca para baixo. Como as
   paginas internas usam ilustracao, a animacao sai daqui.
*/
.banner-section.inner-banner .shape-area .shape-1,
.banner-section.inner-banner .shape-area .shape-2 {
  animation: none;
}

/* --- Botao de apoio ao estudio ---------------------------------------------- */

/*
   Fica no cabecalho, ao lado do seletor de idioma. E um <a> comum, sem
   dependencia de script: o widget flutuante do Buy Me a Coffee so carrega para
   quem aceita cookies de terceiros, entao quem recusa precisava de um caminho
   proprio para apoiar.

   Contorno em vez de preenchimento solido: o cabecalho ja tem o verde da marca
   nos itens ativos, e um segundo bloco cheio competiria com a navegacao.
*/
.support-btn {
  padding: 7px 16px;
  border: 1px solid var(--p300);
  border-radius: 999px;
  color: var(--p300);
  font-family: var(--head-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.support-btn:hover,
.support-btn:focus-visible {
  background: var(--p300);
  color: var(--n900);
}

.support-btn .material-symbols-outlined {
  font-size: 20px;
  color: inherit;
}

/* Abaixo de 1400px o cabecalho fica apertado: sobra o icone, e o `title` mais
   o texto do menu lateral continuam explicando o que ele faz. */
@media (max-width: 1399px) {
  .support-btn {
    padding: 8px;
    border-radius: 50%;
  }
  .support-btn__label {
    display: none;
  }
}

/* No menu lateral (navegacao principal do mobile) o item acompanha o verde da
   marca para nao se perder no meio dos demais links. */
.sidebar-content .support-link {
  color: var(--p300);
}

.sidebar-content .support-link .material-symbols-outlined {
  font-size: 20px;
  color: inherit;
}
