/* =====================================================================
   War-Documentary.info: the site header of the English pages (2026-10-16)
   A rounded capsule over the page: the name of the site, three ways
   (Studies, Selected books, About) and the letter button.
   - The current page is yellow, with a yellow line under its name.
   - "Write to me" is a quiet outline; pointed at, it turns the blue of the About page.
   - Articles: once the reader is past the title, the title of the study sits in
     the middle and a yellow line along the bottom edge shows how much is read.
   - Below 1024px the ways open from a Menu button.
   Markup: template-parts/header-nav.php; script: assets/js/wd-header.js.
   Colours of text are set on the inner spans, so the theme's colours for visited
   and focused links never reach the header.
   ===================================================================== */
.wd-head{--yellow:#ffc107;position:fixed;top:0;left:0;right:0;z-index:9999999;padding-top:10px;pointer-events:none;font-family:Transat,sans-serif;font-weight:300;line-height:1.2;letter-spacing:0;color:#d5dce6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.wd-head *,.wd-head *::before,.wd-head *::after{box-sizing:border-box}
.wd-head a{text-decoration:none!important;transition:none}
.wd-head p{margin:0;padding:0}
.wd-head a:focus{outline:0}
.wd-head a:focus-visible,.wd-head button:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}

.wd-head__in{position:relative;display:flex;align-items:center;gap:28px;width:calc(100% - 2 * clamp(12px,3vw,48px));max-width:1560px;height:58px;margin:0 auto;padding:0 7px 0 26px;border-radius:999px;pointer-events:auto;
	background:rgba(22,30,46,.95);-webkit-backdrop-filter:blur(18px) saturate(1.5);backdrop-filter:blur(18px) saturate(1.5);
	box-shadow:inset 0 0 0 1px rgba(255,255,255,.12),inset 0 1px 0 rgba(255,255,255,.12),0 20px 44px -22px rgba(0,0,0,.85)}

