/* Digital Berries Talent Network: homepage motion layer. Loaded only by index.html.
   Everything is scoped to html.mx, a class db-motion.js adds; without JS, or with reduced motion on, the page is unchanged. */
/* Digital Berries talent site: motion preview layer. Active only while <html> has class "mx". */
@media (prefers-reduced-motion: no-preference) {
  /* 1. Brand collab cards: staggered entrance + cursor spotlight */
  html.mx .collab-card { animation: none; opacity: 0; transform: translateY(34px) scale(.96);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1), box-shadow .25s ease, border-color .25s ease;
    transition-delay: calc(var(--mx-i, 0) * 90ms); }
  html.mx .collab-card.mx-in { opacity: 1; transform: none; }
  html.mx .collab-card.mx-done { transition-delay: 0s; }
  html.mx .collab-card.mx-in:hover { transform: translateY(-6px);
    background-image: radial-gradient(260px circle at var(--mx-x, 50%) var(--mx-y, 50%), rgba(255,184,0,.22), transparent 62%); }
  html.mx .collab-card .collab-apply-link { transition: transform .25s cubic-bezier(.16,1,.3,1); display: inline-block; }
  html.mx .collab-card:hover .collab-apply-link { transform: translateX(5px); }

  /* 2. Section headings: word-by-word reveal */
  html.mx .mx-w { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(2deg); filter: blur(6px);
    transition: opacity .6s ease, transform .7s cubic-bezier(.16,1,.3,1), filter .6s ease; transition-delay: calc(var(--mx-i, 0) * 55ms); }
  html.mx .mx-words.mx-in .mx-w { opacity: 1; transform: none; filter: none; }

  /* 3. Creator showcase cards: 3D tilt, light sweep, stats slide-up */
  html.mx .creator-full-card { animation: none; transform-style: preserve-3d; }
  html.mx .creator-full-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%);
    transform: translateX(-130%); transition: transform .9s cubic-bezier(.16,1,.3,1); }
  html.mx .creator-full-card:hover::after { transform: translateX(130%); }
  html.mx .creator-full-card:hover { transition: transform 120ms ease-out, box-shadow 300ms ease, border-color 300ms ease;
    transform: perspective(900px) rotateX(var(--mx-rx, 0deg)) rotateY(var(--mx-ry, 0deg)) translateY(-8px) scale(1.03); }
  html.mx .creator-full-card:hover .creator-full-img { transform: scale(1.12); transition: transform 1.4s cubic-bezier(.16,1,.3,1); }
  @media (hover: hover) {
    html.mx .creator-full-meta, html.mx .creator-full-actions { opacity: 0; transform: translateY(14px);
      transition: opacity .35s ease, transform .45s cubic-bezier(.16,1,.3,1); }
    html.mx .creator-full-actions { transition-delay: .06s; }
    html.mx .creator-full-card:hover .creator-full-meta, html.mx .creator-full-card:hover .creator-full-actions,
    html.mx .creator-full-card:focus-within .creator-full-meta, html.mx .creator-full-card:focus-within .creator-full-actions { opacity: 1; transform: none; }
  }
}

/* Digital Berries talent site: cinematic hero + pinned scroll story (preview). Active only while <html> has class "mx". */
html:not(.mx) .mxh-wall, html:not(.mx) .mxs { display: none; }

/* ---------- 1. Cinematic hero ---------- */
html.mx main { position: relative; }
html.mx .hero-creatorland { position: relative; z-index: 1; }
.mxh-wall { position: absolute; top: 0; left: 0; right: 0; height: var(--mxh-h, 900px); overflow: hidden; z-index: 0; pointer-events: none;
  animation: mxhIn 2.2s cubic-bezier(.16,1,.3,1) both; }
@keyframes mxhIn { from { opacity: 0; transform: scale(1.18); } to { opacity: 1; transform: none; } }
.mxh-plane { position: absolute; inset: -30% -12%; display: flex; gap: 18px; justify-content: center; transform-origin: 50% 40%;
  transform: perspective(1400px) rotateX(22deg) rotateZ(-9deg) translate3d(calc(var(--mx-px, 0) * -34px), calc(var(--mx-py, 0) * -22px), 0) scale(1.18);
  transition: transform .6s cubic-bezier(.16,1,.3,1); }
