/* InterCorp category ring: V1's warp carousel rebuilt for Studio silver.
   Tokens fall back to Studio silver values so the file works on any page. */
@property --lift { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --turn { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --zoom { syntax: '<number>'; inherits: true; initial-value: 1; }

.warp {
  --w-ink: var(--ink, #1d1d1f); --w-ink-2: var(--ink-2, #56565b); --w-ink-3: var(--ink-3, #6e6e73);
  --w-cyc: var(--cyc, #f5f5f7); --w-hair: var(--hair, rgba(0, 0, 0, .08)); --w-edge: var(--edge, #86868b);
  --w-spring: var(--spring, cubic-bezier(.34, 1.3, .64, 1)); --w-spring-dur: var(--spring-dur, 520ms);
  --w-ease: var(--ease-ui, cubic-bezier(.22, 1, .36, 1)); --w-out: var(--ease-out, cubic-bezier(.16, 1, .3, 1));
  position: relative;
}
.warp-view {
  position: relative; height: clamp(480px, 42vw, 560px);
  perspective: 1600px; perspective-origin: 50% 40%;
  overflow: hidden; overscroll-behavior-x: contain; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  border-radius: 24px; outline-offset: 6px;
  /* side cards fade out at the edges instead of being cut by a hard line */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.warp--bleed .warp-view { margin-inline: calc(50% - 50vw); border-radius: 0; }
.warp-view.is-dragging { cursor: grabbing; }
.warp-track { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; transform-style: preserve-3d; }

/* each card */
.wc {
  position: absolute; top: 20px; left: 50%; width: var(--cw, 320px); height: calc(100% - 78px); margin-left: calc(var(--cw, 320px) / -2);
  display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 8px; border-radius: 26px; background: #fff; color: var(--w-ink);
  box-shadow: inset 0 0 0 1px var(--w-hair), 0 2px 4px rgba(0, 0, 0, .04), 0 26px 50px -28px rgba(0, 0, 0, .34);
  backface-visibility: hidden; will-change: transform, opacity;
  transition: --lift var(--w-spring-dur) var(--w-spring), --turn var(--w-spring-dur) var(--w-spring), --zoom .9s var(--w-out), box-shadow .45s var(--w-ease);
}
.wc.is-front { box-shadow: inset 0 0 0 1px var(--w-hair), 0 4px 10px rgba(0, 0, 0, .05), 0 16px 28px -18px rgba(0, 0, 0, .3); }
.wc-media { position: relative; min-height: 0; border-radius: 19px; overflow: hidden; background: #ededf0; }
/* the photo plate: a studio light that slides across as the card turns; photos multiply into it */
.wc-art {
  position: absolute; inset: 0 -32px; display: grid; place-items: center;
  background: radial-gradient(110% 85% at var(--mx, 50%) 16%, #ffffff 0%, #f4f4f6 52%, #e8e8eb 100%);
  transform: translateX(var(--px, 0px)) scale(var(--zoom));
}
.wc-art img { position: absolute; left: calc(32px + 6%); top: 7%; width: calc(100% - 64px - 12%); height: 86%; object-fit: contain; mix-blend-mode: multiply; -webkit-user-drag: none; }
.wc-art.trio img { top: 18%; left: 50%; width: auto; height: 64%; max-width: none; }
.wc-art.trio img:nth-child(1) { transform: translateX(-124%) rotate(-7deg); }
.wc-art.trio img:nth-child(2) { transform: translateX(-50%); }
.wc-art.trio img:nth-child(3) { transform: translateX(24%) rotate(7deg); }
/* five real parts on one studio floor: the near ones lead, the far ones follow a little */
.wc-art.group { background: linear-gradient(180deg, #fff 0%, #f6f6f8 56%, #e6e6ea 100%); }
.wc-art.group img { left: 32px; top: auto; bottom: 0; width: calc(100% - 64px); height: 100%; object-fit: contain; object-position: 50% 78%; mix-blend-mode: normal; transition: transform .42s var(--w-ease); }
@media (hover: hover) {
  .warp--motion .wc.is-front:hover .g-front { transform: translateY(-5px); }
  .warp--motion .wc.is-front:hover .g-back { transform: translateX(-2px); }
}
.wc-icon { width: 42%; height: auto; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; color: var(--w-ink-3); }
.wc-chip {
  position: absolute; top: 12px; left: 12px; z-index: 1; display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .86); box-shadow: inset 0 0 0 1px var(--w-hair); font-size: 12.5px; font-weight: 600; color: var(--w-ink-2);
}
.wc-body { display: grid; gap: 4px; padding: 16px 12px 8px; }
.wc-name { margin: 0; font-size: 26px; line-height: 1.1; font-weight: 600; letter-spacing: -.025em; }
.wc-sub { margin: 0; font-size: 15px; line-height: 1.45; color: var(--w-ink-2); min-height: 2.9em; text-wrap: pretty; }
.wc-act { display: flex; margin-top: 10px; min-height: 46px; }
.wc-btn {
  display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 20px; border-radius: 999px; background: var(--gold, #FBB600); color: var(--w-ink);
  font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .12s linear, transform var(--w-spring-dur) var(--w-spring);
}
.wc-btn:hover { background: #EAA800; }
.wc-btn .arrow, .wc-btn svg { transition: transform var(--w-spring-dur) var(--w-spring); }
.warp--motion .wc-btn:active { transform: scale(.96); transition-duration: 90ms; }
@media (hover: hover) { .warp--motion .wc-btn:hover svg { transform: translateX(4px); } }

/* light and focus layers, driven per frame */
.wc-shade { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: linear-gradient(90deg, rgba(0, 0, 0, var(--sl, 0)) 0%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, var(--sr, 0)) 100%); }
.wc-dim { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; background: var(--w-cyc); opacity: var(--dim, 0); }

/* quiet and dark variants */
.wc-soon .wc-name { color: var(--w-ink-2); }
.wc-soon .wc-art { background: radial-gradient(110% 85% at var(--mx, 50%) 16%, #fbfbfc 0%, #f1f1f3 60%, #ebebee 100%); }
.wc-soon .wc-art img { opacity: 1; }
.wc-tool { background: var(--w-ink); color: #fff; }
.wc-tool .wc-media { background: #2a2a2d; }
.wc-tool .wc-art { background: radial-gradient(110% 85% at var(--mx, 50%) 16%, #3a3a3e 0%, #262628 60%, #1f1f21 100%); }
.wc-tool .wc-icon { color: #fff; opacity: .92; }
.wc-tool .wc-sub { color: rgba(255, 255, 255, .72); }

/* soft contact shadow on the floor under each card */
.wc-floor {
  position: absolute; left: 50%; bottom: 36px; width: var(--cw, 320px); height: 40px; margin-left: calc(var(--cw, 320px) / -2);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)); pointer-events: none;
}

/* hover: the front card rises and its photo eases closer; a side card turns a little toward you */
@media (hover: hover) {
  .warp--motion .wc.is-front:hover { --lift: -6px; --zoom: 1.05; }
  .warp--motion .wc[data-side="r"]:not(.is-front):hover { --turn: -8deg; --lift: -4px; }
  .warp--motion .wc[data-side="l"]:not(.is-front):hover { --turn: 8deg; --lift: -4px; }
  .wc:not(.is-front) { cursor: pointer; }
}

/* controls */
.warp-ctl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 4px; }
.warp-arw {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--w-ink);
  box-shadow: inset 0 0 0 1px var(--w-edge); cursor: pointer; transition: transform var(--w-spring-dur) var(--w-spring), box-shadow .2s var(--w-ease);
}
@media (hover: hover) { .warp--motion .warp-arw:hover { transform: scale(1.06); box-shadow: inset 0 0 0 1px var(--w-ink), 0 8px 18px -10px rgba(0, 0, 0, .3); } }
.warp--motion .warp-arw:active { transform: scale(.94); transition-duration: 90ms; }
.warp-dots { position: relative; display: flex; gap: 4px; }
.warp-dot { width: 28px; height: 28px; border: 0; padding: 0; background: none; display: grid; place-items: center; border-radius: 999px; cursor: pointer; }
.warp-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c7c7cc; }
.warp-dot:hover::before { background: var(--w-ink-3); }
.warp-ind { position: absolute; top: 10px; left: 0; height: 8px; width: 100%; border-radius: 999px; background: var(--w-ink); pointer-events: none; clip-path: inset(0 100% 0 0 round 999px); }
.warp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
