/* ============================================================
   MISFITS — BRANDS page (Figma node 11:2053)
   Extends css/style.css
   Design canvas: 1920px — proportional sizes use vw = px/19.2
   ============================================================ */

/* ---- Mission (brands variant) ---- */
.bmission {
  padding: clamp(10px, 8.5vw, 163px) 0 clamp(10px, 7.3vw, 140px);
}
/* scaled ×1.183 vs the raw frame so the page reads at the same
   visual size as Home/Studios (title 121.9px like Studios) */
.bmission__inner {
  position: relative;
  z-index: 1;
  width: min(1372px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}
.bmission .mission__kicker {
  margin-bottom: clamp(2px, 1.02cqi, 14px);
  font-size: clamp(4px, 1.108cqi, 15.2px);
  letter-spacing: clamp(0.5px, 0.133cqi, 1.82px);
}
.bmission__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8px, 8.885cqi, 121.9px);
  line-height: 1.105;
  letter-spacing: -0.0225em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.bmission__row {
  display: flex;
  min-width: 0;
}
.bmission__row--top {
  align-items: flex-end;
  gap: clamp(2px, 0.729cqi, 10px);
}
.bmission__row--bottom {
  align-items: center;
  gap: clamp(4px, 2.624cqi, 36px);
}
.bmission__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* design: col 881 of 1160 inner (76%) / col 797 of 1160 (68.7%) */
.bmission__col--top { flex: 0 1 76%; }
.bmission__col--bottom { flex: 0 1 68.7%; }
.bmission__titlerow {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.093cqi, 15px);
}
.bmission__bar {
  width: fit-content;
  min-width: 100%;
  padding-right: 0.25em;
}
.bmission__bar--purple { background: var(--purple); }
.bmission__bar--yellow { background: var(--yellow); padding-left: 0.25em; }
.bmission__bar--yellow .bmission__title { color: var(--dark); }
.bmission__subrow {
  display: flex;
  align-items: flex-end;
  gap: clamp(2px, 1.093cqi, 15px);
  margin-top: clamp(2px, 1.093cqi, 15px);
}
.bmission__text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  font-size: clamp(6px, 2.405cqi, 33px);
  line-height: normal;
  color: #fff;
  max-width: 87%;
}
.levelbars {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.948cqi, 13px);
  flex-shrink: 0;
}
.levelbars span:nth-child(1) { width: clamp(1px, 0.437cqi, 6px); }
.levelbars span:nth-child(2) { width: clamp(1px, 0.875cqi, 12px); }
.levelbars span:nth-child(3) { width: clamp(2px, 1.312cqi, 18px); }
.levelbars span:nth-child(4) { width: clamp(2px, 1.749cqi, 24px); }
.levelbars--purple span { background: var(--purple); height: clamp(10px, 6.268cqi, 86px); }
.levelbars--yellow span { background: var(--yellow); height: clamp(16px, 10.787cqi, 148px); }
.bmission__xpurple {
  width: clamp(30px, 23.178cqi, 318px);
  height: auto;
  flex-shrink: 0;
  margin-left: auto;
}
.bmission__swirlyellow {
  width: clamp(40px, 28.207cqi, 387px);
  height: auto;
  flex-shrink: 0;
  margin-left: auto;
}

/* ---- How we play ---- */
.howweplay {
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 38px);
  padding: clamp(14px, 1.15vw, 22px) 16px;
  min-height: clamp(80px, 7.3vw, 141px);
}
.howweplay__stars {
  width: clamp(70px, 8.4vw, 162px);
  height: auto;
}
.howweplay h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5.36vw, 103px);
  line-height: 1.15;
  letter-spacing: -0.0255em;
  text-transform: uppercase;
  color: #000;
  white-space: nowrap;
}
.howweplay h2 em {
  font-style: normal;
  color: var(--purple);
}

/* ---- Standard rules ----
   Band sits 53px (2.76vw) below the strip; decors bleed past its
   edges (hash over the strip above, starburst into the dark below). */