.mxh-col { flex: 0 0 190px; animation: mxhUp var(--d, 60s) linear infinite; will-change: transform; }
.mxh-col:nth-child(even) { animation-name: mxhDown; }
.mxh-col img { display: block; width: 190px; height: 270px; object-fit: cover; border-radius: 18px; margin: 0 0 18px; opacity: var(--o, .8); }
.mxh-paused .mxh-col { animation-play-state: paused; }
@keyframes mxhUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes mxhDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.mxh-shade { position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12,13,17,.95) 0%, rgba(12,13,17,.88) 46%, rgba(12,13,17,.40) 74%, rgba(12,13,17,.55) 100%),
              linear-gradient(180deg, rgba(12,13,17,.55) 0%, rgba(12,13,17,0) 30%, rgba(12,13,17,0) 70%, #0C0D11 97%); }
.mxh-light { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(460px circle at var(--mx-lx, 70%) var(--mx-ly, 40%), rgba(255,184,0,.20), transparent 65%); }
.mxh-wall.mxh-lit .mxh-light { opacity: 1; }
@media (max-width: 860px) {
  .mxh-col { flex-basis: 130px; } .mxh-col img { width: 130px; height: 185px; border-radius: 14px; margin-bottom: 12px; } .mxh-plane { gap: 12px; }
  .mxh-shade { background: linear-gradient(180deg, rgba(12,13,17,.42) 0%, rgba(12,13,17,.76) 20%, rgba(12,13,17,.86) 60%, #0C0D11 97%); }
}
/* headline assembles letter by letter */
.mxh-word { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.mxh-l { display: inline-block; }
html.mx .mxh-l { opacity: 0; transform: translateY(108%) rotate(9deg); animation: mxhL .95s cubic-bezier(.16,1,.3,1) forwards; animation-delay: calc(var(--i) * 26ms + .3s); }
@keyframes mxhL { to { opacity: 1; transform: none; } }
.mxh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 2. Pinned scroll story ---------- */
.mxs { position: relative; height: 420vh; background: radial-gradient(900px 500px at 75% 50%, rgba(255,184,0,.07), transparent 70%); }
.mxs-pin { position: sticky; top: 0; height: 100vh; height: 100svh; box-sizing: border-box; max-width: 1160px; margin: 0 auto; padding: 96px 24px 28px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; overflow: hidden; }
.mxs-left h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.08; letter-spacing: -.035em; margin: 8px 0 26px; color: #fff; }
.mxs-steps { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.mxs-steps::before, .mxs-steps::after { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: rgba(255,255,255,.12); }
.mxs-steps::after { background: #FFB800; transform-origin: top; transform: scaleY(var(--p, 0)); box-shadow: 0 0 12px rgba(255,184,0,.6); }
.mxs-steps li { padding: 0 0 22px; opacity: .32; transform: translateX(0); transition: opacity .45s ease, transform .6s cubic-bezier(.16,1,.3,1); }
.mxs-steps li:last-child { padding-bottom: 0; }
.mxs-steps li b { display: block; font-size: 19px; color: #fff; letter-spacing: -.01em; }
.mxs-steps li b i { font-style: normal; color: #FFB800; margin-right: 8px; font-variant-numeric: tabular-nums; }
.mxs-steps li span { display: block; font-size: 14px; color: var(--muted, #9CA3AF); margin-top: 2px; }
.mxs[data-step="0"] .mxs-steps li:nth-child(1), .mxs[data-step="1"] .mxs-steps li:nth-child(2),
.mxs[data-step="2"] .mxs-steps li:nth-child(3), .mxs[data-step="3"] .mxs-steps li:nth-child(4) { opacity: 1; transform: translateX(8px); }

.mxs-stage { width: 100%; height: calc(520px * var(--s, 1)); }
.mxs-box { position: relative; width: 520px; height: 520px; transform-origin: top left; transform: scale(var(--s, 1)); margin-left: calc((100% - 520px * var(--s, 1)) / 2); }
.mxs-box > * { position: absolute; transition: transform .9s cubic-bezier(.16,1,.3,1), opacity .5s ease; }
.mxs-glow { inset: 40px; border-radius: 50%; filter: blur(60px); background: #FFB800; opacity: .10; transition: opacity .8s ease, transform 1.2s ease; }
.mxs[data-step="1"] .mxs-glow { opacity: .16; transform: translate(40px, 30px); }
.mxs[data-step="2"] .mxs-glow { opacity: .14; transform: translate(-30px, 10px); }
.mxs[data-step="3"] .mxs-glow { opacity: .26; transform: scale(1.1); }

.mxs-brief { left: 40px; top: 150px; width: 440px; box-sizing: border-box; transform-origin: top left; padding: 20px 22px; border-radius: 20px;
  background: #14161D; border: 1px solid rgba(255,184,0,.35); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.mxs-brief small { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #000; background: #FFB800; border-radius: 999px; padding: 4px 10px; }
.mxs-brief p { margin: 14px 0 0; min-height: 3.1em; font-size: 20px; line-height: 1.35; color: #fff; font-weight: 600; }
.mxs-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: #FFB800; animation: mxsBlink 1s steps(1) infinite; }
@keyframes mxsBlink { 50% { opacity: 0; } }
.mxs-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mxs-chips span { font-size: 12px; font-weight: 700; color: #D1D5DB; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 5px 11px;
  opacity: 0; transform: translateY(8px) scale(.9); transition: opacity .35s ease, transform .5s cubic-bezier(.16,1,.3,1); }
.mxs-typed .mxs-chips span { opacity: 1; transform: none; }
.mxs-typed .mxs-chips span:nth-child(2) { transition-delay: .08s; } .mxs-typed .mxs-chips span:nth-child(3) { transition-delay: .16s; }
.mxs:not([data-step="0"]) .mxs-brief { transform: translate(-40px, -140px) scale(.66); opacity: .85; }
.mxs[data-step="3"] .mxs-brief { opacity: .35; }

.mxs-cc { left: 185px; top: 232px; width: 150px; border-radius: 18px; background: #1B1E27; border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 18px 44px rgba(0,0,0,.6); opacity: 0; transform: translate(420px, 260px) rotate(24deg) scale(.8); }
.mxs-cc img { display: block; width: 150px; height: 150px; object-fit: cover; border-radius: 17px 17px 0 0; }
.mxs-cc b { display: block; padding: 9px 10px 0; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mxs-cc span { display: block; padding: 1px 10px 10px; font-size: 11px; color: #9CA3AF; }
.mxs-cc em { position: absolute; left: 8px; top: 8px; font-size: 10px; font-weight: 800; line-height: 1; font-style: normal; letter-spacing: .04em; color: #000; background: #FFB800; border-radius: 999px; padding: 5px 8px;
  opacity: 0; transform: scale(.5); transition: opacity .3s ease .45s, transform .5s cubic-bezier(.3,1.6,.5,1) .45s; }
.mxs-cc u { position: absolute; left: 50%; top: calc(100% + 12px); transform: translate(-50%, -14px); text-decoration: none; white-space: nowrap;
  font-size: 13px; font-weight: 800; line-height: 1; color: #000; background: #fff; border-radius: 999px; padding: 8px 12px; opacity: 0; transition: opacity .35s ease, transform .6s cubic-bezier(.16,1,.3,1); }
.mxs:not([data-step="0"]) .mxs-cc { opacity: 1; }
.mxs:not([data-step="0"]) .mxs-cc em { opacity: 1; transform: none; }
.mxs-cc.c2 { transition-delay: .08s; } .mxs-cc.c3 { transition-delay: .16s; }
.mxs[data-step="1"] .mxs-cc.c1 { transform: translate(-150px, 0) rotate(-9deg); }
.mxs[data-step="1"] .mxs-cc.c2 { transform: translate(0, -18px); }
.mxs[data-step="1"] .mxs-cc.c3 { transform: translate(150px, 0) rotate(9deg); }
.mxs[data-step="2"] .mxs-cc.c1 { transform: translate(-168px, -64px); }
.mxs[data-step="2"] .mxs-cc.c2 { transform: translate(0, -64px); }
.mxs[data-step="2"] .mxs-cc.c3 { transform: translate(168px, -64px); }
.mxs[data-step="2"] .mxs-cc u { opacity: 1; transform: translate(-50%, 0); }
.mxs[data-step="2"] .mxs-cc.c2 u { transition-delay: .1s; } .mxs[data-step="2"] .mxs-cc.c3 u { transition-delay: .2s; }
.mxs[data-step="3"] .mxs-cc.c1 { transform: translate(-78px, -104px) rotate(-10deg) scale(.76); }
.mxs[data-step="3"] .mxs-cc.c2 { transform: translate(0, -116px) scale(.82); z-index: 2; }
.mxs[data-step="3"] .mxs-cc.c3 { transform: translate(78px, -104px) rotate(10deg) scale(.76); }

.mxs-label { left: 0; right: 0; top: 122px; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #FFB800; opacity: 0; transform: translateY(10px); }
.mxs[data-step="2"] .mxs-label { opacity: 1; transform: none; }
.mxs-done { left: 0; right: 0; top: 338px; text-align: center; opacity: 0; transform: translateY(24px) scale(.94); pointer-events: none; }
.mxs[data-step="3"] .mxs-done { opacity: 1; transform: none; pointer-events: auto; transition-delay: .25s; }
.mxs-done svg { width: 58px; height: 58px; display: block; margin: 0 auto 8px; }
.mxs-done circle, .mxs-done path { fill: none; stroke: #FFB800; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; transition: stroke-dashoffset .9s cubic-bezier(.16,1,.3,1) .4s; }
.mxs-done path { stroke-dasharray: 40; stroke-dashoffset: 40; transition-delay: .9s; }
.mxs[data-step="3"] .mxs-done circle, .mxs[data-step="3"] .mxs-done path { stroke-dashoffset: 0; }
.mxs-done b { display: block; font-size: 24px; color: #fff; letter-spacing: -.02em; margin-bottom: 12px; }

@media (max-width: 860px) {
  .mxs-pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 14px; padding: 84px 18px 96px; }
  .mxs-stage { align-self: center; }
  .mxs-left h2 { font-size: 26px; margin: 4px 0 12px; }
  .mxs-steps { padding-left: 0; min-height: 52px; }
  .mxs-steps::before, .mxs-steps::after { display: none; }
  .mxs-steps li { display: none; padding: 0; }
  .mxs[data-step="0"] .mxs-steps li:nth-child(1), .mxs[data-step="1"] .mxs-steps li:nth-child(2),
  .mxs[data-step="2"] .mxs-steps li:nth-child(3), .mxs[data-step="3"] .mxs-steps li:nth-child(4) { display: block; transform: none; }
}

/* Digital Berries talent site: premium polish layer (preview). Active only while <html> has class "mx". */
html:not(.mx) .mxp-grain, html:not(.mx) .mxp-progress, html:not(.mx) .mxp-cur { display: none; }

/* film grain: takes the flat digital look off the dark background */
.mxp-grain { position: fixed; inset: 0; z-index: 9990; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* reading progress line */
.mxp-progress { position: fixed; left: 0; top: 0; right: 0; height: 2px; z-index: 10001; pointer-events: none; transform-origin: left; transform: scaleX(var(--mxp-p, 0));
  background: linear-gradient(90deg, #FFB800, #FFE082 60%, #EC4899); box-shadow: 0 0 12px rgba(255,184,0,.7); }

/* nav tightens into frosted glass once you leave the top */
html.mx .site-nav { transition: padding .45s cubic-bezier(.16,1,.3,1), background .45s ease, box-shadow .45s ease, backdrop-filter .45s ease; }
html.mx.mxp-scrolled .site-nav { padding-top: 10px; padding-bottom: 10px; background: rgba(12,13,17,.68); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); box-shadow: 0 12px 40px rgba(0,0,0,.4); }

/* cursor ring (desktop only; the normal pointer stays) */
.mxp-cur { position: fixed; left: 0; top: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; z-index: 10002; pointer-events: none;
  border: 1.5px solid rgba(255,184,0,.75); opacity: 0; display: grid; place-items: center; font-size: 9px; font-weight: 800; letter-spacing: .12em; color: #000;
  transition: opacity .3s ease, width .35s cubic-bezier(.16,1,.3,1), height .35s cubic-bezier(.16,1,.3,1), margin .35s cubic-bezier(.16,1,.3,1), background .3s ease, border-color .3s ease; }
.mxp-cur.on { opacity: 1; }
.mxp-cur.is-link { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(255,184,0,.14); }
.mxp-cur.is-card { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: #FFB800; border-color: #FFB800; }
.mxp-cur span { opacity: 0; transition: opacity .2s ease; }
.mxp-cur.is-card span { opacity: 1; }
@media (hover: none) { .mxp-cur { display: none; } }

/* magnetic primary buttons */
html.mx .mxp-mag { transition: transform .5s cubic-bezier(.16,1,.3,1), background .22s ease, box-shadow .22s ease; will-change: transform; }
html.mx .mxp-mag.mxp-pull { transition: transform .12s ease-out, background .22s ease, box-shadow .22s ease; }

/* creator cards: stats and buttons always visible (overrides the earlier hide-until-hover) */
html.mx .creator-full-meta, html.mx .creator-full-actions { opacity: 1 !important; transform: none !important; }

/* typography polish */
html.mx .hero-title-kinetic { letter-spacing: -.045em; line-height: 1.03; text-wrap: balance; }
html.mx .hero-creatorland > div > p { max-width: 54ch; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.6; color: #C9CDD6; text-wrap: pretty; }
html.mx main h2 { text-wrap: balance; }
html.mx main .eyebrow { font-family: var(--font-kicker, inherit); letter-spacing: .22em; }
html.mx :focus-visible { outline: 2px solid #FFB800; outline-offset: 3px; border-radius: 6px; }
@media (max-width: 480px) { html.mx .rotator-word { font-size: .84em; } } /* keeps the gold rotating word inside the screen */

/* scroll story: less scrolling to get through */
html.mx .mxs { height: 340vh; }

/* hero: one action per audience (brands, creators); the other two buttons repeat what is already on screen */
html.mx .hero-actions-row .home-match-btn, html.mx .hero-actions-row a[href="#talent-showcase"] { display: none; }
