/* ══════════════════════════════════════════════════════════════════
   Hulok — Basketball category page (thumbnail prototype v2)
   Case mockups, studio sweep, and floor shadows lifted 1:1 from the
   v29 team page build (team.css). Same overlay PNGs, same layer
   percentages, same shadow recipe scaled to thumbnail size.
   ══════════════════════════════════════════════════════════════════ */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --page-bg: #F4F4F5;
  --text-primary: #1a1a1a;
  --text-secondary: #5A5F66;
  --ease: cubic-bezier(0.4, 0.0, 0.2, 1);   /* team-page motion curve */
  --dur: 0.6s;
  --card-radius: 26px;
}
.hulok-category-wrap *, .hulok-category-wrap { margin: 0; padding: 0; box-sizing: border-box; }
.hulok-category-wrap { padding: 52px 40px 96px; }
.hulok-category-wrap {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text-primary);
  padding: 52px 40px 96px;
}
.page-head { max-width: 1240px; margin: 0 auto 34px; }
.crumb {
  font-size: 12px; color: var(--text-secondary); margin-bottom: 10px;
  display: flex; gap: 8px; align-items: center;
}
.crumb b { color: var(--text-primary); font-weight: 600; }
h1 {
  font-family: 'Poppins', var(--font);
  font-size: 40px; font-weight: 700; letter-spacing: -1px;
}

.grid {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}

/* ══ Card = the rounded studio box. Dots live BELOW it, outside. ══ */
.team-cell { display: block; text-decoration: none; color: inherit; outline: none; }

.team-card {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  /* Exact v29 studio sweep over the team's room color */
  background:
    radial-gradient(ellipse 105% 60% at 48% -4%,
      rgba(255,255,255,0.22) 0%,
      rgba(255,255,255,0.07) 36%,
      rgba(255,255,255,0.00) 58%),
    linear-gradient(170deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0.05) 26%,
      rgba(0,0,0,0.02) 48%,
      rgba(0,0,0,0.18) 68%,
      rgba(0,0,0,0.36) 86%,
      rgba(0,0,0,0.50) 100%),
    var(--room);
  box-shadow: 0 2px 6px rgba(20,26,34,0.06), 0 10px 26px rgba(20,26,34,0.06);
  transform: translateY(0);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.team-cell:hover .team-card,
.team-cell:focus-visible .team-card,
.team-cell.is-open .team-card {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(20,26,34,0.08), 0 24px 48px rgba(20,26,34,0.13);
}
.team-cell:focus-visible .team-card {
  box-shadow: 0 0 0 3px var(--page-bg), 0 0 0 6px var(--text-primary);
}

/* team name, ink adapts to room luminance (set by JS) */
.team-name {
  position: absolute; top: 22px; left: 24px; z-index: 10;
  font-family: 'Poppins', var(--font);
  font-size: clamp(18px, 1.55vw, 22px);
  font-weight: 700; letter-spacing: -0.4px; line-height: 1.15;
  color: var(--ink);
}
.team-name small {
  display: block; font-family: var(--font);
  font-size: 0.6em; font-weight: 600; letter-spacing: 0.2px; opacity: 0.68;
}

