/* =========================================================================
   REBEL CARS // marketplace.css
   NFT Marketplace info page (body.page-marketplace). Loaded after site.css.
   All copy on this page is verbatim from the live page; structure comes from
   layout, type scale and mono indices only.

   01  Hero
   02  Card icons (two-frame PNG sprites, inline SVGs)
   03  Cards and NFT rows (01)
   04  Revenue and racetrack screenshots (02)
   05  Racetrack rules panels, closing copy (03)
   06  Pit-Girls (04)
   07  Clips and IXOR Labs (05)
   08  Store button
   ========================================================================= */


/* =========================================================================
   01  HERO (text only)
   ========================================================================= */
.mp-hero {
  background:
    radial-gradient(48% 62% at 92% 22%, rgba(232,34,47,.17), transparent 70%),
    radial-gradient(36% 44% at 0% 100%, rgba(232,34,47,.08), transparent 70%);
}
.mp-hero > .rc-outline { right: -18%; top: 46%; width: max(900px, 74vw); }
.mp-hero .rc-pagehero__copy { max-width: none; }
.mp-hero__title {
  max-width: 10em;
  font-size: clamp(2.5rem, 4.9vw, 4.4rem);
  line-height: .96;
}
.mp-hero__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  grid-template-areas:
    "text list"
    "cta  list";
  align-items: start;
  gap: 28px clamp(40px, 6vw, 96px);
  margin-top: clamp(20px, 3vw, 40px);
  padding-top: clamp(28px, 3.4vw, 44px);
  border-top: 1px solid var(--line);
}
.mp-hero__text { grid-area: text; display: grid; gap: 18px; }
.mp-hero__list { grid-area: list; }
.mp-hero__list > li:first-child { border-top-color: var(--line-2); }
.mp-hero__cta { grid-area: cta; margin-top: 8px; }
@media (max-width: 960px) {
  .mp-hero__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "text" "list" "cta";
  }
}

/* Hero car: emerges from the dark to the right of the title (desktop). It is
   taken out of the flow, so the h1 and the intro keep their width; the copy
   and the body paint above it. Small screens: after the store button, modest
   height, full bleed. */
.mp-hero__copy,
.mp-hero__body { position: relative; z-index: 1; }
/* The black studio backdrop drops out (lighten), so the rc outline and the red
   glow behind stay visible. The inner wrapper must not isolate it. */
