@import url("tokens.css?v=25");

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--hero-stack-h);
  overflow-x: hidden;
  max-width: 100%;
}

/* Fenix legado redefine html — mantém escala rem do DS em todas as páginas */
html {
  font-size: 62.5% !important;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-page-bg);
  -webkit-font-smoothing: antialiased;
  /* clip (não hidden): hidden transformaria o body num 2º container de scroll além do viewport */
  overflow-x: clip;
}

img, video { max-width: 100%; display: block; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible { color: var(--color-primary-dark); }

:focus-visible {
  outline: 0px solid var(--color-primary-dark);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--color-focus-ring);
}

.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;
}

.site-main, .site-header, .site-footer { position: relative; z-index: 1; }

.w-full { width: 100%; }
.desktop-only { display: none !important; }
.mobile-only { display: block !important; }

@media (min-width: 992px) {
  .desktop-only { display: block !important; }
  .mobile-only { display: none !important; }
}


/* Anti-flash de autenticação: aplica antes do primeiro paint. */
html[data-auth="conectado"] [data-login="desconectado"],
html[data-auth="desconectado"] [data-login="conectado"] {
  display: none !important;
}

/* Fallback antes do auth-boot: assume visitante deslogado. */
html:not([data-auth]) [data-login="conectado"] {
  display: none !important;
}

/* Botões: sem troca de cor no hover; brilho atravessa uma única vez (mesmo efeito do contador). */
.btn,
.site-nav a.nav-cta,
.food99-cookies__btn,
.home-fale__regulamento-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn::before,
.site-nav a.nav-cta::before,
.food99-cookies__btn::before,
.home-fale__regulamento-btn::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  z-index: 1;
  width: 45%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-130%) skewX(-18deg);
  pointer-events: none;
}

.btn:hover:not(:disabled)::before,
.site-nav a.nav-cta:hover::before,
.food99-cookies__btn:hover::before,
.home-fale__regulamento-btn:hover::before {
  animation: btn-hover-shine 0.75s ease-out 1;
}

@keyframes btn-hover-shine {
  from {
    transform: translateX(-130%) skewX(-18deg);
  }
  to {
    transform: translateX(330%) skewX(-18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover:not(:disabled)::before,
  .site-nav a.nav-cta:hover::before,
  .food99-cookies__btn:hover::before,
  .home-fale__regulamento-btn:hover::before {
    animation: none;
  }
}
