/* Shared sticky header + hamburger menu (all pages)
 *
 * Hey. Thanks for checking out my site. I see you inspecting it.
 *
 * © 2026 Cristian Paez Jr. All rights reserved.
 * “Cristian Paez Jr”, “CPJR”, and related logos are trademarks of Cristian Paez Jr.
 * No part of this site’s code, design, or content may be copied, scraped, or reused
 * without prior written permission.
 */

body.menu-open {
  overflow: hidden;
}

/* WebP wrapper must not become a layout box (flex/grid media containers size the img directly) */
.cpjr-pic {
  display: contents;
}

/* Safari otherwise makes the <source> a grid/flex item and shoves the img into the next track */
.cpjr-pic > source {
  display: none;
}

/* Avoid white flash before day/night class is known */
html {
  background-color: #f7f8fa;
  color-scheme: light;
}

html.site-night {
  background-color: #14151a;
  color-scheme: dark;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  color: var(--ink, #14151a);
}

/* Only animate theme after first paint (boot already set the class) */
html.site-theme-ready .site-header {
  transition:
    background 0.45s var(--ease, ease),
    color 0.45s var(--ease, ease),
    border-color 0.45s var(--ease, ease);
}

@media (prefers-reduced-motion: reduce) {
  html.site-theme-ready .site-header {
    transition: none;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 0;
}

/* Desktop header announcement ticker — centered */
.header-ticker {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(22rem, 34vw);
  height: 1.35rem;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 901px) {
  .header-ticker {
    display: block;
  }
}

.header-ticker-viewport {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.header-ticker-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Raleway", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(20, 21, 26, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  text-align: center;
}

.header-ticker-item.is-active {
  transform: translateY(0);
  opacity: 1;
}

.header-ticker-item.is-exit {
  transform: translateY(110%);
  opacity: 0;
}

html.site-night .site-header .header-ticker-item {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .header-ticker-item {
    transition: none;
  }
}

.menu-toggle {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.menu-toggle:hover {
  background: #ffffff;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hamburger {
  width: 18px;
  height: 12px;
  position: relative;
  display: block;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), top 0.35s var(--ease);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 5px; }
.hamburger span:nth-child(3) { top: 10px; }

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
  top: 5px;
  transform: rotate(-45deg);
}

.logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 28px;
  height: 28px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(340px, 52vw);
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-left: auto;
  min-width: 0;
  flex: 1 1 auto;
}

/* Header social: fixed footprint so Store pill stays put; extra icons scroll */
.header-right .social-links {
  position: relative;
  min-width: 0;
  flex: 0 1 260px;
  width: 260px;
  max-width: min(100%, 260px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}

/* Header social scroll fades (desktop + mobile) */
.header-right .social-links.social-fade-right {
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 calc(100% - 18px),
    rgba(0, 0, 0, 0.45) calc(100% - 8px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 calc(100% - 18px),
    rgba(0, 0, 0, 0.45) calc(100% - 8px),
    transparent 100%
  );
}

.header-right .social-links.social-fade-left {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 8px,
    #000 18px,
    #000 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 8px,
    #000 18px,
    #000 100%
  );
}

.header-right .social-links.social-fade-left.social-fade-right {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 8px,
    #000 18px,
    #000 calc(100% - 18px),
    rgba(0, 0, 0, 0.45) calc(100% - 8px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 8px,
    #000 18px,
    #000 calc(100% - 18px),
    rgba(0, 0, 0, 0.45) calc(100% - 8px),
    transparent 100%
  );
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
  max-width: min(100%, 280px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.15rem 0;
}

.social-links::-webkit-scrollbar {
  display: none;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), opacity 0.25s var(--ease);
  opacity: 0.9;
}

.social-links a:hover {
  background: var(--bg-soft);
  opacity: 1;
  transform: translateY(-1px);
}

.social-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.social-links img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-pill, 999px);
  background: var(--store, #14151a);
  color: #fff;
  font-weight: 600;
  font-size: 0.925rem;
  letter-spacing: 0.01em;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), opacity 0.25s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}

