/* ============================================
   Anchors - Typography overrides
   ============================================ */

/* Global: override default em italic to a sans-serif emphasis */
em {
  font-style: normal;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Display headlines: clean sans emphasis with brand blue */
.hero h1 em,
.section-head h2 em,
.admin-header h1 em,
h1 em, h2 em {
  font-style: normal;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92em;
  letter-spacing: -0.015em;
  color: var(--blue);
}

i, cite {
  font-style: italic;
}

/* ============================================
   Brand lockup: logo's A continues as wordmark
   ============================================ */

.brand {
  display: flex;
  align-items: center;
  gap: 0;
}

img.brand-mark {
  height: 42px;
  width: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  background: transparent;
  border: none;
}

svg.brand-mark {
  width: 38px;
  height: 38px;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
  margin-left: -9px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink);
  line-height: 1;
}

.brand-tagline {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1;
}

@media (max-width: 720px) {
  img.brand-mark { height: 36px; }
  .brand-name { font-size: 20px; }
  .brand-tagline { font-size: 8px; letter-spacing: 1.4px; }
  .brand-text { margin-left: -7px; }
}
/* ============================================
   Language toggle — flag + code, modern pair
   ============================================ */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.02);
}

.lang-opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
  line-height: 1;
}
.lang-opt:hover { color: var(--ink); }
.lang-opt.active {
  background: var(--ink);
  color: var(--paper);
}

.lang-flag {
  width: 18px;
  height: 12px;
  display: block;
  border-radius: 1.5px;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

/* Dropdown variant — header shows only the current language */
.lang-dd { position: relative; }

.lang-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.02);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}

.lang-dd-chev { transition: transform 0.18s ease; }
.lang-dd.open .lang-dd-chev { transform: rotate(180deg); }

.lang-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 300;
  min-width: 160px;
  padding: 6px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(19, 32, 44, 0.16);
}

.lang-dd-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}
.lang-dd-opt:hover { background: var(--blue-soft); }
.lang-dd-opt.active { background: var(--paper-2); font-weight: 600; }

/* On the blue header */
.nav-inner .lang-dd-btn {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}
.nav-inner .lang-dd-btn:hover { background: rgba(255, 255, 255, 0.14); }

/* Mobile drawer variant — full-width row with native language names */
.lang-toggle.mobile {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  padding: 5px;
}
.lang-toggle.mobile .lang-opt {
  flex: 1;
  justify-content: center;
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.6px;
}
.lang-toggle.mobile .lang-flag {
  width: 20px;
  height: 14px;
}