.mp-hero .rc-pagehero__inner { z-index: auto; }
.mp-hero__car { margin: 0; pointer-events: none; mix-blend-mode: lighten; }
.mp-hero__car img {
  -webkit-mask-image:
    radial-gradient(64% 62% at 52% 44%, #000 52%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 62%, transparent 92%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(64% 62% at 52% 44%, #000 52%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 62%, transparent 92%);
  mask-composite: intersect;
}
.js .mp-hero__car { animation: mp-car-in 1.4s var(--ease) .2s both; }
@keyframes mp-car-in {
  from { opacity: 0; transform: translateX(3%); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 961px) {
  .mp-hero__car {
    position: absolute;
    z-index: 0;
    top: clamp(-72px, -4vw, -32px);
    right: calc(-1 * var(--gutter));
    width: min(60%, 880px);
  }
}
@media (min-width: 1400px) {
  .mp-hero__car { right: calc((var(--wrap) - 100vw) / 2 - var(--gutter) + 2vw); }
}
@media (max-width: 960px) {
  .mp-hero__car { margin: clamp(8px, 3vw, 24px) calc(-1 * var(--gutter)) 0; }
  .mp-hero__car img { aspect-ratio: 16 / 9; max-height: 300px; object-position: 50% 40%; }
}
@media (prefers-reduced-motion: reduce) {
  .js .mp-hero__car { animation: none; }
}


/* =========================================================================
   02  CARD ICONS
   PNG icons are two identical glyphs side by side: the box crops to the
   left glyph (some also have empty space above it). Box ratio = crop w/h;
   the image is scaled so the crop fills the box. Nothing is distorted.
   ========================================================================= */
.mp-icon {
  position: relative;
  display: block;
  flex: none;
  height: 48px;
  color: var(--text);
  overflow: hidden;
}
.mp-icon img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  height: auto;
  width: 200%;
  mix-blend-mode: screen; /* PNG sprites have opaque black backgrounds: screen drops the black */
}
.mp-icon { align-self: flex-start; }
.mp-icon--svg { width: 46px; }
.mp-icon--svg svg { width: 46px; height: 48px; }
/* crop 0,510 800x528 of 2400x1038 */
.mp-icon--fia { aspect-ratio: 800 / 528; }
.mp-icon--fia img { width: 300%; top: -96.59%; }
/* crop 0,790 800x810 of 2391x1600 */
.mp-icon--influence { aspect-ratio: 800 / 810; }
.mp-icon--influence img { width: 298.875%; top: -97.53%; }
/* left halves */
.mp-icon--pitgirls { aspect-ratio: 800 / 538; }
.mp-icon--auction { aspect-ratio: 788 / 800; }
.mp-icon--event { aspect-ratio: 756 / 800; }
.mp-icon--customize { aspect-ratio: 800 / 627; }


/* =========================================================================
   03  CARDS AND NFT ROWS
   ========================================================================= */
.mp-card { gap: 16px; }
.mp-card .mp-icon { margin-bottom: 10px; }
.mp-card .rc-card__title { padding-right: 2.5rem; }
.mp-card p { font-size: 1rem; line-height: 1.6; }
.mp-card .mp-icon + .rc-card__title { padding-top: 18px; border-top: 1px solid var(--line); }
.mp-card:hover .mp-icon--svg,
.mp-card:focus-within .mp-icon--svg { color: #fff; }

.mp-nft {
  margin-top: clamp(48px, 6vw, 88px);
  background: #000;
}
.mp-nft img { height: auto; }
.mp-nft__strip + .mp-nft__strip { border-top: 1px solid var(--line); }
/* Phones: each row of four cards scrolls sideways (about two cards per view),
   snapping to the first and the last pair. Visible scrollbar as the cue; where
   scroll-driven animations exist, a right-edge fade that clears at the end. */
@media (max-width: 720px) {
  .mp-nft__strip {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--red) var(--line-2);
  }
  .mp-nft__strip::-webkit-scrollbar { height: 6px; }
  .mp-nft__strip::-webkit-scrollbar-track { background: var(--line-2); }
  .mp-nft__strip::-webkit-scrollbar-thumb { background: var(--red); }
  .mp-nft__strip img { width: clamp(680px, 200%, 760px); max-width: none; }
  /* Snap targets must be smaller than the view (an oversized image would allow
     free scrolling), so two 1px markers sit at the image's left and right edge. */
  .mp-nft__strip::before,
  .mp-nft__strip::after {
    content: "";
    display: block;
    width: 1px;
    height: 1px;
  }
  .mp-nft__strip::before { margin-bottom: -1px; scroll-snap-align: start; }
  .mp-nft__strip::after { margin: -1px 0 0 calc(clamp(680px, 200%, 760px) - 1px); scroll-snap-align: end; }
  .mp-nft__strip:focus-visible { outline-offset: -2px; }
}
@property --mp-nft-fade {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@keyframes mp-nft-fade { from { --mp-nft-fade: 56px; } 85% { --mp-nft-fade: 56px; } to { --mp-nft-fade: 0px; } }
@supports (animation-timeline: scroll()) {
  @media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
    .mp-nft__strip {
      -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--mp-nft-fade)), transparent);
      mask-image: linear-gradient(90deg, #000 calc(100% - var(--mp-nft-fade)), transparent);
      animation: mp-nft-fade linear both;
      animation-timeline: scroll(self inline);
    }
  }
}


/* =========================================================================
   04  REVENUE + RACETRACK STORE SCREENSHOTS
   The list view sits behind (top left), the track detail view overlaps its
   lower right corner, as on the live page. Stacked on small screens.
   ========================================================================= */
.mp-revenue { --glow-x: 8%; --glow-y: 420px; }
.mp-revenue__head { margin-bottom: 0; }
.mp-revenue__text { display: grid; gap: 28px; }