/* the name of the site keeps its look: the name, the coloured line, the motto. On /eng/ it is the h1 of the page */
.wd-head__h1{flex:none;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:none;color:inherit}
.wd-head__brand{flex:none;display:flex;flex-direction:column;align-items:flex-start}
.wd-head__name{display:block;color:#fff;font-weight:700;font-size:17px;line-height:1;letter-spacing:.14em;text-transform:uppercase}
.wd-head__motto{position:relative;display:block;margin-top:6px;padding-top:6px;color:#98a5b6;font-weight:300;font-size:9.5px;line-height:1;letter-spacing:.42em;text-transform:uppercase}
.wd-head__motto::before{content:"";position:absolute;left:0;right:.3em;top:0;height:1px;background:linear-gradient(90deg,#4b305f 0,#4b305f 4%,#129eb3 41%,#129eb3 60%,#4b305f 93%,#4b305f 100%)}

/* articles: the title of the study and the reading line */
.wd-head__title{flex:1;min-width:0;color:#fff;font-weight:700;font-size:15px;line-height:1.3;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transform:translateY(5px);transition:opacity .3s ease,transform .3s ease}
.wd-head.is-reading .wd-head__title{opacity:1;transform:none}
.wd-head__progress{position:absolute;left:28px;right:28px;bottom:0;height:2px;border-radius:2px;background:var(--yellow);transform:scaleX(var(--p,0));transform-origin:left center;opacity:0;transition:opacity .3s ease}
.wd-head.is-reading .wd-head__progress{opacity:1}

/* the ways: rounded links in one frame; the current page is yellow with a line under it */
.wd-head__menu{display:flex;align-items:center;gap:12px;margin-left:auto}
.wd-head__nav{display:flex;align-items:center;gap:2px;padding:4px;border-radius:999px;background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.wd-head__link{position:relative;display:flex;align-items:center;height:38px;padding:0 17px;border-radius:999px;white-space:nowrap;transition:background-color .2s ease}
.wd-head__label{color:#d5dce6;font-size:15px;line-height:1.2;white-space:nowrap;transition:color .2s ease}
.wd-head__link[aria-current="page"] .wd-head__label{color:var(--yellow)}
.wd-head__link[aria-current="page"]::after{content:"";position:absolute;left:17px;right:17px;bottom:7px;height:2px;border-radius:2px;background:var(--yellow)}

/* "Write to me": a quiet outline with the photo; the blue fades in when pointed at */
.wd-head__cta{position:relative;isolation:isolate;flex:none;display:inline-flex;align-items:center;gap:10px;height:44px;padding:0 20px 0 5px;border-radius:999px;background:rgba(255,255,255,.05);box-shadow:inset 0 0 0 1px rgba(255,255,255,.24);white-space:nowrap;transition:box-shadow .2s ease}
.wd-head__cta::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;border-radius:inherit;background:linear-gradient(180deg,#6aa6ff 0%,#3b82ec 55%,#2a62c9 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.32);opacity:0;transition:opacity .2s ease}
.wd-head__cta img{display:block;flex:none;width:34px;height:34px;max-width:none;border-radius:50%;object-fit:cover}
.wd-head__cta .wd-head__label{color:#fff;font-weight:700}
.wd-head__cta:focus-visible::before{opacity:1}

/* pointing: only on screens with a mouse, so a tap on a phone leaves nothing lit */
@media (hover: hover){
	.wd-head__link:hover{background:rgba(255,255,255,.1)}
	.wd-head__link:hover .wd-head__label{color:#fff}
	.wd-head__link[aria-current="page"]:hover{background:rgba(255,255,255,.07)}
	.wd-head__link[aria-current="page"]:hover .wd-head__label{color:var(--yellow)}
	.wd-head__cta:hover{box-shadow:inset 0 0 0 1px rgba(106,166,255,.6),0 8px 18px -8px rgba(59,130,236,.8)}
	.wd-head__cta:hover::before{opacity:1}
	.wd-head__toggle:hover{background:rgba(255,255,255,.12)}
}

.wd-head__toggle{display:none}

/* ---------- phones and tablets: the capsule is smaller and the ways open from the Menu button ---------- */
@media (max-width: 1023.98px){
	.wd-head{padding-top:8px}
	.wd-head__in{width:calc(100% - 16px);height:54px;gap:12px;padding:0 6px 0 18px}
	.wd-head__name{font-size:15px;letter-spacing:.12em}
	.wd-head__motto{margin-top:5px;padding-top:5px;font-size:8px;letter-spacing:.36em}
	.wd-head__title{display:none}
	.wd-head__progress{left:24px;right:24px}
	.wd-head__toggle{display:inline-flex;align-items:center;gap:10px;flex:none;height:42px;margin:0 0 0 auto;padding:0 16px 0 14px;border:0;border-radius:999px;background:rgba(255,255,255,.06);box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);color:#fff;font-family:Transat,sans-serif;font-weight:700;font-size:14px;line-height:1;letter-spacing:.02em;text-transform:none;cursor:pointer;transition:background-color .2s ease;-webkit-tap-highlight-color:transparent}
	.wd-head__burger{position:relative;display:block;width:18px;height:12px}
	.wd-head__burger::before,.wd-head__burger::after{content:"";position:absolute;left:0;right:0;height:2px;border-radius:2px;background:currentColor;transition:transform .25s ease,top .25s ease}
	.wd-head__burger::before{top:2px}
	.wd-head__burger::after{top:8px}
	.wd-head.is-open .wd-head__burger::before{top:5px;transform:rotate(45deg)}
	.wd-head.is-open .wd-head__burger::after{top:5px;transform:rotate(-45deg)}
	.wd-head__menu{position:absolute;top:calc(100% + 8px);left:0;right:0;display:none;flex-direction:column;align-items:stretch;gap:0;margin:0;padding:10px 12px 14px;border-radius:24px;
		background:rgba(22,30,46,.98);-webkit-backdrop-filter:blur(20px) saturate(1.5);backdrop-filter:blur(20px) saturate(1.5);
		box-shadow:inset 0 0 0 1px rgba(255,255,255,.12),0 24px 44px -20px rgba(0,0,0,.85)}
	.wd-head.is-open .wd-head__menu{display:flex;animation:wd-head-drop .2s ease}
	.wd-head__nav{flex-direction:column;align-items:stretch;gap:0;padding:0;background:none;box-shadow:none}
	.wd-head__link{height:auto;min-height:52px;margin:2px 0;padding:0 18px}
	.wd-head__link .wd-head__label{color:#fff;font-size:18px}
	.wd-head__link[aria-current="page"] .wd-head__label{color:var(--yellow)}
	/* on the phone every way ends with an arrow; the current one is yellow, with a yellow arrow */
	.wd-head__link::after,.wd-head__link[aria-current="page"]::after{content:"";position:absolute;left:auto;right:20px;top:50%;bottom:auto;width:9px;height:9px;border-radius:0;background:none;border-top:2px solid #8d9cb0;border-right:2px solid #8d9cb0;transform:translateY(-50%) rotate(45deg)}
	.wd-head__link[aria-current="page"]::after{border-color:var(--yellow)}
	.wd-head__cta{justify-content:center;height:52px;margin-top:12px;padding:0 22px 0 6px}
	.wd-head__cta .wd-head__label{font-size:16px}
}
/* tablets: the list opens as a panel under the Menu button rather than across the whole width */
@media (min-width: 600px) and (max-width: 1023.98px){
	.wd-head__menu{left:auto;width:380px}
}
@keyframes wd-head-drop{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion: reduce){
	.wd-head *,.wd-head *::before,.wd-head *::after{transition:none!important;animation:none!important}
}
@media print{.wd-head{display:none}}
