/* ============================================================
   LONGEVITY ATHLETICS — EFFECTS.CSS
   21st.dev-inspired animations, card effects, photo styles
   ============================================================ */

/* ── Scroll Reveal ──────────────────────────────────────── */
.reveal,
.reveal-left,
.reveal-right,
.reveal-up {
  opacity: 0;
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal       { transform: translateY(28px); }
.reveal-left  { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }
.reveal-up    { transform: translateY(20px); }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-up.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* ── Gradient Text ──────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent) 55%, #7dd4f8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: grad-shift 5s ease-in-out infinite alternate;
}
@keyframes grad-shift {
  from { background-position: 0% center; }
  to   { background-position: 100% center; }
}

/* ── Shimmer Button (21st.dev sweep) ────────────────────── */
.btn--primary {
  position: relative;
  overflow: hidden;
}
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 100%
  );
  transform: skewX(-18deg);
  transition: left 0.65s ease;
  pointer-events: none;
}
.btn--primary:hover::after { left: 160%; }

/* ── Dark Card Hover (21st.dev Dark Grid style) ─────────── */
.card-hover-dark {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-card);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
}
.card-hover-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at top left,
    rgba(0, 175, 239, 0.08) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card-hover-dark:hover {
  border-color: rgba(0, 175, 239, 0.35);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0, 175, 239, 0.14);
}
.card-hover-dark:hover::before { opacity: 1; }

/* Corner squares on hover (Dark Grid signature) */
.card-hover-dark::after {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 10px; height: 10px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.card-hover-dark:hover::after { opacity: 1; }

/* ── Light Card Hover ───────────────────────────────────── */
.card-hover-light {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  background: var(--white);
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.card-hover-light:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 175, 239, 0.12);
}

/* ── SVG Icon Wrap ──────────────────────────────────────── */
.icon-wrap {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(0, 175, 239, 0.12);
  border: 1px solid rgba(0, 175, 239, 0.22);
  flex-shrink: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.icon-wrap svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Icon on light cards: no border at rest, shows on hover */
.card-hover-light .icon-wrap {
  border-color: transparent;
  background: rgba(0, 175, 239, 0.08);
}
.card-hover-dark:hover .icon-wrap,
.card-hover-light:hover .icon-wrap {
  background: rgba(0, 175, 239, 0.2);
  border-color: rgba(0, 175, 239, 0.4);
}

/* Dark icon variant (for dark backgrounds) */
.icon-wrap--dark {
  background: rgba(0, 175, 239, 0.15);
  border-color: rgba(0, 175, 239, 0.25);
}

/* ── Community Photo Grid ───────────────────────────────── */
.cv-block {
  position: relative;
  overflow: hidden;
  cursor: default;
  background: var(--dark-3);
}
.cv-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}
.cv-block:hover img {
  transform: scale(1.07);
}
.cv-block-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.1) 55%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  pointer-events: none;
}
.cv-block-label {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ── Founder Photo ──────────────────────────────────────── */
.founder-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-lg);
  display: block;
}

/* ── Ambient Orbs (hero / CTA) ──────────────────────────── */
.orb-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.orb-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(0, 175, 239, 0.22) 0%, transparent 70%);
  top: -120px; right: -80px;
  animation: orb-drift 10s ease-in-out infinite;
}
.orb-2 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(79, 195, 247, 0.14) 0%, transparent 70%);
  bottom: -60px; left: -60px;
  animation: orb-drift 13s ease-in-out infinite reverse;
}
@keyframes orb-drift {
  0%, 100% { transform: translate(0px, 0px); }
  33%       { transform: translate(18px, -22px); }
  66%       { transform: translate(-12px, 14px); }
}

/* ── Stats Counter ──────────────────────────────────────── */
.stat-counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ── Image Hover Zoom ───────────────────────────────────── */
.img-zoom-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.img-zoom-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}
.img-zoom-wrap:hover img { transform: scale(1.05); }

/* ── Glowing Accent Border ──────────────────────────────── */
.glow-border {
  position: relative;
}
.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(0, 175, 239, 0.4) 0%,
    rgba(0, 175, 239, 0) 50%,
    rgba(0, 175, 239, 0.3) 100%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.glow-border:hover::before { opacity: 1; }

/* ── Pulse Badge ────────────────────────────────────────── */
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 175, 239, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(0, 175, 239, 0); }
}
.badge-pulse {
  animation: badge-pulse 2.5s ease-in-out infinite;
}

/* ── Section Fade-in on scroll (via JS) ─────────────────── */
/* Applied automatically to all .reveal* elements */

/* ── Background Shaders (21st.dev style) ────────────────── */

/* Shared base — all shader variants use isolation */
.shader-dot-dark,
.shader-glow-dark,
.shader-dot-light,
.shader-fade-light { position: relative; isolation: isolate; }

/* ── Dark grid — accent-tinted line grid, center-masked ── */
.shader-dot-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,175,239,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,175,239,0.09) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 85% 85% at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at center, black 30%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}

/* ── Glow dark — grid + strong cyan aurora from top ─────── */
.shader-glow-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,175,239,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,175,239,0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 90% at center, black 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at center, black 35%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}
.shader-glow-dark::after {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(0, 175, 239, 0.22) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}