.mp-tracks {
  position: relative;
  aspect-ratio: 1 / .54;
  margin-top: clamp(56px, 7vw, 104px);
}
.mp-tracks .rc-media { position: absolute; margin: 0; }
.mp-tracks img { height: auto; }
.mp-tracks__list { left: 0; top: 0; width: 50%; background: #000; }
.mp-tracks__detail {
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 68%;
  background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 0 1px var(--line-2);
}
@media (max-width: 720px) {
  .mp-tracks { aspect-ratio: auto; display: grid; gap: 20px; }
  .mp-tracks .rc-media { position: relative; width: 100%; }
  .mp-tracks__list { width: 88%; }
  .mp-tracks__detail { margin-top: -18%; margin-left: auto; width: 92%; }
}


/* =========================================================================
   05  RACETRACK RULES PANELS + ROLE CARDS + CLOSING
   ========================================================================= */
.mp-role__head h2 { max-width: 15em; }
.mp-rules {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 24px;
}
.mp-rules__panel .rc-panel__body { padding-block: clamp(14px, 1.6vw, 22px) clamp(20px, 2.4vw, 32px); }
.mp-rules__panel--a { position: sticky; top: calc(var(--header-h) + 24px); }
.mp-rules__lead {
  padding: 10px 0 16px;
  font-size: clamp(1.1rem, 1.4vw, 1.2rem);
  line-height: 1.5;
  color: var(--text);
}
.mp-rules__list > li:first-child { border-top-color: var(--line-2); }
.mp-rules__panel--a .mp-rules__list > li:first-child { border-top: 0; }
@media (max-width: 960px) {
  .mp-rules { grid-template-columns: minmax(0, 1fr); }
  .mp-rules__panel--a { position: relative; top: auto; }
}

.mp-cards--role { margin-top: clamp(48px, 6vw, 88px); }

.mp-closing {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px clamp(40px, 6vw, 96px);
  margin-top: clamp(56px, 7vw, 104px);
  padding-top: clamp(28px, 3.4vw, 44px);
  border-top: 1px solid var(--line);
}
.mp-closing p:last-child { padding-top: .35em; }
@media (max-width: 960px) {
  .mp-closing { grid-template-columns: minmax(0, 1fr); }
  .mp-closing p:last-child { padding-top: 0; }
}


/* =========================================================================
   06  PIT-GIRLS
   ========================================================================= */
.mp-pit { --glow-x: 92%; --glow-y: 760px; }
.mp-pit__ui { background: #000; }
.mp-pit__ui img { height: auto; }
.mp-pit__split {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  margin-top: clamp(48px, 6vw, 88px);
}
.mp-pit__cards { position: sticky; top: calc(var(--header-h) + 24px); background: #000; }
.mp-pit__cards img { height: auto; }
.mp-pit__text { display: grid; justify-items: start; gap: 20px; }
.mp-pit__text > h2 { margin-bottom: 6px; }
.mp-pit__text > .rc-list { width: 100%; }
.mp-pit__leadin {
  margin-top: 10px;
  font-weight: 500;
  color: var(--text);
}
.mp-pit__cta { margin-top: 12px; }
@media (max-width: 960px) {
  .mp-pit__split { grid-template-columns: minmax(0, 1fr); }
  .mp-pit__cards { position: relative; top: auto; }
}


/* =========================================================================
   07  CLIPS + IXOR LABS
   ========================================================================= */
.mp-clips__kicker { margin-bottom: clamp(28px, 3.4vw, 44px); }
.mp-clips__layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: end;
  gap: 40px clamp(40px, 5vw, 72px);
}
.mp-clips__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mp-clip { background: #000; }
.mp-clip video { aspect-ratio: 9 / 16; height: auto; background: #000; }
.mp-clips__text {
  max-width: 68ch;
  padding-left: 24px;
  border-left: 2px solid var(--red);
}
@media (max-width: 1099px) {
  .mp-clips__layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  /* Horizontally scrollable strip; the strip scrolls, not the page. */
  .mp-clips__row {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(72vw, 300px);
    gap: 16px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 2px var(--gutter) 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    overscroll-behavior-x: contain;
  }
  .mp-clips__row > li { scroll-snap-align: start; }
  .mp-clips__text { padding-left: 18px; }
}


/* =========================================================================
   08  STORE BUTTON (storefront glyph)
   ========================================================================= */
.mp-store svg { width: 22px; height: 20px; }
