/* =====================================================================
   FOUNDER HOLOGRAM ("A Legacy of Excellence") — see js/shrine.js.
   Full-screen overlay on the home page, inline (data-inline) on About.
   ===================================================================== */

.shrine {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.35s;
  overflow: hidden;
  touch-action: none;
}
.shrine[hidden] {
  display: none;
}
.shrine.on {
  opacity: 1;
}
.sh-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 70% at 50% 40%, #0d1b3a 0, #050816 70%), #050816;
}
.sh-bg:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 38%;
  width: 230vmax;
  height: 230vmax;
  margin: -115vmax 0 0 -115vmax;
  background: repeating-conic-gradient(from 0deg, rgba(243, 201, 105, 0.09) 0 2deg, transparent 2deg 12deg);
  -webkit-mask: radial-gradient(circle, #000 0, transparent 38%);
  mask: radial-gradient(circle, #000 0, transparent 38%);
  animation: sh-spin 90s linear infinite;
}
.sh-logo {
  position: absolute;
  left: 50%;
  top: 36%;
  aspect-ratio: 1;
  object-fit: contain;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  filter: drop-shadow(0 0 28px rgba(109, 240, 255, 0.55)) drop-shadow(0 0 80px rgba(109, 240, 255, 0.3));
  transition:
    opacity 1.1s 0.15s,
    transform 1.4s 0.15s cubic-bezier(0.16, 0.9, 0.2, 1);
}
.shrine.ready .sh-logo {
  transform: translate(-50%, -50%) scale(1);
  animation: sh-pulse 6s ease-in-out 1.6s infinite;
}
.sh-x {
  position: absolute;
  right: clamp(14px, 2.4vw, 30px);
  top: clamp(14px, 2.4vw, 30px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(243, 201, 105, 0.6);
  background: rgba(5, 8, 22, 0.6);
  color: #f3c969;
  font: 300 30px/1 var(--hd, sans-serif);
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(6px);
}
.sh-x:hover,
.sh-x:focus-visible {
  background: #f3c969;
  color: #050816;
  outline: none;
}
.sh-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(18px, 4vh, 40px);
  text-align: center;
  pointer-events: none;
  display: grid;
  gap: 6px;
  padding: 0 16px;
  z-index: 2;
  text-shadow: 0 0 18px #000;
}
.sh-cap span {
  color: #f3c969;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.sh-cap b {
  font: 900 clamp(30px, 5vw, 58px)/1 var(--hd, sans-serif);
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.04em;
}
.sh-cap i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}
.sh-open body {
  overflow: hidden;
}
@keyframes sh-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes sh-pulse {
  50% {
    opacity: 0.4;
  }
}
html[data-theme="light"] .sh-bg {
  background: radial-gradient(70% 70% at 50% 40%, #2a3f78 0, #0b1030 75%);
}
@media (prefers-reduced-motion: reduce) {
  .sh-bg:after,
  .shrine.ready .sh-logo {
    animation: none;
  }
}
.shrine .sh-cap span {
  color: #f3c969 !important;
}
.shrine .sh-cap i {
  color: rgba(255, 255, 255, 0.6) !important;
}

.shrine[data-inline] {
  position: relative;
  inset: auto;
  z-index: 0;
  width: 100%;
  opacity: 1;
  touch-action: pan-y;
}
.shrine[data-inline] .sh-bg:after {
  opacity: 0.5;
}
.shrine[data-inline] .sh-cap {
  bottom: 14px;
}
.shrine[data-inline] .sh-cap b {
  font-size: clamp(20px, 2.6vw, 30px);
}
.shrine[data-inline] .sh-cap span {
  font-size: 10px;
}

.sh-fig {
  position: relative;
  z-index: 1;
  height: min(78vh, 92%);
  aspect-ratio: 547/621;
  max-width: 92%;
  margin-top: -9vh;
  perspective: 900px;
  transform-style: preserve-3d;
  opacity: 0;
  transition: opacity 1s 0.25s;
}
.shrine.ready .sh-fig {
  opacity: 1;
}
.sh-holo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s ease-out;
  filter: drop-shadow(0 0 18px rgba(80, 215, 255, 0.55)) drop-shadow(0 0 60px rgba(40, 140, 255, 0.35));
  animation:
    sh-flick 5.5s steps(1) infinite,
    sh-bob 7s ease-in-out infinite;
}
.sh-scan {
  position: absolute;
  left: 4%;
  right: 4%;
  height: 14%;
  top: 0;
  background: linear-gradient(180deg, transparent, rgba(120, 235, 255, 0.28), transparent);
  mix-blend-mode: screen;
  animation: sh-sweep 4.2s linear infinite;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.sh-beam {
  position: absolute;
  left: 50%;
  bottom: -2%;
  width: 86%;
  height: 62%;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(90, 220, 255, 0),
    rgba(90, 220, 255, 0.14) 60%,
    rgba(90, 220, 255, 0.28)
  );
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
  filter: blur(2px);
  animation: sh-pulse 5s ease-in-out infinite;
}
.sh-disc {
  position: absolute;
  left: 50%;
  bottom: -5%;
  width: 92%;
  height: 12%;
  transform: translateX(-50%);
}
.sh-disc i {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  border-radius: 50%;
  border: 2px solid rgba(110, 230, 255, 0.8);
  box-shadow:
    0 0 22px rgba(80, 210, 255, 0.7),
    inset 0 0 22px rgba(80, 210, 255, 0.45);
  transform: scale(1);
}
.sh-disc i + i {
  inset: 22% 14%;
  border-width: 1px;
  opacity: 0.7;
  animation: sh-ring 3.4s ease-out infinite;
}
@keyframes sh-sweep {
  0% {
    top: -10%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    top: 96%;
    opacity: 0;
  }
}
@keyframes sh-flick {
  0%,
  91%,
  94%,
  100% {
    opacity: 1;
  }
  92% {
    opacity: 0.82;
  }
  93% {
    opacity: 0.94;
  }
}
@keyframes sh-bob {
  50% {
    translate: 0 -6px;
  }
}
@keyframes sh-ring {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}
.shrine[data-inline] .sh-fig {
  margin-top: -18px;
}
@media (prefers-reduced-motion: reduce) {
  .sh-holo,
  .sh-scan,
  .sh-beam,
  .sh-disc i {
    animation: none !important;
  }
}

.shrine[data-inline] {
  border: 0;
  border-radius: 0;
  height: clamp(420px, 62vh, 620px);
  background: none;
  overflow: visible;
}
.shrine[data-inline] .sh-bg {
  background: none;
}
.shrine[data-inline] .sh-bg:after {
  display: none;
}
.shrine[data-inline] .sh-logo {
  top: 46%;
  width: min(100%, 92vh);
  max-height: 100%;
  opacity: 0.5;
  transform: translate(-50%, -50%) scale(1);
}
.shrine[data-inline] .sh-fig {
  height: 80%;
}
.sh-logo {
  width: min(70vh, 82vw);
}
.shrine.ready .sh-logo {
  opacity: 0.5;
}
