/* ————————————————————————————————————————————
   lil bit cycling v2 — the header

   Ported from the first theme's blog.css (header section) and nav-menu.css.
   One header, two rows: the identity — logo at the left, name and tagline
   beside it — over the menu bar. The whole thing is sticky with a negative
   top exactly the identity's height, so the identity scrolls away with the
   page like ordinary content and only the menu row pins. Once the identity
   is gone, assets/js/site-bar.js sets `is-compact` and a small logo pops in
   at the pinned row's left.

   Every class is lbc-prefixed and the design tokens are scoped to the bar,
   so nothing here touches the parent's or the base's rules for the page.
   ———————————————————————————————————————————— */

.lbc-bar {
  --paper:     #ffffff;
  --paper-2:   #faf9f7;
  --ink:       #212121;
  --ink-soft:  #6e6e6e;
  --ink-faint: rgba(0, 0, 0, .12);
  --rule:      rgba(0, 0, 0, .09);
  --coral:     #fc4c02;
  --sans:      "Quicksand", "helvetica neue", helvetica, arial, sans-serif;
  --wrap:      74rem;   /* the parent's .content-wrap is 1180px */
  --gutter:    1.4rem;

  position: sticky;
  top: calc(var(--bar-top, 0px) - var(--identity-h));
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  color: var(--ink);
  box-sizing: border-box;

  /* The identity's geometry, held in one place so the logo can be sized from
     the type: --id-height is the name-and-tagline stack (each size times its
     line-height), and the logo is that times --logo-scale, a touch larger. */
  --title-size:   clamp(1.6rem, 1.1rem + 2vw, 3rem);
  --tagline-size: .95rem;
  --id-height:    calc(var(--title-size) * 1.15 + var(--tagline-size) * 1.7);
  --logo-scale:   1.2;

  /* how far the bar hangs above the viewport when pinned: the identity row —
     its logo (the taller of its two sides) plus its 2rem + 1.8rem padding */
  --identity-h: calc(var(--id-height) * var(--logo-scale) + 3.8rem);
}
.lbc-bar *, .lbc-bar *::before, .lbc-bar *::after { box-sizing: border-box; }

/* the admin bar is fixed and 32px tall, and the pinned row has to clear it */
.admin-bar .lbc-bar { --bar-top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .lbc-bar { --bar-top: 46px; }
}

.lbc-bar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ——— the identity row ——— */

.lbc-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  /* --identity-h's arithmetic depends on this padding */
  padding: 2rem 0 1.8rem;
}

/* flex: none — were the anchor squeezed, a global img max-width would cap
   the logo's width while its height stays set, distorting it. The titles are
   the side of the row that gives (.lbc-id's min-width: 0). */
.lbc-brand { flex: none; display: block; line-height: 0; }
.lbc-brand img {
  display: block;
  height: calc(var(--id-height) * var(--logo-scale));
  width: auto;
  max-width: none;
  border: 0;
}
.lbc-brand:hover img { opacity: .85; }

.lbc-id { min-width: 0; }

/* the name set as the original masthead: 48px Quicksand, no weight.
   line-heights stay explicit — --id-height's arithmetic depends on them. */
.lbc-title {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: var(--title-size);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
}
.lbc-title a { color: var(--ink); text-decoration: none; }
.lbc-title a:hover { color: var(--coral); }

.lbc-tagline {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: var(--tagline-size);
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

/* ——— the menu row ——— */

.lbc-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  /* its rule runs edge to edge like the old nav bar's did, so the row is
     pulled out to the viewport and padded back to the wrap */
  border-top: 1px solid var(--rule);
  margin: 0 calc(50% - 50vw);
  padding: .55rem calc(50vw - 50%);
}

/* the pinned row's brand — the logo with the site's name beside it: absolute
   at the bar's far left, so it never moves the centred menu. Hidden while the
   identity is on screen; once the reader has scrolled past it, the logo pops
   — a springy scale-in, transform only — and the name springs out of it a
   beat later. */
