/* Cabeçalho local: marca preservada e ações com um único padrão. */
:root {
  --nav-bg: #1c1510;
  --nav-gold: #d9b27c;
  --nav-cream: #f3e9d8;
  --nav-height: 144px;
  --nav-announcement-height: 0px;
  --nav-side: clamp(32px, 7vw, 128px);
  --nav-gap: 12px;
  --nav-transition: 250ms ease;
  --nav-logo-height: 112px;
  --nav-button-height: var(--action-height);
  --nav-button-radius: var(--action-radius);
  --nav-button-dark: var(--action-dark);
  --nav-button-gap: 12px;
  --nav-button-primary: var(--action-gold);
  --nav-button-hover: var(--action-hover);
  --nav-button-active: var(--action-active);
  --nav-font-size: 14px;
  --nav-font-weight: 500;
  --nav-font-spacing: .01em;
  --nav-line-height: 1.5;
  --nav-shade-start: rgba(28,21,16,.96);
  --nav-shade-middle: rgba(28,21,16,.58);
  --nav-gradient-height: 180px;
}
.header { position: absolute; inset: 0 0 auto; z-index: 40; width: 100%; max-width: none; height: auto; padding: 0; margin: 0; display: block; color: var(--nav-cream); background: transparent; border-bottom: 0; }
.header::before { content: ''; position: absolute; inset: 0 0 auto; height: calc(var(--nav-announcement-height) + var(--nav-gradient-height)); z-index: -1; pointer-events: none; background: linear-gradient(to bottom, var(--nav-shade-start) 0%, var(--nav-shade-middle) 55%, transparent 100%); }
.header-inner { width: 100%; max-width: none; height: var(--nav-height); padding-inline: var(--nav-side); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.desktop-nav { justify-self: center; display: flex; align-items: center; gap: var(--nav-gap); }
.header .header-actions { position: relative; justify-self: end; display: grid; grid-template-columns: repeat(2, 1fr); align-items: center; gap: var(--nav-button-gap); }
.header, .mobile-menu {
  --action-bg: #291f16;
  --action-ghost-hover: #35281c;
  --action-border: rgba(217,178,124,.32);
}
.header-brand { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; justify-self: start; flex-shrink: 0; }
.header .header-brand { margin-left: 16px; top: 14px; }
.header-brand picture { display: block; line-height: 0; }
.header-brand img { display: block; height: var(--nav-logo-height); width: auto; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); transition: height 250ms ease; }

