/* ════════════════════════════════════════════════════════════════
   LYDIAN AI — canonical site header (content pages, 6 languages)
   Same metrics as the headers it replaces: sticky, 64px, near-opaque.
   Isolated `lh-*` namespace; logical properties (RTL-safe).
   ════════════════════════════════════════════════════════════════ */

.lh {
  --lh-bg: rgba(255, 255, 255, 0.96);
  --lh-text: #3d3b37;
  --lh-strong: #1f1f1e;
  --lh-muted: #66635d;
  --lh-accent: #8f3d21;
  --lh-cta-bg: #e97451;
  --lh-cta-text: #1f1f1e;
  --lh-rule: rgba(31, 31, 30, 0.1);
  --lh-panel: #ffffff;
  --lh-hover: rgba(233, 116, 81, 0.1);
  position: sticky;
  inset-block-start: 0;
  z-index: 1000;
  display: block;
  inline-size: 100%;
  box-sizing: border-box;
  margin: 0;
  background: var(--lh-bg);
  border-block-end: 1px solid var(--lh-rule);
  color: var(--lh-text);
  font-family: var(--font-body, 'Plus Jakarta Sans', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  font-size: 14px;
  line-height: 1.4;
  text-align: start;
}
[data-theme='dark'] .lh {
  --lh-bg: rgba(31, 31, 30, 0.96);
  --lh-text: rgba(255, 255, 255, 0.8);
  --lh-strong: #fafafa;
  --lh-muted: rgba(255, 255, 255, 0.56);
  --lh-accent: #f5a47c;
  --lh-rule: rgba(245, 164, 124, 0.16);
  --lh-panel: #262624;
  --lh-hover: rgba(245, 164, 124, 0.1);
}
.lh *,
.lh *::before,
.lh *::after {
  box-sizing: border-box;
}
.lh ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lh a {
  color: inherit;
  text-decoration: none;
}
.lh a:focus-visible,
.lh summary:focus-visible,
.lh button:focus-visible {
  outline: 2px solid var(--lh-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.lh-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-inline-size: 1280px;
  min-block-size: 64px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.lh-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--lh-strong) !important;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.06em;
}
.lh-logo img {
  display: block;
  inline-size: 28px;
  block-size: 28px;
}

/* ── Desktop navigation ── */
.lh-nav {
  display: none;
  align-items: center;
  gap: 2px;
  margin-inline-start: 12px;
}
.lh-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}
.lh-dd {
  position: relative;
}
.lh-dd > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 40px;
  padding-inline: 12px;
  border-radius: 10px;
  color: var(--lh-text);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.lh-dd > summary::-webkit-details-marker {
  display: none;
}
.lh-dd > summary:hover,
.lh-dd[open] > summary {
  background: var(--lh-hover);
  color: var(--lh-strong);
}
.lh-chev {
  transition: transform 150ms ease;
}
.lh-dd[open] .lh-chev {
  transform: rotate(180deg);
}
.lh-panel {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-start: 0;
  min-inline-size: 220px;
  padding: 8px !important;
  background: var(--lh-panel);
  border: 1px solid var(--lh-rule);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}
.lh-panel-end {
  inset-inline-start: auto;
  inset-inline-end: 0;
  min-inline-size: 180px;
}
.lh-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--lh-text);
  white-space: nowrap;
}
.lh-panel a:hover,
.lh-panel a[aria-current='true'] {
  background: var(--lh-hover);
  color: var(--lh-strong);
}

.lh-theme {
  flex: none;
}
.lh-cta {
  display: none;
  align-items: center;
  min-block-size: 40px;
  padding-inline: 16px;
  border-radius: 999px;
  background: var(--lh-cta-bg);
  color: var(--lh-cta-text) !important;
  font-weight: 700;
  white-space: nowrap;
}
.lh-cta:hover {
  filter: brightness(1.05);
}

/* ── Mobile menu ── */
.lh-lang {
  display: none;
}
.lh-burger > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
}
.lh-burger > summary::-webkit-details-marker {
  display: none;
}
.lh-burger-icon,
.lh-burger-icon::before,
.lh-burger-icon::after {
  display: block;
  inline-size: 20px;
  block-size: 2px;
  border-radius: 2px;
  background: var(--lh-strong);
  transition: transform 150ms ease, opacity 150ms ease;
}
.lh-burger-icon {
  position: relative;
}
.lh-burger-icon::before,
.lh-burger-icon::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
}
.lh-burger-icon::before {
  inset-block-start: -6px;
}
.lh-burger-icon::after {
  inset-block-start: 6px;
}
.lh-burger[open] .lh-burger-icon {
  background: transparent;
}
.lh-burger[open] .lh-burger-icon::before {
  transform: translateY(6px) rotate(45deg);
}
.lh-burger[open] .lh-burger-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}
.lh-sheet {
  position: fixed;
  inset-block: 64px 0;
  inset-inline: 0;
  overflow-y: auto;
  padding: 16px clamp(16px, 4vw, 32px) 32px;
  background: var(--lh-panel);
  border-block-start: 1px solid var(--lh-rule);
}
.lh-sheet-group + .lh-sheet-group {
  margin-block-start: 18px;
  padding-block-start: 18px;
  border-block-start: 1px solid var(--lh-rule);
}
.lh-sheet-title {
  margin: 0 0 8px;
  color: var(--lh-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lh-sheet a {
  display: block;
  padding: 10px 4px;
  color: var(--lh-strong);
  font-size: 16px;
}
.lh-sheet-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lh-sheet-langs a {
  padding: 8px 14px;
  border: 1px solid var(--lh-rule);
  border-radius: 999px;
  font-size: 14px;
}
.lh-sheet-langs a[aria-current='true'] {
  border-color: var(--lh-accent);
}
.lh-cta-block {
  display: flex !important;
  justify-content: center;
  margin-block-start: 22px;
  font-size: 16px;
}

@media (min-width: 1024px) {
  .lh-nav {
    display: flex;
  }
  .lh-lang {
    display: block;
  }
  .lh-cta {
    display: inline-flex;
  }
  .lh-burger {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lh-chev,
  .lh-burger-icon,
  .lh-burger-icon::before,
  .lh-burger-icon::after {
    transition: none;
  }
}
@media print {
  .lh {
    position: static;
  }
  .lh-tools,
  .lh-nav {
    display: none;
  }
}