.store-btn:hover {
  background: var(--store-hover, #2a2c35);
  transform: translateY(-1px);
}

.store-btn.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.store-btn.is-locked:hover {
  background: var(--store, #14151a);
  transform: none;
}

.store-btn .cpjr-entry-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.store-btn.is-locked-pulse {
  animation: cpjr-entry-lock-pulse 0.45s ease;
}

@keyframes cpjr-entry-lock-pulse {
  0%,
  100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.store-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Studio | Store toggle in the main site header */
.site-header .store-site-toggle {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px;
  border: 1px solid rgba(20, 21, 26, 0.55);
  border-radius: 999px;
  font-family: var(--font-ui, "Raleway", sans-serif);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.site-header .store-site-toggle > * {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: #14151a;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-header .store-site-toggle a:not(.is-current):hover {
  background: rgba(20, 21, 26, 0.06);
}

.site-header .store-site-toggle a:focus-visible {
  outline: 2px solid var(--accent, #89cff0);
  outline-offset: 2px;
}

.site-header .store-site-toggle .is-current {
  background: #14151a;
  color: #fff;
}

/* Header night shift — same schedule as footer (8pm–8am local time) */
html.site-night .site-header {
  background: rgba(20, 21, 26, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

html.site-night .site-header .logo-text {
  color: #fff;
}

html.site-night .site-header .menu-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

html.site-night .site-header .menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

html.site-night .site-header .hamburger span {
  background: #fff;
}

html.site-night .site-header .social-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

html.site-night .site-header .social-links img {
  filter: invert(1) brightness(1.05);
  animation: footer-social-soft-glow 2.6s ease-in-out infinite;
}

html.site-night .site-header .store-btn {
  background: #fff;
  color: #14151a;
}

html.site-night .site-header .store-btn:hover {
  background: #e8eaee;
}

html.site-night .site-header .store-btn.is-locked:hover {
  background: #fff;
}

html.site-night .site-header .store-site-toggle {
  border-color: rgba(255, 255, 255, 0.28);
}

html.site-night .site-header .store-site-toggle > * {
  color: #fff;
}

html.site-night .site-header .store-site-toggle a:not(.is-current):hover {
  background: rgba(255, 255, 255, 0.08);
}

html.site-night .site-header .store-site-toggle .is-current {
  background: #fff;
  color: #14151a;
}

/* Studio ↔ Media Kit variant: baby blue so it reads differently from the regular toggle */
.site-header .store-site-toggle--variant .is-current,
html.site-night .site-header .store-site-toggle--variant .is-current {
  background: #89cff0;
  color: #14151a;
}

.site-header .store-site-toggle--variant .is-current:hover,
html.site-night .site-header .store-site-toggle--variant .is-current:hover {
  background: #a6dcf5;
}

@media (prefers-reduced-motion: reduce) {
  html.site-night .site-header .social-links img {
    animation: none;
    filter:
      invert(1)
      brightness(1.05)
      drop-shadow(0 0 4px rgba(255, 255, 255, 0.55))
      drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  }
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 21, 26, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
  z-index: 998;
}

.nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: var(--header-h, 68px);
  left: 0;
  width: min(320px, 88vw);
  height: calc(100vh - var(--header-h, 68px));
  height: calc(100dvh - var(--header-h, 68px));
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #14151a;
  border-right: 1px solid rgba(20, 21, 26, 0.1);
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-105%);
  transition:
    transform 0.4s var(--ease),
    visibility 0s linear 0.4s,
    background 0.45s var(--ease, ease),
    color 0.45s var(--ease, ease),
    border-color 0.45s var(--ease, ease);
  z-index: 999;
  box-shadow: var(--shadow-soft, 0 10px 30px rgba(20, 21, 26, 0.06));
  visibility: hidden;
  pointer-events: none;
  font-family: var(--font-display);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    transform 0.4s var(--ease),
    visibility 0s,
    background 0.45s var(--ease, ease),
    color 0.45s var(--ease, ease),
    border-color 0.45s var(--ease, ease);
}

.mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.mobile-nav a {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  color: #14151a;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.mobile-nav a:hover {
  background: rgba(20, 21, 26, 0.06);
  color: var(--accent);
}

.mobile-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Night menu — current dark panel */
html.site-night .mobile-nav {
  background: #14151a;
  color: #fff;
  border-right-color: rgba(255, 255, 255, 0.1);
}

html.site-night .mobile-nav a {
  color: #fff;
}

html.site-night .mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

/* Contact Me — under last menu link, flush to the right edge like a bookmark */
.mobile-nav a.nav-contact-bookmark {
  position: static;
  align-self: flex-end;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 7.25rem;
  height: 2.85rem;
  margin-top: 0.85rem;
  margin-right: -1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border-radius: 12px 0 0 12px;
  background: #89cff0;
  color: #14151a;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 0 12px rgba(137, 207, 240, 0.85),
    0 0 28px rgba(137, 207, 240, 0.55),
    0 0 48px rgba(137, 207, 240, 0.3);
  animation: contact-glow-pulse 2.4s ease-in-out infinite;
  transition:
    background 0.25s var(--ease),
    transform 0.25s var(--ease),
    color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

@keyframes contact-glow-pulse {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(137, 207, 240, 0.65),
      0 0 22px rgba(137, 207, 240, 0.4),
      0 0 36px rgba(137, 207, 240, 0.2);
  }
  50% {
    box-shadow:
      0 0 18px rgba(137, 207, 240, 1),
      0 0 40px rgba(137, 207, 240, 0.75),
      0 0 64px rgba(137, 207, 240, 0.45);
  }
}

.mobile-nav a.nav-contact-bookmark:hover {
  background: #9fd8f4;
  color: #14151a;
  transform: translateY(-2px);
  animation-duration: 1.6s;
}

.mobile-nav a.nav-contact-bookmark:focus-visible {
  outline: 2px solid #14151a;
  outline-offset: 2px;
}

html.site-night .mobile-nav a.nav-contact-bookmark:focus-visible {
  outline-color: #fff;
}

@media (hover: none) {
  .mobile-nav a.nav-contact-bookmark:hover {
    transform: none;
    animation-duration: 2.4s;
  }

  .mobile-nav a.nav-contact-bookmark:active {
    background: #9fd8f4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav a.nav-contact-bookmark {
    animation: none;
  }
}

.nav-dropdown {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-dropdown-header {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.nav-dropdown-header .nav-home-link,
.nav-dropdown-header .nav-dropdown-label {
  flex: 1;
  min-width: 0;
}

.nav-dropdown-header .nav-dropdown-label {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  font-family: inherit;
  color: #14151a;
  background: transparent;
  border: none;
  text-align: left;
  cursor: default;
}

html.site-night .mobile-nav .nav-dropdown-header .nav-dropdown-label {
  color: #fff;
}

.nav-dropdown-toggle {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(20, 21, 26, 0.14);
  border-radius: 10px;
  background: rgba(20, 21, 26, 0.05);
  color: #14151a;
  cursor: pointer;
  font: inherit;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-dropdown-toggle:hover {
  background: rgba(20, 21, 26, 0.08);
}

html.site-night .mobile-nav .nav-dropdown-toggle {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html.site-night .mobile-nav .nav-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-dropdown-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-dropdown-toggle .chevron {
  position: relative;
  left: -2%;
  width: 8.55px;
  height: 8.55px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.3s var(--ease), left 0.3s var(--ease);
}

.nav-dropdown-toggle[aria-expanded="true"] .chevron {
  transform: rotate(225deg) translateY(-1px);
}

.nav-submenu {
  list-style: none;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
  padding-left: 0.5rem;
  margin: 0;
  gap: 0.2rem;
}

.nav-submenu.is-open {
  grid-template-rows: 1fr;
}

.nav-submenu-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-submenu a {
  font-size: 0.98rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  color: rgba(20, 21, 26, 0.62);
}

.nav-submenu a:hover {
  color: var(--accent);
}

.nav-submenu .nav-placeholder {
  display: block;
  font-size: 0.98rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  color: rgba(20, 21, 26, 0.62);
  cursor: default;
}

html.site-night .mobile-nav .nav-submenu a,
html.site-night .mobile-nav .nav-submenu .nav-placeholder {
  color: #fff;
}

@media (max-width: 900px) {
  .header-left {
    flex: 1 1 auto;
    flex-shrink: 1;
    min-width: 0;
    gap: 0.55rem;
  }

  .header-right {
    flex: 0 0 auto;
  }

  .logo {
    flex: 1 1 auto;
    min-width: 0;
  }

  .logo-text {
    font-size: clamp(0.88rem, 3.6vw + 0.35rem, 1.12rem);
    line-height: 1.15;
    height: auto;
    max-width: 100%;
  }

  .header-right .social-links {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 0 0.75rem;
    gap: 0.45rem;
  }

  .header-right {
    gap: 0.4rem;
  }

  .logo-text {
    font-size: clamp(0.82rem, 3.2vw + 0.3rem, 1rem);
    letter-spacing: -0.02em;
  }

  .store-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }

  .site-header .store-site-toggle {
    letter-spacing: 0.08em;
  }

  .site-header .store-site-toggle > * {
    padding: 0.45rem 0.55rem;
  }

  .site-header:has(.store-site-toggle) .logo-text {
    font-size: clamp(0.75rem, 8.7vw - 20px, 1rem);
  }
}

@media (max-width: 359px) {
  .site-header:has(.store-site-toggle) .logo-text {
    white-space: normal;
    text-overflow: clip;
  }

  .mobile-nav a.nav-contact-bookmark {
    width: 6.85rem;
    height: 2.75rem;
    font-size: 0.74rem;
    padding: 0.4rem 0.65rem;
  }
}

/* Footer social scroll fades (mobile + desktop) */
.site-footer .social-links {
  position: relative;
}

.site-footer .social-links.social-fade-right {
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 calc(100% - 36px),
    rgba(0, 0, 0, 0.55) calc(100% - 16px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 calc(100% - 36px),
    rgba(0, 0, 0, 0.55) calc(100% - 16px),
    transparent 100%
  );
}

.site-footer .social-links.social-fade-left {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 16px,
    #000 36px,
    #000 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 16px,
    #000 36px,
    #000 100%
  );
}

.site-footer .social-links.social-fade-left.social-fade-right {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 16px,
    #000 36px,
    #000 calc(100% - 36px),
    rgba(0, 0, 0, 0.55) calc(100% - 16px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 16px,
    #000 36px,
    #000 calc(100% - 36px),
    rgba(0, 0, 0, 0.55) calc(100% - 16px),
    transparent 100%
  );
}

/* Extra edge wash so the scroll cue reads on light + night footers */
.site-footer .social-links.social-fade-right::after,
.site-footer .social-links.social-fade-left::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.25rem;
  pointer-events: none;
  z-index: 2;
}

.site-footer .social-links.social-fade-right::after {
  right: 0;
  background: linear-gradient(to right, transparent, var(--surface, #f4f4f5));
}

.site-footer .social-links.social-fade-left::before {
  left: 0;
  background: linear-gradient(to left, transparent, var(--surface, #f4f4f5));
}

html.site-night .site-footer .social-links.social-fade-right::after {
  background: linear-gradient(to right, transparent, #14151a);
}

html.site-night .site-footer .social-links.social-fade-left::before {
  background: linear-gradient(to left, transparent, #14151a);
}

@keyframes footer-social-peek-wiggle {
  0%,
  70%,
  100% {
    transform: translateX(0);
  }

  78% {
    transform: translateX(-6px);
  }

  86% {
    transform: translateX(3px);
  }

  92% {
    transform: translateX(-2px);
  }
}

@media (min-width: 901px) {
  .site-footer .social-links.social-fade-right:not(.scroll-hint-dismissed) {
    animation: footer-social-peek-wiggle 2.8s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer .social-links.social-fade-right:not(.scroll-hint-dismissed) {
    animation: none;
  }
}

/* Footer social: desktop peek after Spotify */
@media (min-width: 901px) {
  .site-footer .footer-brand .social-links,
  .site-footer .footer-bottom .social-links {
    position: relative;
    box-sizing: border-box;
    /* YouTube → Spotify in view; Donate / later icons peek + scroll */
    width: 586px;
    max-width: min(100%, 586px);
    flex: 0 0 auto;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .site-footer .footer-brand .social-links::-webkit-scrollbar,
  .site-footer .footer-bottom .social-links::-webkit-scrollbar {
    display: none;
  }

  .site-footer .footer-brand .social-links a,
  .site-footer .footer-bottom .social-links a {
    flex: 0 0 auto;
  }
}

/* Footer social: mobile scroll + peeks */
@media (max-width: 900px) {
  .site-footer .footer-brand {
    min-width: 0;
    max-width: 100%;
  }

  .site-footer .social-links {
    position: relative;
    width: 100%;
    max-width: min(100%, 20.5rem);
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    transform: none;
  }

  .site-footer .footer-links {
    position: relative;
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.85rem 1.15rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .site-footer .footer-links::-webkit-scrollbar {
    display: none;
  }

  .site-footer .footer-links a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .site-footer .footer-links.social-fade-right {
    -webkit-mask-image: linear-gradient(
      to right,
      #000 0%,
      #000 calc(100% - 18px),
      rgba(0, 0, 0, 0.45) calc(100% - 8px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      #000 0%,
      #000 calc(100% - 18px),
      rgba(0, 0, 0, 0.45) calc(100% - 8px),
      transparent 100%
    );
  }

  .site-footer .footer-links.social-fade-left {
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.45) 8px,
      #000 18px,
      #000 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.45) 8px,
      #000 18px,
      #000 100%
    );
  }

  .site-footer .footer-links.social-fade-left.social-fade-right {
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.45) 8px,
      #000 18px,
      #000 calc(100% - 18px),
      rgba(0, 0, 0, 0.45) calc(100% - 8px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.45) 8px,
      #000 18px,
      #000 calc(100% - 18px),
      rgba(0, 0, 0, 0.45) calc(100% - 8px),
      transparent 100%
    );
  }
}

/* Footer day/night — night from 8pm–8am local time */
.site-footer {
  position: relative;
  overflow: hidden;
}

html.site-theme-ready .site-footer {
  transition: background 0.45s var(--ease, ease), color 0.45s var(--ease, ease), border-color 0.45s var(--ease, ease);
}

@media (prefers-reduced-motion: reduce) {
  html.site-theme-ready .site-footer {
    transition: none;
  }
}

html.site-night .site-footer {
  background: #14151a;
  color: #fff;
  border-top-color: rgba(255, 255, 255, 0.12);
}

html.site-night .site-footer a {
  color: #fff;
}

html.site-night .site-footer a:hover {
  color: #89cff0;
}

html.site-night .site-footer .social-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

html.site-night .site-footer .social-links img {
  filter: invert(1) brightness(1.05);
  animation: footer-social-soft-glow 2.6s ease-in-out infinite;
}

@keyframes footer-social-soft-glow {
  0%,
  100% {
    filter:
      invert(1)
      brightness(1.05)
      drop-shadow(0 0 3px rgba(255, 255, 255, 0.45))
      drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
  }
  50% {
    filter:
      invert(1)
      brightness(1.08)
      drop-shadow(0 0 5px rgba(255, 255, 255, 0.75))
      drop-shadow(0 0 14px rgba(255, 255, 255, 0.4));
  }
}

@media (prefers-reduced-motion: reduce) {
  html.site-night .site-footer .social-links img {
    animation: none;
    filter:
      invert(1)
      brightness(1.05)
      drop-shadow(0 0 4px rgba(255, 255, 255, 0.55))
      drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  }
}

/* Night moon swim — once per night shift, arcing up from the footer over the page bottom */
.site-footer.is-night-passing {
  overflow: visible;
}

.night-stage {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  height: clamp(10rem, 24vw, 16rem);
  overflow: hidden;
  pointer-events: none;
}

.night-moon {
  position: absolute;
  left: 0%;
  bottom: 0%;
  z-index: 6;
  width: clamp(2.4rem, 6vw, 3.75rem);
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  display: block;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
  transform: translate(-50%, 55%) scaleX(-1);
  transform-origin: center center;
  will-change: transform, opacity, left, bottom;
}

.night-moon.is-passing {
  animation: night-moon-swim 10s linear forwards;
}

/*
  True semicircle, left → right, constant angular speed (linear).
  left = 50% * (1 + cos θ), bottom = 82% * sin θ, θ: 180° → 0°
*/
@keyframes night-moon-swim {
  0% {
    left: 0%;
    bottom: 0%;
    opacity: 0;
    transform: translate(-50%, 55%) scaleX(-1);
  }
  3% {
    opacity: 1;
  }
  8.33% {
    left: 1.7%;
    bottom: 21.2%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  16.67% {
    left: 6.7%;
    bottom: 41%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  25% {
    left: 14.6%;
    bottom: 58%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  33.33% {
    left: 25%;
    bottom: 71%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  41.67% {
    left: 37.1%;
    bottom: 79.2%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  50% {
    left: 50%;
    bottom: 82%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  58.33% {
    left: 62.9%;
    bottom: 79.2%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  66.67% {
    left: 75%;
    bottom: 71%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  75% {
    left: 85.4%;
    bottom: 58%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  83.33% {
    left: 93.3%;
    bottom: 41%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  91.67% {
    left: 102%;
    bottom: 28%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  96% {
    opacity: 1;
    left: 108%;
    bottom: 22%;
    transform: translate(-50%, 0) scaleX(-1);
  }
  100% {
    left: 118%;
    bottom: 18%;
    opacity: 0;
    transform: translate(-50%, 0) scaleX(-1);
  }
}

/* Soft white CSS clouds — fade as the moon passes (same night pass) */
.night-sky {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.night-cloud {
  position: absolute;
  width: clamp(3.2rem, 8vw, 5rem);
  height: clamp(1.1rem, 2.4vw, 1.55rem);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.28));
  transform: translate(-50%, 0);
}

.night-cloud::before,
.night-cloud::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
}

.night-cloud::before {
  width: 58%;
  height: 150%;
  top: -70%;
  left: 12%;
}

.night-cloud::after {
  width: 72%;
  height: 175%;
  top: -95%;
  right: 8%;
}

.night-cloud--1 {
  left: 28%;
  bottom: 52%;
}

.night-cloud--2 {
  left: 50%;
  bottom: 68%;
  width: clamp(3.8rem, 9.5vw, 5.8rem);
}

.night-cloud--3 {
  left: 72%;
  bottom: 48%;
}

.night-sky.is-passing .night-cloud--1 {
  animation: night-cloud-pass-1 10s linear forwards;
}

.night-sky.is-passing .night-cloud--2 {
  animation: night-cloud-pass-2 10s linear forwards;
}

.night-sky.is-passing .night-cloud--3 {
  animation: night-cloud-pass-3 10s linear forwards;
}

@keyframes night-cloud-pass-1 {
  0%,
  18% {
    opacity: 0;
  }
  28% {
    opacity: 0.9;
  }
  40% {
    opacity: 0.85;
  }
  52% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes night-cloud-pass-2 {
  0%,
  36% {
    opacity: 0;
  }
  46% {
    opacity: 0.95;
  }
  56% {
    opacity: 0.9;
  }
  68% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes night-cloud-pass-3 {
  0%,
  54% {
    opacity: 0;
  }
  64% {
    opacity: 0.9;
  }
  76% {
    opacity: 0.85;
  }
  88% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .night-stage,
  .night-moon,
  .night-moon.is-passing,
  .night-sky,
  .night-sky.is-passing .night-cloud {
    display: none !important;
    animation: none !important;
  }
}

/* Bottom-right project announcement toast */
.announce-toast {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1100;
  width: min(22.5rem, calc(100vw - 2rem));
  background: #ffffff;
  color: #14151a;
  border: 1px solid rgba(20, 21, 26, 0.1);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(20, 21, 26, 0.14);
  overflow: visible;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.45s var(--ease, ease),
    transform 0.45s var(--ease, ease),
    visibility 0s linear 0.45s,
    background 0.45s var(--ease, ease),
    color 0.45s var(--ease, ease),
    border-color 0.45s var(--ease, ease);
}

.announce-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  animation: announce-glow 0.95s ease-out;
  transition:
    opacity 0.45s var(--ease, ease),
    transform 0.45s var(--ease, ease),
    visibility 0s,
    background 0.45s var(--ease, ease),
    color 0.45s var(--ease, ease),
    border-color 0.45s var(--ease, ease);
}

.announce-toast-rays,
.announce-toast-flash {
  pointer-events: none;
}

.announce-toast-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 230%;
  height: 230%;
  transform: translate(-50%, -50%) rotate(-8deg) scale(0.55);
  opacity: 0;
  background: repeating-conic-gradient(
    from -6deg,
    transparent 0deg 14deg,
    rgba(255, 236, 120, 0) 14deg 16deg,
    rgba(255, 226, 70, 0.95) 17deg 21deg,
    rgba(255, 248, 190, 0.85) 21deg 22deg,
    rgba(255, 226, 70, 0) 23deg 25deg,
    transparent 25deg 40deg
  );
  -webkit-mask-image: radial-gradient(circle, #000 6%, transparent 58%);
  mask-image: radial-gradient(circle, #000 6%, transparent 58%);
}

.announce-toast-flash {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 252, 220, 0.95) 0%, rgba(255, 224, 80, 0.45) 38%, transparent 72%);
}

.announce-toast.is-visible .announce-toast-rays {
  animation: announce-rays 0.9s ease-out both;
}

.announce-toast.is-visible .announce-toast-flash {
  animation: announce-flash 0.7s ease-out both;
}

@keyframes announce-rays {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-16deg) scale(0.4);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(2deg) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(18deg) scale(1.28);
  }
}

@keyframes announce-flash {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes announce-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 220, 60, 0), 0 16px 40px rgba(20, 21, 26, 0.14);
  }
  22% {
    box-shadow: 0 0 46px 14px rgba(255, 220, 50, 0.62), 0 16px 40px rgba(20, 21, 26, 0.14);
  }
  100% {
    box-shadow: 0 16px 40px rgba(20, 21, 26, 0.14);
  }
}

.announce-toast-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 4;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 21, 26, 0.08);
  color: #14151a;
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s var(--ease, ease);
}

.announce-toast-close:hover {
  background: rgba(20, 21, 26, 0.14);
}

.announce-toast-close:focus-visible {
  outline: 2px solid var(--accent, #89cff0);
  outline-offset: 2px;
}

.announce-toast-link {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 5.75rem 1fr;
  gap: 0.85rem;
  padding: 0.85rem 2.5rem 0.85rem 0.85rem;
  color: inherit;
  text-decoration: none;
}

.announce-toast-media {
  width: 5.75rem;
  height: 5.75rem;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}

.announce-toast-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.announce-toast-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding-top: 0.15rem;
}

.announce-toast-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5c616b;
}

.announce-toast-title {
  font-family: var(--font-display, "Gloria Hallelujah", cursive);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.2;
  color: #14151a;
}

.announce-toast-desc {
  font-size: 0.86rem;
  line-height: 1.4;
  color: #5c616b;
}

.announce-toast-cta {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #14151a;
}

html.site-night .announce-toast {
  background: #1a1b21;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

html.site-night .announce-toast.is-visible {
  animation-name: announce-glow-night;
}

@keyframes announce-glow-night {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 220, 60, 0), 0 16px 40px rgba(0, 0, 0, 0.45);
  }
  22% {
    box-shadow: 0 0 52px 16px rgba(255, 226, 70, 0.5), 0 16px 40px rgba(0, 0, 0, 0.45);
  }
  100% {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

html.site-night .announce-toast-close {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

html.site-night .announce-toast-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

html.site-night .announce-toast-media {
  background: rgba(255, 255, 255, 0.06);
}

html.site-night .announce-toast-eyebrow,
html.site-night .announce-toast-desc {
  color: #fff;
}

html.site-night .announce-toast-title,
html.site-night .announce-toast-cta {
  color: #fff;
}

@media (max-width: 520px) {
  .announce-toast {
    width: min(100vw - 1.5rem, 22rem);
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .announce-toast-link {
    grid-template-columns: 4.75rem 1fr;
    gap: 0.7rem;
    padding: 0.75rem 2.35rem 0.75rem 0.75rem;
  }

  .announce-toast-media {
    width: 4.75rem;
    height: 4.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .announce-toast,
  .announce-toast.is-visible {
    transition: none;
    transform: none;
    animation: none;
  }

  .announce-toast.is-visible .announce-toast-rays,
  .announce-toast.is-visible .announce-toast-flash {
    animation: none;
    opacity: 0;
  }
}

/* Old mobile nav markup stays in the pages but never shows; ☰ opens shop/store-menu.js on every page */
.nav-backdrop,
.mobile-nav {
  display: none !important;
  pointer-events: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