/* hover arrow — glass chip, same treatment as hero chips */
.go {
  position: absolute; top: 22px; right: 20px; z-index: 10;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--chip-bg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink);
  opacity: 0; transform: translateX(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.go svg { width: 15px; height: 15px; }
.team-cell:hover .go,
.team-cell:focus-visible .go,
.team-cell.is-open .go { opacity: 1; transform: translateX(0); }

/* ══ Case cluster ══ */
.case-group {
  position: absolute;
  left: 50%; top: 45%;
  width: 27%;
  aspect-ratio: 1800 / 2724;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: 50% 78%;
  transition: transform var(--dur) var(--ease);
  z-index: 5;
}
.team-cell:hover .case-group,
.team-cell:focus-visible .case-group,
.team-cell.is-open .case-group { transform: translate(-50%, -50%) scale(1.04); }

.case-wrap {
  position: absolute; inset: 0;
  transform: translate(var(--tx), var(--ty)) scale(var(--s, 1));
  transition: transform var(--dur) var(--ease);
  transition-delay: var(--delay, 0ms);
}

/* REST — three cases shingled in a row, bumper-on-bumper overlap only.
   The windows are now see-through to the room, so the side cases sit at
   ±87%: every case edge stays clear of every window (center window spans
   ±34.4% of case width; side windows begin at ±52.6%) — they read like
   they could slide straight out. */
.pos-l { --tx: -87%; --ty: 0%; z-index: 2; --delay: 0ms; }
.pos-c { --tx: 0%;   --ty: 0%; z-index: 3; --delay: 50ms; }
.pos-r { --tx: 87%;  --ty: 0%; z-index: 1; --delay: 100ms; }

/* HOVER — fan out into a line with clear gaps, a tad of zoom (group
   scale above), and the whole trio settles DOWN slightly onto one
   shared plane — same --ty for all three. */
.team-cell:hover .pos-l, .team-cell:focus-visible .pos-l, .team-cell.is-open .pos-l { --tx: -114%; --ty: 4%; }
.team-cell:hover .pos-c, .team-cell:focus-visible .pos-c, .team-cell.is-open .pos-c { --tx: 0%;    --ty: 4%; }
.team-cell:hover .pos-r, .team-cell:focus-visible .pos-r, .team-cell.is-open .pos-r { --tx: 114%;  --ty: 4%; }

/* ── The case mockup — IDENTICAL layer stack + percentages to team.css ── */
.mini-case { position: absolute; inset: 0; }
.mini-case .layer { position: absolute; pointer-events: none; }
.mini-case .bumper-color {
  top: 0.29%; left: 0.11%; width: 99.72%; height: 99.42%;
  border-radius: 19% / 12.3%;
  background: var(--bumper);
}
.mini-case .case-color {
  top: 6.20%; left: 8.97%; width: 82.00%; height: 87.67%;
  border-radius: 10% / 8.5%;
  background: var(--case);
}
.mini-case .window-bg {
  top: 18.98%; left: 15.36%; width: 68.67%; height: 62.26%;
  border-radius: 4% / 3%;
  /* v6 hero window: clear window shows the room behind the case —
     darker mix of the live room color, recessed via one-sided inset
     shadow matching the sweep's upper-left key light (scaled). */
  background: rgba(20, 20, 24, 0.55); /* fallback */
  background: color-mix(in srgb, rgb(8, 8, 10) 30%, var(--room));
  box-shadow:
    inset 4px 5px 8px rgba(0, 0, 0, 0.34),
    inset -1.5px -2px 5px rgba(255, 255, 255, 0.05);
}
.mini-case .overlay-img {
  top: 0; left: 0; width: 100%; height: 100%;
  user-select: none; -webkit-user-drag: none;
}

/* ── Floor shadows — the v29 OLIPOP recipe, scaled to thumbnail size.
      Same right-drift (translateX -40% / -30%), same falloff stops. ── */

/* individual shadow under each case (the "after" state) */
.case-wrap::before {
  content: '';
  position: absolute; left: 50%; bottom: -2.7%;
  transform: translateX(-40%);
  width: 92%; height: 3.9%;
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.56) 0%, rgba(0,0,0,0.34) 45%, rgba(0,0,0,0.00) 72%);
  filter: blur(2px);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  transition-delay: var(--delay, 0ms);
  pointer-events: none;
}
.case-wrap::after {
  content: '';
  position: absolute; left: 50%; bottom: -5%;
  transform: translateX(-30%);
  width: 155%; height: 8.9%;
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.34) 0%, rgba(0,0,0,0.16) 48%, rgba(0,0,0,0.00) 74%);
  filter: blur(4px);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  transition-delay: var(--delay, 0ms);
  pointer-events: none;
  z-index: -1;
}
.team-cell:hover .case-wrap::before, .team-cell:hover .case-wrap::after,
.team-cell:focus-visible .case-wrap::before, .team-cell:focus-visible .case-wrap::after,
.team-cell.is-open .case-wrap::before, .team-cell.is-open .case-wrap::after { opacity: 1; }

