/* Site navigation, shared by every page: a fixed top bar (logo, "Let's
   Talk" pill, Menu toggle) and a fullscreen link overlay that wipes in
   via clip-path. Menu open/close, body-scroll lock and the marquee track
   content are handled in js/global/nav.js. */

/* ---------- top bar ---------- */
.sh-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
}

.sh-nav-mark {
  font-family: var(--sh-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  mix-blend-mode: difference;
  color: var(--sh-bone);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .sh-nav-mark {
    background: linear-gradient(135deg, var(--sh-bone) 10%, var(--sh-orange) 60%, var(--sh-orange-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.sh-nav-mark .tri {
  width: 0;
  height: 0;
  border-left: 9px solid var(--sh-orange);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.sh-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ---------- "let's talk" pill button ---------- */
.sh-nav-talk {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--sh-orange) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--sh-ink) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--sh-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sh-bone);
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.sh-nav-talk:hover {
  background: linear-gradient(135deg, var(--sh-orange), var(--sh-orange-deep));
  border-color: var(--sh-orange);
  color: var(--sh-ink);
}

.sh-nav-talk-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.sh-nav-talk:hover .sh-nav-talk-arrow {
  transform: translate(2px, -2px);
}

@media (max-width: 640px) {
  .sh-nav-talk { display: none; }
}

/* ---------- menu toggle (hamburger <-> X) pill button ---------- */
.sh-nav-sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--sh-bone) 22%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--sh-ink) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--sh-bone);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.sh-nav-sound:hover {
  border-color: color-mix(in srgb, var(--sh-orange) 55%, transparent);
}

.sh-nav-sound .ico {
  width: 18px;
  height: 18px;
}

.sh-nav-sound .ico.on { display: none; }

.sh-nav-sound.is-playing {
  color: var(--sh-orange);
  border-color: color-mix(in srgb, var(--sh-orange) 55%, transparent);
}

.sh-nav-sound.is-playing .ico.on { display: block; }
.sh-nav-sound.is-playing .ico.off { display: none; }

@media (max-width: 600px) {
  .sh-nav-sound { width: 32px; height: 32px; }
  .sh-nav-sound .ico { width: 16px; height: 16px; }
}

.sh-nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--sh-bone) 22%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--sh-ink) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  color: var(--sh-bone);
  font-family: var(--sh-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.sh-nav-toggle:hover {
  border-color: color-mix(in srgb, var(--sh-orange) 55%, transparent);
}

.sh-nav-toggle.is-open {
  background: var(--sh-bone);
  border-color: var(--sh-bone);
  color: var(--sh-ink);
}

.sh-nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 11px;
  flex: 0 0 auto;
}

.sh-nav-toggle-icon .bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1), top 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.sh-nav-toggle-icon .bar1 { top: 0; }
.sh-nav-toggle-icon .bar2 { top: 100%; transform: translateY(-100%); }

.sh-nav-toggle.is-open .bar1 { top: 50%; transform: translateY(-50%) rotate(45deg); }
.sh-nav-toggle.is-open .bar2 { top: 50%; transform: translateY(-50%) rotate(-45deg); }

/* ---------- body scroll lock while the overlay is open ---------- */
/* The actual freeze is done in js/global/nav.js (pins body in place with
   position:fixed so the scroll offset survives); this just drops the
   now-redundant scrollbar so nothing shifts the layout width. */
html.sh-nav-locked {
  overflow: hidden;
}

/* ---------- fullscreen overlay: clip-path wipe from top-right ---------- */
.sh-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--sh-ink);
  clip-path: circle(0% at calc(100% - 3rem) 3rem);
  transition: clip-path 0.85s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0.85s;
  pointer-events: none;
  visibility: hidden;
}

.sh-nav-overlay.open {
  clip-path: circle(150% at calc(100% - 3rem) 3rem);
  pointer-events: auto;
  visibility: visible;
  transition: clip-path 0.85s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0s;
}

/* ---------- stacked overlay links ---------- */
.sh-nav-overlay-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5rem, 11vh, 6.5rem) clamp(1.25rem, 6vw, 6rem) 1rem;
  overflow-y: auto;
}

/* ---------- overlay footer: copyright, socials, quick links ---------- */
.sh-nav-overlay-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1.1rem clamp(1.25rem, 6vw, 6rem) clamp(1.25rem, 4vw, 2rem);
  border-top: 1px solid color-mix(in srgb, var(--sh-bone) 14%, transparent);
  font-family: var(--sh-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.sh-nav-overlay-copy {
  color: color-mix(in srgb, var(--sh-bone) 60%, transparent);
}

.sh-nav-overlay-socials {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sh-nav-overlay-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--sh-bone) 25%, transparent);
  color: var(--sh-bone);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.sh-nav-overlay-socials a svg {
  width: 0.9rem;
  height: 0.9rem;
}