.lbc-brand-mini {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: .65rem;
  line-height: 0;
  text-decoration: none;
  color: var(--ink);
  visibility: hidden;
}
.lbc-brand-mini:hover { opacity: .85; }
.lbc-brand-mini img {
  display: block;
  height: 2.1rem;
  width: auto;
  max-width: none;
  border: 0;
}
.lbc-brand-mini-name {
  display: none;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1;
  white-space: nowrap;
  /* growing from its left edge, it reads as sprung from the logo */
  transform-origin: left center;
}
/* the name only where it can't crowd the centred menu */
@media (min-width: 1000px) {
  .lbc-brand-mini-name { display: block; }
}
.lbc-brand-mini img, .lbc-brand-mini-name { transform: scale(0); }
.lbc-bar.is-compact .lbc-brand-mini { visibility: visible; }
.lbc-bar.is-compact .lbc-brand-mini img,
.lbc-bar.is-compact .lbc-brand-mini-name {
  animation: lbc-brand-pop .28s cubic-bezier(.34, 1.56, .64, 1) both;
}
.lbc-bar.is-compact .lbc-brand-mini-name { animation-delay: .065s; }
@keyframes lbc-brand-pop {
  to { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .lbc-bar.is-compact .lbc-brand-mini img,
  .lbc-bar.is-compact .lbc-brand-mini-name { animation: none; transform: scale(1); }
}

/* ——— the menu, as WordPress prints it ——— */

.lbc-nav ul,
.lbc-menu-links ul { list-style: none; margin: 0; padding: 0; }

.lbc-nav-list {
  display: flex;
  /* the original gives each link 1rem of side padding, so neighbours sit 2rem apart */
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.lbc-nav-list > li { position: relative; margin: 0; padding: .3rem 0; }
/* set as the original navbar is: 15px Quicksand, uppercase, a little tracking */
.lbc-nav-list a {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  font-family: var(--sans);
  font-size: .9375rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: .2rem 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}
.lbc-nav-list a:hover { color: var(--ink); }
.lbc-nav-list > .current-menu-item > a,
.lbc-nav-list > .current-menu-ancestor > a { color: var(--ink); border-bottom-color: var(--coral); }
/* an entry drawn as a mark (the Menu Icons plugin's Instagram glyph) sits a
   little larger than the text so it reads */
.lbc-nav-list a > i { font-size: 1.2em; }
.lbc-nav-list a img { display: inline-block; width: auto; height: .8em; }

/* a dropdown under an entry with children — the "Journeys" list, Polylang's
   languages — opened on hover and on keyboard focus */
.lbc-nav-list > li > ul {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  min-width: 12rem;
  width: max-content;
  background: var(--paper);
  border: 1px solid var(--ink-faint);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  padding: .5rem;
  z-index: 30;
}
.lbc-nav-list > li:hover > ul,
.lbc-nav-list > li:focus-within > ul { display: flex; }
.lbc-nav-list > li > ul li { margin: 0; }
.lbc-nav-list > li > ul a {
  display: flex;
  text-transform: none;
  letter-spacing: .1em;
  font-size: .8rem;
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  padding: .6rem .8rem;
  white-space: nowrap;
}
.lbc-nav-list > li > ul a:hover { background: var(--paper-2); color: var(--coral); }
.lbc-nav-list > li > ul .current-menu-item > a { color: var(--coral); }

/* ——— the phone menu: one button, one panel ——— */

.lbc-menu-wrap { position: relative; display: none; }

/* A drawn icon, not the ☰ glyph: its ink sits high in its em box, so the button
   read as misaligned however the box was centred. */
.lbc-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  color: var(--ink);
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.lbc-menu-btn .icon { width: 1.15rem; height: 1.15rem; display: block; }
.lbc-menu-btn[aria-expanded="true"] { color: var(--coral); }

.lbc-menu-panel {
  position: absolute;
  top: calc(100% + .7rem);
  right: 0;
  width: max-content;
  min-width: 14rem;
  max-width: calc(100vw - 2.2rem);
  background: var(--paper);
  border: 1px solid var(--ink-faint);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  padding: .5rem;
  z-index: 30;
  text-align: left;
}
.lbc-menu-panel[hidden] { display: none; }

.lbc-menu-list { display: flex; flex-direction: column; }
.lbc-menu-list li { margin: 0; }
.lbc-menu-list a {
  display: flex;
  align-items: center;
  gap: .5em;
  font-family: var(--sans);
  font-size: .76rem;
  letter-spacing: .1em;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  padding: .7rem .8rem;
}
.lbc-menu-list a:hover { background: var(--paper-2); color: var(--coral); }
.lbc-menu-list .current-menu-item > a { color: var(--coral); }
.lbc-menu-list a img { display: inline-block; width: auto; height: .9em; }
/* children indented under their heading */
.lbc-menu-list ul { padding-left: 1rem; }

/* Above the breakpoint the row shows its entries inline; below it they all
   fold into the button. */
@media (max-width: 880px) {
  .lbc-nav { display: none; }
  .lbc-menu-wrap { display: block; }
}
@media (max-width: 640px) {
  .lbc-identity { gap: 1rem; }
}

/* the parent's leftover mobile-menu shells, never filled now that its
   navigation markup is gone */
#smobile-menu, #mobile-menu-overlay { display: none; }
