/* Floating nav / header. Extracted from styles.css so a page can load just the header. */
:root{--eggshell:#fbead2;--red:#de3831;--ink:#171312;--muted:#62564f;--off-white:#fffaf2;}

/* --- Floating nav: red circle (logo) that expands sideways into a pill of links on hover --- */
.fab {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  height: 56px;
  width: 56px;
  display: flex;
  align-items: center;
  background: var(--red);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(23, 19, 18, 0.22), 0 2px 6px rgba(23, 19, 18, 0.14);
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transition:
    width 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s ease,
    opacity 0.35s ease,
    box-shadow 0.25s ease;
}

.fab.visible {
  opacity: 1;
  pointer-events: auto;
}

.fab.open {
  width: 380px;
  box-shadow: 0 12px 30px rgba(23, 19, 18, 0.28), 0 2px 6px rgba(23, 19, 18, 0.16);
}

.fab-mark {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.fab-mark:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6);
  border-radius: 50%;
}

.fab-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.fab-toggle {
  display: none;
  flex-shrink: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: url('cursor-pointer.svg') 10 2, pointer;
  align-items: center;
  justify-content: center;
}
.fab-toggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6);
  border-radius: 50%;
}

.fab-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}
.fab-burger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.fab-nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  padding-right: 28px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-12px);
  overflow: hidden;
  transition: opacity 0.3s ease 0.05s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}
.fab.open .fab-nav {
  opacity: 1;
  transform: translateX(0);
  overflow: visible;
  transition-delay: 0.18s;
}

.fab-nav > a,
.fab-nav-link-mega {
  color: #fff;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: url('cursor-pointer.svg') 10 2, pointer;
}
.fab-nav > a:hover,
.fab-nav-link-mega:hover {
  background: rgba(255, 255, 255, 0.18);
}


.fab-nav-mega-wrap {
  position: relative;
  display: inline-block;
}
.fab-nav-chev {
  transition: transform 0.25s ease;
  opacity: 0.85;
}
.fab-nav-mega-wrap.is-mega-open .fab-nav-chev {
  transform: rotate(180deg);
}

/* --- Mega menu panel --- */
.fab-mega {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: min(560px, 80vw);
  background: var(--off-white);
  border: 1px solid rgba(23, 19, 18, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(23, 19, 18, 0.22), 0 4px 10px rgba(23, 19, 18, 0.1);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Invisible bridge that fills the 14px gap between the trigger and the panel,
   so the mouse never "leaves" the wrap when crossing into the mega menu. */
.fab-mega::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.fab-nav-mega-wrap.is-mega-open .fab-mega {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fab-mega-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.fab-mega-list li { margin: 0; }
.fab-mega-list a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  white-space: normal;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.18s ease;
}
.fab-mega-list a:hover { background: var(--eggshell); }
.fab-mega-list strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.fab-mega-list span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 500;
}

.fab-mega-art {
  background: var(--eggshell);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  min-height: 180px;
}
.fab-mega-art img {
  width: 80%;
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(23, 19, 18, 0.15));
  animation: artFloatNav 7s ease-in-out infinite;
}
@keyframes artFloatNav {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-8px) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .fab-mega-art img { animation: none; transform: rotate(-4deg); }
}

/* --- Mobile: full-width pill across the top, hides on scroll-down --- */
@media (max-width: 800px) {
  .fab {
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 60px;
    border-radius: 0;
    overflow: visible;
    justify-content: space-between;
    padding: 0 16px;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
  }
  .fab.is-hidden { transform: translateY(-100%); }
  .fab.open { width: 100vw; }

  .fab-mark { width: auto; height: auto; }
  .fab-logo { width: 26px; height: 26px; }
  .fab-toggle {
    display: flex;
    width: 44px;
    height: 44px;
  }
  .fab.open .fab-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .fab.open .fab-burger span:nth-child(2) { opacity: 0; }
  .fab.open .fab-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* The drop-down panel: full-width, anchored under the pill */
  .fab-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 18px;
    background: var(--red);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 12px 30px rgba(23, 19, 18, 0.28);
    transform: translateY(-12px);
    transform-origin: top center;
    pointer-events: none;
    overflow: visible;
    opacity: 0;
  }
  .fab.open .fab-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .fab-nav > a,
  .fab-nav-link-mega {
    padding: 14px 14px;
    font-size: 16px;
    text-align: left;
    border-radius: 10px;
    justify-content: space-between;
  }

  /* Mega menu collapses inline on mobile */
  .fab-nav-mega-wrap { display: block; }
  .fab-mega {
    position: static;
    width: 100%;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: none;
    border: 0;
    border-radius: 12px;
    grid-template-columns: 1fr;
    padding: 6px;
    margin-top: 6px;
    transform: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.3s ease, padding 0.3s ease;
  }
  .fab-nav-mega-wrap.is-mega-open .fab-mega {
    opacity: 1;
    max-height: 800px;
    padding: 8px;
  }
  .fab-mega-list a { color: #fff; }
  .fab-mega-list a:hover { background: rgba(255, 255, 255, 0.12); }
  .fab-mega-list strong { font-size: 1rem; }
  .fab-mega-list span { color: rgba(255, 255, 255, 0.78); }
  .fab-mega-art { display: none; }
}
