/* V8.0.0 — site header + primary navigation. Markup: template-parts/site-header.php.
   Every selector is under .lp-hdr, so nothing here reaches page content and the legacy
   legacy header rules cannot reach this. Accent #ff73ee, flat.
   V8.1.0 — the bar is ALWAYS frosted glass (the page still shows through, blurred): over a bright
   slider frame the bare text measured ~3.7:1. Tint .72 is set for the worst case, white behind:
   ink 6.9:1, soft text 5.6:1, the #ff73ee playhead 3.4:1 (non-text, needs 3:1). */

.lp-hdr {
  --h-ink: #f4f1eb;
  --h-soft: rgba(244, 241, 235, .85);
  --h-mut: rgba(244, 241, 235, .62);
  --h-line: rgba(244, 241, 235, .14);
  --h-hot: #ff73ee;
  --h-glass: rgba(14, 14, 17, .72);
  --h-edge: rgba(255, 255, 255, .12);
  --h-ease: cubic-bezier(.22, 1, .36, 1);
  --h-h: 80px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2002;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--h-h);
  padding: 0 clamp(20px, 4vw, 60px);
  color: var(--h-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: transform .56s var(--h-ease), height .56s var(--h-ease), opacity .6s linear;
}
.admin-bar .lp-hdr { top: 32px; }
@media (max-width: 782px) { .admin-bar .lp-hdr { top: 46px; } }

/* the glass bar */
.lp-hdr::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--h-glass);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border-bottom: 1px solid var(--h-edge);
  transition: opacity .56s var(--h-ease);
  pointer-events: none;
}
.lp-hdr.is-compact { --h-h: 64px; }
.lp-hdr.is-hidden { transform: translateY(-100%); }
html.lp-nav-open .lp-hdr { transform: none; }
html.lp-nav-open .lp-hdr::before { opacity: 0; }
html.lp-vp-open .lp-hdr { opacity: 0; pointer-events: none; }

.lp-hdr__logo { justify-self: start; display: flex; align-items: center; }
/* V8.6.0 — !important is deliberate and narrow: an inline Customizer rule
   (.logo-wrap .leopati-logo { display:inline-block !important }, 0,2,0) beat the plain
   inline-flex here, so the 44px target kept its text at the top — measured 12.3px above the
   nav labels' centre line on every page. This selector is 0,2,1 and only touches the header logo. */
.lp-hdr .lp-hdr__logo > a { display: inline-flex !important; align-items: center; min-height: 44px; }
/* V8.98.3 — "Agency" under the wordmark (owner's choice A, 2026-10-29): centred, thin, wide-spaced
   capitals. Stacked inside the same 44px link, so the header keeps its 80px (72px on phones). */
.lp-hdr .lp-hdr__logo > a.has-sub { flex-direction: column; justify-content: center; line-height: 1; }
.lp-hdr .lp-hdr__logo .leopati-logo-word { display: block; line-height: 1; }
.lp-hdr .lp-hdr__logo .leopati-logo-sub { display: block; margin-top: 5px; padding-left: .52em; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; font-size: 8.5px; font-weight: 300; letter-spacing: .52em; line-height: 1; text-transform: uppercase; color: rgba(244, 241, 235, .72); white-space: nowrap; }
.lp-hdr__side { justify-self: end; display: flex; align-items: center; gap: 22px; }