/* Navegação e conta compartilham geometria, fonte e estados. */
.desktop-nav a, .header-actions :is(a, button), .mobile-nav a, .mobile-menu-actions :is(a, button) {
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--action-height); min-height: var(--action-height);
  padding: 0 24px; border: 1px solid var(--action-border); border-radius: 5px;
  background: var(--action-bg); color: var(--action-cream);
  font-family: var(--sans); font-size: var(--nav-font-size); font-weight: 500; line-height: 1.5;
  letter-spacing: 0; text-transform: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(243,233,216,.035); text-shadow: none; transform: none;
  transition: background-color var(--action-transition), border-color var(--action-transition), color var(--action-transition);
}
/* Eventos, Quem somos e Meu acesso: texto e um traço discreto, sem caixas. */
.desktop-nav a,.header-actions .account-button,.mobile-nav a,.mobile-menu-actions .account-button {
  position:relative; border:0; border-radius:0; background:transparent;
  color:var(--action-cream); box-shadow:none; text-decoration:none; font-size:16px; font-weight:600; letter-spacing:-.015em;
  transition:color 180ms ease;
}
.desktop-nav a::after,.header-actions .account-button::after,.mobile-nav a::after,.mobile-menu-actions .account-button::after {
  content:''; position:absolute; left:50%; right:auto; bottom:6px; width:22px; height:1px; border-radius:1px; transform:translateX(-50%);
  background:#a88153; opacity:0; pointer-events:none;
  transition:opacity 180ms ease;
}
.desktop-nav a:hover,.header-actions .account-button:hover,.mobile-nav a:hover,.mobile-menu-actions .account-button:hover {
  background:transparent; color:#e8c796; box-shadow:none;
}
.desktop-nav a[aria-current="location"]::after,.mobile-nav a[aria-current="location"]::after { opacity:1; }
.desktop-nav a[aria-current="location"],.mobile-nav a[aria-current="location"] { color:#e8c796; }
.desktop-nav a:active,.header-actions .account-button:active,.mobile-nav a:active,.mobile-menu-actions .account-button:active { background:transparent; color:var(--nav-gold); }
.header-actions .register-button, .mobile-menu-actions .register-button {
  background: var(--action-gold); color: var(--action-dark); border-color: var(--action-gold); font-weight: 600;
}
.header-actions .register-button:hover, .mobile-menu-actions .register-button:hover { background: var(--action-hover); border-color: var(--action-hover); }
.header-actions .register-button:active, .mobile-menu-actions .register-button:active { background: var(--action-active); border-color: var(--action-active); }
.header a:focus-visible, .header button:focus-visible, .mobile-menu a:focus-visible, .mobile-menu button:focus-visible { outline: 2px solid var(--action-focus); outline-offset: 3px; }
.header-toggle { display: none; }
.header-toggle, .mobile-menu-close, .announcement-close { border: 1px solid var(--action-border); border-radius: var(--action-radius); background: var(--action-bg); color: var(--action-cream); min-width: 48px; min-height: 48px; transition: background-color var(--action-transition), border-color var(--action-transition); }
.header-toggle:hover, .mobile-menu-close:hover, .announcement-close:hover { background: var(--action-ghost-hover); border-color: var(--action-gold); }
.header-toggle-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 48px; }
.header-toggle-icon svg { display: block; width: 22px; height: 22px; }
.header-toggle-label { padding-right: 16px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.header-announcement[hidden] { display: none; }
.header-announcement { min-height: 48px; padding-inline: var(--nav-side); display: flex; align-items: center; justify-content: center; gap: 12px; background: rgba(201,154,91,.12); border-bottom: 1px solid #d9b27c29; font-size: 12px; line-height: 1.4; }
.announcement-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.announcement-dot { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: var(--nav-gold); }
.announcement-link { flex-shrink: 0; color: var(--nav-gold); }
.announcement-close { flex-shrink: 0; padding: 0; font-size: 19px; }
.header-menu-open { overflow: hidden; }
.skip-link { z-index: 60; }
#inicio, #eventos, #quem-somos { scroll-margin-top: 16px; }

/* O dialog mantém foco, ESC e rolagem acessíveis em telas baixas. */
.mobile-menu:not([open]) { display: none; }
.mobile-menu[open] { display: flex; flex-direction: column; }
.mobile-menu { position: fixed; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: max(20px, env(safe-area-inset-top)) var(--nav-side) max(24px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: var(--nav-bg); color: var(--nav-cream); overflow-y: auto; }
.mobile-menu::backdrop { background: var(--nav-bg); backdrop-filter: none; }
.mobile-menu-top { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 16px; }
.mobile-menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mobile-menu-close { grid-column: 3; grid-row: 1; width: 48px; height: 48px; display: grid; place-items: center; }
.mobile-menu-close .icon { width: 24px; height: 24px; }
.mobile-menu-brand { grid-column: 2; grid-row: 1; justify-self: center; }
.mobile-menu-brand img { height: 88px; }
.mobile-nav { display: grid; gap: 12px; padding-block: 32px 12px; }
.mobile-menu-actions { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.mobile-nav a, .mobile-menu-actions :is(a, button) { width: 100%; height: 56px; min-height: 56px; font-size: 17px; flex-shrink: 0; }
/* Abrir o menu antes de os quatro controles de 16px colidirem. */
@media (max-width: 1100px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .desktop-nav, .header .header-actions { display: none; }
  .header-toggle { display: inline-flex; align-items: center; justify-content: center; justify-self: end; height: 48px; padding: 0; }
}
@media (max-width: 767px) {
  :root { --nav-height: 96px; --nav-side: clamp(20px, 5vw, 32px); --nav-logo-height: 68px; }
  .header .header-brand { margin-left: 10px; top: 12px; }
  .header-announcement { gap: 8px; font-size: 12px; }
  .announcement-text { flex: 1; min-width: 0; }
  .announcement-link { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .header :is(a, button, img), .mobile-menu :is(a, button) { transition: none; } }

@media (prefers-reduced-motion:reduce) {
 .desktop-nav a::after,.header-actions .account-button::after,.mobile-nav a::after,.mobile-menu-actions .account-button::after { transition:none; }
}

@media (max-width:1100px) {
 .mobile-nav a,.mobile-menu-actions .account-button { font-size:18px; }
 .mobile-nav a::after,.mobile-menu-actions .account-button::after { bottom:5px; }
}

/* Navegação em texto real, com tipografia consistente e acabamento discreto. */
.public-home .header :is(.desktop-nav a,.header-actions a) { font-family:'Inter',sans-serif; font-weight:500; font-size:16px; letter-spacing:0; }
.public-home .header :is(.desktop-nav a,.account-button)::after { content:none; }
.public-home .header .header-actions { display:flex; gap:16px; }
.public-home .header .header-actions .register-button { font-weight:500; width:150px; height:48px; min-height:48px; padding:0 24px; border:1px solid rgba(154,116,64,.55); border-radius:6px; background:var(--action-gold); color:var(--action-dark); box-shadow:inset 0 1px 0 rgba(255,255,255,.15); }
.public-home .header .header-actions .register-button:hover { background:var(--action-hover); border-color:var(--action-hover); }
@media (max-width:767px) {
  .public-home .header .header-actions { gap:10px; }
  .public-home .header .header-actions a { font-size:14px; }
  .public-home .header .header-actions .register-button { width:106px; height:48px; padding:0 10px; }
}
/* Navegação pública sempre direta, sem botão Menu em nenhuma largura. */
.header .header-toggle { display:none; }
@media (min-width:768px) and (max-width:1100px) {
  :root { --nav-height:112px; }
  .header-inner { grid-template-columns:auto minmax(0,1fr) auto; gap:16px; padding-inline:24px; }
  .header .header-brand { margin:0; top:0; }
  .header-brand img { height:88px; }
  .header .desktop-nav { display:flex; justify-self:center; gap:4px; min-width:0; }
  .header .header-actions { display:flex; justify-self:end; gap:10px; min-width:0; }
  .header .desktop-nav a,.header .header-actions :is(a,button) { height:48px; min-height:48px; padding-inline:14px; font-size:15px; white-space:nowrap; }
}

