/* Header ------------------------------------------------------------------ */
.header { position: relative; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; height: 80px; gap: 48px; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo__word { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em; white-space: nowrap; }
.logo__word span { font-weight: 400; }

.header__inner { gap: 40px; }
.nav__list { display: flex; gap: 28px; }
.nav__item { position: relative; }
.nav__link { white-space: nowrap; }
.nav__trigger {
  display: inline-flex; align-items: center; gap: 6px; height: 40px;
  font-weight: 600; font-size: var(--fs-sm); color: var(--ink);
}
.nav__trigger:hover { color: var(--ink-2); }
.nav__chevron { transition: transform var(--dur) var(--ease); }
.nav__trigger[aria-expanded="true"] .nav__chevron { transform: rotate(180deg); }
.nav__trigger { white-space: nowrap; }
.nav__menu {
  position: absolute; top: calc(100% + 18px); left: -18px; min-width: 270px;
  padding: 8px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-pop);
  animation: mega-in 180ms var(--ease);
}
/* Invisible bridge so moving the pointer down to the menu doesn't close it. */
.nav__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.nav__menu a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 600; }
.nav__menu a::after { content: "→"; color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.nav__menu a:hover { background: var(--bg-band); }
.nav__menu a:hover::after { opacity: 1; transform: none; }

/* Mega panel: full width under the header */
.nav__item:has(.mega) { position: static; }
.nav__trigger { position: relative; }
.nav__trigger[aria-controls][aria-expanded="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -20px; height: 2px; background: var(--ink); }
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(20, 27, 45, 0.18);
  animation: mega-in 180ms var(--ease);
}
@keyframes mega-in { from { opacity: 0; transform: translateY(-6px); } }
.mega__inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 280px; gap: 32px; padding-block: 32px 40px; }
.mega__heading { margin-bottom: 14px; font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.mega__col li + li { margin-top: 4px; }
.mega__col a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 280px;
  margin-left: -10px; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent;
  font-size: var(--fs-sm); font-weight: 600;
}
.mega__arrow { opacity: 0; transform: translateX(-4px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.mega__col a:hover { border-color: var(--line); background: var(--surface); }
.mega__col a:hover .mega__arrow { opacity: 1; transform: none; }
.mega__side { display: grid; gap: 10px; align-content: start; }
.mega__promo {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 18px;
  border-radius: 8px; background: var(--bg-band); font-size: var(--fs-sm); font-weight: 600;
  transition: background var(--dur) var(--ease);
}
.mega__promo:hover { background: var(--accent-soft); }
.mega__feature { display: grid; gap: 6px; margin-top: 10px; font-size: var(--fs-sm); }
.mega__feature img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.mega__feature span { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mega__feature:hover strong { text-decoration: underline; text-underline-offset: 3px; }

.header__actions { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.header__link { font-weight: 600; font-size: var(--fs-sm); }
.header__link:hover { color: var(--ink-2); }
.header__cta { padding-inline: 30px; }

.header__burger { display: none; width: 40px; height: 40px; place-items: center; border-radius: 8px; }
.header__burger .when-open { display: none; }
.header__burger[aria-expanded="true"] .when-open { display: block; }
.header__burger[aria-expanded="true"] .when-closed { display: none; }

.mobile-menu {
  position: absolute; inset: 100% 0 auto 0; height: calc(100dvh - 72px);
  padding: 24px var(--gutter) 32px; background: var(--bg); overflow-y: auto;
  display: flex; flex-direction: column; gap: 24px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__list > li { border-bottom: 1px solid var(--line); }
.mobile-menu__list a, .mobile-menu__label { display: block; padding: 16px 0; font-weight: 600; font-size: 1.0625rem; }
.mobile-menu__list ul a { padding: 10px 0 10px 12px; font-weight: 500; }
.mobile-menu__group { padding-bottom: 10px; }
.mobile-menu__group .mobile-menu__label { padding-bottom: 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.mobile-menu__group ul a { padding: 9px 0; font-size: 1rem; font-weight: 600; }
.mobile-menu__cta { width: 100%; }
body.no-scroll { overflow: hidden; }

@media (max-width: 1140px) {
  .header__inner { height: 72px; }
  .nav, .header__link { display: none; }
  .header__actions { gap: 12px; }
  .header__burger { display: grid; }
}
@media (max-width: 420px) {
  .header__cta { display: none; }
}
