/* Site header and footer: one design on every page, signed in or out, desktop and mobile.

   Design read: global chrome for a consumer travel utility, calm editorial minimalism with a little
   physical polish. Dials: variance 5, motion 4, density 3. Space Grotesk (the site font), one accent,
   hairline borders, one radius scale (bar and menus 12px, links and buttons 8px, avatar round).
   Motion is transform and opacity only, on one easing curve, and switched off for reduced-motion.

   Both pieces use their own dark tokens, so pages that retheme --bg/--text (pricing, trip planner,
   compare) do not change the chrome. Loaded after landing.css. */

.pw-hdr,
.pw-ftr {
  --c-canvas: #070b17;
  --c-bar: rgba(13, 19, 38, 0.94);
  --c-raised: #101830;
  --c-fg: #f1f4ff;
  --c-muted: rgba(241, 244, 255, 0.72);
  --c-faint: rgba(241, 244, 255, 0.58);
  --c-line: rgba(241, 244, 255, 0.11);
  --c-line-strong: rgba(241, 244, 255, 0.2);
  --c-wash: rgba(255, 255, 255, 0.06);
  --c-accent: #b3a3ff;
  --r-box: 12px;
  --r-ctl: 8px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  color: var(--c-fg);
  font-family: inherit;
}

.pw-hdr a,
.pw-ftr a {
  color: inherit;
  text-decoration: none;
}

.pw-hdr a:focus-visible,
.pw-hdr button:focus-visible,
.pw-ftr a:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: var(--r-ctl);
}

/* ---- Header: a floating bar, detached from the top edge -------------------------------------- */

.pw-hdr {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: 12px;
  pointer-events: none;
}

.pw-hdr__wrap {
  pointer-events: none;
}

.pw-hdr__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-box);
  background: var(--c-bar);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  pointer-events: auto;
}

.pw-hdr__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pw-hdr__logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.pw-hdr__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.pw-hdr__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-ctl);
  background: none;
  color: var(--c-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

.pw-hdr__link:hover,
.pw-hdr__link[aria-expanded="true"] {
  background: var(--c-wash);
  color: var(--c-fg);
}

.pw-hdr__link[aria-current="page"] {
  background: var(--c-wash);
  color: var(--c-fg);
}

.pw-hdr__caret {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.7;
  transform: rotate(45deg);
  transition: transform 240ms var(--ease), margin 240ms var(--ease);
}

[aria-expanded="true"] > .pw-hdr__caret {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.pw-hdr__menuWrap,
.pw-hdr__user {
  position: relative;
}

.pw-hdr__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 3;
  min-width: 232px;
  padding: 6px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-box);
  background: var(--c-raised);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  transform-origin: top right;
  animation: pw-pop 200ms var(--ease);
}

.pw-hdr__menu[hidden] {
  display: none;
}

.pw-hdr__menuLabel {
  margin: 10px 10px 4px;
  color: var(--c-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pw-hdr__item {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--r-ctl);
  color: var(--c-fg);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 160ms var(--ease);
}

.pw-hdr__item:hover,
.pw-hdr__item[aria-current="page"] {
  background: var(--c-wash);
}

.pw-hdr__sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--c-line);
}

/* Auth slot */
.pw-hdr__auth {
  display: flex;
  align-items: center;
  flex: none;
  justify-content: flex-end;
  min-width: 108px;
}

.pw-hdr__skel {
  width: 104px;
  height: 40px;
  border-radius: var(--r-ctl);
  background: var(--c-wash);
}

/* Primary action: a solid light button with its arrow in its own small box. */
.pw-hdr__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 6px 0 16px;
  border-radius: var(--r-ctl);
  background: var(--c-fg);
  color: #0a0f1f !important;
  font-size: 14px;
  font-weight: 600;
  transition: transform 160ms var(--ease), background-color 200ms var(--ease);
}

.pw-hdr__cta:hover {
  background: #fff;
}

.pw-hdr__cta:active {
  transform: scale(0.98);
}

.pw-hdr__ctaIcon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(10, 15, 31, 0.08);
  transition: transform 240ms var(--ease);
}

.pw-hdr__ctaIcon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid #0a0f1f;
  border-right: 1.5px solid #0a0f1f;
  transform: translate(-65%, -50%) rotate(45deg);
}

.pw-hdr__cta:hover .pw-hdr__ctaIcon {
  transform: translateX(2px);
}

.pw-hdr__userBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 4px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: none;
  color: var(--c-fg);
  font: inherit;
  cursor: pointer;
  transition: background-color 200ms var(--ease);
}

.pw-hdr__userBtn:hover,
.pw-hdr__userBtn[aria-expanded="true"] {
  background: var(--c-wash);
}

.pw-hdr__avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 50%;
  background: #35306a;
  font-size: 13px;
  font-weight: 700;
}

.pw-hdr__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pw-hdr__userName {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

/* Auth state is set on <html> before first paint (inline script in renderPage), so the right half of
   the bar is already in its final state. "unknown" shows a same-size placeholder. */
html[data-pw-auth="in"] [data-auth="out"],
html[data-pw-auth="out"] [data-auth="in"],
html[data-pw-auth="in"] .pw-hdr__skel,
html[data-pw-auth="out"] .pw-hdr__skel {
  display: none !important;
}

html:not([data-pw-auth="in"]):not([data-pw-auth="out"]) [data-auth] {
  display: none !important;
}

/* Menu button: two lines that become a cross. */
.pw-hdr__burger {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--r-ctl);
  background: none;
  color: var(--c-fg);
  cursor: pointer;
}

