/* ============================================================
   Shared site header — used identically by the landing page and
   the Privacy / Terms pages.

   Tokens are namespaced (--hdr-*) so the header renders the same
   regardless of the palette the host page defines for itself.
   ============================================================ */

:root {
  --hdr-bg: rgba(255, 248, 240, 0.85);
  --hdr-ink: #1A1625;
  --hdr-orange: #FF5C39;
  --hdr-border: #E8DDD0;
  --hdr-font-display: 'Bricolage Grotesque', system-ui, sans-serif;
}

/* Anchors in the page shouldn't disappear behind the sticky bar. */
html { scroll-padding-top: 88px; }

/* Transparent while resting at the top so the hero reads as one surface;
   the background, blur and border fade in only once content scrolls under. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 13px 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.25s ease,
    backdrop-filter 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
/* Applied by js/header.js once the page is scrolled. */
.site-header.is-stuck {
  background: var(--hdr-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--hdr-border);
  box-shadow: 0 6px 20px -14px rgba(20, 14, 5, 0.55);
}

.header-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  display: block;
  height: 34px;
  width: auto;
}

/* ---- Language toggle ----
   Buttons on the landing page (JS swaps copy in place); anchors on the
   legal pages (each locale is its own document). Styled identically. */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--hdr-border);
  border-radius: 999px;
  padding: 6px 12px;
  flex: none;
}
.lang-btn {
  position: relative;
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-family: var(--hdr-font-display);
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.6px;
  padding: 5px 5px 8px;
  color: var(--hdr-ink);
}
/* Press feedback — the toggle previously gave no acknowledgment on tap. */
.lang-btn {
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.lang-btn:active {
  transform: scale(0.92);
}
.brand-logo {
  transition: transform 250ms cubic-bezier(0.23, 1, 0.32, 1);
}
.brand:active .brand-logo {
  transform: scale(0.97);
}

.lang-btn::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 1px;
  height: 3px;
  border-radius: 2px;
  background: var(--hdr-orange);
  opacity: 0;
}
.lang-btn[aria-pressed="true"]::after,
.lang-btn[aria-current="page"]::after { opacity: 1; }

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 2px solid var(--hdr-orange);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}
