/* ==========================================================================
   ACMOBOOK — Homepage Spread Marketplace Hero (two-column)
   Left ~1/3 story · Right ~2/3 unified 3-row marketplace stage
   ========================================================================== */

.acm-home-hero {
  --acm-hero-scroll: 0;
  --acm-mh-card-w: clamp(132px, 11vw, 172px);
  --acm-mh-req-w: clamp(200px, 16vw, 260px);
  --acm-mh-gap: clamp(8px, 0.9vw, 14px);
  --acm-mh-stage-h: clamp(440px, 56vh, 560px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 0;
  padding: clamp(20px, 3.2vw, 40px) 0 clamp(28px, 3.5vw, 48px);
  background:
    radial-gradient(780px 420px at 88% 18%, rgba(99, 91, 255, 0.13), transparent 58%),
    radial-gradient(620px 360px at 12% 82%, rgba(34, 211, 238, 0.09), transparent 55%),
    radial-gradient(520px 300px at 55% 50%, rgba(236, 72, 153, 0.05), transparent 62%),
    linear-gradient(180deg, #F8F7FF 0%, #FFFFFF 52%, #FAFBFF 100%);
  color: #10152B;
}

.acm-home-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.acm-home-hero__glow {
  position: absolute;
  border-radius: 50%;
  opacity: calc(0.85 - (var(--acm-hero-scroll) * 0.2));
}

.acm-home-hero__glow--a {
  width: min(380px, 36vw);
  height: min(380px, 36vw);
  top: -10%;
  right: 4%;
  background: radial-gradient(circle, rgba(99, 91, 255, 0.2), transparent 68%);
}

.acm-home-hero__glow--b {
  width: min(300px, 30vw);
  height: min(300px, 30vw);
  bottom: -8%;
  left: 2%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 70%);
}

.acm-home-hero__glow--c {
  width: min(240px, 24vw);
  height: min(240px, 24vw);
  top: 40%;
  left: 38%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.08), transparent 70%);
}

/* —— Two-column shell —— */
.acm-home-hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: clamp(24px, 3.5vw, 48px);
  width: min(100% - 40px, 1280px);
  margin-inline: auto;
}

.acm-home-hero__content {
  max-width: 420px;
  min-width: 0;
}

.acm-home-hero__copy {
  text-align: left;
}

.acm-home-hero__eyebrow {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(99, 91, 255, 0.1);
  color: #5146E5;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.acm-home-hero__heading {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3.1vw, 2.75rem);
  font-weight: 780;
  letter-spacing: -0.042em;
  line-height: 1.08;
  color: #10152B;
}

