/* ============================================================
   PREMIUM SOCIAL COMPONENTS  (shared across every page)
   - .social-tray   : fixed desktop/laptop side-rail (>= 1024px)
   - .footer-social : centered icon row inside the footer (all devices)
   Design tokens (--gold, --off, --muted*, --border*, --surface) come
   from each page's own stylesheet :root, so this file stays portable.
============================================================ */

/* ---------------- Floating side tray (desktop) ---------------- */
.social-tray {
  position: fixed;
  /* Sit in the right gutter of the 1200px content column holding a ~30px gap
     from it (never crowds content). clamp() floors it at 8px so it can't clip
     off-screen at the narrow end, and caps it at 64px on wide screens so it
     hugs the edge instead of drifting toward center. */
  right: clamp(16px, calc((100vw - 1200px) / 2 - 72px), 64px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: socialTrayIn 0.9s cubic-bezier(0.19, 1, 0.22, 1) 0.6s forwards;
}
@keyframes socialTrayIn {
  from { opacity: 0; transform: translateY(-50%) translateX(18px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.social-tray-top {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  margin-bottom: 2px;
}
.social-tray-follow {
  writing-mode: vertical-rl;
  margin-top: 6px;
  font-family: 'Syne', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

.social-tray-link {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border2);
  color: var(--muted2);
  text-decoration: none;
  transition: transform 0.45s cubic-bezier(0.19, 1, 0.22, 1),
              background 0.45s ease, border-color 0.45s ease,
              color 0.45s ease, box-shadow 0.45s ease;
}
.social-tray-link svg { width: 17px; height: 17px; display: block; }

.social-tray-link:hover,
.social-tray-link:focus-visible {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  border-color: var(--gold);
  color: #0b0b0b;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(201, 168, 76, 0.32);
}
.social-tray-link:focus-visible {
  outline: 2px solid var(--gold2);
  outline-offset: 3px;
}

/* Slide-out handle tooltip */
.st-tip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  padding: 7px 13px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--gold-border);
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--off);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: opacity 0.35s cubic-bezier(0.19, 1, 0.22, 1),
              transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}
.st-tip::before {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--gold-border);
}
.social-tray-link:hover .st-tip,
.social-tray-link:focus-visible .st-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Below ~1360px the gutter beside the 1200px column is too narrow for the
   rail, so hide it; the footer icons cover tablet and phone. */
@media (max-width: 1359px) {
  .social-tray { display: none; }
}

/* ---------------- Footer social row (every device) ---------------- */
.footer-social {
  max-width: 1200px;
  margin: 0 auto 34px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}
.footer-social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-social-icons a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border2);
  color: var(--muted2);
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
              background 0.4s ease, border-color 0.4s ease,
              color 0.4s ease, box-shadow 0.4s ease;
}
.footer-social-icons a svg { width: 17px; height: 17px; display: block; }
.footer-social-icons a:hover,
.footer-social-icons a:focus-visible {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  border-color: var(--gold);
  color: #0b0b0b;
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(201, 168, 76, 0.3);
}
.footer-social-icons a:focus-visible {
  outline: 2px solid var(--gold2);
  outline-offset: 3px;
}
.footer-social-handle {
  font-family: 'Syne', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-social-handle b { color: var(--gold2); font-weight: 700; }

@media (max-width: 600px) {
  .footer-social { margin-bottom: 28px; padding-bottom: 26px; gap: 14px; }
  .footer-social-icons { gap: 12px; }
  .footer-social-icons a { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .social-tray { animation: none; opacity: 1; }
  .social-tray-link,
  .footer-social-icons a,
  .st-tip { transition: none; }
}


/* ---------------- Developer credit watermark (all pages) ---------------- */
/* Plain centered inline text (NOT flex): the badge flows as inline content, so
   on any width it simply wraps to the next line and stays centered - it can
   never overflow or clip, regardless of the loaded font's width. */
.footer-credit {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 20px 16px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  line-height: 2;
  font-family: 'Syne', sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-credit-link {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 8px;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.footer-credit-link:hover { transform: translateY(-1px); }
.footer-credit-link:focus-visible {
  outline: 2px solid var(--gold2);
  outline-offset: 3px;
  border-radius: 8px;
}
/* Premium gold "CHA" text, no badge tile: it's plain inline text, so it flows
   with the sentence and wraps if needed - it can never clip. */
.footer-credit-badge {
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold2);
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold2) 45%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 0.3s ease;
}
.footer-credit-link:hover .footer-credit-badge { opacity: 0.82; }

@media (prefers-reduced-motion: reduce) {
  .footer-credit-link { transition: none; }
}
