/* SmōlBoi Athletics — shared visual layer (animations, image treatments, widgets) */

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ---------- Hero photography ---------- */
.hero-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .45; transform: scale(1.06); animation: heroDrift 22s ease-in-out infinite alternate; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,7,18,.55) 0%, rgba(3,7,18,.75) 60%, #030712 100%); }
@keyframes heroDrift { from { transform: scale(1.06) translate3d(0,0,0); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }

.photo-card { position: relative; overflow: hidden; border-radius: 1.5rem; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s; }
.photo-card:hover img { transform: scale(1.06); }
.photo-card .photo-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(3,7,18,.92) 100%); pointer-events: none; }

/* ---------- Star field ---------- */
.starfield { position: absolute; inset: 0; pointer-events: none; background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 72% 12%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 62%, rgba(196,181,253,.8), transparent 60%),
    radial-gradient(1px 1px at 88% 48%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 22% 82%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 28%, rgba(167,139,250,.9), transparent 60%),
    radial-gradient(1px 1px at 92% 86%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,.6), transparent 60%);
    animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .5; } to { opacity: 1; } }

/* ---------- Ticker ---------- */
.ticker { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker:hover { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Floating chips ---------- */
.float-y { animation: floatY 5s ease-in-out infinite; }
.float-y-slow { animation: floatY 7s ease-in-out infinite reverse; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Gradient border glow ---------- */
.glow-border { position: relative; }
.glow-border::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(139,92,246,.8), rgba(99,102,241,.15), rgba(139,92,246,.6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

/* ---------- Range sliders ---------- */
input[type="range"].lab-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #7C3AED var(--fill, 50%), #374151 var(--fill, 50%)); outline: none; cursor: pointer; }
input[type="range"].lab-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid #7C3AED; box-shadow: 0 0 0 4px rgba(124,58,237,.25); transition: transform .15s; }
input[type="range"].lab-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"].lab-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid #7C3AED; }
input[type="range"].lab-range:focus-visible { box-shadow: 0 0 0 3px rgba(167,139,250,.6); }

/* ---------- Flip cards ---------- */
.flip { perspective: 1200px; cursor: pointer; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .7s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 1.25rem; }
.flip-back { transform: rotateY(180deg); }

/* ---------- Gauge ring ---------- */
.gauge-track { stroke: #1f2937; }
.gauge-fill { transition: stroke-dashoffset 1s cubic-bezier(.2,.7,.2,1), stroke .4s; }

/* ---------- Meter bar ---------- */
.meter { height: 10px; border-radius: 999px; background: #1f2937; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6D28D9, #A78BFA); transition: width .9s cubic-bezier(.2,.7,.2,1); }

/* ---------- Chips / tabs ---------- */
.chip { transition: all .2s; }
.chip[aria-pressed="true"], .chip.is-active { background: #6D28D9; color: #fff; border-color: #8B5CF6; box-shadow: 0 0 18px rgba(109,40,217,.45); }

/* ---------- Quiz ---------- */
.quiz-opt.correct { border-color: #34D399 !important; background: rgba(6,78,59,.45) !important; color: #fff; }
.quiz-opt.wrong { border-color: #FB7185 !important; background: rgba(76,5,25,.45) !important; }

/* ---------- Chart frame ---------- */
.chart-box { position: relative; width: 100%; }
.chart-note { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #6B7280; }

/* ---------- Lever SVG ---------- */
.lever-beam { transition: all .35s cubic-bezier(.2,.7,.2,1); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-photo, .ticker, .float-y, .float-y-slow, .starfield { animation: none; }
  .flip-inner { transition: none; }
}