/* language switch (keeps .leopati-langswitch__link for the first-visit selector) */
.lp-hdr .lp-hdr__lang { display: flex; gap: 4px; margin: 0; }
.lp-hdr .lp-hdr__lang .leopati-langswitch__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 2px;
  color: var(--h-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-decoration: none;
  background: transparent;
  transition: color .4s var(--h-ease), background-color .4s var(--h-ease);
}
.lp-hdr .lp-hdr__lang .leopati-langswitch__link.is-current { color: var(--h-ink); background: rgba(255, 255, 255, .12); }
.lp-hdr .lp-hdr__lang .leopati-langswitch__link:hover { color: #fff; }
.lp-hdr .lp-hdr__lang .leopati-langswitch__link:focus-visible { outline: 1px solid var(--h-hot); outline-offset: 2px; }
.lp-hdr .leopati-header-cta { margin: 0; }

/* ---------------- desktop timeline nav ---------------- */
.lp-nav { position: relative; height: 100%; }
.lp-nav__panel { position: relative; height: 100%; display: flex; align-items: center; }
.lp-nav__list { position: relative; display: flex; height: 100%; margin: 0; padding: 0; list-style: none; }
.lp-nav__item { position: relative; margin: 0; padding: 0; list-style: none; }
.lp-nav__row { height: 100%; }
.lp-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--h-h);
  padding: 0 clamp(16px, 1.6vw, 24px);
  color: var(--h-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color .5s var(--h-ease), height .56s var(--h-ease);
}
.lp-nav__link:hover,
.lp-nav__link:focus-visible,
.lp-nav__link[aria-current] { color: #fff; outline: none; }
.lp-nav__link:focus-visible .lp-nav__label { outline: 1px solid var(--h-hot); outline-offset: 6px; }
.has-sub.is-dismissed > .lp-nav__sub { opacity: 0; visibility: hidden; }
.lp-nav__caret {
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: .7;
  transform: rotate(45deg);
  transition: transform .45s var(--h-ease);
}
.lp-nav__tog { display: none; }

/* the cut-timeline ruler: hard-stop ticks, not a gradient fill */
.lp-nav__ruler {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 9px;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(244, 241, 235, .34) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(90deg, rgba(244, 241, 235, .16) 0 1px, transparent 1px 12px);
  background-size: 100% 9px, 100% 4px;
  background-repeat: repeat-x;
  background-position: 0 0, 0 5px;
}
.lp-nav__head {
  position: absolute;
  left: -1px;
  bottom: 4px;
  width: 2px;
  height: 15px;
  background: var(--h-hot);
  opacity: 0;
  transform: translateX(var(--x, 0));
  transition: transform .55s var(--h-ease), opacity .4s var(--h-ease);
}
.lp-nav__head::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -5px;
  border: 5px solid transparent;
  border-top-color: var(--h-hot);
  border-bottom: 0;
}
.lp-nav.has-head .lp-nav__head { opacity: 1; }

