/* ============================================================
   shapes.css
   Shared styles for SHAPES for Maya and SHAPES for Blender.
   Load order: fonts.css -> site.css -> shapes.css -> page inline <style>

   site.css handles: header, .nav, .burger, .mobnav, .stuck, footer.
   shapes.css only adds what differs: logo sizing, product label,
   the Support submenu, and the brave rabbit nav link separator.
   ============================================================ */


/* ── HEADER PADDING ────────────────────────────────────────── */

/* site.css sets .nav padding to 0 26px (no vertical padding).
   Add 5px top/bottom so the logo doesn't sit flush at the edges. */
.nav {
  padding-top: 10px;
  padding-bottom: 10px;
}


/* ── LOGO & PRODUCT LABEL ──────────────────────────────────── */

/* The SHAPES logo SVG is sized inline (height:34px;width:auto).
   .brand already handles flex + gap in site.css. */

.shapes-product-label {
  font-family: 'Fira Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lo);
  padding-left: 12px;
  border-left: 1px solid var(--line);
}


/* ── SUPPORT SUBMENU ───────────────────────────────────────── */

/* Parent list item */
.nav ul li.has-sub {
  position: relative;
}

/* The toggle link looks identical to every other nav link.
   No button — it's an <a> styled the same way. */
.nav ul li.has-sub > a.sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: default; /* it opens the submenu; does not navigate */
}

.sub-chevron {
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
  opacity: 0.55;
}

/* Submenu panel */
.subnav {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 172px;
  background: #282828;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  /* reset list styles that site.css sets on .nav ul */
  list-style: none;
  margin: 0;
}

/* Open state — toggled by hover on the parent li */
.nav ul li.has-sub:hover .subnav,
.nav ul li.has-sub:focus-within .subnav {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.nav ul li.has-sub:hover .sub-chevron,
.nav ul li.has-sub:focus-within .sub-chevron {
  transform: rotate(180deg);
}

/* Bridge the gap between the toggle and the panel so the mouse
   can travel down without the submenu collapsing */
.subnav::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0; right: 0;
  height: 12px;
}

/* Submenu links — same type treatment as nav links */
.subnav li {
  list-style: none;
}

.subnav a {
  display: block;
  padding: 2px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--lo);
  text-decoration: none;
  transition: color 0.18s;
  white-space: nowrap;
}

.subnav a:hover {
  color: var(--hi);
}


/* ── BRAVE RABBIT LINK SEPARATOR ───────────────────────────── */

.nav ul a.nav-br {
  color: var(--lo);
  opacity: 0.55;
  font-size: 13px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  margin-left: 6px;
}

.nav ul a.nav-br:hover {
  opacity: 1;
  color: var(--hi);
}


/* ── MOBILE NAV ADDITIONS ──────────────────────────────────── */

/* Support group label — matches mobnav link styling (site.css:
   font-weight:800, font-size:20px, color:var(--hi), border-bottom)
   but is a <span> so non-interactive and gets no hover state. */
.mobnav-group-label {
  display: block;
  color: var(--hi);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

/* Sub-links indented within the Support group */
.mobnav a.mobnav-sub {
  font-size: 16px;
  font-weight: 600;
  color: var(--lo);
  padding: 10px 0 10px 16px;
}

.mobnav a.mobnav-sub:hover {
  color: var(--hi);
}


/* ── REDUCED MOTION ────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .subnav,
  .sub-chevron {
    transition: none;
  }
}
