/* "Put the hoodie on" (hoodify.html): a calm, cozy studio. Builds on css/pfp.css.
   Only transform/opacity animate, nothing heavy runs in a loop (the stage glow breathes via opacity). */
.hf {
  --soft: #0d1220;
  --soft-2: #141b2c;
  --soft-3: #1b2438;
  --edge: rgba(238, 241, 230, .08);
  --glow: rgba(196, 251, 7, .45);
  --ease: cubic-bezier(.22, .8, .24, 1);
  background: #050812;
}
.hf-sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 18% 8%, rgba(122, 44, 255, .16), transparent 70%),
    radial-gradient(55% 40% at 88% 18%, rgba(10, 143, 143, .16), transparent 70%),
    radial-gradient(70% 50% at 50% 105%, rgba(196, 251, 7, .09), transparent 70%),
    #050812;
}
.hf .top { background: rgba(5, 8, 18, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom-color: var(--edge); }
.hf .top__buy { box-shadow: 0 6px 20px -8px var(--glow); border-radius: 999px; white-space: nowrap; }
@media (max-width: 420px) {
  .hf .top { gap: 8px; }
  .hf .top__links { gap: 6px; }
  .hf .top__back span { display: none; }
  .hf .top__buy { padding: 0 12px; font-size: .8rem; }
  .hf .maker { padding-top: 22px; }
}

/* sound toggle */
.hf-sound {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--lime);
  transition: background-color .2s;
}
.hf-sound:hover { background: rgba(196, 251, 7, .08); }
.hf-sound svg { width: 20px; height: 20px; }
.hf-sound .off, .hf-sound[aria-pressed="false"] .on { display: none; }
.hf-sound[aria-pressed="false"] .off { display: block; color: var(--fog); }
.hf .top__music { border-radius: 999px; padding-right: 12px; }
.hf-chill__label { font: 400 .7rem/1 var(--pixel); text-transform: uppercase; letter-spacing: .06em; color: var(--fog); }
.top__music.is-on .hf-chill__label { color: var(--lime); }
@media (max-width: 420px) { .hf-chill__label { display: none; } .hf .top__music .eq { display: none; } .hf .top__music { padding: 0 4px; } }

/* intro + progress */
.hf-intro { margin-bottom: clamp(20px, 3.5vw, 36px); }
.hf .intro__eyebrow { color: rgba(196, 251, 7, .85); }
.hf .intro__title span { text-shadow: 0 0 34px rgba(196, 251, 7, .35); }
.hf-steps {
  list-style: none; margin: 22px auto 0; padding: 6px; display: inline-flex; gap: 4px;
  border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--edge);
}
.hf-steps li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px;
  font: 600 .86rem/1 var(--ui); color: var(--fog); transition: color .3s, background-color .3s;
}
.hf-steps i {
  position: relative; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(238, 241, 230, .25); transition: border-color .3s, background-color .3s;
}
.hf-steps i::after {
  content: ''; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
  border: solid var(--lime-ink); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg) scale(0); transition: transform .35s var(--ease);
}
.hf-steps li.is-now { color: var(--paper); background: rgba(255, 255, 255, .05); }
.hf-steps li.is-now i { border-color: var(--lime); }
.hf-steps li.is-done { color: var(--paper); }
.hf-steps li.is-done i { border-color: var(--lime); background: var(--lime); }
.hf-steps li.is-done i::after { transform: rotate(45deg) scale(1); }

/* stage */
.hf-stage { top: 86px; }
.hf-frame {
  position: relative; border-radius: 30px; padding: 10px; touch-action: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02));
  border: 1px solid var(--edge);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
  transition: transform .4s var(--ease);
}
.hf-frame::before {
  content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: 32px;
  box-shadow: 0 0 80px -6px var(--glow);
  opacity: .35; animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .75; } }
.hf-frame.is-over { transform: scale(1.015); }
.hf-frame.is-over::before { opacity: 1; animation: none; }
.hf-canvas { display: block; width: 100%; aspect-ratio: 1; height: auto; border-radius: 22px; cursor: grab; }
.hf-canvas.is-dragging { cursor: grabbing; }
.hf-canvas.is-reveal { animation: reveal .7s var(--ease); }
@keyframes reveal { 0% { transform: scale(.94); filter: brightness(1.6); } 100% { transform: scale(1); filter: none; } }
.hf-canvas.is-nudge { animation: nudge .35s var(--ease); }
@keyframes nudge { 0% { transform: scale(.985); } 100% { transform: scale(1); } }

.hf-upload {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 16px 30px 14px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--lime); color: var(--lime-ink);
  box-shadow: 0 14px 34px -10px rgba(196, 251, 7, .7), inset 0 -3px 0 rgba(0, 0, 0, .12);
  font: 400 1.1rem/1 var(--sign);
  transition: transform .25s var(--ease), background-color .2s;
}
.hf-upload:hover { background: var(--lime-hover); transform: translateX(-50%) translateY(-2px); }
.hf-upload:active { transform: translateX(-50%) scale(.97); }
.hf-upload__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .1); }
.hf-upload svg { width: 22px; height: 22px; }
.hf-upload small { font: 400 .62rem/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.hf-upload[hidden] { display: none; }
.hf-drag {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(5, 8, 18, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: var(--paper);
  font: 600 .8rem/1.2 var(--ui); pointer-events: none; transition: opacity .6s;
}
.hf-drag.is-gone { opacity: 0; }

/* sparkles + confetti (a few DOM dots, removed after the animation) */
.hf-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.hf-fx i {
  position: absolute; left: 50%; top: 40%; width: 9px; height: 9px; border-radius: 3px;
  opacity: 0; animation: burst var(--t, .9s) var(--ease) forwards;
}
@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(.4) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(var(--r)); opacity: 0; }
}