/* ── Light grid — subtle dark grid, center-masked ────────── */
.shader-dot-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 90% 90% at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at center, black 30%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}

/* ── Fade light — grid + diagonal accent sweep ───────────── */
.shader-fade-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 90% 90% at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at center, black 30%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}
.shader-fade-light::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,175,239,0.07) 0%, transparent 45%, rgba(0,175,239,0.05) 100%);
  pointer-events: none;
  z-index: -1;
}

/* ── Step Sequence Animation ─────────────────────────────── */
/* Apply .step-sequence to the steps container.              */
/* JS adds .in-view when scrolled into viewport.             */

.step-sequence .step-card,
.step-sequence .step-arrow {
  opacity: 0;
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.step-sequence .step-card  { transform: translateY(28px); }
.step-sequence .step-arrow { transform: scaleX(0); transform-origin: left center; }

/* Sequential reveal */
.step-sequence.in-view .step-card:nth-child(1)  { opacity: 1; transform: none; transition-delay: 0s; }
.step-sequence.in-view .step-arrow:nth-child(2)  { opacity: 1; transform: scaleX(1); transition-delay: 0.22s; }
.step-sequence.in-view .step-card:nth-child(3)   { opacity: 1; transform: none; transition-delay: 0.38s; }
.step-sequence.in-view .step-arrow:nth-child(4)  { opacity: 1; transform: scaleX(1); transition-delay: 0.60s; }
.step-sequence.in-view .step-card:nth-child(5)   { opacity: 1; transform: none; transition-delay: 0.76s; }

/* Step number pop (scale bounce) */
.step-sequence .step-num {
  display: block;
  transform: scale(0.65);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity var(--transition);
}
.step-sequence.in-view .step-card:nth-child(1) .step-num { transform: scale(1); transition-delay: 0.08s; }
.step-sequence.in-view .step-card:nth-child(3) .step-num { transform: scale(1); transition-delay: 0.46s; }
.step-sequence.in-view .step-card:nth-child(5) .step-num { transform: scale(1); transition-delay: 0.84s; }

/* ── Staggered List Items (hiw-visual-items) ─────────────── */
/* Add .step-list to a container with .hiw-visual-item kids. */
.step-list .hiw-visual-item {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.step-list.in-view .hiw-visual-item:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.1s; }
.step-list.in-view .hiw-visual-item:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.25s; }
.step-list.in-view .hiw-visual-item:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.40s; }

/* Dot pop for numbered items */
.step-list .hiw-vi-dot {
  transform: scale(0.5);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.step-list.in-view .hiw-visual-item:nth-child(1) .hiw-vi-dot { transform: scale(1); transition-delay: 0.15s; }
.step-list.in-view .hiw-visual-item:nth-child(2) .hiw-vi-dot { transform: scale(1); transition-delay: 0.30s; }
.step-list.in-view .hiw-visual-item:nth-child(3) .hiw-vi-dot { transform: scale(1); transition-delay: 0.45s; }

/* ── Floating Particles (21st.dev noise layer) ───────────── */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0, 175, 239, 0.55);
  animation: particle-float linear infinite;
}
@keyframes particle-float {
  0%   { transform: translateY(0px) translateX(0px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-120px) translateX(var(--dx, 20px)); opacity: 0; }
}

/* ── Shimmer Text (loading/highlight effect) ─────────────── */
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--white) 0%,
    var(--accent) 38%,
    #7dd4f8 50%,
    var(--accent) 62%,
    var(--white) 100%
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-sweep 3.5s linear infinite;
}
@keyframes shimmer-sweep {
  from { background-position: 100% center; }
  to   { background-position: -100% center; }
}

/* ── Floating Label Chip ─────────────────────────────────── */
.float-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 175, 239, 0.3);
  background: rgba(0, 175, 239, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  animation: float-chip-bob 4s ease-in-out infinite;
}
.float-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes float-chip-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* ── Scan Line (dark hero accent) ───────────────────────── */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,175,239,0.6), transparent);
  animation: scan-sweep 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes scan-sweep {
  0%   { top: 0%; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ── Reveal Scale (zoom-in variant) ─────────────────────── */
.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ── Neon Glow Text ──────────────────────────────────────── */
.neon-text {
  color: var(--accent);
  text-shadow:
    0 0 10px rgba(0, 175, 239, 0.8),
    0 0 30px rgba(0, 175, 239, 0.4),
    0 0 60px rgba(0, 175, 239, 0.2);
}

/* ── Ticker / Scroll Marquee ─────────────────────────────── */
.marquee-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}
.marquee-wrap {
  overflow: hidden;
  position: relative;
}
.marquee-wrap::before,
.marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee-wrap::before { left: 0;  background: linear-gradient(to right, var(--dark-1), transparent); }
.marquee-wrap::after  { right: 0; background: linear-gradient(to left,  var(--dark-1), transparent); }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Hover Lift Shadow ───────────────────────────────────── */
.lift-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lift-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* ── Blinking Cursor ─────────────────────────────────────── */
.cursor-blink::after {
  content: '|';
  color: var(--accent);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