/* shared shadow under the whole cluster (the "before" state) */
.shadow-group {
  position: absolute; left: 50%; bottom: -3.5%;
  width: 100%; height: 10%;
  transform: translateX(-50%);
  opacity: 1;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
  z-index: 0; /* below every case-wrap — shadows never sit on a case */
}
/* one shadow per resting case, at the rest offsets (-87 / 0 / +87) */
.sg-under {
  position: absolute; left: 50%; bottom: 0;
  width: 100%; height: 100%;
  transform: translateX(calc(-50% + var(--x, 0%)));
}
.sg-under::before {
  content: ''; position: absolute; left: 50%; bottom: 30%;
  transform: translateX(-40%);
  width: 92%; height: 40%;
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.56) 0%, rgba(0,0,0,0.34) 45%, rgba(0,0,0,0) 72%);
  filter: blur(2px); border-radius: 50%;
}
.sg-under::after {
  content: ''; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-30%);
  width: 155%; height: 90%;
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.34) 0%, rgba(0,0,0,0.16) 48%, rgba(0,0,0,0) 74%);
  filter: blur(5px); border-radius: 50%;
}
.team-cell:hover .shadow-group,
.team-cell:focus-visible .shadow-group,
.team-cell.is-open .shadow-group { opacity: 0; }

/* ══ Colorway dots — BELOW the card, outside the box ══ */
.below {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 13px;
}
.dot {
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--f);
  border: 3px solid var(--b);
  box-shadow: 0 1px 2px rgba(20,26,34,0.14);
  flex-shrink: 0;
}
.more {
  margin-left: 2px;
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
  letter-spacing: 0.1px;
}


/* ══ Dot-preview: hover/tap a dot → trio fades out, that combo zooms up ══ */
.dot {
  width: 26px; height: 26px;
  border-width: 3.5px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.dot:hover { transform: scale(1.12); }
.dot.solo-on {
  transform: scale(1.12);
  box-shadow: 0 1px 2px rgba(20,26,34,0.14), 0 0 0 2.5px #fff, 0 0 0 4.5px rgba(20,26,34,0.35);
}
.below { gap: 7px; }

/* trio + shared shadow fade away in solo mode */
.case-wrap { transition: transform var(--dur) var(--ease), opacity 0.35s var(--ease); transition-delay: var(--delay, 0ms); }
.team-cell.solo-active .case-wrap { opacity: 0; }
.team-cell.solo-active .shadow-group { opacity: 0; }

/* the solo case: rises from below-center and zooms to near-fill */
.solo-case {
  position: absolute;
  left: 50%; top: 53%;
  width: 52%;
  aspect-ratio: 1800 / 2724;
  transform: translate(-50%, -44%) scale(0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.55s var(--ease);
  z-index: 6;
}
.team-cell.solo-active .solo-case {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto; /* the big case is tappable → that exact colorway */
  cursor: pointer;
}
/* its own floor shadow — same two-layer recipe, right-drifted */
.solo-case::before {
  content: ''; position: absolute; left: 50%; bottom: -2.7%; transform: translateX(-40%);
  width: 92%; height: 3.9%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.56) 0%, rgba(0,0,0,0.34) 45%, rgba(0,0,0,0) 72%);
  filter: blur(3px); border-radius: 50%; pointer-events: none;
}
.solo-case::after {
  content: ''; position: absolute; left: 50%; bottom: -5%; transform: translateX(-30%);
  width: 155%; height: 8.9%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0.16) 48%, rgba(0,0,0,0) 74%);
  filter: blur(6px); border-radius: 50%; pointer-events: none; z-index: -1;
}

/* ══ Responsive / motion ══ */
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .hulok-category-wrap { padding: 34px 18px 64px; }
  .grid { grid-template-columns: 1fr; gap: 26px; }
  h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01s !important; transition-delay: 0s !important; }
}
