/* IHC v5 — ENHANCEMENTS: motion, reveal, polish */

/* ===== SITE-WIDE PAGE LOAD ===== */
.loader-curtain{
  position:fixed;inset:0;z-index:9999;
  background:#0a1628;
  display:flex;align-items:center;justify-content:center;
  transition:opacity .5s ease,visibility .5s ease;
}
.loader-curtain.gone{opacity:0;visibility:hidden;pointer-events:none}
.loader-mark{
  font-family:'Bungee',sans-serif;font-size:clamp(2.5rem,8vw,5rem);
  color:#00d4ff;
  text-shadow:4px 4px 0 #ff2d8a,8px 8px 0 #000;
  animation:loader-pulse 1.2s ease-in-out infinite;
  letter-spacing:.03em;
}
.loader-bar{
  position:absolute;bottom:30%;left:50%;transform:translateX(-50%);
  width:min(280px,60vw);height:8px;
  background:#0f1f38;border:2px solid #000;box-shadow:3px 3px 0 #000;
  overflow:hidden;
}
.loader-bar::after{
  content:'';position:absolute;top:0;left:-40%;width:40%;height:100%;
  background:linear-gradient(90deg,#00d4ff,#ff2d8a,#ffd23f);
  animation:loader-fill 1.3s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes loader-pulse{
  0%,100%{transform:scale(1) rotate(-1deg);filter:drop-shadow(0 0 0 rgba(0,212,255,.5))}
  50%{transform:scale(1.06) rotate(1deg);filter:drop-shadow(0 0 20px rgba(0,212,255,.6))}
}
@keyframes loader-fill{
  0%{left:-40%}
  100%{left:100%}
}

/* ===== SCROLL REVEAL ===== */
.reveal{opacity:0;transform:translateY(32px);transition:opacity .7s cubic-bezier(.22,1,.36,1),transform .7s cubic-bezier(.22,1,.36,1)}
.reveal.in{opacity:1;transform:translateY(0)}
.reveal-stagger > *{opacity:0;transform:translateY(24px);transition:opacity .6s cubic-bezier(.22,1,.36,1),transform .6s cubic-bezier(.22,1,.36,1)}
.reveal-stagger.in > *{opacity:1;transform:translateY(0)}
.reveal-stagger.in > *:nth-child(1){transition-delay:.05s}
.reveal-stagger.in > *:nth-child(2){transition-delay:.12s}
.reveal-stagger.in > *:nth-child(3){transition-delay:.19s}
.reveal-stagger.in > *:nth-child(4){transition-delay:.26s}
.reveal-stagger.in > *:nth-child(5){transition-delay:.33s}
.reveal-stagger.in > *:nth-child(6){transition-delay:.4s}
.reveal-stagger.in > *:nth-child(7){transition-delay:.47s}
.reveal-stagger.in > *:nth-child(8){transition-delay:.54s}

/* ===== HERO H1 ATTACK ANIMATION ===== */
.hero h1{animation:hero-slam .9s cubic-bezier(.22,1,.36,1) both}
.hero .badge{animation:badge-pop 1.1s cubic-bezier(.34,1.56,.64,1) both;animation-delay:.2s}
.hero .lead,.hero-lead{animation:fade-rise .8s cubic-bezier(.22,1,.36,1) both;animation-delay:.4s}
.hero .hero-actions,.hero .btn{animation:fade-rise .8s cubic-bezier(.22,1,.36,1) both;animation-delay:.55s}

@keyframes hero-slam{
  0%{opacity:0;transform:translateY(-24px) skewY(-2deg);filter:blur(6px)}
  60%{opacity:1;filter:blur(0)}
  100%{opacity:1;transform:translateY(0) skewY(0);filter:blur(0)}
}
@keyframes badge-pop{
  0%{opacity:0;transform:rotate(-12deg) scale(.4)}
  70%{transform:rotate(1deg) scale(1.1)}
  100%{opacity:1;transform:rotate(-2deg) scale(1)}
}
@keyframes fade-rise{
  0%{opacity:0;transform:translateY(14px)}
  100%{opacity:1;transform:translateY(0)}
}

/* ===== AMBIENT BACKGROUND GLOW DRIFT ===== */
.hero::before,.hero::after{animation:glow-drift 14s ease-in-out infinite alternate}
.hero::after{animation-delay:-7s;animation-duration:18s}
@keyframes glow-drift{
  0%{transform:translate(0,0) scale(1)}
  50%{transform:translate(40px,-30px) scale(1.1)}
  100%{transform:translate(-20px,40px) scale(.95)}
}

/* ===== HALFTONE DOT DRIFT (homepage hero) ===== */
.halftone{animation:halftone-slide 60s linear infinite}
@keyframes halftone-slide{
  0%{background-position:0 0}
  100%{background-position:280px 280px}
}

/* ===== PANEL BUTTON PRESS ENHANCEMENT ===== */
.btn{position:relative;overflow:hidden}
.btn::before{
  content:'';position:absolute;top:50%;left:50%;width:0;height:0;
  background:rgba(255,255,255,.4);border-radius:50%;
  transform:translate(-50%,-50%);
  transition:width .5s ease,height .5s ease;
  pointer-events:none;
}
.btn:active::before{width:300px;height:300px;transition:width 0s,height 0s}

/* ===== NAV BRAND BOUNCE ON LOAD ===== */
.brand img{animation:brand-enter .8s cubic-bezier(.34,1.56,.64,1) both}
@keyframes brand-enter{
  0%{opacity:0;transform:translateX(-20px) rotate(-8deg)}
  100%{opacity:1;transform:translateX(0) rotate(0)}
}

/* ===== SERVICE / CASE CARD HOVER TILT ===== */
.svc,.case,.post,.work-tile,.val,.bundle-card{
  transition:transform .25s cubic-bezier(.22,1,.36,1),box-shadow .25s cubic-bezier(.22,1,.36,1),background .25s ease !important;
}
.svc:hover,.case:hover,.post:hover{
  transform:translate(-4px,-4px) rotate(-.3deg) !important;
}

/* ===== METRIC NUMBER ODOMETER TICK ===== */
.metric .num,.metric-num{
  display:inline-block;
  animation:num-tick .6s cubic-bezier(.22,1,.36,1) both;
  animation-delay:.3s;
}
@keyframes num-tick{
  0%{opacity:0;transform:translateY(-20px) scale(1.3)}
  60%{transform:translateY(2px) scale(.95)}
  100%{opacity:1;transform:translateY(0) scale(1)}
}

/* ===== LOGO GLOW PULSE ON HOVER ===== */
.brand img{transition:filter .3s ease,transform .3s ease}
.brand:hover img{
  filter:drop-shadow(3px 3px 0 #00d4ff) drop-shadow(5px 5px 0 #ff2d8a) drop-shadow(0 0 18px rgba(0,212,255,.5)) !important;
  transform:rotate(-2deg) scale(1.05);
}

/* ===== DETAILS (FAQ) SMOOTH OPEN ===== */
details{transition:background .2s ease}
details > summary{cursor:pointer;transition:color .15s ease}
details > summary:hover{color:#00d4ff !important}
details[open] > summary .plus{transform:rotate(135deg);transition:transform .3s cubic-bezier(.34,1.56,.64,1)}
details > summary .plus{transition:transform .3s cubic-bezier(.34,1.56,.64,1);display:inline-block}
details[open] > p{animation:faq-reveal .4s ease both}
@keyframes faq-reveal{
  0%{opacity:0;transform:translateY(-6px)}
  100%{opacity:1;transform:translateY(0)}
}

/* ===== SOUND TOGGLE (optional) ===== */
.sound-toggle{
  position:fixed;bottom:20px;right:20px;z-index:100;
  background:#ffd23f;color:#000;border:2px solid #000;
  box-shadow:3px 3px 0 #000;
  width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:1.1rem;
  transition:transform .15s ease,box-shadow .15s ease;
  font-family:'Bungee',sans-serif;
}
.sound-toggle:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 #000}
.sound-toggle:active{transform:translate(2px,2px);box-shadow:0 0 0 #000}
.sound-toggle.off{opacity:.5;background:#0f1f38;color:#8da3c2}

/* ===== REDUCED MOTION OVERRIDE ===== */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
  .reveal,.reveal-stagger > *{opacity:1 !important;transform:none !important}
}

/* ===== TEXT GLITCH (hero em on hover) ===== */
.hero h1 em,.sec-h em{position:relative;cursor:default;transition:text-shadow .2s ease}
.hero h1 em:hover{animation:glitch .4s ease}
@keyframes glitch{
  0%,100%{text-shadow:4px 4px 0 #000,4px 4px 0 #ff2d8a}
  25%{text-shadow:-2px 0 #ff2d8a,2px 2px 0 #000,2px 0 #00d4ff}
  50%{text-shadow:2px 2px 0 #ffd23f,-2px -2px 0 #ff2d8a,4px 4px 0 #000}
  75%{text-shadow:-1px 1px 0 #00d4ff,3px 3px 0 #000}
}


/* ===== MOBILE HAMBURGER NAV ===== */
.ihc-hamburger{
  display:none;
  background:var(--gold,#ffd23f);color:#000;
  border:2px solid #000;box-shadow:3px 3px 0 #000;
  width:44px;height:44px;border-radius:4px;
  padding:0;cursor:pointer;
  flex-direction:column;justify-content:center;align-items:center;gap:5px;
  transition:transform .15s ease,box-shadow .15s ease;
  position:relative;z-index:60;
}
.ihc-hamburger:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 #000}
.ihc-hamburger:active{transform:translate(2px,2px);box-shadow:0 0 0 #000}
.ihc-hamburger span{
  display:block;width:22px;height:3px;background:#000;
  transition:transform .25s ease,opacity .2s ease;
}
.ihc-hamburger.open span:nth-child(1){transform:translateY(8px) rotate(45deg)}
.ihc-hamburger.open span:nth-child(2){opacity:0}
.ihc-hamburger.open span:nth-child(3){transform:translateY(-8px) rotate(-45deg)}

.ihc-mobile-menu{
  position:fixed;top:0;left:0;right:0;bottom:0;z-index:55;
  background:rgba(10,22,40,.98);backdrop-filter:blur(14px);
  display:flex;flex-direction:column;justify-content:flex-start;
  padding:90px 28px 40px;
  transform:translateY(-100%);transition:transform .35s cubic-bezier(.22,1,.36,1);
  overflow-y:auto;
  background-image:radial-gradient(circle,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size:18px 18px;
}
.ihc-mobile-menu.open{transform:translateY(0)}
.ihc-mobile-menu a{
  display:block;
  color:#fff;font-family:'Bungee',sans-serif;font-size:1.5rem;
  padding:16px 4px;border-bottom:2px solid rgba(255,255,255,.08);
  text-decoration:none;letter-spacing:.02em;
  transition:color .2s ease,transform .2s ease,padding-left .2s ease;
  opacity:0;transform:translateX(-20px);
}
.ihc-mobile-menu.open a{opacity:1;transform:translateX(0)}
.ihc-mobile-menu.open a:nth-child(1){transition-delay:.08s}
.ihc-mobile-menu.open a:nth-child(2){transition-delay:.13s}
.ihc-mobile-menu.open a:nth-child(3){transition-delay:.18s}
.ihc-mobile-menu.open a:nth-child(4){transition-delay:.23s}
.ihc-mobile-menu.open a:nth-child(5){transition-delay:.28s}
.ihc-mobile-menu.open a:nth-child(6){transition-delay:.33s}
.ihc-mobile-menu.open a:nth-child(7){transition-delay:.38s}
.ihc-mobile-menu.open a:nth-child(8){transition-delay:.43s}
.ihc-mobile-menu.open a:nth-child(9){transition-delay:.48s}
.ihc-mobile-menu a:hover{color:#00d4ff;padding-left:14px}
.ihc-mobile-menu a.mm-cta{
  margin-top:20px;background:#00d4ff;color:#000;
  text-align:center;border:2px solid #000;box-shadow:4px 4px 0 #000;
  padding:18px;border-bottom:2px solid #000;
}
.ihc-mobile-menu a.mm-cta:hover{color:#000;padding-left:4px;background:#ffd23f}
.ihc-mobile-menu .mm-contact{
  margin-top:32px;padding-top:24px;border-top:2px solid rgba(255,255,255,.1);
  font-family:'JetBrains Mono',monospace;font-size:.82rem;
  color:#8da3c2;letter-spacing:.1em;text-transform:uppercase;
}
.ihc-mobile-menu .mm-contact a{
  font-family:'JetBrains Mono',monospace;font-size:.95rem;
  color:#00d4ff;padding:8px 0;border:none;letter-spacing:.05em;
  text-transform:none;
}

body.menu-open{overflow:hidden}

@media(max-width:760px){
  .ihc-hamburger{display:flex}
  .nav-links > a:not(.nav-cta){display:none !important}
  .nav-links > .nav-cta{display:none !important}
  .nav-links{gap:12px}
}