.acm-home-hero__accent {
  font-style: normal;
  background: linear-gradient(115deg, #635BFF 0%, #7C5CFF 42%, #22D3EE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.acm-home-hero__lead {
  margin: 0 0 20px;
  max-width: 34rem;
  color: #667085;
  font-size: clamp(0.92rem, 1.15vw, 1.02rem);
  line-height: 1.55;
}

.acm-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.acm-home-hero .acm-btn--primary {
  background: linear-gradient(120deg, #5B4FFF 0%, #4F8CFF 52%, #22D3EE 100%);
  background-size: 160% 100%;
  color: #fff;
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 12px 28px rgba(91, 79, 255, 0.26);
}

.acm-home-hero .acm-btn--primary:hover {
  filter: brightness(1.04);
  background: linear-gradient(120deg, #5B4FFF 0%, #4F8CFF 52%, #22D3EE 100%);
  background-position: 100% 50%;
  transform: translateY(-1px);
}

.acm-home-hero .acm-btn--ghost {
  background: rgba(255, 255, 255, 0.94);
  color: #10152B;
  border-color: rgba(99, 91, 255, 0.22);
  box-shadow: 0 6px 18px rgba(16, 21, 43, 0.05);
}

.acm-home-hero .acm-btn--ghost:hover {
  background: #fff;
  border-color: rgba(99, 91, 255, 0.4);
  color: #5146E5;
}

.acm-home-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.acm-home-hero__chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #E7E8F2;
  background: rgba(255, 255, 255, 0.88);
  color: #475467;
  font-size: 0.72rem;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.acm-home-hero__chip:hover {
  border-color: rgba(99, 91, 255, 0.4);
  color: #5146E5;
  background: #EEF0FF;
}

.acm-home-hero__fallback-note {
  margin: 16px 0 0;
  color: #667085;
  font-size: 0.9rem;
  line-height: 1.5;
}

.acm-home-hero__fallback-note a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  color: #5146E5;
  font-weight: 650;
  text-decoration: none;
}

/* —— Right marketplace —— */
.acm-home-hero__marketplace {
  min-width: 0;
  width: 100%;
}

.acm-marketplace-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  height: var(--acm-mh-stage-h);
  min-height: 400px;
  padding: 8px 0;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.55), rgba(247, 248, 255, 0.35)),
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(99, 91, 255, 0.06), transparent 70%);
  border: 1px solid rgba(99, 91, 255, 0.08);
  box-shadow:
    0 20px 48px rgba(99, 91, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

/* Rows share the stage — tight, connected */
.acm-marketplace-row {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.acm-marketplace-row--talent-top {
  flex: 0 0 31%;
}

.acm-marketplace-row--requirements {
  flex: 0 0 36%;
}

.acm-marketplace-row--talent-bottom {
  flex: 0 0 31%;
}

.acm-marketplace-track {
  display: flex;
  align-items: stretch;
  gap: var(--acm-mh-gap);
  width: max-content;
  height: 100%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  padding-block: 2px;
}

.acm-marketplace-row--empty {
  justify-content: center;
}

.acm-marketplace-row__placeholder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  width: calc(100% - 32px);
  margin-inline: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px dashed rgba(99, 91, 255, 0.28);
  background: rgba(255, 255, 255, 0.75);
  color: #667085;
  text-align: center;
}

.acm-marketplace-row__placeholder p {
  margin: 0;
  font-size: 0.88rem;
}

.acm-marketplace-row__placeholder a {
  color: #5146E5;
  font-weight: 650;
  text-decoration: none;
}

/* —— Cards —— */
.acm-marketplace-card {
  --acm-card-x: 0px;
  --acm-card-y: 0px;
  --acm-card-s: 1;
  --acm-card-o: 1;
  --acm-tilt-x: 0deg;
  --acm-tilt-y: 0deg;
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  text-decoration: none;
  color: inherit;
  transform:
    translate3d(var(--acm-card-x), var(--acm-card-y), 0)
    scale(var(--acm-card-s))
    perspective(800px)
    rotateX(var(--acm-tilt-x))
    rotateY(var(--acm-tilt-y));
  opacity: var(--acm-card-o);
  transform-style: preserve-3d;
  will-change: transform, opacity;
  transition: box-shadow 0.28s ease;
}

.acm-marketplace-card:focus-visible {
  outline: 2px solid #635BFF;
  outline-offset: 3px;
  z-index: 6;
}

.acm-marketplace-card--talent {
  width: var(--acm-mh-card-w);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(231, 232, 242, 0.95);
  box-shadow:
    0 8px 20px rgba(16, 21, 43, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
}

.acm-marketplace-card--talent.is-focused {
  z-index: 5;
  box-shadow:
    0 18px 40px rgba(99, 91, 255, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.acm-marketplace-card__media {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #EEF0FF, #F7F8FF 55%, #E8FBFF);
}

.acm-marketplace-card__media picture,
.acm-marketplace-card__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acm-marketplace-card__media picture {
  height: 100%;
}

.acm-marketplace-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.45s ease;
}

.acm-marketplace-card.is-focused .acm-marketplace-card__media img {
  transform: scale(1.05);
}

.acm-marketplace-card__fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 72px;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: #5146E5;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.7), transparent 50%),
    linear-gradient(145deg, rgba(99, 91, 255, 0.28), rgba(34, 211, 238, 0.18));
}

.acm-marketplace-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #5146E5;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(16, 21, 43, 0.1);
}

.acm-marketplace-card__body {
  display: grid;
  gap: 2px;
  flex: 0 0 auto;
  padding: 8px 9px 10px;
  background: #fff;
}

.acm-marketplace-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #10152B;
  line-height: 1.25;
}

.acm-marketplace-card__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: #667085;
  font-size: 0.68rem;
  line-height: 1.3;
}

.acm-marketplace-card__cat,
.acm-marketplace-card__city {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.acm-marketplace-card__sep {
  opacity: 0.55;
  flex-shrink: 0;
}

.acm-marketplace-card--requirement {
  width: var(--acm-mh-req-w);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 255, 0.94));
  border: 1px solid rgba(99, 91, 255, 0.14);
  box-shadow:
    0 8px 22px rgba(99, 91, 255, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  min-height: 0;
}

.acm-marketplace-card--requirement.is-focused {
  z-index: 5;
  box-shadow:
    0 18px 36px rgba(99, 91, 255, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.acm-marketplace-card__kicker {
  display: inline-flex;
  align-self: flex-start;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.1);
  color: #BE185D;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.acm-marketplace-card--requirement .acm-marketplace-card__title {
  -webkit-line-clamp: 2;
  font-size: 0.84rem;
  line-height: 1.3;
  min-height: 0;
}

.acm-marketplace-card__detail {
  color: #475467;
  font-size: 0.7rem;
  font-weight: 550;
}

.acm-marketplace-card__cta {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5146E5;
  font-size: 0.72rem;
  font-weight: 650;
}

.acm-marketplace-card__cta i {
  transition: transform 0.2s ease;
}

.acm-marketplace-card--requirement:hover .acm-marketplace-card__cta i,
.acm-marketplace-card--requirement.is-focused .acm-marketplace-card__cta i {
  transform: translateX(3px);
}

.acm-home-hero--fallback .acm-home-hero__layout {
  grid-template-columns: 1fr;
  max-width: 640px;
}

.acm-home-hero--fallback .acm-home-hero__content {
  max-width: none;
}

.acm-home-hero--fallback .acm-home-hero__copy {
  text-align: center;
}

.acm-home-hero--fallback .acm-home-hero__actions,
.acm-home-hero--fallback .acm-home-hero__chips {
  justify-content: center;
}

/* —— Wide desktop: cap left column —— */
@media (min-width: 1440px) {
  .acm-home-hero__layout {
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 2.1fr);
  }

  .acm-home-hero__content {
    max-width: 400px;
  }
}

