/* ============================================================
   ARC — Visual Enhancements
   Creative animations & decorative elements (no text)
   ============================================================ */

/* ── 1. Scroll progress bar ─────────────────────────────── */
#arc-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2.5px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--purple));
  z-index: 9999;
  transition: width .08s linear;
  transform-origin: left;
}

/* ── 2. Ambient floating orbs ───────────────────────────── */
.arc-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.arc-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation: orbFloat linear infinite;
}
.arc-orb--1 {
  width: clamp(280px, 40vw, 560px);
  height: clamp(280px, 40vw, 560px);
  background: radial-gradient(circle, rgba(47,210,125,.18) 0%, transparent 70%);
  top: -10%; left: -8%;
  animation-duration: 28s;
  animation-delay: 0s;
}
.arc-orb--2 {
  width: clamp(200px, 30vw, 440px);
  height: clamp(200px, 30vw, 440px);
  background: radial-gradient(circle, rgba(31,160,239,.15) 0%, transparent 70%);
  top: 30%; right: -10%;
  animation-duration: 36s;
  animation-delay: -12s;
}
.arc-orb--3 {
  width: clamp(180px, 28vw, 380px);
  height: clamp(180px, 28vw, 380px);
  background: radial-gradient(circle, rgba(128,80,240,.12) 0%, transparent 70%);
  bottom: 10%; left: 20%;
  animation-duration: 32s;
  animation-delay: -6s;
}
.arc-orb--4 {
  width: clamp(150px, 22vw, 300px);
  height: clamp(150px, 22vw, 300px);
  background: radial-gradient(circle, rgba(240,112,0,.10) 0%, transparent 70%);
  top: 60%; right: 15%;
  animation-duration: 40s;
  animation-delay: -20s;
}
@keyframes orbFloat {
  0%   { opacity: 0; transform: translate(0, 0) scale(1); }
  10%  { opacity: 1; }
  50%  { transform: translate(clamp(20px,4vw,60px), clamp(-30px,-3vw,-20px)) scale(1.08); }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translate(0, 0) scale(1); }
}

/* ── 3. Cursor spotlight ────────────────────────────────── */
#arc-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,210,125,.055) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  transition: opacity .4s;
  will-change: transform;
  mix-blend-mode: normal;
}

/* ── 4. Card 3D tilt ────────────────────────────────────── */
.program-card,
.project-card,
.tile,
.gallery-card,
.step,
.event-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ── 5. Program card hover glow ─────────────────────────── */
.program-card {
  position: relative;
  overflow: hidden;
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.program-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--green), var(--blue), var(--purple));
  opacity: 0;
  z-index: 0;
  transition: opacity .35s var(--ease);
}
.program-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius) - 1px);
  background: #fff;
  z-index: 1;
}
.program-card > * { position: relative; z-index: 2; }
.program-card:hover::before { opacity: 1; }
.program-card:hover {
  box-shadow: 0 20px 60px rgba(128,80,240,.18), 0 4px 16px rgba(47,210,125,.12);
  transform: translateY(-5px);
}

/* ── 6. Bento tile shimmer ──────────────────────────────── */
.tile {
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.22) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%) skewX(-15deg);
  transition: transform .6s var(--ease);
  pointer-events: none;
}
.tile:hover::after { transform: translateX(200%) skewX(-15deg); }
.tile:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,.14); }

/* ── 7. Primary button pulse glow ───────────────────────── */
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(128,80,240,.45); }
  50%       { box-shadow: 0 0 0 10px rgba(128,80,240,0); }
}
.btn--primary {
  animation: btnPulse 3.2s ease infinite;
}
.btn--primary:hover { animation-play-state: paused; }

/* ── 8. Grain texture on dark sections ──────────────────── */
.section--ink::after,
.how-we-teach::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: overlay;
}