/* dropdowns: frosted glass under the bar, opened by hover or keyboard focus */
.lp-nav__sub {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 5;
  min-width: 320px;
  padding: 8px;
  background: var(--h-glass);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--h-edge);
  border-radius: 2px;
  text-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .4s var(--h-ease), transform .5s var(--h-ease), visibility 0s linear .4s;
}
.lp-nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.has-sub:hover > .lp-nav__sub,
.has-sub:focus-within > .lp-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}
.has-sub:hover .lp-nav__caret,
.has-sub:focus-within .lp-nav__caret { transform: translateY(3px) rotate(225deg); }
.lp-nav__sub ul { margin: 0; padding: 0; list-style: none; }
.lp-nav__sub li { margin: 0; padding: 0; list-style: none; }
.lp-nav__sub a {
  position: relative;
  display: block;
  padding: 12px 16px 12px 18px;
  color: var(--h-ink);
  text-decoration: none;
  transition: background-color .4s var(--h-ease);
}
.lp-nav__sub a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--h-hot);
  transform: scaleY(0);
  transition: transform .45s var(--h-ease);
}
.lp-nav__sub a:hover,
.lp-nav__sub a:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
.lp-nav__sub a:hover::before,
.lp-nav__sub a:focus-visible::before,
.lp-nav__sub a[aria-current]::before { transform: scaleY(1); }
.lp-nav__sub b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.lp-nav__sub small { display: block; margin-top: 3px; color: var(--h-soft); font-size: 12px; }
.lp-nav__all { margin-top: 6px !important; padding-top: 6px !important; border-top: 1px solid var(--h-line); }
.lp-nav__all b { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

.lp-nav__foot { display: none; }
.lp-hdr__burger { display: none; }

/* ---------------- phones & tablets: the same nav as a full-screen sheet ---------------- */
@media (max-width: 1023px) {
  .lp-hdr { --h-h: 72px; grid-template-columns: 1fr auto; }
  .lp-hdr.is-compact { --h-h: 60px; }
  /* V8.98.5 — phones keep a short "Start" in the bar (owner, 2026-10-30): the first call to action
     was otherwise four screens down the home page. Hidden below 370px by inc/header-cta.php. */
  .lp-hdr .leopati-header-cta { margin-right: 4px; }
  .lp-hdr__side { grid-column: 2; gap: 10px; }
  .lp-hdr .lp-hdr__lang .leopati-langswitch__link { min-width: 44px; min-height: 44px; justify-content: center; padding: 0; }

  html.lp-nav-open, html.lp-nav-open body { overflow: hidden; }
  .lp-hdr__burger {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--h-ink);
    cursor: pointer;
  }
  .lp-hdr__burger span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 1.5px;
    background: currentColor;
    transition: transform .6s var(--h-ease), opacity .4s var(--h-ease);
  }
  .lp-hdr__burger span:nth-child(1) { top: 16px; }
  .lp-hdr__burger span:nth-child(2) { top: 22px; right: 16px; }
  .lp-hdr__burger span:nth-child(3) { top: 28px; }
  html.lp-nav-open .lp-hdr__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  html.lp-nav-open .lp-hdr__burger span:nth-child(2) { opacity: 0; }
  html.lp-nav-open .lp-hdr__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .lp-hdr__burger:focus-visible { outline: 1px solid var(--h-hot); outline-offset: 2px; }

  .lp-nav { position: fixed; inset: 0; z-index: -1; height: auto; visibility: hidden; pointer-events: none; }
  .lp-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #08080a;
    transform: translateY(-100%);
    transition: transform .75s var(--h-ease);
  }
  html.lp-nav-open .lp-nav { visibility: visible; pointer-events: auto; }
  html.lp-nav-open .lp-nav::before { transform: none; }
  .lp-nav__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(var(--h-h) + 24px) 20px calc(24px + env(safe-area-inset-bottom)) 52px;
    /* the desktop bar centres its row; the sheet is a column that must run full width */
    align-items: stretch;
    text-shadow: none;
  }
  .lp-nav__list,
  .lp-nav__foot { width: 100%; max-width: 560px; }
  .admin-bar .lp-nav__panel { padding-top: calc(var(--h-h) + 70px); }
  .lp-nav__list { flex: 0 0 auto; display: block; height: auto; margin: auto 0; }
  .lp-nav__list::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 0;
    bottom: 0;
    width: 9px;
    background-image:
      repeating-linear-gradient(180deg, rgba(244, 241, 235, .34) 0 1px, transparent 1px 56px),
      repeating-linear-gradient(180deg, rgba(244, 241, 235, .16) 0 1px, transparent 1px 11.2px);
    background-size: 9px 100%, 4px 100%;
    background-repeat: repeat-y;
    opacity: 0;
    transition: opacity .6s var(--h-ease);
  }
  html.lp-nav-open .lp-nav__list::before { opacity: 1; transition-delay: .3s; }
  .lp-nav__item { overflow: hidden; border-bottom: 1px solid var(--h-line); }
  .lp-nav__row {
    display: flex;
    align-items: center;
    height: auto;
    transform: translateY(105%);
    transition: transform .75s var(--h-ease);
  }
  html.lp-nav-open .lp-nav__row { transform: none; transition-delay: calc(.25s + var(--i, 0) * .07s); }
  .lp-nav__link {
    flex: 1 1 auto;
    height: auto;
    min-height: 80px;
    padding: 10px 0;
    color: rgba(244, 241, 235, .72);
    font-size: clamp(34px, 11vw, 46px);
    font-weight: 500;
    letter-spacing: -.05em;
    line-height: 1;
    text-transform: none;
  }
  .lp-nav__link[aria-current] { color: var(--h-ink); }
  .lp-nav__caret { display: none; }
  .lp-nav__tog {
    position: relative;
    display: block;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--h-line);
    border-radius: 50%;
    background: none;
    color: var(--h-ink);
    cursor: pointer;
    transition: border-color .4s var(--h-ease);
  }
  .lp-nav__tog::before,
  .lp-nav__tog::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 1.5px;
    margin: -.75px 0 0 -6px;
    background: currentColor;
    transition: transform .45s var(--h-ease);
  }
  .lp-nav__tog::after { transform: rotate(90deg); }
  .lp-nav__tog[aria-expanded="true"] { border-color: var(--h-hot); }
  .lp-nav__tog[aria-expanded="true"]::after { transform: rotate(0); }
  .lp-nav__tog:focus-visible { outline: 1px solid var(--h-hot); outline-offset: 2px; }

  .lp-nav__sub {
    position: static;
    display: none;
    min-width: 0;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .lp-nav__sub::before { display: none; }
  .lp-nav__item.is-expanded .lp-nav__sub { display: block; }
  .has-sub:hover > .lp-nav__sub,
  .has-sub:focus-within > .lp-nav__sub { transform: none; }
  .lp-nav__item:not(.is-expanded) .lp-nav__sub { display: none; }
  .lp-nav__sub a { display: flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 10px 0; color: var(--h-mut); }
  .lp-nav__sub a::before { display: none; }
  .lp-nav__sub a[aria-current] { color: var(--h-ink); }
  .lp-nav__sub b { font-size: 18px; font-weight: 500; }
  .lp-nav__sub small { margin: 0; color: var(--h-mut); font-size: 12px; }
  .lp-nav__all { margin-top: 0 !important; padding-top: 0 !important; border: 0; }
  .lp-nav__all b { font-size: 18px; letter-spacing: 0; text-transform: none; }
  .lp-nav__all small { display: none; }

  .lp-nav__ruler { display: none; }
  .lp-nav__head {
    left: 20px;
    top: 0;
    bottom: auto;
    width: 16px;
    height: 2px;
    transform: translateY(var(--y, 0));
  }
  .lp-nav__head::before { left: auto; right: -5px; top: -4px; border: 5px solid transparent; border-left-color: var(--h-hot); border-right: 0; }
  .lp-nav.has-head .lp-nav__head { opacity: 0; }
  html.lp-nav-open .lp-nav.has-head .lp-nav__head { opacity: 1; transition-delay: 0s, .45s; }

  .lp-nav__foot {
    flex: 0 0 auto;
    display: grid;
    gap: 16px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--h-line);
    opacity: 0;
    transition: opacity .6s var(--h-ease);
  }
  html.lp-nav-open .lp-nav__foot { opacity: 1; transition-delay: .55s; }
  .lp-nav__btn {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    border: 1px solid var(--h-ink);
    color: var(--h-ink);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-decoration: none;
  }
  .lp-nav__contact { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; }
  .lp-nav__contact a { display: block; min-height: 44px; color: var(--h-ink); text-decoration: none; }
  .lp-nav__contact span { display: block; margin-bottom: 3px; color: var(--h-mut); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
  .lp-nav__plats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 10px; margin: 0; font-size: 12px; }
  .lp-nav__plats a { display: inline-flex; align-items: center; min-height: 44px; color: var(--h-mut); text-decoration: none; }
  .lp-nav__meta { margin: 0; color: var(--h-mut); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-hdr, .lp-hdr *, .lp-hdr *::before, .lp-hdr *::after, .lp-hdr::before {
    transition-duration: .01s !important;
    transition-delay: 0s !important;
  }
}

/* V8.87.0 — a sub-category (AI Shorts & Series, AI Cartoon & Animation) sits under its discipline,
   indented with a small elbow, so the menu reads as a tree and not as six equal siblings. */
.lp-nav__sub li.lp-nav__subitem a { padding-left: 30px; }
.lp-nav__sub li.lp-nav__subitem b { font-weight: 500; font-size: 13px; }
.lp-nav__sub li.lp-nav__subitem b::before { content: "\21B3"; display: inline-block; margin-right: 8px; opacity: .5; }
@media (max-width: 991.98px) {
  .lp-nav__sub li.lp-nav__subitem a { padding-left: 18px; }
}