.hf-toast {
  margin: 16px auto 0; min-height: 40px; display: flex; justify-content: center; align-items: center;
  font: 600 .95rem/1.3 var(--ui); color: var(--paper); text-align: center;
}
.hf-toast span {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  background: rgba(196, 251, 7, .1); border: 1px solid rgba(196, 251, 7, .25);
  animation: toast .45s var(--ease);
}
@keyframes toast { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* panel */
.hf-panel { background: rgba(13, 18, 32, .78); border: 1px solid var(--edge); border-radius: 28px; padding: clamp(12px, 2vw, 18px); }
.hf-card { padding: 14px; border-radius: 20px; background: var(--soft-2); }
.hf-card + .hf-card { margin-top: 10px; }
.hf-card__title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px 2px;
  font: 600 .95rem/1 var(--ui); color: var(--paper);
}
.hf-card__title b {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(196, 251, 7, .14); color: var(--lime); font: 400 .7rem/1 var(--pixel);
}

.hf-pick {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px;
  border: 1.5px dashed rgba(196, 251, 7, .45); border-radius: 16px; cursor: pointer;
  background: rgba(196, 251, 7, .05); color: var(--lime); font: 600 1rem/1 var(--ui);
  transition: background-color .2s, border-color .2s, transform .2s var(--ease);
}
.hf-pick:hover { background: rgba(196, 251, 7, .1); border-color: var(--lime); }
.hf-pick:active { transform: scale(.98); }
.hf-pick svg { width: 20px; height: 20px; }
.hf-zoom { display: grid; grid-template-columns: 20px minmax(0, 1fr) 20px; align-items: center; gap: 10px; margin-top: 12px; color: var(--fog); }
.hf-zoom svg { width: 20px; height: 20px; }
.hf-zoom input { width: 100%; height: 30px; margin: 0; accent-color: var(--lime); cursor: pointer; }

.hf-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 16px; background: var(--soft); }
.hf-seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--fog); font: 600 .95rem/1 var(--ui);
  transition: background-color .25s, color .25s, transform .2s var(--ease);
}
.hf-seg button:hover { color: var(--paper); }
.hf-seg button:active { transform: scale(.96); }
.hf-seg button[aria-checked="true"] { background: var(--soft-3); color: var(--paper); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(196, 251, 7, .35); }
.sw { width: 16px; height: 16px; border-radius: 5px; flex: none; }
.sw--voxel { background: conic-gradient(#e6b48f 0 25%, #a5704e 0 50%, #e6b48f 0 75%, #c48d66 0); }
.sw--lime { background: conic-gradient(#c4fb07 0 25%, #6aa800 0 50%, #c4fb07 0 75%, #95d400 0); }
.sw--photo { background: linear-gradient(135deg, #f1c9a5, #8b5a3c); border-radius: 50%; }

.hf-poses { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.hf-poses button {
  position: relative; padding: 0; border: 0; border-radius: 14px; cursor: pointer; overflow: hidden;
  background: var(--soft); aspect-ratio: 176 / 162;
  box-shadow: inset 0 0 0 2px transparent;
  transition: transform .25s var(--ease), box-shadow .2s;
}
.hf-poses button img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .2s; }
.hf-poses button:hover img { opacity: 1; }
.hf-poses button:active { transform: scale(.95); }
.hf-poses button[aria-checked="true"] { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--lime), 0 8px 20px -8px var(--glow); }
.hf-poses button[aria-checked="true"] img { opacity: 1; }
.hf-poses span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 4px 5px;
  background: linear-gradient(transparent, rgba(5, 8, 18, .85));
  font: 600 .66rem/1 var(--ui); color: var(--paper); text-align: center;
}
@media (max-width: 380px) { .hf-poses { gap: 6px; } .hf-poses span { font-size: .58rem; } }

.hf-colors { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.hf-colors button {
  aspect-ratio: 1; width: 100%; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid rgba(255, 255, 255, .14);
  transition: transform .25s var(--ease), box-shadow .2s;
}
.hf-colors button:hover { transform: scale(1.08); }
.hf-colors button[aria-checked="true"] { transform: scale(1.1); box-shadow: 0 0 0 3px var(--soft-2), 0 0 0 5px var(--lime); }
@media (max-width: 460px) { .hf-colors { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 8px; justify-items: center; } .hf-colors button { width: 42px; } }

.hf-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.hf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: 0 16px; border-radius: 16px; cursor: pointer;
  border: 1px solid rgba(238, 241, 230, .16); background: var(--soft-2); color: var(--paper);
  font: 600 1rem/1 var(--ui); text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s;
}
.hf-btn svg { width: 20px; height: 20px; flex: none; }
.hf-btn:hover { background: var(--soft-3); border-color: rgba(238, 241, 230, .3); }
.hf-btn:active { transform: scale(.97); }
.hf-btn--main {
  grid-column: 1 / -1; min-height: 62px; border: 0; border-radius: 20px;
  background: var(--lime); color: var(--lime-ink); font: 400 1.15rem/1 var(--sign);
  box-shadow: 0 16px 36px -14px rgba(196, 251, 7, .75), inset 0 -3px 0 rgba(0, 0, 0, .12);
}
.hf-btn--main:hover { background: var(--lime-hover); transform: translateY(-2px); }
.hf-note { margin: 12px 4px 0; font-size: .88rem; color: var(--fog); }
.hf-note b { color: var(--paper); font-weight: 600; }
.hf-note a { color: var(--lime); }
.hf .foot { border-top-color: var(--edge); }

@media (prefers-reduced-motion: reduce) {
  .hf-frame::before, .hf-canvas.is-reveal, .hf-canvas.is-nudge, .hf-toast span, .hf-fx i { animation: none !important; }
  .hf-fx { display: none; }
}
