/* ============================================================
   block: header — broadsheet masthead
   ============================================================ */

.header {
  position: relative;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  z-index: 30;
}
.header::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -5px;
  height: 1px;
  background: var(--ink);
}

.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 0 14px;
}

/* — Edition rail (left) — */
.header__edition {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-fade);
  text-transform: uppercase;
}
.header__edition-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header__edition-tag {
  display: inline-block;
  padding: 1px 7px 2px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
}

/* — Centre wordmark — */
.header__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: none;
  color: var(--ink);
  padding: 0;
}
.header__brand:hover { color: var(--rouge); background: none; }

.header__brand-eyebrow {
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--brass-dark);
  margin-bottom: 4px;
}
.header__name {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.6vw, 2.6rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .03em;
  text-align: center;
}
.header__name--accent {
  font-family: var(--font-display-it);
  font-style: italic;
  color: var(--rouge-deep);
  text-transform: lowercase;
  letter-spacing: 0;
}
.header__brand-sub {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ash);
  margin-top: 6px;
  border-top: 1px solid var(--rule);
  padding-top: 4px;
  width: 100%;
  text-align: center;
}

/* — Right rail — */
.header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}
.header__age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border: 2px solid var(--rouge);
  color: var(--rouge);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .04em;
  border-radius: 50%;
  background: rgba(255, 250, 232, .35);
  transform: rotate(-6deg);
  font-feature-settings: "smcp" 0;
}

/* — Lower nav rail — */
.header__rail {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: relative;
}
.header__rail::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 3px;
  height: 1px;
  background: var(--ink);
}

.header__nav { display: flex; }
.header__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.header__nav-list li {
  border-right: 1px solid var(--rule);
}
.header__nav-list li:first-child { border-left: 1px solid var(--rule); }

.header__nav-link {
  display: inline-block;
  padding: 12px 22px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
}
.header__nav-link:hover {
  background: var(--ink);
  color: var(--paper);
}
.header__nav-link--active {
  background: var(--turf);
  color: var(--paper);
  position: relative;
}
.header__nav-link--active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px;
  bottom: 6px;
  height: 1px;
  background: var(--brass-bright);
  opacity: .7;
}

/* — Burger — */
.header__burger {
  display: none;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}
.header__burger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--paper);
  transition: transform .25s ease, opacity .2s ease;
}
.header__burger--open .header__burger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.header__burger--open .header__burger-line:nth-child(2) { opacity: 0; }
.header__burger--open .header__burger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .header__nav-link { padding: 11px 16px; font-size: .92rem; letter-spacing: .1em; }
  .header__edition { font-size: .65rem; }
}

@media (max-width: 768px) {
  .header__inner {
    grid-template-columns: 1fr auto;
    padding: 14px 0 10px;
    gap: 12px;
  }
  .header__edition { display: none; }
  .header__brand { align-items: flex-start; text-align: left; }
  .header__brand-eyebrow,
  .header__brand-sub { text-align: left; }
  .header__brand-sub { border-top: 0; padding-top: 2px; width: auto; }
  .header__right { justify-self: end; }
  .header__age { width: 38px; height: 38px; font-size: .9rem; }
  .header__burger { display: inline-flex; }

  /* On mobile the rail loses its visual furniture but stays in the DOM
     so the absolute-positioned nav drawer has a host. */
  .header__rail {
    border: 0;
    background: transparent;
    position: static;
  }
  .header__rail::before { display: none; }
  .header__rail .container { padding: 0; }

  .header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper-deep);
    border-top: 4px double var(--ink);
    border-bottom: 1px solid var(--ink);
    z-index: 28;
    box-shadow: var(--shadow-deep);
  }
  .header__nav--open { display: block; }
  .header__nav--open .header__nav-list {
    flex-direction: column;
    align-items: stretch;
  }
  .header__nav--open .header__nav-list li {
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
  }
  .header__nav--open .header__nav-link {
    display: block;
    padding: 14px 24px;
    text-align: left;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .header__inner { padding: 10px 0 8px; }
  .header__brand-eyebrow { font-size: .58rem; letter-spacing: .3em; }
  .header__brand-sub { font-size: .6rem; letter-spacing: .18em; }
  .header__name { font-size: 1.55rem; }
}