/* —— Tablet —— */
@media (max-width: 1100px) {
  .acm-home-hero {
    --acm-mh-card-w: clamp(118px, 14vw, 148px);
    --acm-mh-req-w: clamp(180px, 22vw, 220px);
    --acm-mh-stage-h: clamp(400px, 52vh, 500px);
    --acm-mh-gap: 8px;
  }

  .acm-home-hero__layout {
    grid-template-columns: minmax(240px, 0.95fr) minmax(0, 1.7fr);
    gap: 20px;
    width: min(100% - 32px, 1280px);
  }

  .acm-home-hero__heading {
    font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  }

  .acm-marketplace-stage {
    border-radius: 22px;
  }
}

@media (max-width: 900px) {
  .acm-home-hero__layout {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 18px;
  }

  .acm-home-hero__content {
    max-width: none;
  }

  .acm-home-hero__copy {
    text-align: center;
  }

  .acm-home-hero__actions,
  .acm-home-hero__chips {
    justify-content: center;
  }

  .acm-home-hero {
    --acm-mh-stage-h: clamp(360px, 48vh, 460px);
    padding: 16px 0 24px;
  }

  .acm-marketplace-stage {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  }
}

/* —— Mobile —— */
@media (max-width: 767.98px) {
  .acm-home-hero {
    --acm-mh-card-w: min(38vw, 138px);
    --acm-mh-req-w: min(62vw, 220px);
    --acm-mh-gap: 8px;
    --acm-mh-stage-h: clamp(340px, 46vh, 420px);
    min-height: 0;
    padding: 12px 0 18px;
  }

  .acm-home-hero__layout {
    width: min(100% - 28px, 1280px);
    gap: 14px;
  }

  .acm-home-hero__heading {
    font-size: clamp(1.65rem, 6.8vw, 2.05rem);
    margin-bottom: 10px;
  }

  .acm-home-hero__lead {
    font-size: 0.9rem;
    margin-bottom: 14px;
  }

  .acm-home-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: 320px;
    margin-inline: auto;
  }

  .acm-home-hero__actions .acm-btn {
    width: 100%;
    min-height: 46px;
  }

  .acm-marketplace-stage {
    gap: 5px;
    padding: 6px 0;
    border-radius: 18px;
    min-height: 320px;
  }

  .acm-marketplace-row--talent-top,
  .acm-marketplace-row--talent-bottom {
    flex: 0 0 30%;
  }

  .acm-marketplace-row--requirements {
    flex: 0 0 38%;
  }

  .acm-marketplace-card--talent {
    border-radius: 14px;
  }

  .acm-marketplace-card__body {
    padding: 7px 8px 8px;
  }

  .acm-marketplace-card__title {
    font-size: 0.74rem;
  }

  .acm-marketplace-card__meta {
    font-size: 0.62rem;
  }

  .acm-marketplace-card--requirement {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .acm-marketplace-card--requirement .acm-marketplace-card__title {
    font-size: 0.78rem;
  }
}

@media (max-width: 429.98px) {
  .acm-home-hero {
    --acm-mh-card-w: min(40vw, 128px);
    --acm-mh-stage-h: clamp(320px, 44vh, 400px);
  }

  .acm-marketplace-card__badge {
    top: 6px;
    left: 6px;
    font-size: 0.52rem;
  }
}

/* Reduced motion */
.acm-home-hero.is-reduced-motion .acm-marketplace-card,
.acm-home-hero.is-reduced-motion .acm-marketplace-track {
  transform: none !important;
  opacity: 1 !important;
}

.acm-home-hero.is-reduced-motion .acm-marketplace-card {
  --acm-card-x: 0px !important;
  --acm-card-y: 0px !important;
  --acm-card-s: 1 !important;
  --acm-tilt-x: 0deg !important;
  --acm-tilt-y: 0deg !important;
}

.acm-home-hero.is-reduced-motion .acm-marketplace-row {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.acm-home-hero.is-reduced-motion .acm-marketplace-row::-webkit-scrollbar {
  display: none;
}

.acm-home-hero.is-reduced-motion .acm-marketplace-track {
  padding-inline: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .acm-home-hero .acm-marketplace-card,
  .acm-home-hero .acm-marketplace-track {
    transition: none !important;
  }

  .acm-home-hero__glow {
    opacity: 0.5;
  }
}
