/* ==========================================================================
   Menu padrão do site (pílula flutuante preta), usado em todas as páginas.
   Animação discreta Brasil → EUA: borda fina com as cores das duas
   bandeiras correndo devagar e um brilho suave de cada lado.
   ========================================================================== */

.site-header { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; padding: 0 var(--gutter, clamp(16px, 4vw, 40px)); pointer-events: none; }
.header-pill { position: relative; isolation: isolate; pointer-events: auto; max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 10px 0 26px; border-radius: 999px; background: rgba(11,12,10,.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; box-shadow: 0 18px 40px -20px rgba(11,12,10,.6); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.site-header.hide .header-pill { transform: translateY(-120%); }

/* Borda Brasil → EUA */
.header-pill::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(90deg,
    #009C3B 0px, #FEDF00 110px, #2E5BD8 220px, #3C3B6E 300px, #FFFFFF 380px, #B22234 470px, #009C3B 600px);
  background-size: 600px 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: .75; animation: pillFlow 16s linear infinite;
}
/* Fundo da pílula: a bandeira do Brasil vira a dos EUA, escurecida */
@property --pmix { syntax: "<percentage>"; inherits: true; initial-value: 40%; }
.pill-flags { --pmix: 40%; position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: -1; pointer-events: none;
  animation: pfIn 2.2s cubic-bezier(.65,0,.35,1) .2s both, pfDrift 12s ease-in-out 2.4s infinite alternate; }
.pill-flags i, .pill-flags b { position: absolute; display: block; }
.pf-br { inset: 0; background: #009C3B;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--pmix) - 16%), transparent calc(var(--pmix) + 16%));
  mask-image: linear-gradient(90deg, #000 calc(var(--pmix) - 16%), transparent calc(var(--pmix) + 16%)); }
.pf-rh { left: -3%; top: 50%; width: 44%; height: 170px; margin-top: -85px; background: #FEDF00; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.pf-ci { left: calc(19% - 46px); top: 50%; width: 92px; height: 92px; margin-top: -46px; border-radius: 50%;
  background: radial-gradient(ellipse 150% 95% at 50% 135%, transparent 60%, #fff 61%, #fff 67%, transparent 68%), #002776; }
.pf-us { inset: 0; background: repeating-linear-gradient(180deg, #B22234 0 4.93px, #fff 4.93px 9.86px);
  -webkit-mask-image: linear-gradient(90deg, transparent calc(var(--pmix) - 16%), #000 calc(var(--pmix) + 16%));
  mask-image: linear-gradient(90deg, transparent calc(var(--pmix) - 16%), #000 calc(var(--pmix) + 16%)); }
.pf-ca { top: 0; bottom: 0; left: calc(var(--pmix) + 2%); width: min(34%, 360px); background-color: #3C3B6E;
  background-image: radial-gradient(circle, #fff 1.2px, transparent 1.8px), radial-gradient(circle, #fff 1.2px, transparent 1.8px);
  background-size: 20px 13px; background-position: 3px 1px, 13px 7px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 50px); mask-image: linear-gradient(90deg, transparent, #000 50px); }
/* Véu escuro para o menu continuar legível, mais forte no meio */
.pill-flags::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,12,10,.55), rgba(11,12,10,.8) 38%, rgba(11,12,10,.82) 72%, rgba(11,12,10,.6)); }
/* Reflexo de luz passando, como bandeira ao vento */
.pill-flags::before { content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; z-index: 1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.10) 45%, rgba(255,255,255,.16) 50%, rgba(255,255,255,.10) 55%, transparent);
  animation: pfShine 7s ease-in-out 2.6s infinite; }
@keyframes pfIn { from { --pmix: 120%; } to { --pmix: 40%; } }
@keyframes pfDrift { from { --pmix: 40%; } to { --pmix: 64%; } }
@keyframes pfShine { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(470%); } }

.header-pill .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; color: #fff; }
.header-pill .brand-text { display: inline-flex; align-items: center; gap: 9px; font-family: "Space Grotesk", system-ui, sans-serif; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.header-pill .brand-logo { height: 22px; width: auto; display: block; }
.header-pill .brand-text em { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 500; color: #fff; }
.main-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.main-nav a { display: block; padding: 8px 14px; border-radius: 99px; text-decoration: none; font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,.75); transition: background .2s, color .2s; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-toggle { display: none; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); position: relative; cursor: pointer; }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: #fff; transition: transform .3s, top .3s; }
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }
.mobile-nav { pointer-events: auto; max-width: 1100px; margin: 8px auto 0; display: flex; flex-direction: column; padding: 8px 20px 20px; border-radius: 26px; background: rgba(11,12,10,.96); color: #fff; }
.mobile-nav[hidden] { display: none; }
.mobile-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid #262823; text-decoration: none; font-family: "Space Grotesk", system-ui, sans-serif; font-size: 20px; font-weight: 500; color: #fff; }
.mobile-nav .btn { margin-top: 18px; }

@media (max-width: 1100px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .header-pill { gap: 10px; }
}
@media (max-width: 640px) {
  .pf-rh { width: 62%; height: 150px; margin-top: -75px; }
  .pf-ci { left: calc(27% - 40px); width: 80px; height: 80px; margin-top: -40px; }
  .site-header { top: 10px; padding: 0 10px; }
  .header-pill { height: 58px; padding: 0 7px 0 20px; }
  .header-cta { display: none; }
  .header-pill .brand-text { font-size: 16px; gap: 7px; }
  .header-pill .brand-logo { height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .header-pill::before, .pill-flags, .pill-flags::before { animation: none; }
  .pill-flags::before { display: none; }
}
