/*
 * Real creators: the creator card (Inpock-style), the drifting row (landing strip and /showcase), the
 * group-buy case cards and the showcase hero collage. Only creators and cases stylmatch.com's home
 * already shows (PagesController::creators, newbrand_pages.showcase). Static file like landing.css.
 * Motion: the row drifts with one transform animation; it stops on hover/focus, off screen, on a hidden
 * tab and with the button (showcase.js). Reduced motion: no drift, a still row you can swipe.
 */

/* ─── Creator card ─── */
.nb-cc {
    --tint: var(--nb-mist);
    display: grid; justify-items: start; gap: 2px; flex: none;
    width: 184px; padding: 10px 10px 14px; border-radius: 22px;
    background: #fff; color: var(--nb-ink);
    box-shadow: 0 0 0 1px var(--nb-line), 0 10px 24px -18px rgba(17, 17, 19, .4);
    transition: transform var(--nb-dur-3) var(--nb-ease), box-shadow var(--nb-dur-3) ease;
}
.nb-cc__photo { position: relative; display: block; width: 100%; aspect-ratio: 1; margin-bottom: 10px; overflow: hidden; border-radius: 16px; background: var(--tint); }
.nb-cc__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--nb-ease); }
.nb-cc__name { max-width: 100%; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.nb-cc__handle { max-width: 100%; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--nb-ink-3); }
.nb-cc__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; padding: 0 2px; }
.nb-cc__tags i { padding: 3px 8px; border-radius: 999px; background: var(--nb-mist); font-size: 12px; font-style: normal; font-weight: 700; color: var(--nb-ink-2); }
.nb-cc__tags i.is-gb { background: var(--nb-accent); color: var(--nb-on-accent); box-shadow: inset 0 0 0 1.5px var(--nb-ink); }
.nb-cc--pink { --tint: #f6e9ee; }
.nb-cc--lime { --tint: var(--nb-accent-soft); }
.nb-cc--blue { --tint: #e6edf8; }
.nb-cc--wine { --tint: #f1e6e8; }
@media (hover: hover) {
    .nb-cc:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--nb-line-2), 0 18px 32px -18px rgba(17, 17, 19, .45); }
    .nb-cc:hover .nb-cc__photo img { transform: scale(1.05); }
}
.nb-cc:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 3px; box-shadow: 0 0 0 3px var(--nb-accent); }

