/* Homepage-only peeking edge-tab linking to /website-unlocked. Injected the
   same way sol.js/sol.css are (a <link>+<script defer> pair in index.html's
   head/body), since there's no shared header/footer partial on this site.
   New prefix wu-tab- so nothing collides with .sol-ribbon/.sol-launcher/
   .project-card/.sr-*. See README's "Website Unlocked" section. */

.wu-tab-root {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 40;
  display: flex;
  align-items: stretch;
  transform: translate(calc(-1 * var(--wu-tab-w, 220px)), -50%) translateX(-24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 380ms cubic-bezier(0.3, 0.9, 0.3, 1), opacity 320ms ease;
}
.wu-tab-root.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(calc(-1 * var(--wu-tab-w, 220px)), -50%);
}
.wu-tab-root.is-open {
  transform: translate(0, -50%);
}

/* Same Golden Gate recipe as .nav-glass (styles.css) -- darkened edge +
   brighter specular highlight, static (no motion/pointer tracking). */
.wu-tab-glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.06) 48%, rgba(255, 255, 255, 0.02)), var(--glass-fill);
  box-shadow: 0 14px 40px var(--glass-shadow), inset 0 1px 0 var(--glass-depth-highlight-on-light), inset 0 0 16px rgba(255, 255, 255, 0.16), inset 0 -1px 0 var(--glass-depth-edge-on-light);
  backdrop-filter: blur(34px) saturate(1.8) contrast(1.05);
  -webkit-backdrop-filter: blur(34px) saturate(1.8) contrast(1.05);
  border: 1px solid var(--glass-stroke);
}
:root[data-theme="dark"] .wu-tab-glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 48%, transparent), var(--glass-fill);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wu-tab-glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 48%, transparent), var(--glass-fill);
  }
}

.wu-tab-nub {
  width: 40px;
  flex: 0 0 auto;
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-block: 14px;
  border-left: none;
  border-radius: 0 16px 16px 0;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
/* The real key shape, cropped straight out of the hero artwork (see
   assets/website-unlocked-key.png -- an alpha cutout of one of the key
   silhouettes in website-unlocked-hero.png, not a drawn icon), painted in
   the accent color via mask-image rather than a filter/invert chain. Its
   natural crop lies on its side with the bow (ring) on the right; rotating
   -90deg (counterclockwise) brings the bow to the top and the teeth to the
   bottom, so it reads as a key hanging straight down. */
.wu-tab-icon {
  display: block;
  width: 30px;
  height: 30px;
  transform: rotate(-90deg);
  background: #00adff; /* sampled from the hero artwork's sky-blue, website-unlocked.css's --wu-c1 */
  -webkit-mask-image: url("/assets/website-unlocked-key.png");
  mask-image: url("/assets/website-unlocked-key.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.wu-tab-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--ink);
}

.wu-tab-panel {
  width: var(--wu-tab-w, 220px);
  flex: 0 0 auto;
  order: 1;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: none;
  border-radius: 0;
}
.wu-tab-eyebrow {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.wu-tab-title {
  margin: 0;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 0.98rem;
  font-weight: 900;
  text-transform: uppercase;
}
.wu-tab-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.wu-tab-go {
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .wu-tab-root {
    transition: none;
  }
}

/* The tab only ever appears on the homepage once scrolled to "Product
   leadership" -- on very short/narrow viewports where Sol's launcher or a
   modal might already be busy near the bottom, the tab stays vertically
   centered (not bottom-anchored) specifically to avoid that collision. */
@media (max-width: 480px) {
  .wu-tab-panel {
    width: 180px;
  }
  .wu-tab-sub {
    display: none;
  }
}