.rules {
  position: relative;
  background: var(--yellow);
  margin-top: clamp(20px, 2.76vw, 53px);
  padding: clamp(20px, 1.35vw, 26px) 24px clamp(120px, 18vw, 345px);
}
.rules__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rules__swirlright {
  position: absolute;
  left: 70.3%;
  top: clamp(-433px, -22.5vw, -150px);
  width: min(56.1vw, 1077px);
  aspect-ratio: 1077 / 1039;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rules__swirlright img {
  width: 63.8%;
  height: auto;
  transform: rotate(55.55deg);
}
.rules__xsplash {
  position: absolute;
  left: -12.1%;
  top: clamp(100px, 11.9vw, 229px);
  width: min(42.8vw, 822px);
  aspect-ratio: 822 / 924;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rules__xsplash img {
  width: 79.3%;
  height: auto;
  transform: rotate(13.86deg);
}
.rules__starburst {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1vw; /* chin touching the band's bottom edge (frame 16:3149) */
  width: min(17.7vw, 339px);
  height: auto;
}
.rules__skull { display: block; aspect-ratio: 339.36 / 334.704; }
/* eyes a bit smaller than the original sockets; JS translates the outer group */
.rules__skull .skull__eye-in {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.82);
}
.rules__content {
  position: relative;
  z-index: 1;
  max-width: 1109px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.rules__kicker {
  font-family: var(--font-dm);
  font-weight: 500;
  font-size: 11.35px;
  letter-spacing: 1.36px;
  text-transform: uppercase;
  text-align: center;
  color: var(--purple-square);
  width: 100%;
}
.rules__cards {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}
.rule {
  width: 343px;
  min-height: 306px;
  border: 6px solid var(--purple);
  background: var(--yellow); /* opaque so edge decors never bleed behind the text */
}
.rule header {
  background: var(--purple);
  padding: 10px 20px 12px;
  min-height: 80px;
  display: flex;
  align-items: center;
}
.rule h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34.35px;
  line-height: 0.911;
  letter-spacing: -1.66px;
  text-transform: uppercase;
  color: #fff;
}
.rule p {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 25.76px;
  line-height: 0.947;
  color: #000;
  padding: 18px 20px 20px;
}
.rules__divider {
  height: 19px;
  background: var(--yellow);
  margin: clamp(24px, 2.6vw, 50px) 0 4px;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .rules__swirlright, .rules__xsplash { display: none; }
  .rules { padding-bottom: clamp(100px, 16vw, 180px); }
  .rules__starburst { bottom: -12px; width: 140px; }
}
@media (max-width: 700px) {
  .howweplay__stars { width: 48px; }
  .rule { width: 100%; max-width: 400px; min-height: 0; border-width: 4px; }
  .rule h3 { font-size: 26px; }
  .rule p { font-size: 19px; line-height: 1.05; }
  .rules__starburst { width: 110px; bottom: -10px; }
  .rules { padding-bottom: 130px; }
}

/* ---- polish: rule card hover (brutalist offset shadow on the yellow band) ---- */
.rule {
  transition: transform .3s ease, box-shadow .3s ease;
}
.rule:hover {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 rgba(10, 10, 16, 0.9);
}

/* ---- swirl box: two masked copies of the art spin in opposite
   directions — inner clockwise, outer counter-clockwise ---- */
.swirlbox {
  position: relative;
  aspect-ratio: 327 / 264;
  border: 7px solid var(--yellow); /* replaces the SVG's two frame rects */
  overflow: hidden;
}
.swirl-layer {
  position: absolute;
  inset: 0;
}
.swirl-layer img {
  width: 100%;
  height: 100%;
}
.swirl-layer--outer {
}
.swirl-layer--outer img { animation: swirl-spin-ccw 26s linear infinite; }
.swirl-layer--inner {
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0 27%, transparent 28%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0 27%, transparent 28%);
}
.swirl-layer--inner img { animation: swirl-spin-cw 14s linear infinite; }
/* scale 1.35 keeps the rotated art covering the box corners (max W/H = 1.24) */
@keyframes swirl-spin-cw {
  from { transform: scale(1.35) rotate(0deg); }
  to   { transform: scale(1.35) rotate(360deg); }
}
@keyframes swirl-spin-ccw {
  from { transform: scale(1.35) rotate(0deg); }
  to   { transform: scale(1.35) rotate(-360deg); }
}

/* ---- X bouncing around its frame, DVD-logo style (two alternating
   axis animations with different periods) ---- */
.xbox {
  position: relative;
  aspect-ratio: 269.045 / 202;
  border: 6px solid var(--purple); /* replaces the SVG's frame rect */
  overflow: hidden;
}
.xbox__drift {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 84%;
  animation: dvd-drift-x 12s linear infinite alternate;
}
.xbox__drift img {
  position: absolute;
  width: 100%;
  height: auto;
  animation: dvd-drift-y 8.5s linear infinite alternate;
}
@keyframes dvd-drift-x { from { left: 0; } to { left: 16%; } }
@keyframes dvd-drift-y { from { top: 0; }  to { top: 15%; } }

@media (prefers-reduced-motion: reduce) {
  .swirl-layer img, .xbox__drift, .xbox__drift img { animation: none; }
}