/* ─── Drifting row ─── */
.nb-mq { position: relative; overflow: hidden; padding: 12px 0 20px; }
.nb-mq__track { display: flex; width: max-content; }
.nb-mq__set { display: flex; gap: 12px; padding-right: 12px; }
.nb-mq::before, .nb-mq::after {
    content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: max(16px, calc(var(--edge, 16px) * .6)); pointer-events: none;
}
.nb-mq::before { left: 0; background: linear-gradient(90deg, var(--mq-bg, #fff), transparent); }
.nb-mq::after { right: 0; background: linear-gradient(270deg, var(--mq-bg, #fff), transparent); }
@media (prefers-reduced-motion: no-preference) {
    .nb-js .nb-mq.is-live .nb-mq__track { animation: nb-mq var(--mq-dur, 60s) linear infinite; animation-play-state: paused; }
    .nb-js .nb-mq.is-live.is-on:not(.is-paused):not(:hover):not(:focus-within) .nb-mq__track { animation-play-state: running; }
    .nb-mq--rev.is-live .nb-mq__track { animation-direction: reverse; }
}
@keyframes nb-mq { to { transform: translateX(-50%); } }
/* Still row (reduced motion or no script): one set, swipe sideways inside the row only. */
.nb-mq:not(.is-live) { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.nb-mq:not(.is-live)::-webkit-scrollbar { display: none; }
.nb-mq:not(.is-live) .nb-mq__set[aria-hidden] { display: none; }
.nb-mq:not(.is-live) .nb-mq__set { padding-left: var(--edge, 16px); }
.nb-mq:not(.is-live) .nb-cc { scroll-snap-align: start; scroll-margin-left: var(--edge, 16px); }
@media (prefers-reduced-motion: reduce) { .nb-cc, .nb-cc__photo img { transition: none; } }

.nb-mq-toggle { position: relative; }
.nb-mq-toggle .nb-i { width: 16px; height: 16px; }
.nb-mq-toggle__play { display: none; }
.nb-mq-toggle[aria-pressed="true"] .nb-mq-toggle__pause { display: none; }
.nb-mq-toggle[aria-pressed="true"] .nb-mq-toggle__play { display: block; }

/* ─── Landing strip ─── */
.nb-cs { padding-top: calc(var(--sec) * .6); padding-bottom: calc(var(--sec) * .6); }
.nb-cs__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: 28px; }
.nb-cs__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ─── Showcase hero collage: the three group-buy shots as a fanned stack ─── */
.nb-sc-collage { position: relative; width: min(100%, 520px); aspect-ratio: 1 / 1.02; margin: 0 auto; }
.nb-sc-collage figure {
    position: absolute; overflow: hidden; border-radius: 22px; background: #1a1a1f;
    box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
.nb-sc-collage img { width: 100%; height: 100%; object-fit: cover; }
.nb-sc-collage figure:nth-child(1) { left: 0; top: 10%; width: 44%; aspect-ratio: 9 / 14; transform: rotate(-6deg); }
.nb-sc-collage figure:nth-child(2) { left: 30%; top: 0; width: 42%; aspect-ratio: 4 / 5; z-index: 2; transform: rotate(2deg); }
.nb-sc-collage figure:nth-child(3) { right: 0; top: 22%; width: 40%; aspect-ratio: 1; transform: rotate(7deg); }
.nb-sc-collage__chip {
    position: absolute; left: 14%; bottom: 4%; z-index: 3;
    display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px;
    background: #fff; color: var(--nb-ink); font-size: 14px; font-weight: 600; white-space: nowrap;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .6);
}
.nb-sc-collage__chip img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.nb-sc-collage__chip b { font-weight: 800; }
.nb-sc-collage__chip i { padding: 2px 8px; border-radius: 999px; background: var(--nb-accent); font-style: normal; font-size: 12px; font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--nb-ink); }
@media (prefers-reduced-motion: no-preference) {
    .nb-motion .nb-sc-collage figure { animation: nb-sc-in 760ms var(--nb-ease-emph) both; }
    .nb-motion .nb-sc-collage figure:nth-child(1) { --r: -6deg; animation-delay: 80ms; }
    .nb-motion .nb-sc-collage figure:nth-child(2) { --r: 2deg; animation-delay: 0ms; }
    .nb-motion .nb-sc-collage figure:nth-child(3) { --r: 7deg; animation-delay: 160ms; }
    .nb-motion .nb-sc-collage__chip { animation: nb-pg-chip 520ms var(--nb-ease-emph) 700ms both; }
}
@keyframes nb-sc-in { from { opacity: 0; transform: translateY(28px) rotate(0deg); } to { transform: rotate(var(--r)); } }

/* ─── Group-buy cases ─── */
.nb-sc-cases { display: grid; gap: 16px; margin-top: 44px; }
@media (min-width: 900px) { .nb-sc-cases { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.nb-sc-case { display: grid; align-content: start; gap: 14px; }
.nb-sc-case__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-panel); background: var(--nb-mist); }
.nb-sc-case__media img, .nb-sc-case__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nb-sc-case__media video { opacity: 0; transition: opacity 400ms ease; }
.nb-sc-case__media video.is-on { opacity: 1; }
.nb-sc-case__brand {
    position: absolute; left: 14px; top: 14px; z-index: 1;
    padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--nb-ink);
    font: 800 15px/1 var(--nb-display); letter-spacing: -0.02em;
}
.nb-sc-case__play { position: absolute; right: 12px; bottom: 12px; z-index: 1; background: rgba(255, 255, 255, .94); }
.nb-sc-case__meta { font-size: 14px; font-weight: 600; color: var(--nb-ink-3); }
.nb-sc-case p { color: var(--nb-ink-2); }
.nb-sc-case__by { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nb-sc-creator { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; }
.nb-sc-creator img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.nb-sc-creator span { color: var(--nb-ink-3); font-weight: 500; }
.nb-sc-tag { padding: 3px 9px; border-radius: 999px; background: var(--nb-accent); font-size: 12px; font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--nb-ink); }
.nb-motion .nb-sc-cases > [data-reveal] { transition-delay: calc(var(--i, 0) * 90ms); }
@media (hover: hover) {
    .nb-sc-case__media img { transition: transform 700ms var(--nb-ease); }
    .nb-sc-case:hover .nb-sc-case__media img { transform: scale(1.03); }
}

/* ─── Showcase shops: two rows drifting opposite ways on a mist stage ─── */
.nb-sc-shops { background: var(--nb-mist); --mq-bg: var(--nb-mist); }
.nb-sc-shops .nb-cs__head { margin-bottom: 20px; }
.nb-sc-shops .nb-mq + .nb-mq { margin-top: -4px; }

/* Brand page: three case cards in a row, smaller */
.nb-sc-cases--mini { margin-top: 28px; }
.nb-sc-cases--mini .nb-sc-case__media { aspect-ratio: 1; }
.nb-mq-toggle[hidden], .nb-sc-case__play[hidden] { display: none; }