.pw-hdr__burgerIcon {
  position: relative;
  width: 20px;
  height: 10px;
}

.pw-hdr__burgerIcon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 320ms var(--ease), top 320ms var(--ease);
}

.pw-hdr__burgerIcon span:nth-child(1) {
  top: 0;
}

.pw-hdr__burgerIcon span:nth-child(2) {
  top: 8px;
}

.pw-hdr__burger[aria-expanded="true"] .pw-hdr__burgerIcon span:nth-child(1) {
  top: 4px;
  transform: rotate(45deg);
}

.pw-hdr__burger[aria-expanded="true"] .pw-hdr__burgerIcon span:nth-child(2) {
  top: 4px;
  transform: rotate(-45deg);
}

.pw-hdr__panel {
  display: none;
}

body.pw-hdr-lock {
  overflow: hidden;
}

/* ---- Header on small screens: the menu opens as a full screen of large type ------------------- */

@media (max-width: 900px) {
  .pw-hdr__nav {
    display: none;
  }

  .pw-hdr__burger {
    display: inline-flex;
  }

  .pw-hdr__auth {
    margin-left: auto;
    min-width: 0;
  }

  .pw-hdr__userName,
  .pw-hdr__userCaret {
    display: none;
  }

  .pw-hdr__userBtn {
    padding: 0 4px;
    border-color: transparent;
  }

  .pw-hdr__skel {
    width: 92px;
  }

  .pw-hdr__bar {
    gap: 4px;
  }

  .pw-hdr__panel:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 88px 0 max(32px, env(safe-area-inset-bottom));
    background: rgba(7, 11, 23, 0.94);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    pointer-events: auto;
    animation: pw-fade 260ms var(--ease);
  }

  .pw-hdr__bigList,
  .pw-hdr__smallList {
    display: grid;
  }

  .pw-hdr__big {
    display: flex;
    align-items: center;
    min-height: 60px;
    border-bottom: 1px solid var(--c-line);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    animation: pw-rise 520ms var(--ease) both;
    animation-delay: calc(var(--n, 0) * 45ms + 60ms);
  }

  .pw-hdr__big[aria-current="page"] {
    color: var(--c-accent);
  }

  .pw-hdr__smallList {
    margin-top: 20px;
  }

  .pw-hdr__small {
    display: flex;
    align-items: center;
    min-height: 48px;
    color: var(--c-muted);
    font-size: 17px;
    font-weight: 500;
    animation: pw-rise 520ms var(--ease) both;
    animation-delay: calc(var(--n, 0) * 45ms + 60ms);
  }

  .pw-hdr__small[aria-current="page"] {
    color: var(--c-fg);
  }
}

@media (min-width: 901px) {
  .pw-hdr__panel {
    display: none !important;
  }
}

@media (max-width: 520px) {
  .pw-hdr {
    padding-top: 8px;
  }

  .pw-hdr__bar {
    height: 52px;
    padding-left: 12px;
  }
}

@keyframes pw-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pw-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pw-pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-hdr *,
  .pw-hdr *::before,
  .pw-hdr *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- Footer: quiet, set in columns, with room around it -------------------------------------- */

.pw-ftr {
  margin-top: 72px;
  padding: 72px 0 36px;
  border-top: 1px solid var(--c-line);
  background: var(--c-canvas);
  color: var(--c-muted);
  font-size: 14px;
}

.pw-ftr__top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
}

.pw-ftr__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-fg);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pw-ftr__logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.pw-ftr__statement {
  max-width: 16ch;
  margin: 24px 0 0;
  color: var(--c-fg);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.pw-ftr__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.pw-ftr__h {
  margin: 0 0 16px;
  color: var(--c-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pw-ftr__note {
  margin-left: 6px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  opacity: 0.8;
}

.pw-ftr__list,
.pw-ftr__partnerList {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pw-ftr__list {
  display: grid;
  gap: 2px;
}

.pw-ftr__list a,
.pw-ftr__partnerList a {
  display: inline-block;
  padding: 6px 0;
  color: var(--c-muted);
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 4px) / 0 1px no-repeat;
  transition: color 200ms var(--ease), background-size 320ms var(--ease);
}

.pw-ftr__list a:hover,
.pw-ftr__partnerList a:hover {
  color: var(--c-fg);
  background-size: 100% 1px;
}

.pw-ftr__partners {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--c-line);
}

.pw-ftr__partnerList {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.pw-ftr__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--c-line);
  color: var(--c-faint);
  font-size: 13px;
  line-height: 1.5;
}

.pw-ftr__bottom a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 860px) {
  .pw-ftr {
    margin-top: 48px;
    padding: 48px 0 28px;
  }

  .pw-ftr__top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .pw-ftr__statement {
    max-width: 18ch;
  }
}

@media (max-width: 560px) {
  .pw-ftr__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .pw-ftr__list a,
  .pw-ftr__partnerList a {
    padding: 9px 0;
  }

  .pw-ftr__partners {
    margin-top: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-ftr * {
    transition: none !important;
  }
}