/* ── 9. Dot grid decoration on hero ─────────────────────── */
.hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: min(44vw, 500px);
  height: 100%;
  background-image: radial-gradient(circle, rgba(128,80,240,.18) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to left, rgba(0,0,0,.6) 0%, transparent 80%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.6) 0%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* ── 10. Animated gradient underline on nav hover ───────── */
.nav__links a {
  background-image: linear-gradient(90deg, var(--purple), var(--blue));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size .3s var(--ease), opacity .2s, color .2s;
}
.nav__links a:hover {
  background-size: 100% 2px;
}
.nav__links a[aria-current="page"] {
  background-size: 100% 2px;
  background-image: linear-gradient(90deg, var(--purple), var(--blue));
}
/* remove the old ::after underline since we're using background now */
.nav__links a[aria-current="page"]::after { display: none; }

/* ── 11. Section entrance clip-path wipe ────────────────── */
.reveal-ready [data-reveal] {
  clip-path: inset(0 0 0 0);
}
.reveal-ready [data-reveal]:not(.is-visible) {
  clip-path: inset(0 0 12% 0);
}
.reveal-ready [data-reveal].is-visible {
  clip-path: inset(0 0 0 0);
  transition: opacity .7s var(--ease), transform .7s var(--ease), clip-path .7s var(--ease);
}

/* ── 12. Project card index number pop ──────────────────── */
.project-card {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  overflow: hidden;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(0,0,0,.12);
}
.project-card__index {
  transition: color .3s var(--ease), transform .3s var(--ease);
  display: inline-block;
}
.project-card:hover .project-card__index {
  color: var(--purple);
  transform: scale(1.15);
}

/* ── 13. Footer brand glow ──────────────────────────────── */
.footer__brand-col img {
  transition: filter .4s var(--ease), transform .4s var(--ease);
  filter: brightness(1);
}
.footer__brand-col img:hover {
  filter: brightness(1.15) drop-shadow(0 0 12px rgba(47,210,125,.4));
  transform: scale(1.04);
}

/* ── 14. How-step circle pulse on hover ─────────────────── */
@keyframes stepPing {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(1.9); opacity: 0; }
}
.how-step__circle {
  position: relative;
}
.how-step:hover .how-step__circle::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--green);
  animation: stepPing .7s var(--ease) forwards;
}

/* ── 15. Eyebrow dot pulse ──────────────────────────────── */
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: .6; }
}
.eyebrow::before {
  animation: dotPulse 2.4s ease infinite;
}

/* ── 16. Page load screen wipe ──────────────────────────── */
#arc-wipe {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--ink);
  transform-origin: top;
  pointer-events: none;
  animation: wipeOut .7s cubic-bezier(.76,0,.24,1) .15s both;
}
@keyframes wipeOut {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0); }
}

/* ── 17. Blog card hover lift ───────────────────────────── */
.blog-card, .event-card {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.blog-card:hover, .event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,.1);
}

/* ── 18. Stat number shimmer ────────────────────────────── */
@keyframes statShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.stat__num {
  background: linear-gradient(90deg, var(--text) 30%, var(--green) 50%, var(--text) 70%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: statShimmer 4s linear infinite;
}

/* ── 19. Floating badge on hero ─────────────────────────── */
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50%       { transform: translateY(-8px) rotate(-2deg); }
}
.fan__card:first-child {
  animation: badgeFloat 4s ease-in-out infinite !important;
}
.fan__card:nth-child(2) {
  animation: badgeFloat 4.5s ease-in-out infinite !important;
  animation-delay: .5s !important;
}

/* ── 20. Smooth scroll snap on desktop ──────────────────── */
@media (min-width: 900px) {
  .hero { position: relative; z-index: 1; }
}

/* ── Respect reduced motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .arc-orb,
  .arc-wipe,
  .btn--primary,
  .eyebrow::before,
  .stat__num,
  .fan__card,
  .how-step__circle::before { animation: none !important; }

  .tile::after,
  .program-card::before,
  .tile,
  .program-card,
  .project-card,
  .blog-card,
  .event-card { transition: none !important; }
}