.sh-nav-overlay-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sh-nav-overlay-foot-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.sh-nav-overlay-foot-links a {
  color: color-mix(in srgb, var(--sh-bone) 75%, transparent);
  text-decoration: none;
  transition: color 0.25s ease;
}

.sh-nav-overlay-foot-links a:hover {
  color: var(--sh-bone);
}

/* .sh-email-cta (shared with the page footer) carries its own larger
   font-size/underline for that context — reset it back down to match
   the plain "Blog" link it sits next to here. */
.sh-nav-overlay-foot-links .sh-email-cta {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: color-mix(in srgb, var(--sh-bone) 75%, transparent);
  border-bottom: 0;
  padding-bottom: 0;
}

.sh-nav-overlay-foot-links .sh-email-cta:hover {
  color: var(--sh-bone);
}

@media (max-width: 640px) {
  .sh-nav-overlay-foot {
    justify-content: center;
    text-align: center;
  }
}

.sh-nav-overlay-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.1rem, 2.6vw, 1.85rem) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--sh-bone) 16%, transparent);
  text-decoration: none;
  overflow: hidden;
}

.sh-nav-overlay-link:first-child {
  border-top: 1px solid color-mix(in srgb, var(--sh-bone) 16%, transparent);
}

.sh-nav-overlay-item {
  display: inline-flex;
  align-items: flex-start;
  gap: clamp(0.5rem, 1.4vw, 0.9rem);
}

.sh-nav-overlay-num {
  font-family: var(--sh-mono);
  font-size: clamp(0.6rem, 0.9vw, 0.75rem);
  letter-spacing: 0.1em;
  color: var(--sh-taupe);
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.sh-nav-overlay-text {
  font-family: var(--sh-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-transform: uppercase;
  font-size: clamp(28px, 5.5vw, 64px);
  color: var(--sh-bone);
  transition: opacity 0.25s ease;
}

@media (hover: hover) {
  .sh-nav-overlay-link:hover .sh-nav-overlay-num,
  .sh-nav-overlay-link:hover .sh-nav-overlay-text {
    opacity: 0;
  }
}

/* ---------- hover state: the link becomes a scrolling marquee band ---------- */
.sh-nav-overlay-marquee {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
  overflow: hidden;
}

@media (hover: hover) {
  .sh-nav-overlay-link:hover .sh-nav-overlay-marquee {
    transform: scaleY(1);
  }
}

.sh-nav-overlay-marquee-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: sh-nav-marquee 30s linear infinite;
  will-change: transform;
}

@keyframes sh-nav-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.sh-nav-overlay-marquee-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-family: var(--sh-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: uppercase;
  font-size: clamp(20px, 4vw, 44px);
  color: var(--sh-ink);
  padding: 0 1.25rem;
  white-space: nowrap;
}

.sh-nav-overlay-marquee-num {
  font-family: var(--sh-mono);
  font-weight: 500;
  letter-spacing: 0.05em;
  font-size: 0.4em;
  color: color-mix(in srgb, var(--sh-ink) 65%, transparent);
}

.sh-nav-overlay-marquee-tag {
  font-family: var(--sh-mono);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.35em;
  color: color-mix(in srgb, var(--sh-ink) 65%, transparent);
}

.sh-nav-overlay-marquee-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: clamp(1.4rem, 2.6vw, 2.25rem);
  height: clamp(1.4rem, 2.6vw, 2.25rem);
  border-radius: 50%;
  background: var(--sh-bone);
  color: var(--sh-ink);
}

.sh-nav-overlay-marquee-arrow svg {
  width: 55%;
  height: 55%;
}

/* On touch devices there's no hover to trigger the marquee, so skip
   building/animating it entirely and just keep the plain stacked links. */
@media (hover: none) {
  .sh-nav-overlay-marquee { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sh-nav-overlay,
  .sh-nav-overlay.open {
    transition: clip-path 0.01s linear, visibility 0s linear;
  }
  .sh-nav-toggle-icon .bar {
    transition: none !important;
  }
  .sh-nav-overlay-marquee-track {
    animation: none !important;
  }
  .sh-nav-overlay-marquee {
    transition: none !important;
  }
}
