/* ==========================================================
   Header + full-screen navigation
   ========================================================== */
.sw-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding: 0 var(--gutter);
  color: var(--white);
  transition: background-color 0.45s var(--ease-out), color 0.45s var(--ease-out),
    height 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.sw-header.is-glass {
  --header-h: 68px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(16, 49, 85, 0.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.sw-header__links {
  display: flex;
  gap: 28px;
}

.sw-header__links a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
}

.sw-header__links a:hover {
  color: var(--accent-soft);
}

.sw-header.is-glass .sw-header__links a:hover {
  color: var(--accent);
}

.sw-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.sw-header.is-glass .sw-btn--ghost {
  border-color: var(--ink-faint);
  color: var(--ink);
}

.sw-header.is-glass .sw-btn--ghost:hover {
  background: var(--ink);
  color: var(--white);
}

/* ---------- Logo: official lockup, white on the hero, navy once the header turns glass ---------- */
.sw-logo {
  position: relative;
  display: block;
  width: 210px;
  aspect-ratio: 651 / 214;
  transition: width 0.45s var(--ease-out);
}

.sw-logo__img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.45s var(--ease-out);
}

.sw-logo__img--dark {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.sw-header .sw-logo__img--light {
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.25));
}

.sw-header.is-glass .sw-logo {
  width: 160px;
}

.sw-header.is-glass .sw-logo__img--light {
  opacity: 0;
}

.sw-header.is-glass .sw-logo__img--dark {
  opacity: 1;
}

.is-nav-open .sw-header .sw-logo__img--light {
  opacity: 1;
}

.is-nav-open .sw-header .sw-logo__img--dark {
  opacity: 0;
}

/* ---------- Burger ---------- */
.sw-burger {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.sw-burger__line {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease-out), width 0.4s var(--ease-out);
}

.sw-burger__line:last-child {
  width: 70%;
  justify-self: end;
}

.sw-burger:hover .sw-burger__line:last-child {
  width: 100%;
}

.is-nav-open .sw-burger__line:first-child {
  transform: translateY(4.75px) rotate(45deg);
}

.is-nav-open .sw-burger__line:last-child {
  width: 100%;
  transform: translateY(-4.75px) rotate(-45deg);
}

.is-nav-open .sw-header {
  background: transparent;
  box-shadow: none;
  color: var(--white);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.is-nav-open .sw-header__book {
  visibility: hidden;
}

/* ---------- Overlay nav ---------- */
.sw-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  align-items: center;
  padding: 120px var(--gutter) 48px;
  background: var(--ink);
  color: var(--white);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  overflow-y: auto;
}

.sw-nav[hidden] {
  display: none;
}

.sw-nav.is-open {
  opacity: 1;
}

.sw-nav__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.sw-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sw-nav__list li {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms + 120ms);
}

.sw-nav.is-open .sw-nav__list li {
  opacity: 1;
  transform: none;
}

.sw-nav__list a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 4px 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 62px);
  font-weight: 300;
  line-height: 1.12;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}

.sw-nav__list a span {
  color: var(--accent-soft);
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.sw-nav__list a:hover {
  color: var(--accent-soft);
}

.sw-nav__aside {
  display: grid;
  gap: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.sw-nav__aside a {
  text-decoration: none;
}

.sw-nav__aside a:hover {
  color: var(--accent-soft);
}

.sw-nav__social {
  display: flex;
  gap: 20px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  :root {
    --header-h: 74px;
  }

  .sw-header {
    grid-template-columns: auto 1fr;
  }

  .sw-header__links,
  .sw-header__book {
    display: none;
  }

  .sw-logo {
    width: 160px;
  }

  .sw-header.is-glass .sw-logo {
    width: 136px;
  }

  .sw-nav__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
