/* ==========================================================================
   Charlie — global chrome: header, navigation, footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-3) var(--ease-out),
              box-shadow var(--dur-3) var(--ease-out),
              background-color var(--dur-3) var(--ease-out);
}
.site-header.is-stuck {
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 1px 24px -10px rgba(10, 12, 17, 0.22);
}

/* ---- Overlay mode -------------------------------------------------------
   On pages that open with a dark hero the header sits *in* the hero rather
   than on a white strip above it, then resolves to the solid treatment as
   soon as the page scrolls. Both logo variants are in the markup and swapped
   with CSS, so there is no flash and no second request.                    */
.site-header--overlay {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header--overlay:not(.is-stuck) {
  --hdr-fg: rgba(255, 255, 255, 0.82);
  --hdr-fg-strong: #fff;
  --hdr-line: rgba(255, 255, 255, 0.16);
  --hdr-fill: rgba(255, 255, 255, 0.06);
}
.site-header--overlay.is-stuck {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

/* Pages using the overlay header start their content underneath it. */
.page--overlay-header .page__main { margin-top: calc(var(--header-h) * -1); }
@media (max-width: 900px) {
  .page--overlay-header .page__main { margin-top: calc(var(--header-h-sm) * -1); }
}

.brand__logo--light { display: none; }
.site-header--overlay:not(.is-stuck) .brand__logo--dark { display: none; }
.site-header--overlay:not(.is-stuck) .brand__logo--light { display: block; }

.site-header--overlay:not(.is-stuck) .nav__link { color: var(--hdr-fg); }
.site-header--overlay:not(.is-stuck) .nav__link:hover {
  color: var(--hdr-fg-strong);
  background: var(--hdr-fill);
}
.site-header--overlay:not(.is-stuck) .nav__link--active { color: var(--hdr-fg-strong); }

.site-header--overlay:not(.is-stuck) .city-switch {
  color: var(--hdr-fg-strong);
  background: var(--hdr-fill);
  border-color: var(--hdr-line);
  backdrop-filter: blur(10px);
}
.site-header--overlay:not(.is-stuck) .city-switch:hover { border-color: rgba(255, 255, 255, 0.34); }
.site-header--overlay:not(.is-stuck) .city-switch__currency {
  border-inline-start-color: var(--hdr-line);
  color: rgba(255, 255, 255, 0.55);
}

.site-header--overlay:not(.is-stuck) .btn--quiet {
  --btn-fg: var(--hdr-fg);
}
.site-header--overlay:not(.is-stuck) .btn--quiet:hover {
  --btn-bg: var(--hdr-fill);
  --btn-fg: #fff;
}
.site-header--overlay:not(.is-stuck) .btn--ghost {
  --btn-fg: #fff;
  --btn-border: var(--hdr-line);
}
.site-header--overlay:not(.is-stuck) .btn--ghost:hover { --btn-bg: var(--hdr-fill); }
.site-header--overlay:not(.is-stuck) .bell__count { border-color: var(--ink-950); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  height: var(--header-h);
}
@media (max-width: 900px) {
  .site-header__inner { height: var(--header-h-sm); }
}

/* ---- Logo ---------------------------------------------------------------
   The supplied artwork is used verbatim; only its height is constrained so
   the lockup keeps its proportions from a 360px phone to a 4K display.       */
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  margin-inline-end: auto;
}
.brand:hover { text-decoration: none; }
.brand__logo {
  height: 38px;
  width: auto;
  transition: transform var(--dur-2) var(--ease-spring);
}
.brand:hover .brand__logo { transform: scale(1.03); }
@media (max-width: 900px) { .brand__logo { height: 32px; } }
@media (max-width: 420px) { .brand__logo { height: 28px; } }

/* ---- Primary nav --------------------------------------------------------- */
.nav { display: flex; align-items: center; gap: var(--sp-1); }
@media (max-width: 1023px) { .nav--primary { display: none; } }

.nav__link {
  position: relative;
  padding: 0.55rem 0.9rem;
  border-radius: var(--r-sm);
  font-size: var(--text-base);
  font-weight: 550;
  color: var(--ink-700);
  transition: color var(--dur-1) var(--ease-out),
              background-color var(--dur-1) var(--ease-out);
}
.nav__link:hover { color: var(--ink-950); background: var(--ink-50); text-decoration: none; }
.nav__link--active { color: var(--ink-950); font-weight: 650; }
.nav__link--active::after {
  content: "";
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--red-500);
}

