/* HEADER — v5.3 "BRAND MARK"
   backdrop-filter is now conditional via html[data-quality] in base.css.
   Default here: solid background only (safe on all tiers).
   No will-change. No isolation.

   v5.3: the generic "M" letter tile is replaced by the doctor's own
   portrait (the same asset already used as the splash's confirming
   avatar — see features/splash/splash.css .splash-portrait and
   index.html's splash-portrait <img>). Reused verbatim, no new asset.
   Header grows modestly (52px -> 58px) to give the real photo and the
   now-larger name room to read as an actual brand mark, not a cramped
   badge; still far short of "excessively tall". */
:root { --header-h: calc(58px + var(--sat)); }
.app-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  padding: var(--sat) 20px 0;
  box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between;
  /* Solid default — quality rules in base.css layer glass on top for high/medium */
  background: rgba(24,21,16,.96);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 1px 12px rgba(8,7,5,.28);
  contain: layout style;
}
.app-logo { display: flex; align-items: center; gap: 11px; min-width: 0; }
/* Wrapper carries the halo (a pseudo-element on the <img> itself is
   unreliable across engines for replaced elements); the photo sits on
   top at z-index:1, exactly mirroring .splash-portrait-wrap/.splash-halo. */
.app-logo-mark {
  position: relative; width: 38px; height: 38px; flex-shrink: 0;
}
.app-logo-mark img {
  position: relative; z-index: 1; display: block;
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; object-position: top center;
  background: var(--ink-raised);
  box-shadow: var(--edge-light-strong), 0 0 0 1.5px rgba(221,184,104,.38), 0 3px 10px rgba(8,7,5,.4);
}
.app-logo-mark::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(221,184,104,.40), transparent 70%);
  opacity: .5; animation: markBreath var(--breath) ease-in-out infinite;
}
@keyframes markBreath { 0%,100% { opacity: .32; transform: scale(1); } 50% { opacity: .65; transform: scale(1.10); } }
@media (prefers-reduced-motion: reduce) { .app-logo-mark::after { animation: none; } }
.app-logo-text { display: flex; flex-direction: column; line-height: 1.18; gap: 1px; min-width: 0; }
/* Was --ff-latin-display (a Latin-only display face) on Arabic text --
   silently fell back to a generic sans-serif for every Arabic glyph.
   --ff-display is the language-aware token (Tajawal in AR, Bricolage
   Grotesque in EN, see base.css html[lang="en"]), so the name now
   actually renders in the intended typeface in both languages. */
.app-logo-name {
  font-family: var(--ff-display); font-size: 14.5px; font-weight: 800;
  color: var(--snow); letter-spacing: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.app-logo-sub { font-family: var(--ff-mono); font-size: 8.5px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--gold-bright); opacity: .92; }

/* Language switcher — same toggleLang() logic, same ids, visually
   quieted so it reads as a secondary header control rather than
   competing with the doctor's name for attention. */
.lang-toggle {
  display: flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--gold); background: var(--gold);
  font-family: var(--ff-mono); font-size: 10.5px; font-weight: 900; letter-spacing: .1em;
  color: #1a1400; transition: background .2s, box-shadow .2s, transform .1s;
  box-shadow: 0 0 0 2px rgba(212,175,55,.16), 0 2px 10px rgba(212,175,55,.24);
  min-width: 50px; min-height: 38px; justify-content: center; position: relative; flex-shrink: 0;
}
.lang-toggle:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(212,175,55,.2); }
.lang-toggle:hover  { background: var(--gold-bright); box-shadow: 0 0 0 3px rgba(212,175,55,.26), 0 3px 14px rgba(212,175,55,.34); }
.lang-toggle svg { width: 13px; height: 13px; opacity: .8; color: #1a1400; }
@media (max-width: 480px) {
  .lang-toggle { padding: 9px 15px; font-size: 11px; min-height: 44px; min-width: 56px; }
}
