/* ══════════════════════════════════════════════════════
   04-LAYOUT — NAV · THEME TOGGLE · LANG · FONT CONTROL
══════════════════════════════════════════════════════ */

/* ── NAV ─────────────────────────────────────────────── */

#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 0 2.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition: background 0.55s ease, border-color 0.55s ease;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  transition: color 0.55s ease;
}

.nav-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.55s ease;
}

.nav-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  transition: color 0.55s ease;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}


/* ── THEME TOGGLE ───────────────────────────────────── */

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem 0.4rem 0.5rem;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.3s, background 0.3s, var(--theme-transition);
  user-select: none;
}

.theme-toggle:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.tt-track {
  width: 32px;
  height: 17px;
  border-radius: 30px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.4s ease;
}

[data-theme="dark"]  .tt-track { background: rgba(200,169,110,0.25); }
[data-theme="light"] .tt-track { background: rgba(156,124,62,0.2); }

.tt-dot {
  position: absolute;
  top: 2px; left: 2px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--gold);
  transition: transform 0.35s cubic-bezier(0.34,1.4,0.64,1), background 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  line-height: 1;
}

[data-theme="light"] .tt-dot {
  transform: translateX(15px);
}

.tt-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.55s ease;
  /* Label oculto visualmente — informação acessível via aria-label */
  display: none;
}


/* ── LANG SWITCHER ──────────────────────────────────── */

.lang-switcher {
  display: flex;
  align-items: center;
  background: rgba(200,169,110,0.06);
  border: 1px solid rgba(200,169,110,0.15);
  border-radius: 6px;
  overflow: hidden;
  font-family: 'DM Mono', monospace;
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(200,169,110,0.45);
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
  position: relative;
}

.lang-btn:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 20%;
  height: 60%; width: 1px;
  background: rgba(200,169,110,0.18);
}

.lang-btn:hover { color: rgba(200,169,110,0.75); }

.lang-btn.active {
  color: #c8a96e;
  font-weight: 500;
}

/* Lang — light overrides */
[data-theme="light"] .lang-switcher {
  background: rgba(156,124,62,0.07);
  border-color: rgba(156,124,62,0.2);
}
[data-theme="light"] .lang-btn           { color: rgba(156,124,62,0.45); }
[data-theme="light"] .lang-btn:hover     { color: rgba(156,124,62,0.75); }
[data-theme="light"] .lang-btn.active    { color: #9c7c3e; }
[data-theme="light"] .lang-btn:not(:last-child)::after { background: rgba(156,124,62,0.2); }


/* ── FONT CONTROL — A- / A+ ─────────────────────────────
   Controla a escala tipográfica do produto (→ 01-root.css).
   Vive no nav entre lang-switcher e theme-toggle.

   HTML a adicionar dentro de .nav-right:
   <div class="font-ctrl" role="group" aria-label="Tamanho do texto">
     <button class="font-btn" id="fontDecrease" aria-label="Diminuir texto">A−</button>
     <button class="font-btn" id="fontIncrease" aria-label="Aumentar texto">A+</button>
   </div>
─────────────────────────────────────────────────────── */

.font-ctrl {
  display: flex;
  align-items: center;
  background: rgba(200,169,110,0.06);
  border: 1px solid rgba(200,169,110,0.15);
  border-radius: 6px;
  overflow: hidden;
  font-family: 'DM Mono', monospace;
}

.font-btn {
  background: none;
  border: none;
  color: rgba(200,169,110,0.45);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
  position: relative;
  user-select: none;
}

.font-btn:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 20%;
  height: 60%; width: 1px;
  background: rgba(200,169,110,0.18);
}

.font-btn:hover { color: var(--gold); }

.font-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

/* Feedback visual — botão ativo quando no estado correspondente */
html[data-font="small"]  #fontDecrease,
html[data-font="large"]  #fontIncrease {
  color: var(--gold);
  font-weight: 700;
}

/* Botões desabilitados nos extremos */
html[data-font="small"]  #fontDecrease { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
html[data-font="large"]  #fontIncrease { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* Font control — light overrides */
[data-theme="light"] .font-ctrl {
  background: rgba(156,124,62,0.07);
  border-color: rgba(156,124,62,0.2);
}
[data-theme="light"] .font-btn { color: rgba(156,124,62,0.45); }
[data-theme="light"] .font-btn:hover { color: var(--gold); }
[data-theme="light"] .font-btn:not(:last-child)::after { background: rgba(156,124,62,0.2); }
