/* Site chrome: sticky gold header, off-canvas drawer, gold footer,
   sticky mobile CTA. */

/* ---------- Header: gold at all times ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  padding: 14px clamp(16px, 3vw, 40px);
  background: var(--c-fill);
  border-bottom: 1px solid var(--line-on-gran);
  transition: box-shadow var(--speed) var(--ease);
}

/* Scrolled: only a shadow, so the bar reads as floating over the content */
.topnav.is-scrolled {
  box-shadow: 0 8px 24px rgba(27, 29, 27, 0.18);
}

.topnav .btn--primary {
  background: var(--c-vit);
  color: var(--c-granit);
}

.topnav .btn--primary:hover {
  background: var(--c-dis);
}

.topnav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text-on-gran);
  white-space: nowrap;
}

.brand-mark {
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  line-height: 1.1;
}

.topnav .brand-tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--text-on-gran-muted);
}

@media (max-width: 480px) {
  .topnav .brand-tag {
    display: none;
  }
}

.topnav .brand b {
  font-weight: 700;
}

.topnav nav {
  display: flex;
  gap: clamp(14px, 2.2vw, 30px);
  margin-left: auto;
}

.topnav nav a {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-on-gran);
  padding-block: 4px;
  white-space: nowrap;
}

/* Hairline underline slides in on hover / marks the current page */
.topnav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--text-on-gran);
  transition: right var(--speed) var(--ease);
}

.topnav nav a:hover::after,
.topnav nav a[aria-current="page"]::after {
  right: 0;
}

/* Current page: ink on gold, a step bolder, 2px underline (v2 handoff) */
.topnav nav a[aria-current="page"] {
  color: var(--text-on-gran);
  font-weight: 600;
}

.topnav nav a[aria-current="page"]::after {
  height: 2px;
}

.topnav .btn {
  padding-block: 10px;
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--text-on-gran);
  border: 1px solid var(--line-on-gran);
  border-radius: var(--r-sm);
}

.menu-btn svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ---------- Language switcher (only when a page emits in >1 locale) ---------- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-switch a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 6px 7px;
  border-radius: var(--r-sm);
  color: var(--text-on-gran-muted);
  transition: color var(--speed);
}

.lang-switch a:hover {
  color: var(--text-on-gran);
}

.lang-switch a[aria-current="true"] {
  color: var(--text-on-gran);
  font-weight: 600;
  border: 1px solid var(--line-on-gran);
}

/* ---------- Language switcher: globe dropdown (header) ---------- */
.lang-menu {
  position: relative;
}

.lang-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  color: var(--text-on-gran-muted);
  cursor: pointer;
}

.lang-menu > summary::-webkit-details-marker {
  display: none;
}

.lang-menu > summary:hover,
.lang-menu[open] > summary {
  color: var(--text-on-gran);
  background: var(--line-on-gran);
}

.lang-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--c-vit);
  border: 1px solid var(--line-on-gran);
  border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(27, 29, 27, 0.18);
  z-index: 50;
}

.lang-pop a {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  color: var(--c-granit);
  white-space: nowrap;
}

.lang-pop a:hover {
  background: var(--c-dis);
}

.lang-pop a[aria-current="true"] {
  font-weight: 600;
}

@media (max-width: 900px) {
  .topnav nav,
  .topnav .lang-menu,
  .topnav .btn {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
    margin-left: auto;
  }
}