.nav__actions { display: flex; align-items: center; gap: var(--sp-2); }

/* ---- Dropdown ------------------------------------------------------------ */
.dropdown { position: relative; }
.dropdown__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 248px;
  padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--dur-2) var(--ease-out);
  z-index: var(--z-drawer);
}
.dropdown__panel[data-open="true"],
.dropdown:focus-within .dropdown__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.dropdown__panel--left { right: auto; left: 0; }
.dropdown__header {
  padding: var(--sp-3) var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--sp-2);
}
.dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: 0.6rem var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--text-base);
  color: var(--ink-700);
  text-align: start;
  transition: background-color var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out);
}
.dropdown__item:hover { background: var(--ink-50); color: var(--ink-950); text-decoration: none; }
.dropdown__item--danger { color: var(--danger-500); }
.dropdown__item--danger:hover { background: var(--danger-50); color: var(--danger-700); }
.dropdown__divider { height: 1px; background: var(--border-subtle); margin: var(--sp-2) 0; }

/* ---- City switcher -------------------------------------------------------- */
.city-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-800);
  transition: all var(--dur-1) var(--ease-out);
}
.city-switch:hover { border-color: var(--ink-400); }
.city-switch__currency {
  padding-inline-start: var(--sp-2);
  margin-inline-start: 2px;
  border-inline-start: 1px solid var(--border);
  color: var(--text-subtle);
  font-weight: 550;
}

/* ---- Notification bell ------------------------------------------------- */
.bell { position: relative; }
.bell__count {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--red-500);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--surface);
}

/* ---- Mobile menu --------------------------------------------------------- */
.menu-toggle { display: none; }
@media (max-width: 1023px) { .menu-toggle { display: inline-flex; } }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease-out);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu[data-open="true"] { transform: none; }
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h-sm);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--border-subtle);
  flex: none;
}
.mobile-menu__body { padding: var(--sp-5) var(--gutter) var(--sp-8); }
.mobile-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--ink-950);
}
.mobile-menu__link:hover { text-decoration: none; color: var(--red-600); }
.mobile-menu__link .c-icon { color: var(--ink-300); }
body.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: auto;
  background: var(--ink-950);
  color: rgba(255, 255, 255, 0.68);
  overflow: hidden;
}
.site-footer::before {
  /* A single soft red bloom, matching the social card. */
  content: "";
  position: absolute;
  right: -10%;
  bottom: -55%;
  width: min(760px, 85vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 28, 36, 0.30), transparent 68%);
  pointer-events: none;
}
.site-footer > * { position: relative; }

.footer__top {
  display: grid;
  gap: var(--sp-10);
  padding-block: var(--sp-16) var(--sp-10);
}
@media (min-width: 900px) {
  .footer__top { grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp-8); }
}

.footer__logo { height: 42px; width: auto; margin-bottom: var(--sp-5); }
.footer__blurb { max-width: 34ch; line-height: var(--leading-relaxed); font-size: var(--text-base); }

.footer__heading {
  margin-bottom: var(--sp-4);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.footer__list { display: grid; gap: var(--sp-3); }
.footer__list a {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--text-base);
  transition: color var(--dur-1) var(--ease-out);
}
.footer__list a:hover { color: #fff; text-decoration: none; }

.footer__contact {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: rgba(255, 255, 255, 0.72);
}
.footer__contact:hover { color: #fff; text-decoration: none; }
.footer__contact .c-icon { color: var(--red-400); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.footer__legal a { color: rgba(255, 255, 255, 0.5); }
.footer__legal a:hover { color: #fff; text-decoration: none; }

.footer__cities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.footer__city {
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-full);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.66);
  /* A thumb target, not just a label: these chips were 29px tall.
     24px clears WCAG AA but is mean on a phone. */
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}
.footer__city:hover { border-color: rgba(255,255,255,.3); color: #fff; text-decoration: none; }

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.page__main { flex: 1; }

.page-head {
  padding-block: var(--sp-10) var(--sp-8);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
}
.page-head h1 { letter-spacing: var(--tracking-display); }
.page-head__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
}
.page-head h1 { font-size: var(--text-3xl); }
.page-head p { color: var(--text-muted); margin-top: var(--sp-2); }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--text-subtle);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--ink-900); text-decoration: none; }
.breadcrumbs__sep { color: var(--ink-300); }
