/* ==========================================================
   Social links section (#social-links)
   APPEND THIS BLOCK TO: assets/css/site.css
   Uses the same dark / cyan theme already defined in the site.
   ========================================================== */

@property --tz-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.tz-social-section {
  isolation: isolate;
}

/* floating background glows */
.tz-social-orb {
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  pointer-events: none;
  animation: tz-social-drift 14s ease-in-out infinite alternate;
}
.tz-social-orb-a {
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
}
.tz-social-orb-b {
  bottom: -160px;
  right: -100px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  animation-delay: -7s;
}

/* grid */
.tz-social-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (min-width: 768px) {
  .tz-social-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .tz-social-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .tz-social-grid { grid-template-columns: minmax(0, 1fr); }
}

.tz-social-item {
  opacity: 0;
  animation: tz-social-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.tz-social-item:nth-child(1) { animation-delay: 0.05s; }
.tz-social-item:nth-child(2) { animation-delay: 0.15s; }
.tz-social-item:nth-child(3) { animation-delay: 0.25s; }
.tz-social-item:nth-child(4) { animation-delay: 0.35s; }
.tz-social-item:nth-child(5) { animation-delay: 0.45s; }

/* brand colours */
.tz-social-facebook  { --tz-c: #4c8dff; --tz-c-rgb: 76, 141, 255; }
.tz-social-youtube   { --tz-c: #ff4757; --tz-c-rgb: 255, 71, 87; }
.tz-social-linkedin  { --tz-c: #2bb3ff; --tz-c-rgb: 43, 179, 255; }
.tz-social-instagram { --tz-c: #ff4fa3; --tz-c-rgb: 255, 79, 163; }
.tz-social-google    { --tz-c: #fbbf24; --tz-c-rgb: 251, 191, 36; }

/* card */
.tz-social-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  height: 100%;
  padding: 1.5rem 1.25rem 1.4rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(100, 116, 139, 0.28);
  background:
    linear-gradient(160deg, rgba(var(--tz-c-rgb), 0.1) 0%, rgba(8, 12, 22, 0.55) 55%),
    rgba(8, 12, 22, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.tz-social-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.tz-social-card:hover,
.tz-social-card:focus-visible {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(var(--tz-c-rgb), 0.7);
  box-shadow: 0 18px 40px -12px rgba(var(--tz-c-rgb), 0.55), 0 0 0 1px rgba(var(--tz-c-rgb), 0.25);
}
.tz-social-card:hover::after,
.tz-social-card:focus-visible::after {
  animation: tz-social-shine 0.9s ease;
}
.tz-social-card:focus-visible {
  outline: 2px solid var(--tz-c);
  outline-offset: 3px;
}

/* rotating gradient border */
.tz-social-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--tz-angle), transparent 0deg, var(--tz-c) 70deg, transparent 140deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0.55;
  animation: tz-social-spin 5s linear infinite;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.tz-social-card:hover .tz-social-ring,
.tz-social-card:focus-visible .tz-social-ring {
  opacity: 1;
  animation-duration: 2s;
}

/* icon bubble */
.tz-social-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.75rem;
  border-radius: 1rem;
  color: var(--tz-c);
  background: rgba(var(--tz-c-rgb), 0.14);
  border: 1px solid rgba(var(--tz-c-rgb), 0.4);
  box-shadow: inset 0 0 18px rgba(var(--tz-c-rgb), 0.18);
  animation: tz-social-float 4s ease-in-out infinite;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.tz-social-item:nth-child(2) .tz-social-icon { animation-delay: -0.8s; }
.tz-social-item:nth-child(3) .tz-social-icon { animation-delay: -1.6s; }
.tz-social-item:nth-child(4) .tz-social-icon { animation-delay: -2.4s; }
.tz-social-item:nth-child(5) .tz-social-icon { animation-delay: -3.2s; }

.tz-social-card:hover .tz-social-icon,
.tz-social-card:focus-visible .tz-social-icon {
  color: #070b14;
  background: var(--tz-c);
  box-shadow: 0 0 28px rgba(var(--tz-c-rgb), 0.8);
}

/* radar pulse behind the icon */
.tz-social-pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--tz-c);
  opacity: 0;
  animation: tz-social-ping 2.6s ease-out infinite;
  pointer-events: none;
}
.tz-social-item:nth-child(2) .tz-social-pulse { animation-delay: 0.5s; }
.tz-social-item:nth-child(3) .tz-social-pulse { animation-delay: 1s; }
.tz-social-item:nth-child(4) .tz-social-pulse { animation-delay: 1.5s; }
.tz-social-item:nth-child(5) .tz-social-pulse { animation-delay: 2s; }

.tz-social-svg {
  position: relative;
  width: 1.7rem;
  height: 1.7rem;
  transform-origin: center;
}

/* per-icon hover personalities */
.tz-social-card:hover .tz-anim-facebook,
.tz-social-card:focus-visible .tz-anim-facebook {
  animation: tz-social-wiggle 0.7s ease-in-out infinite;
}
.tz-social-play {
  transform-box: fill-box;
  transform-origin: center;
}
.tz-social-card:hover .tz-social-play,
.tz-social-card:focus-visible .tz-social-play {
  fill: currentColor;
  animation: tz-social-beat 0.8s ease-in-out infinite;
}
.tz-social-dot {
  transform-box: fill-box;
  transform-origin: center;
}
.tz-social-card:hover .tz-social-dot,
.tz-social-card:focus-visible .tz-social-dot {
  fill: currentColor;
  animation: tz-social-hop 0.8s ease-in-out infinite;
}
.tz-social-lens {
  transform-box: fill-box;
  transform-origin: center;
}
.tz-social-card:hover .tz-social-lens,
.tz-social-card:focus-visible .tz-social-lens {
  animation: tz-social-spin-icon 2.2s linear infinite;
}
.tz-social-card:hover .tz-social-flash,
.tz-social-card:focus-visible .tz-social-flash {
  animation: tz-social-blink 0.9s steps(2, jump-none) infinite;
}
.tz-social-card:hover .tz-anim-google,
.tz-social-card:focus-visible .tz-anim-google {
  fill: currentColor;
  animation: tz-social-twinkle 1.2s ease-in-out infinite;
}

/* text */
.tz-social-label {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.tz-social-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #94a3b8;
}

/* corner arrow */
.tz-social-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  transition: transform 0.35s ease, background 0.3s ease, color 0.3s ease;
}
.tz-social-arrow svg {
  width: 1rem;
  height: 1rem;
}
.tz-social-card:hover .tz-social-arrow,
.tz-social-card:focus-visible .tz-social-arrow {
  transform: translate(3px, -3px) rotate(8deg);
  color: #070b14;
  background: var(--tz-c);
}

/* keyframes */
@keyframes tz-social-rise {
  from { opacity: 0; transform: translateY(26px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tz-social-spin {
  to { --tz-angle: 360deg; }
}
@keyframes tz-social-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes tz-social-ping {
  0%   { opacity: 0.7; transform: scale(1); }
  70%  { opacity: 0; transform: scale(1.65); }
  100% { opacity: 0; transform: scale(1.65); }
}
@keyframes tz-social-shine {
  from { left: -75%; }
  to   { left: 130%; }
}
@keyframes tz-social-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes tz-social-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-14deg); }
  75%      { transform: rotate(14deg); }
}
@keyframes tz-social-beat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.35); }
}
@keyframes tz-social-hop {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px) scale(1.3); }
}
@keyframes tz-social-spin-icon {
  to { transform: rotate(360deg); }
}
@keyframes tz-social-blink {
  from { opacity: 1; }
  to   { opacity: 0.15; }
}
@keyframes tz-social-twinkle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50%      { transform: rotate(72deg) scale(1.22); }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tz-social-orb,
  .tz-social-ring,
  .tz-social-icon,
  .tz-social-pulse,
  .tz-social-card:hover .tz-social-svg,
  .tz-social-card:hover .tz-social-play,
  .tz-social-card:hover .tz-social-dot,
  .tz-social-card:hover .tz-social-lens,
  .tz-social-card:hover .tz-social-flash {
    animation: none;
  }
  .tz-social-item {
    animation: none;
    opacity: 1;
  }
  .tz-social-card,
  .tz-social-card:hover,
  .tz-social-card:focus-visible {
    transform: none;
  }
}
